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

griesemer opened this issue Dec 12, 2017 · 2 comments


None yet
4 participants
Copy link

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


This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2018

Simpler repro case:

package main

var a [len(a)]int

This comment has been minimized.

Copy link

commented Jun 5, 2018

Change 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.