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

go/types, types2: unions must not accept uninstantiated types #48083

Closed
griesemer opened this issue Aug 31, 2021 · 1 comment
Closed

go/types, types2: unions must not accept uninstantiated types #48083

griesemer opened this issue Aug 31, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Aug 31, 2021

This code is accepted by mistake:

package p

type T[P any] struct{}

type _ interface{ int | T } // <<< expected error here for uninstantiated T
@griesemer griesemer added this to the Go1.18 milestone Aug 31, 2021
@griesemer griesemer self-assigned this Aug 31, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 31, 2021

Change https://golang.org/cl/346293 mentions this issue: cmd/compile/internal/types2: union terms must be instantiated

Loading

@gopherbot gopherbot closed this in 605d1aa Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants