-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: inline of f(m T) from package containing type m causes stack overflow #25984
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
Comments
I'm bisecting, back from evening events. |
I pruned some unnecessary code from the test case, and managed to replicate a different error that is the one I was originally looking for. If you remove
the error is instead (at least at tip)
|
Ugh, this is yet another scoping issue due to resolving symbols within import bodies. The problem is export.go:importsym uses s.Def. But when called to import a package-scoped symbol that's shadowed within an inline body (e.g., the recursive It needs to use s.PkgDef() instead, and maybe a corresponding s.SetPkgDef method. |
Change https://golang.org/cl/120456 mentions this issue: |
What version of Go are you using (
go version
)?Development tip as of bug report (2018-06-20)
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
Successful compilation.
What did you see instead?
1.10 seems to be okay. This is not caused by the recent CL for importing FOR loops, unless I am utterly failing at "git checkout". I'm still looking for the commit where it goes wrong.
Bad commit is between these two:
The good commit is dated "Sat Apr 14 05:36:36 2018 +0000"
The text was updated successfully, but these errors were encountered: