compiler: handle void call to recover()

Other builtins such as `len` and `make` can be ignored,
because not-assigning `make` result is catched by parser.
This commit is contained in:
Evgenii Stratonikov 2020-09-02 15:20:11 +03:00
parent 7d61a567d5
commit 3d8c7af66c
2 changed files with 5 additions and 3 deletions

View file

@ -128,8 +128,8 @@ func TestRecover(t *testing.T) {
return h() + a
}
func h() int {
defer func() { a += 2; _ = recover() }()
defer func() { a *= 3; _ = recover(); panic("again") }()
defer func() { a += 2; recover() }()
defer func() { a *= 3; recover(); panic("again") }()
a = 1
panic("msg")
return a