From 7456b948532e752c0ea0ac98e56e6898271f4dcd Mon Sep 17 00:00:00 2001
From: Robert Griesemer
+ The Go 1.18 compiler now reports an overflow when passing a rune constant expression
+ such as '1' << 32
as an argument to the predeclared functions
+ print
and println
, consistent with the behavior of
+ user-defined functions. Before Go 1.18, the compiler did not report an error
+ in such cases but silently accepted such constant arguments if they fit into an
+ int64
. As a result of this change, (possibly incorrect) programs
+ may not compile anymore. The necessary fix is straightforward: fix the program if it
+ was in fact incorrect, or explicitly convert the offending argument to the correct type.
+ Since go vet
always pointed out this error, the number of affected
+ programs is likely very small.
+