Skip to content

Commit 4e94ff0

Browse files
authored
Don't use 1.22 features (types.Unalias) (#120)
* Don't use 1.22 features * fix comment
1 parent 1164965 commit 4e94ff0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/checkers/printf/printf.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ func isFormatter(typ types.Type) bool {
213213
types.Identical(sig.Params().At(1).Type(), types.Typ[types.Rune])
214214
}
215215

216-
// isTypeParam reports whether t is a type parameter (or an alias of one).
216+
// isTypeParam reports whether t is a type parameter.
217217
func isTypeParam(t types.Type) bool {
218-
_, ok := types.Unalias(t).(*types.TypeParam)
218+
_, ok := t.(*types.TypeParam)
219219
return ok
220220
}
221221

@@ -224,7 +224,7 @@ func isTypeParam(t types.Type) bool {
224224
// This function avoids allocating the concatenation of "pkg.Name",
225225
// which is important for the performance of syntax matching.
226226
func isNamedType(t types.Type, pkgPath string, names ...string) bool {
227-
n, ok := types.Unalias(t).(*types.Named)
227+
n, ok := t.(*types.Named)
228228
if !ok {
229229
return false
230230
}

0 commit comments

Comments
 (0)