-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
package main
func main() {
var value = new(Demo)
UseFunc[value.(type)]()
}
type Demo struct{}
func UseFunc[T any]() {}./prog.go:4:6: value declared and not used
./prog.go:5:10: value.(type) is not a type
./prog.go:5:10: invalid syntax tree: use of .(type) outside type switch
Only the 2nd error should be presented.
From #58608.
Metadata
Metadata
Assignees
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
In Progress