Source file src/internal/types/testdata/fixedbugs/issue41176.go

     1  // Copyright 2023 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 S struct{}
     8  
     9  func (S) M() byte {
    10  	return 0
    11  }
    12  
    13  type I[T any] interface {
    14  	M() T
    15  }
    16  
    17  func f[T any](x I[T]) {}
    18  
    19  func _() {
    20  	f(S{})
    21  }
    22  

View as plain text