mirror of
https://github.com/golang/go
synced 2024-11-11 12:49:30 +00:00
4f8bc6224b
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>
24 lines
292 B
Go
24 lines
292 B
Go
// run
|
|
|
|
// Copyright 2022 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
type I interface {
|
|
M()
|
|
}
|
|
|
|
type S struct {
|
|
}
|
|
|
|
func (*S) M() {
|
|
}
|
|
|
|
func main() {
|
|
func() {
|
|
I(&S{}).M()
|
|
}()
|
|
}
|