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: better error message for specific typechecking loop error #23094

Closed
griesemer opened this issue Dec 12, 2017 · 2 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@griesemer
Copy link
Contributor

https://play.golang.org/p/BrstSie5Lc reports when compiling

tmp/sandbox575967625/main.go:5:21: invalid expression unsafe.Sizeof(a)
tmp/sandbox575967625/main.go:5:22: typechecking loop involving a
	prog.go:5:21 unsafe.Sizeof(a)
	prog.go:5:7 []unsafe.Sizeof(a)
	prog.go:5:5 a

The line for prog.go:5:7 prints a non-Go expression which is confusing.

@griesemer griesemer added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 12, 2017
@griesemer griesemer added this to the Soon milestone Dec 12, 2017
@bradfitz bradfitz added the Soon This needs to be done soon. (regressions, serious bugs, outages) label May 17, 2018
@bradfitz bradfitz modified the milestones: Soon, Go1.11 May 17, 2018
@griesemer
Copy link
Contributor Author

Simpler repro case:

package main

var a [len(a)]int

@gopherbot
Copy link

Change https://golang.org/cl/116256 mentions this issue: cmd/compile: fix printing of array types in error messages

@golang golang locked and limited conversation to collaborators Jun 5, 2019
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. Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

4 participants