source-academy / go-slang

Implementation of Go
Apache License 2.0
0 stars 0 forks source link

Functions that return multiple values at once are not supported #16

Open chengda300 opened 2 weeks ago

chengda300 commented 2 weeks ago

Functions for now can only return a single variable

chengda300 commented 1 week ago

The functions are actually pushing the correct number of return values. However, as the CallInstruction took the compile-time argument length (where functions are assumed to return only 1 value at compile-time), functions that return more than 1 value are counted as only 1 argument instead of the number of return values as argument length.

The following kinds of error surface as a result: