Open
Description
Go version
go version go1.24.2 linux/amd64
Output of go env
in your module/workspace:
N/A
What did you do?
This like #57160, but with func
instead of pointers:
package p
func _() {
if foo < bar {
}
}
func foo() {}
const bar = 0
What did you see happen?
./main.go:4:11: cannot convert bar (untyped int constant 0) to type func()
But even if you could convert it to func(), it's not comparable with <
What did you expect to see?
Like go 1.17:
./main.go:4:9: invalid operation: foo < bar (mismatched types func() int and int)