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/go2go: assertion failed in go/types/subst.go: (makeSubstMap) #39976
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
Slightly smaller reproducer with which the bottom 8 frames before the panic are the same, the rest differs since the code is different: package main
type (
any interface{}
policy(type K comparable, V any) interface{}
LRU(type K comparable, V any) struct{}
Cache(type K comparable, V any) struct{}
)
func NewCache(type K comparable, V any)(p policy(K, V)) {}
func main() {
lru := LRU(int, string){}
// NewCache(int, string)(&lru) // ok: compiles and run
NewCache(&lru) // nok: 'go tool go2go run' panics
} |
arl
changed the title
cmd/go2go: type inference gives panic: assertion failed
cmd/go2go: panic: assertion failed in go/types/subst.go: (makeSubstMap)
Jul 1, 2020
arl
changed the title
cmd/go2go: panic: assertion failed in go/types/subst.go: (makeSubstMap)
cmd/go2go: assertion failed in go/types/subst.go: (makeSubstMap)
Jul 1, 2020
Seems to have broken fairly recently. |
ianlancetaylor
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Jul 1, 2020
Thanks. This was triggered by the fix for #39725. |
Change https://golang.org/cl/240718 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Jul 1, 2020
… inference failure Fixes #39976. Change-Id: Idc304a615193847337438e7024e43140472e7bae Reviewed-on: https://go-review.googlesource.com/c/go/+/240718 Reviewed-by: Robert Griesemer <gri@golang.org>
Fixed on dev.go2go. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
It does with the latest commit, at time of writing, of the dev.go2go experimental branch: 6cf6bf1
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Running the following file:
triggers:
What did you expect to see?
Not sure about the type inference rule here, but I was either expecting a message telling me that the type of
NewCache
can't be inferred or a successful compilation.What did you see instead?
go2go
panicked.Note I think the code is straightforward but I can always try to provide a smaller reproducer
The text was updated successfully, but these errors were encountered: