diff options
author | Clyybber <darkmine956@gmail.com> | 2019-09-28 19:50:20 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-09-28 19:50:20 +0200 |
commit | 85db42ad8c1a19ea47bd5826d8639e8974cc9042 (patch) | |
tree | 5d00473b4dbf1caeacddcc8a0b14467523c5e630 /tests/vm/teval1.nim | |
parent | 5a65243e14773fc0d96bfd70429056dc5161df7f (diff) | |
download | Nim-85db42ad8c1a19ea47bd5826d8639e8974cc9042.tar.gz |
Fixes #10514 (#12268)
* Fixes #10514 (cherry picked from commit f6f789bb4db2a367384ba6ad75706edd503de1f8) * Add comment * Add changelog entry
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 |