mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-30 18:41:45 +00:00
fixes #6279
This commit is contained in:
9
tests/ccgbugs/t6279.nim
Normal file
9
tests/ccgbugs/t6279.nim
Normal file
@@ -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
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user