mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 03:14:08 +00:00
added test case for #3736
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user