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/go2go: missing error for use of uninstantiated type argument #40684

Closed
griesemer opened this issue Aug 11, 2020 · 2 comments
Closed

cmd/go2go: missing error for use of uninstantiated type argument #40684

griesemer opened this issue Aug 11, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Aug 11, 2020

package p

type A[type T] int

func f[type P]()

func _() {
	_ = f[A]
}

passes type-checking without error. But it should not be possible to instantiate f[A] with an uninstantiated A.

Follow-up on #40038.

@griesemer griesemer added the NeedsFix label Aug 11, 2020
@griesemer griesemer added this to the Unreleased milestone Aug 11, 2020
@griesemer griesemer self-assigned this Aug 11, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 28, 2020

Change https://golang.org/cl/251557 mentions this issue: [dev.go2go] go/types: add missing instantiation checks for function type arguments

gopherbot pushed a commit that referenced this issue Aug 28, 2020
…ype arguments

Fixes #40684.

Change-Id: If642edbf321973729a8d5b36b4bf61e3fae7ee3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/251557
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Aug 28, 2020

Fixed on dev.go2go branch.

@griesemer griesemer closed this Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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