}
}
+ if got, want := count(n.List), count(rl); got != want {
+ // order should have rewritten multi-value function calls
+ // with explicit OAS2FUNC nodes.
+ Fatalf("expected %v return arguments, have %v", want, got)
+ }
+
if samelist(rl, n.List) {
// special return in disguise
n.List = nil
break
}
- if count(n.List) == 1 && count(rl) > 1 {
- // OAS2FUNC in disguise
- f := n.List.N
-
- if f.Op != OCALLFUNC && f.Op != OCALLMETH && f.Op != OCALLINTER {
- Fatalf("expected return of call, have %v", f)
- }
- n.List = concat(list1(f), ascompatet(n.Op, rl, &f.Type, 0, &n.Ninit))
- break
- }
-
// move function calls out, to make reorder3's job easier.
walkexprlistsafe(n.List, &n.Ninit)