github.com/amarpal/go-tools@v0.0.0-20240422043104-40142f59f616/staticcheck/sa1019/testdata/src/example.com/CheckDeprecated/CheckDeprecated_generics.go (about)

     1  //go:build go1.18
     2  
     3  package pkg
     4  
     5  import pkg "example.com/CheckDeprecatedassist.notstdlib_generics"
     6  
     7  func tpFn() {
     8  	var x pkg.S[int]
     9  	x.Foo()
    10  	x.Bar() //@ diag(`deprecated`)
    11  	x.Baz() //@ diag(`deprecated`)
    12  	x.Qux()
    13  	_ = x.Field1
    14  	_ = x.Field2 // This should be flagged, but see issue 1215
    15  }