You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
QF1011, ST1023: the type isn't redundant for uninstantiated generic rhs #1673
$ staticcheck -checks ST1023 ./...
st.go:9:8: should omit type func(string) string from declaration; it will be inferred from the right-hand side (ST1023)
After applying the suggestion (var f = t.M):
$ go build ./...
./st.go:9:10: cannot use generic function t.M without instantiation
Activity
far4599 commentedon Sep 24, 2026
The same false positive happens with a method value of a generic method (Go 1.27),
where the suggested fix does not compile either:
After applying the suggestion (
var f = t.M):staticcheck 2026.2.1 (0.8.1), go1.27.0 darwin/arm64.