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

cmd/compile: better error message for specific typechecking loop error #23094

griesemer opened this issue Dec 12, 2017 · 2 comments
Assignees
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer 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

@griesemer griesemer commented Jun 5, 2018

Simpler repro case:

package main

var a [len(a)]int
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot 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
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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