diff options
Diffstat (limited to 'src/cmd/compile/internal/types2/builtins.go')
-rw-r--r-- | src/cmd/compile/internal/types2/builtins.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types2/builtins.go b/src/cmd/compile/internal/types2/builtins.go index a3e1981af6..f3763862ec 100644 --- a/src/cmd/compile/internal/types2/builtins.go +++ b/src/cmd/compile/internal/types2/builtins.go @@ -578,6 +578,11 @@ func (check *Checker) builtin(x *operand, call *syntax.CallExpr, id builtinId) ( x.mode = value } + // Use the final type computed above for all arguments. + for _, a := range args { + check.updateExprType(a.expr, x.typ, true) + } + if check.recordTypes() && x.mode != constant_ { types := make([]Type, nargs) for i := range types { |