mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-30 18:41:45 +00:00
don't update const symbol on const section re-sems (#22609)
fixes #19849
(cherry picked from commit 53d9fb259f)
This commit is contained in:
10
tests/vm/tconstresem.nim
Normal file
10
tests/vm/tconstresem.nim
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user