golang.org/x/tools@v0.21.0/internal/refactor/inline/testdata/err-basic.txtar (about)

     1  Basic errors:
     2  - Inlining of generic functions is not yet supported.
     3  
     4  We can't express tests for the error resulting from inlining a
     5  conversion T(x), a call to a literal func(){}(), a call to a
     6  func-typed var, or a call to an interface method, since all of these
     7  cause the test driver to fail to locate the callee, so
     8  it doesn't even reach the Indent function.
     9  
    10  -- go.mod --
    11  module testdata
    12  go 1.12
    13  
    14  -- a/generic.go --
    15  package a
    16  
    17  func _() {
    18  	f[int]() //@ inline(re"f", re"type parameters are not yet supported")
    19  }
    20  
    21  func f[T any]() {}
    22  
    23  -- a/nobody.go --
    24  package a
    25  
    26  func _() {
    27  	g() //@ inline(re"g", re"has no body")
    28  }
    29  
    30  func g()