diff options
author | metagn <metagngn@gmail.com> | 2023-09-01 09:59:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-01 08:59:48 +0200 |
commit | 53d9fb259fc7d36660be20be0a199625ef126376 (patch) | |
tree | 8668e07ec4f3a7329fd1b192fa014c4a0ef72a5a /tests | |
parent | affd3f78587f1b18a8b4bc2fc51967cd55cb7531 (diff) | |
download | Nim-53d9fb259fc7d36660be20be0a199625ef126376.tar.gz |
don't update const symbol on const section re-sems (#22609)
fixes #19849
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vm/tconstresem.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/vm/tconstresem.nim b/tests/vm/tconstresem.nim new file mode 100644 index 000000000..4526cb891 --- /dev/null +++ b/tests/vm/tconstresem.nim @@ -0,0 +1,10 @@ +block: # issue #19849 + type + Vec2[T] = object + x, y: T + Vec2i = Vec2[int] + template getX(p: Vec2i): int = p.x + let x = getX: + const t = Vec2i(x: 1, y: 2) + t + doAssert x == 1 |