package main
func main()() {
printf("%s\n", -1)
panic(true, false, "must not compile")
}
Expected behavior
Compilation error eg golang:
Printf format %s has arg -1 of wrong type int
Ideally this should be done at compile time when the format string is a literal.
We should check the parameters to printf, but this isn't done yet. In the meantime, this should only give a runtime error and continue, but should not panic.
@asahi3g commented on Jul 3
To Reproduce
Expected behavior Compilation error eg golang:
Printf format %s has arg -1 of wrong type int
Ideally this should be done at compile time when the format string is a literal.Screenshots
Desktop: