You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// I use the "compile" mode, so still go ./sample.go
panic: reflect.Set: value of type interface {} is not assignable to type main.Super
goroutine 1 [running]:
reflect.Value.assignTo({0x100bbe1a0?, 0x14000110ca0?, 0x140000295a8?}, {0x100b34f3b, 0xb}, 0x100bc48c0, 0x0)
Yaegi Version
0.16.1
Additional Notes
The behavior in the above case is really strange, I tried the following variants, they all worked..
In the internal closure, if I add a parameter name, i.e.
from
returnfunc (any) (any)
to
returnfunc (aany) (any)
Then it works fine, I don't understand..
If I remove the "import" part, and just use builtin type, it also worked. BUT when i add an an "anonymous" assignment, it breaks again..
v, err:=i.Eval(` func Playing1() func(any) (any) { return func(any) (any) { _ = 1 // without this statement, it works return 1 } }`)
The text was updated successfully, but these errors were encountered:
The following program
sample.go
triggers an unexpected resultExpected result
finished
Got
// I use the "compile" mode, so still go ./sample.go
Yaegi Version
0.16.1
Additional Notes
The behavior in the above case is really strange, I tried the following variants, they all worked..
from
to
Then it works fine, I don't understand..
The text was updated successfully, but these errors were encountered: