Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: extra (confusing) error message after shift error #27712

griesemer opened this issue Sep 17, 2018 · 0 comments


Copy link

@griesemer griesemer commented Sep 17, 2018

package main

func main() {
	var s uint
	var _ interface{} = 1.0 << s


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 ( The first error message is misleading and unnecessary. Should suppress once we know that the shift is invalid.

Not urgent.

@griesemer griesemer added this to the Unplanned milestone Sep 17, 2018
@griesemer griesemer self-assigned this Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.