commit | be9a1774f274e5333bef873868bb28b93918d8e7 | [log] [tgz] |
---|---|---|
author | Robert Griesemer <gri@golang.org> | Wed Jan 10 16:05:12 2018 -0800 |
committer | Robert Griesemer <gri@golang.org> | Mon Feb 12 22:57:54 2018 +0000 |
tree | 05b1a3ad456b6a4814c3b4920d21b71c8b6b9f83 | |
parent | ac45cb9aa0154a84a63d18d87161dd39a2885449 [diff] |
cmd/compile/internal/syntax: better error msg for some 'if' statements R=go1.11 A common error is to write '=' instead of '==' inside the condition of a simple 'if' statement: if x = 0 { ... } Highlight the fact that we have an assignment in the error message to prevent further confusion. Fixes #23385. Change-Id: I1552050fd6da927bd12a1be0977bd2e98eca5885 Reviewed-on: https://go-review.googlesource.com/87316 Reviewed-by: Daniel Martà <mvdan@mvdan.cc> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.