You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/compile: extra (confusing) error message after shift error #27712
package main
funcmain() {
varsuintvar_interface{} =1.0<<s
}
produces
prog.go:5:6: cannot use 1 << s as type interface {} in assignment
prog.go:5:26: invalid operation: 1 << s (shift of type float64)
on the playground (https://play.golang.org/p/lZceKWg78OH). The first error message is misleading and unnecessary. Should suppress once we know that the shift is invalid.
Activity
ALTree commentedon Jul 22, 2020
This appears to be fixed, the reproducer above now generates a single error line:
Closing here.