diff options
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/tsimpleglobals.nim | 16 | ||||
-rw-r--r-- | tests/vm/twrongconst.nim | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/vm/tsimpleglobals.nim b/tests/vm/tsimpleglobals.nim new file mode 100644 index 000000000..27bfdce50 --- /dev/null +++ b/tests/vm/tsimpleglobals.nim @@ -0,0 +1,16 @@ +discard """ + msg: "abc xyz bb" +""" + +# bug #2473 +type + Test = tuple[a,b: string] + +static: + var s:seq[Test] = @[(a:"a", b:"b")] + s[0] = (a:"aa", b:"bb") + + var x: Test + x.a = "abc" + x.b = "xyz" + echo x.a, " ", x.b, " ", s[0].b diff --git a/tests/vm/twrongconst.nim b/tests/vm/twrongconst.nim index 68ab2757c..424ed080e 100644 --- a/tests/vm/twrongconst.nim +++ b/tests/vm/twrongconst.nim @@ -1,6 +1,6 @@ discard """ errormsg: "cannot evaluate at compile time: x" - line: 9 + line: 7 """ var x: array[100, char] |