-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed as not planned
Closed as not planned
Copy link
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Description
What version of Go are you using (go version
)?
$ go version go version devel +165ceb09f9 Tue Nov 3 12:31:40 2020 -0500 windows/amd64
Does this issue reproduce with the latest release?
n/a
What operating system and processor architecture are you using (go env
)?
- windows/amd64
- go2go playground
What did you do?
https://go2goplay.golang.org/p/dTkkesE4GCX.
Error is printing when go1 compiler tries to compile translated code.
Also I ran on dev.typeparams
go tool compile -G ./issue.go
where issue.go
is code from playground
Here instantiated createRequest[io.Writer]
look something like:
func createRequest_ioWriter(w io.Writer) {
switch (interface{})(w).(type) {
case io.Writer:
fmt.Println("W")
case io.Writer:
fmt.Println("io.Writer")
}
}
What did you expect to see
An error from go2go like type parameter cannot be case of type switch
.
What did you see instead?
Code passes go2go and dev.typeparams
type checker.
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.