-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler: Ignore result context in constant expressions.
When evaluating a constant expression, the gofrontend would incorrectly force each operand to be represented as the resulting type before checking if the operation was valid with the untyped constants. According to the language specification on constant expressions(http://golang.org/ref/spec#Constant_expressions): "Untyped boolean, numeric, and string constants may be used as operands wherever it is legal to use an operand of boolean, numeric, or string type, respectively." Fixes golang/go#11566. Change-Id: Idb92523f5e1612ecd7c72fb4d00f079a395922f4 Reviewed-on: https://go-review.googlesource.com/12716 Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information
1 parent
aea4360
commit 1d9d92a
Showing
1 changed file
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters