This also provides the initial steps towards support for type class "filtered" type inference fixes an "ordinal type expected" ICE, related to the use of static params
10 lines
157 B
Nim
10 lines
157 B
Nim
import typetraits
|
|
|
|
type
|
|
Vec[N: static[int]; T] = distinct array[N, T]
|
|
|
|
var x = Vec([1, 2, 3])
|
|
|
|
static:
|
|
assert x.type.name == "Vec[static[int](3), int]"
|
|
|