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

Comments

Projects
None yet
4 participants
@griesemer
Copy link
Contributor

commented Dec 12, 2017

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 label Dec 12, 2017

@griesemer griesemer added this to the Soon milestone Dec 12, 2017

@bradfitz bradfitz added the Soon label May 17, 2018

@bradfitz bradfitz modified the milestones: Soon, Go1.11 May 17, 2018

@griesemer

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2018

Simpler repro case:

package main

var a [len(a)]int
@gopherbot

This comment has been minimized.

Copy link

commented Jun 5, 2018

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

@gopherbot gopherbot closed this in 4a2bec9 Jun 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.