Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: bug in string comparison #24817
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
On my phone, but I believe the offending line is:
Unlike = and !=, the order of args here matters for > and <. Oops.
This only happens for the empty string.
The cleanest fix is probably to rewrite >, <, >=, and <= for “” into !=, false, true, and == respectively. I’ll send a CL first chance I get.
I'm sorry for the churn in process.
Per the Wiki doc listed above: