You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most minimal code snippet I could come up with that still produces the error is this:
package main
funcmain() {
varvGI[any]
F(v)
}
funcF[Tany](aGI[T]) {
_, _=a.(any) // the type assertion to a non-generic interface seems to cause the issue
}
typeGI[Tany] interface{}
It should reproduce the error if you try to execute it via go run.
What did you expect to see?
There should be no output but it should compile fine.
What did you see instead?
./main.go:5:3: internal compiler error: assertion failed
Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
I tried to debug the problem on the original code base that I encountered the error with, but could only get as far as this line. (I only include this info in hope of making your job easier, but don't be misled by it, I'm not really familiar with the compiler internals.)
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, but not with 1.18.3.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The most minimal code snippet I could come up with that still produces the error is this:
It should reproduce the error if you try to execute it via
go run
.What did you expect to see?
There should be no output but it should compile fine.
What did you see instead?
I tried to debug the problem on the original code base that I encountered the error with, but could only get as far as this line. (I only include this info in hope of making your job easier, but don't be misled by it, I'm not really familiar with the compiler internals.)
The text was updated successfully, but these errors were encountered: