Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.19.4 linux/amd64
Does this issue reproduce with the latest release?
Yes
What did you do?
https://go.dev/play/p/rctUQ2F2oSI
package main
func main() {
_ = 0 < new(int)
}
go 1.17:
./main.go:4:8: invalid operation: 0 < new(int) (mismatched types int and *int)
go 1.18/19/tip:
./main.go:4:6: cannot convert 0 (untyped int constant) to *int
Also, even if the constant could be converted to *int
, the <
operator is not defined on it.