source-academy / go-slang

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

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

Closed chengda300 closed 1 month ago

chengda300 commented 2 months ago

Functions for now can only return a single variable

chengda300 commented 1 month 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: