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: failure to export mutually recursive type parameters #46575

Closed
mdempsky opened this issue Jun 4, 2021 · 2 comments
Closed

cmd/compile: failure to export mutually recursive type parameters #46575

mdempsky opened this issue Jun 4, 2021 · 2 comments

Comments

@mdempsky
Copy link
Contributor

mdempsky commented Jun 4, 2021

I have this test case working with unified IR, and I thought it was working with golang.org/cl/323029 last night when I tested it, but it's currently failing at de61465 when I try compiling with -G=3 due to:

$GOROOT/test/typeparam/mutualimp.dir/a.go:11:6: internal compiler error: weird package in name: .dict => .dict from "", not "/usr/local/google/home/mdempsky/wd/go/test/typeparam/mutualimp.dir/a"
package a

type X int
func (x X) M() X { return x }

func F[T interface{ M() U }, U interface{ M() T }]() {}
func G() { F[X, X]() }
package b

import "./a"

func H() {
	a.F[a.X, a.X]()
	a.G()
}

/cc @danscales @randall77 @griesemer

@danscales danscales self-assigned this Jun 5, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/325529 mentions this issue: [dev.typeparams] cmd/compile: create .dict Param in the package of the instantiated function

gopherbot pushed a commit that referenced this issue Jun 7, 2021
…e instantiated function

The instantiated functions are created in the source package of the
generic function, so all lookups of symbols should be relative to that
package, so all symbols are consistently in the source package.

Fixes #46575

Change-Id: Iba67b2ba8014a630c5d4e032c0f2f2fbaaedce65
Reviewed-on: https://go-review.googlesource.com/c/go/+/325529
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
@danscales
Copy link
Contributor

Fixed by #46575

@golang golang locked and limited conversation to collaborators Jun 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants