cmd/compile: untyped arguments to real
and imag
converted to default type
#15892
Labels
real
and imag
converted to default type
#15892
On
go version devel +81a8f1a Mon May 30 05:24:16 2016 +0000 linux/amd64
the following program (https://play.golang.org/p/DbyUqeHamB), compiled with
go run real.go
exits with error message
and behaves analogously with other kinds of untyped constants, passed as an argument
to
real
orimag
.The Go Language Specification seems to allow any kind of
untyped numeric constant to be passed as an argument to
real
orimag
.https://golang.org/ref/spec#Complex_numbers
Both
gotypes
andgccgo
accept the program without diagnostics.The text was updated successfully, but these errors were encountered: