1 // Copyright 2021 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package p 6 7 type Mer interface { M() } 8 9 func F[T Mer](p *T) { 10 p.M /* ERROR "p.M undefined" */ () 11 } 12 13 type MyMer int 14 15 func (MyMer) M() {} 16 17 func _() { 18 F(new(MyMer)) 19 F[Mer](nil) 20 } 21