We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 024c900 commit 6519aa9Copy full SHA for 6519aa9
src/cmd/vet/testdata/print/print.go
@@ -678,3 +678,12 @@ func PointersToCompoundTypes() {
678
}
679
fmt.Printf("%s\n", T1{&T2{"x"}}) // ERROR "Printf format %s has arg T1{&T2{.x.}} of wrong type .*print\.T1"
680
681
+
682
+// Regression test for #68796: materialized aliases cause printf
683
+// checker not to recognize "any" as identical to "interface{}".
684
+func printfUsingAnyNotEmptyInterface(format string, args ...any) {
685
+ _ = fmt.Sprintf(format, args...)
686
+}
687
+func _() {
688
+ printfUsingAnyNotEmptyInterface("%s", 123) // ERROR "wrong type"
689
0 commit comments