diff options
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/tuple_canon.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ccgbugs/tuple_canon.nim b/tests/ccgbugs/tuple_canon.nim index 1a4a4d611..7e9e91836 100644 --- a/tests/ccgbugs/tuple_canon.nim +++ b/tests/ccgbugs/tuple_canon.nim @@ -98,3 +98,18 @@ proc print(pos: Position) = var x = 0.n16 var y = 0.n16 print((x, y)) + + +# bug #6889 +proc createProgressSetterWithPropSetter[T](setter: proc(v: T)) = discard + +type A = distinct array[4, float32] +type B = distinct array[3, float32] + +type Foo[T] = tuple + setter: proc(v: T) + +proc getFoo[T](): Foo[T] = discard + +createProgressSetterWithPropSetter(getFoo[A]().setter) +createProgressSetterWithPropSetter(getFoo[B]().setter) |