Files
Nim/tests/generics/t12938.nim
Bung d53a89e453 fix #12938 index type of array in type section without static (#20529)
* fix #12938 nim compiler assertion fail when literal integer is passed as template argument for array size

* use new flag tfImplicitStatic

* fix

* fix #14193

* correct tfUnresolved add condition

* clean test
2023-08-09 12:45:43 +02:00

10 lines
229 B
Nim

type
ExampleArray[Size, T] = array[Size, T]
var integerArray: ExampleArray[32, int] # Compiler crash!
doAssert integerArray.len == 32
const Size = 2
var integerArray2: ExampleArray[Size, int]
doAssert integerArray2.len == 2