Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gnolang): make Go2Gno return a prespective error instead of sudde…
…n/elusive runtime panic with a bad receiver (#3733) The pattern: ```go func() A() ``` confuses Go into expecting a receiver and it returns a compile time error "missing receiver", but previously Gno panicked with a runtime error due to a deference yet the Recv.List was empty. This change fixes that by detecting that condition and prescriptively panicking which can then be relayed reasonably as expecting to the calling user. Fixes #3727 --------- Co-authored-by: Morgan Bazalgette <[email protected]>
- Loading branch information