Closed hesining closed 1 year ago
Th same program in a script sample.go
works ok:
package main
func main() {
var cc interface{}
cc = 1
dd := cc.(int)
println(dd)
}
$ yaegi ./sample.go
1
The difference is that Eval()
is called multiple times in your case instead of one.
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
v0.15.1
Additional Notes
Is the problem caused by type conversion and assignment at the same time ?