go/test/typeparam/issue49538.go
Cuong Manh Le b1b6d928bd cmd/compile: fix missing transformEarlyCall for OXDOT in subster.node
Like OFUNCINST, in case of OXDOT call expression, the arguments need
to be transformed earlier, so any needed CONVIFACE nodes are exposed.

Fixes #49538

Change-Id: I275ddf6f53a9cadc8708e805941cdf7bdffabba9
Reviewed-on: https://go-review.googlesource.com/c/go/+/363554
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2021-11-12 18:57:22 +00:00

24 lines
342 B
Go

// compile -G=3
// Copyright 2021 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 p
type I interface {
M(interface{})
}
type a[T any] struct{}
func (a[T]) M(interface{}) {}
func f[T I](t *T) {
(*t).M(t)
}
func g() {
f(&a[int]{})
}