Open
Description
Consider the following snippet:
package main
var ok = false
func f() func(int, int) {
ok = true
return func(int, int) {}
}
func g() (int, int) {
if !ok {
panic("Bad order!")
}
return 0, 0
}
func main() {
f()(g())
}
In it, the f()(g())
should be equivalent to:
funExpr := f()
a, b := g()
funExpr(a, b)
However, in GopherJS it is:
a, b := g()
funExpr := f()
funExpr(a, b)
https://gopherjs.github.io/playground/#/FMGNfOX9RA
https://go.dev/play/p/DGqo4zOvkUM
The bug is here:
Line 119 in e76f823