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
Assignees
Labels
Milestone

Comments

@mvdan
Copy link
Member

@mvdan 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
Copy link
Contributor

@griesemer griesemer commented Jun 4, 2018

Not urgent.

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

@cuonglm cuonglm commented Sep 11, 2020

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

@mvdan mvdan closed this Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.