Open runsisi opened 5 months ago
the patch below fixes the segfault, but i am not sure if it's the right fix.
diff --git a/interp/type.go b/interp/type.go
index b322045..b533636 100644
--- a/interp/type.go
+++ b/interp/type.go
@@ -829,6 +829,8 @@ func nodeType2(interp *Interpreter, sc *scope, n *node, seen []*node) (t *itype,
switch lt.cat {
case arrayT, mapT, sliceT, variadicT:
t = lt.val
+ case valueT:
+ t = valueTOf(lt.rtype.Elem())
case genericT:
t1, err := nodeType2(interp, sc, n.child[1], seen)
if err != nil {
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
c828692c0b
Additional Notes
No response