traefik / yaegi

Yaegi is Another Elegant Go Interpreter
https://pkg.go.dev/github.com/traefik/yaegi
Apache License 2.0
6.78k stars 341 forks source link

interp: fix mismatch assign statement panic #1607

Open chikaku opened 5 months ago

chikaku commented 5 months ago

Follow by the Spec:

The number of operands on the left hand side must match the number of values. For instance, if f is a function returning two values x, y = f() assigns the first value to x and the second to y.

In the second form, the number of operands on the left must equal the number of expressions on the right, each of which must be single-valued, and the nth expression on the right is assigned to the nth operand on the left.

Fixes #1606

CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.