-
Caio Marcelo de Oliveira Filho authored
In increment and decrement statements, explicit check that the type of operand is numeric. This avoids a related but less clear error about converting "1" to be emitted. So, when checking package main func main() { var x bool x++ } instead of emitting the error prog.go:5:2: cannot convert 1 (untyped int constant) to bool emits prog.go:5:2: invalid operation: x++ (non-numeric type bool). Updates #12525. Change-Id: I00aa6bd0bb23267a2fe10ea3f5a0b20bbf3552bc Reviewed-on: https://go-review.googlesource.com/20244Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
133c26b1
Name |
Last commit
|
Last update |
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README.md | ||
favicon.ico | ||
robots.txt |