Skip to content

Commit

Permalink
also fixes nim-lang#4990
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Aug 25, 2024
1 parent 7b29c2b commit 67dfc15
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/proc/tstaticsignature.nim
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ block: # tyStatic and tyFromExpr instantiation mid-match
foo(Foo[1]([1]), Foo[3]([1, 2, 3]))
foo2(Foo[1]([1]), Foo[4]([1, 2, 3, 4]))

block: # issue #4990
type Foo[I: static[int], A: static[array[I, int]]] = object
curIndex: int

proc next[I: static[int], A: static[array[I, int]]](f: Foo[I, A]): string =
discard
const arr = [1, 2, 3]
var f: Foo[arr.len, arr]
discard next(f)

when false: # issue #22607, needs nkWhenStmt to be handled like nkRecWhen
proc test[x: static bool](
t: (
Expand Down

0 comments on commit 67dfc15

Please sign in to comment.