Source file test/codegen/ifaces.go

     1  // asmcheck
     2  
     3  // Copyright 2022 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  package codegen
     8  
     9  type I interface { M() }
    10  
    11  func NopConvertIface(x I) I {
    12          // amd64:-`.*runtime.convI2I`
    13  	return I(x)
    14  }
    15  
    16  func NopConvertGeneric[T any](x T) T {
    17          // amd64:-`.*runtime.convI2I`
    18          return T(x)
    19  }
    20  
    21  var NopConvertGenericIface = NopConvertGeneric[I]
    22  

View as plain text