diff options
Diffstat (limited to 'tests/generics/tlateboundstatic.nim')
-rw-r--r-- | tests/generics/tlateboundstatic.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/generics/tlateboundstatic.nim b/tests/generics/tlateboundstatic.nim new file mode 100644 index 000000000..f68f95f8d --- /dev/null +++ b/tests/generics/tlateboundstatic.nim @@ -0,0 +1,16 @@ +discard """ + msg: "array[0..3, int]" +""" + +type + KK[I: static[int]] = object + x: array[I, int] + +proc foo(a: static[string]): KK[a.len] = + result.x[0] = 12 + +var x = foo "test" + +import typetraits +static: echo x.x.type.name + |