-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
regression: S1029: interface conversion: interface {} is nil, not *buildir.IR #2868
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
Comments
Sometimes error on same code looks like this:
|
Another code example, same issue. package main
import "fmt"
// GoDrain runs Drain in a goroutine. Useful in defer.
func GoDrain[T <-chan E | chan E, E any](c T) {
go Drain(c)
}
// Drain any channel.
func Drain[T <-chan E | chan E, E any](c T) {
for range c {
}
}
// UnexpectedMsg if you get any msg from this channel you will get panic.
func UnexpectedMsg[T <-chan E | chan E, E any](c T) {
for msg := range c {
panic(fmt.Sprintf("unexpected msg: %#+v", msg))
}
} |
Duplicate of #2859 |
Maybe. But it happens even with |
|
Welcome
Description of the problem
Versions 1.46.0 -1.46.2 are crashing on some generic code, 1.45.2 works okay.
Version of golangci-lint
Configuration file
$ cat .golangci.yml
Go environment
Verbose output of running
Code example or link to a public repository
The text was updated successfully, but these errors were encountered: