From 83e0e32f934a47eeab661288cb3d63a7258ec06f Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 30 Jan 2016 17:17:28 +0100 Subject: [PATCH] added test case for #3736 --- tests/ccgbugs/tunsafeaddr.nim | 9 +++++++++ 1 file changed, 9 insertions(+) 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()