unused/testdata/src/example.com/instantiated-functions/instantiated-functions.go
raw| 1 | package pkg |
| 2 | |
| 3 | // https://staticcheck.dev/issues/1199 |
| 4 | |
| 5 | type c1 struct{} //@ used("c1", false) |
| 6 | |
| 7 | func Fn[T any]() {} //@ used("Fn", true), used("T", true) |
| 8 | |
| 9 | func uncalled() { //@ used("uncalled", false) |
| 10 | Fn[c1]() |
| 11 | } |
| 12 | |
| 13 | type c2 struct{} //@ used("c2", true) |
| 14 | |
| 15 | func Called() { //@ used("Called", true) |
| 16 | Fn[c2]() |
| 17 | } |