mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-16 08:04:20 +00:00
fixes #25008
It seems that `semOverloadedCall` evaluates the same node twice using
`tryConstExpr` in order for `efExplain` to print all the diagnostic
output. The problem is that `tryConstExpr` has side effects, i.e., it
changes the slot index of variables after VM execution.
(cherry picked from commit 130eac2f93)
This commit is contained in:
@@ -813,3 +813,9 @@ static:
|
||||
conf = defaultConf # removing this results in the expected output
|
||||
conf.val = 2
|
||||
foo2323(defaultConf)
|
||||
|
||||
|
||||
proc g1314(_: static bool) = discard
|
||||
proc g1314(_: int) = discard
|
||||
proc y1314() = g1314((; let k = 0; k))
|
||||
y1314()
|
||||
|
||||
Reference in New Issue
Block a user