Open theclapp opened 1 month ago
Sometimes the problem is in assigning to pkg.J
, sometimes it's with passing pkg.J
to a function. It's like Yaegi decides (in the cfg code, maybe?) that pkg.J
is a constant, evaluates it once at compile-time, and doesn't later re-evaluate it when it should (at run-time). The use of *&pkg.J
gets around that.
The following test case in
interp/interp_eval_test.go
triggers an unexpected resultExpected result
Got
Yaegi Version
381e045
Additional Notes
Related: #1623 .
Obviously I changed
assertEval
to useErrorf
instead ofFatalf
.