Updates golang/go#68796
Change-Id: I5bfa80216deff76fd9aabe9882f93fbfaebef957
Reviewed-on: https://go-review.googlesource.com/c/go/+/610737
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
}
fmt.Printf("%s\n", T1{&T2{"x"}}) // ERROR "Printf format %s has arg T1{&T2{.x.}} of wrong type .*print\.T1"
}
+
+// Regression test for #68796: materialized aliases cause printf
+// checker not to recognize "any" as identical to "interface{}".
+func printfUsingAnyNotEmptyInterface(format string, args ...any) {
+ _ = fmt.Sprintf(format, args...)
+}
+func _() {
+ printfUsingAnyNotEmptyInterface("%s", 123) // ERROR "wrong type"
+}