aboutsummaryrefslogtreecommitdiff
path: root/test/named.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-02-21 22:54:07 -0500
committerRuss Cox <rsc@golang.org>2012-02-21 22:54:07 -0500
commita457fa500d35d352a76883706e82fd7e9f8e4bd7 (patch)
treee5e23701e0ee9400e4e68c438fbce369c4a1b504 /test/named.go
parent5bcad92f07317dc81122f72d40433f314e336b7c (diff)
downloadgo-a457fa500d35d352a76883706e82fd7e9f8e4bd7.tar.gz
go-a457fa500d35d352a76883706e82fd7e9f8e4bd7.zip
gc: return of ideal bool
This is a manual undo of CL 5674098. It does not implement the even less strict spec that we just agreed on, but it gets us back where we were at the last weekly. R=ken2 CC=golang-dev https://golang.org/cl/5683069
Diffstat (limited to 'test/named.go')
-rw-r--r--test/named.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/named.go b/test/named.go
index 9b8e10ba22..d0330ab238 100644
--- a/test/named.go
+++ b/test/named.go
@@ -31,6 +31,7 @@ func asString(String) {}
func (Map) M() {}
+
// These functions check at run time that the default type
// (in the absence of any implicit conversion hints)
// is the given type.
@@ -46,7 +47,7 @@ func isString(x interface{}) { _ = x.(String) }
func main() {
var (
a Array
- b Bool = Bool(true)
+ b Bool = true
c Chan = make(Chan)
f Float = 1
i Int = 1
@@ -66,6 +67,7 @@ func main() {
isBool(b)
asBool(!b)
isBool(!b)
+ asBool(true)
asBool(*&b)
isBool(*&b)
asBool(Bool(true))