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: duplicate error on operation with mismatched types #23486

Open
mvdan opened this Issue Jan 19, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@mvdan
Member

mvdan commented Jan 19, 2018

What version of Go are you using (go version)?

go version devel +7e054553ad Tue Jan 16 15:11:05 2018 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What did you do?

https://play.golang.org/p/osxSXmoCG9N

What did you expect to see?

prog.go:4:15: invalid operation: true != 0 (mismatched types bool and int)

What did you see instead?

prog.go:4:15: cannot convert 0 to type bool
prog.go:4:15: invalid operation: true != 0 (mismatched types bool and int)

The first error seems redundant, given the second. The second is also much clearer.

/cc @griesemer @mdempsky

@griesemer griesemer added this to the Go1.11 milestone Jan 19, 2018

@griesemer griesemer self-assigned this Jan 19, 2018

@griesemer griesemer added the NeedsFix label Jan 19, 2018

@griesemer

This comment has been minimized.

Contributor

griesemer commented Jun 4, 2018

Not urgent.

@griesemer griesemer modified the milestones: Go1.11, Unplanned Jun 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment