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
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@griesemer
Copy link
Contributor

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 The path to resolution is known, but the work has not been done. 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

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

Fixed on dev.go2go branch.

@golang golang locked and limited conversation to collaborators Aug 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants