Commit graph

6 commits

Author SHA1 Message Date
Anna Shaleva
9b9d72937b compiler: restrict return values count for manifest methods
Exported functions from main package shouldn't have more than one return
value.
2022-08-17 15:42:56 +03:00
Anna Shaleva
f8d5c40928 compiler: do not DROP return value with type assertion
The same problem as with IF. Example:

```
func foo() interface{} {
    ...
}

func Main() int{} {
   return foo().(int)    <--- panic here
}
```
2020-10-13 19:14:44 +03:00
Evgenii Stratonikov
b0a89e8a1a compiler: support named returns 2020-05-06 18:22:52 +03:00
Evgenii Stratonikov
bfcb1a409f compiler: extend possible returned values
All integer values (int32, uint64...) should be able to be returned.
2020-04-28 16:44:06 +03:00
Evgenii Stratonikov
8b922c057c compiler: fix a bug with assignment to underscore
When using underscore it does not appear in the list
of local variables, so it can't be assigned.
In this commit the value is dropped.
2020-01-29 17:07:55 +03:00
Evgenii Stratonikov
f4571ba8cf compiler: implement multiple return support 2019-12-24 16:46:43 +03:00