interp: fix fieldName method parsing embedded + generic fields

Fix https://github.com/traefik/yaegi/issues/1571
This commit is contained in:
bysir
2023-07-01 18:58:05 +08:00
committed by GitHub
parent 75e5f99bc5
commit c10e468d01
2 changed files with 22 additions and 0 deletions

View File

@@ -1230,6 +1230,8 @@ func fieldName(n *node) string {
return fieldName(n.child[1])
case starExpr:
return fieldName(n.child[0])
case indexExpr:
return fieldName(n.child[0])
case identExpr:
return n.ident
default: