interp/type.go
can return a nil
value (and no error, either) in nodetype2
, which causes a panic
#1636
Labels
bug
Something isn't working
The following program
sample.go
triggers an unexpected resultExpected result
Error
Got
panic
Yaegi Version
381e045
Additional Notes
I'm having a hard time reproducing this at the moment, but the
t == nil
line in the below snippet frominterp/type.go
allows returning anil
value fromnodetype2
, which lots of places use without checking if it'snil
(including right insidenodetype2
), which causes a panic:yaegi/interp/type.go
Lines 1119 to 1127 in 381e045
I suspect that me hitting this case was a result of using Yaegi incorrectly (possibly from using
ImportUsed
but not actually importing those packages in the Eval'ed code), which I'm not doing any more, which is why I'm not seeing it, but I feel like thet == nil
case should clearly at least return an error.The text was updated successfully, but these errors were encountered: