diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-08-29 00:33:36 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-08-29 00:33:46 +0200 |
commit | 920f4acadfabb7c426f272f8a57d08276eb1264e (patch) | |
tree | 181ea00e2f79ded515f10afc94efa11849da36dd /tests/ccgbugs | |
parent | 57f0936f2a21bde3cc1b3b42673562e14cdffc2e (diff) | |
download | Nim-920f4acadfabb7c426f272f8a57d08276eb1264e.tar.gz |
fixes #6279
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/t6279.nim | 9 | ||||
-rw-r--r-- | tests/ccgbugs/taddhigh.nim | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/tests/ccgbugs/t6279.nim b/tests/ccgbugs/t6279.nim new file mode 100644 index 000000000..37345d807 --- /dev/null +++ b/tests/ccgbugs/t6279.nim @@ -0,0 +1,9 @@ +discard """ +cmd: "nim c -r -d:fulldebug -d:smokeCycles --gc:refc $file" +output: '''@[a]''' +""" + +# bug #6279 +var foo = newSeq[tuple[a: seq[string], b: seq[string]]]() +foo.add((@["a"], @["b"])) +echo foo[0].a # Crashes on this line diff --git a/tests/ccgbugs/taddhigh.nim b/tests/ccgbugs/taddhigh.nim index d6ac8f650..549eb8caa 100644 --- a/tests/ccgbugs/taddhigh.nim +++ b/tests/ccgbugs/taddhigh.nim @@ -1,5 +1,5 @@ discard """ - output: '''@[5, 5, 5]''' + output: '''@[5, 5, 5, 5, 5]''' """ # bug #1832 @@ -13,4 +13,7 @@ s.add x # Causes the 0 to appear: s.add s[s.high] +s.add s[s.len-1] +s.add s[s.xlen-1] + echo s # @[5, 5, 0] |