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
package main
funcA[Tany](vT, fnfunc(T) T) T { returnfn(v) }
funcB[Tany](vT) T { returnv }
funcmain() {
A(0, B)
}
What did you see happen?
$ go test -cover .
# test
<unknown line number>: internal compiler error: panic: runtime error: invalid memory address or nil pointer dereference
Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
FAIL test [build failed]
FAIL
What did you expect to see?
$ go test -cover .
test coverage: 0.0% of statements
The text was updated successfully, but these errors were encountered:
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
msbit
changed the title
internal compiler error for implicitly instantiated function as argument with lang was set to go1.20 when running coverage
internal compiler error for implicitly instantiated function as argument with lang set to go1.20 when running coverage
Aug 7, 2024
./main.go:8:7: implicitly instantiated function as argument requires go1.21 or later (-lang was set to go1.20; check go.mod)
FAIL go.seankhliao.com/testrepo0743 [build failed]
Go version
go version go1.22.2 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
go.mod:
main.go:
What did you see happen?
What did you expect to see?
The text was updated successfully, but these errors were encountered: