]> Cypherpunks repositories - gostls13.git/commitdiff
builtin: document true and false.
authorRobert Griesemer <gri@golang.org>
Thu, 18 Apr 2013 21:36:08 +0000 (14:36 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 18 Apr 2013 21:36:08 +0000 (14:36 -0700)
Fixes #5315.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8841048

src/pkg/builtin/builtin.go

index d3c1a5c55aacb97851bbe6083dc934d601ea0e14..128a1b5f8fc0ff969e80e800328d5330c131185a 100644 (file)
@@ -13,6 +13,12 @@ package builtin
 // bool is the set of boolean values, true and false.
 type bool bool
 
+// true and false are the two untyped boolean values.
+const (
+       true  = 0 == 0 // Untyped bool.
+       false = 0 != 0 // Untyped bool.
+)
+
 // uint8 is the set of all unsigned 8-bit integers.
 // Range: 0 through 255.
 type uint8 uint8