diff options
author | Araq <rumpf_a@web.de> | 2017-12-08 10:06:20 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-12-08 10:06:20 +0100 |
commit | eae1aaa37728578bf93263b0ca24064a31ca4b16 (patch) | |
tree | c90ecc0070f5024255684d8bfc7c112bcda555ec /tests/ccgbugs/tuple_canon.nim | |
parent | 00a230e5d86598f37fb2708bae97c7ab1c0ebe0e (diff) | |
download | Nim-eae1aaa37728578bf93263b0ca24064a31ca4b16.tar.gz |
fixes another sighashes problem
Diffstat (limited to 'tests/ccgbugs/tuple_canon.nim')
-rw-r--r-- | tests/ccgbugs/tuple_canon.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ccgbugs/tuple_canon.nim b/tests/ccgbugs/tuple_canon.nim index 45fed8eee..1a4a4d611 100644 --- a/tests/ccgbugs/tuple_canon.nim +++ b/tests/ccgbugs/tuple_canon.nim @@ -85,3 +85,16 @@ proc go() = echo "vidx ", $vidx(hg, 1, 2, hiC) go() + +# another sighashes problem: In tuples we have to ignore ranges. + +type + Position = tuple[x, y: int16] + n16 = range[0'i16..high(int16)] + +proc print(pos: Position) = + echo $pos.x, ",", $pos.y + +var x = 0.n16 +var y = 0.n16 +print((x, y)) |