diff --git a/tests/ccgbugs/tunsafeaddr.nim b/tests/ccgbugs/tunsafeaddr.nim index 518e05b258..8d0a9d8cb5 100644 --- a/tests/ccgbugs/tunsafeaddr.nim +++ b/tests/ccgbugs/tunsafeaddr.nim @@ -16,4 +16,13 @@ proc main = let foo = [8, 3, 1] echo sum(unsafeAddr foo[0], foo.len) + +# bug #3736 + +proc p(x: seq[int]) = discard x[0].unsafeAddr # works +proc q(x: seq[SomeInteger]) = discard x[0].unsafeAddr # doesn't work + +p(@[1]) +q(@[1]) + main()