Closed epowsal closed 16 hours ago
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
you can only type switch on interfaces, once instantiated, K is a concrete type not an interface.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions
Duplicate of #45380
Go version
1.23 windows amd64
Output of
go env
in your module/workspace:What did you do?
try get type but code can not compile.
What did you see happen?
compile it get error.
What did you expect to see?
make compile pass through.