// expected: "math" imported and not used // // Go requires an imported package to be referred to in the file that imports // it: a package imported for its side effects only needs the blank identifier. // go/types rejects this on the legacy side; stage4 linked the import and said // nothing, so a file could import a package it never mentioned and only the // legacy compiler would object. // // The rule is per file, not per package - another file importing "math" and // using it does not excuse this one - and the message names the alias when the // import has one ("math" imported as m and not used). package main import "math" func main() { println(int32(1)) }