We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following program:
package main const x = complex(0i, 1i) func main() { }
compiles, links, and runs w/o errors:
$ gccgo x.go -o x && ./x
(version: gccgo (google-gccgo-219769) 5.0.0 20150116 (experimental))
The 2nd argument 1i is a complex constant with non-zero imaginary component, it should not be accepted.
Note that:
package main const x = complex(1, 1i) func main() { }
leads to an error:
$ gccgo x.go -o x && ./x x.go:2:11: error: complex arguments must have identical types const x = complex(1, 1i) ^
which is misleading (both arguments are untyped).
Furthermore:
package main import "fmt" const x = complex(1i, 1i) func main() { fmt.Println(x) }
compiles, links, and runs without error, but does not print anything (not even a newline):
$ gccgo x.go -o x && ./x $
The text was updated successfully, but these errors were encountered:
This has the same root cause as #11566. Closng this as a duplicate; the test cases here will be sucked into the test case for #11566.
Sorry, something went wrong.
No branches or pull requests
The following program:
compiles, links, and runs w/o errors:
(version: gccgo (google-gccgo-219769) 5.0.0 20150116 (experimental))
The 2nd argument 1i is a complex constant with non-zero imaginary component, it should not be accepted.
Note that:
leads to an error:
which is misleading (both arguments are untyped).
Furthermore:
compiles, links, and runs without error, but does not print anything (not even a newline):
The text was updated successfully, but these errors were encountered: