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

Closed
mvdan opened this issue Jan 19, 2018 · 2 comments
Closed

cmd/compile: duplicate error on operation with mismatched types #23486

mvdan opened this issue Jan 19, 2018 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mvdan
Copy link
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 The path to resolution is known, but the work has not been done. label Jan 19, 2018
@griesemer
Copy link
Contributor

Not urgent.

@griesemer griesemer modified the milestones: Go1.11, Unplanned Jun 4, 2018
@cuonglm
Copy link
Member

cuonglm commented Sep 11, 2020

@mvdan go1.15 now only print one error, we can close this issue.

@mvdan mvdan closed this as completed Sep 11, 2020
@golang golang locked and limited conversation to collaborators Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants