diff options
Diffstat (limited to 'tests/vm/teval1.nim')
-rw-r--r-- | tests/vm/teval1.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/vm/teval1.nim b/tests/vm/teval1.nim index 5c323f0e7..0316ea238 100644 --- a/tests/vm/teval1.nim +++ b/tests/vm/teval1.nim @@ -25,3 +25,18 @@ doAssert x == "" static: var i, j: set[int8] = {} var k = i + j + +type + Obj = object + x: int + +converter toObj(x: int): Obj = Obj(x: x) + +# bug #10514 +block: + const + b: Obj = 42 + bar = [b] + + let i_runtime = 0 + doAssert bar[i_runtime] == b |