diff options
author | Matthew Dempsky <mdempsky@google.com> | 2022-12-14 11:48:02 -0800 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2022-12-14 20:37:17 +0000 |
commit | 4f8bc6224b64bf7149a03678ab5448830e7df80d (patch) | |
tree | c4e2e04196d100b5bdd7915094eba261088a100f /src/cmd/compile/internal/devirtualize/devirtualize.go | |
parent | 5c682f94c6b465f75b3e638ecff77adaf87aabb2 (diff) | |
download | go-git-4f8bc6224b64bf7149a03678ab5448830e7df80d.tar.gz |
cmd/compile: desugar OCALLMETH->OCALLFUNC within devirtualization
Devirtualization can turn OCALLINTER into OCALLMETH, but then we want
to actually desugar into OCALLFUNC instead for later phases. Just
needs a missing call to typecheck.FixMethodCall.
Fixes #57309.
Change-Id: I331fbd40804e1a370134ef17fa6dd501c0920ed3
Reviewed-on: https://go-review.googlesource.com/c/go/+/457715
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/devirtualize/devirtualize.go')
-rw-r--r-- | src/cmd/compile/internal/devirtualize/devirtualize.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/devirtualize/devirtualize.go b/src/cmd/compile/internal/devirtualize/devirtualize.go index 7350a6f171..554e935c3e 100644 --- a/src/cmd/compile/internal/devirtualize/devirtualize.go +++ b/src/cmd/compile/internal/devirtualize/devirtualize.go @@ -152,4 +152,7 @@ func Call(call *ir.CallExpr) { default: call.SetType(ft.Results()) } + + // Desugar OCALLMETH, if we created one (#57309). + typecheck.FixMethodCall(call) } |