summaryrefslogtreecommitdiff
path: root/gcc/testsuite/go.test/test/named1.go
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/go.test/test/named1.go')
-rw-r--r--gcc/testsuite/go.test/test/named1.go19
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/testsuite/go.test/test/named1.go b/gcc/testsuite/go.test/test/named1.go
index 600e502f9e..561d84a43d 100644
--- a/gcc/testsuite/go.test/test/named1.go
+++ b/gcc/testsuite/go.test/test/named1.go
@@ -37,18 +37,10 @@ func main() {
asBool(true)
asBool(*&b)
asBool(Bool(true))
- asBool(1 != 2) // ERROR "cannot use.*type bool.*as type Bool"
- asBool(i < j) // ERROR "cannot use.*type bool.*as type Bool"
+ asBool(1 != 2) // ok now
+ asBool(i < j) // ok now
_, b = m[2] // ERROR "cannot .* bool.*type Bool"
- m[2] = 1, b // ERROR "cannot use.*type Bool.*as type bool"
-
- b = c <- 1 // ERROR "cannot use.*type bool.*type Bool"
- _ = b
- asBool(c <- 1) // ERROR "cannot use.*type bool.*as type Bool"
-
- _, b = <-c // ERROR "cannot .* bool.*type Bool"
- _ = b
var inter interface{}
_, b = inter.(Map) // ERROR "cannot .* bool.*type Bool"
@@ -60,9 +52,10 @@ func main() {
_, b = minter.(Map) // ERROR "cannot .* bool.*type Bool"
_ = b
- asBool(closed(c)) // ERROR "cannot use.*type bool.*as type Bool"
- b = closed(c) // ERROR "cannot use.*type bool.*type Bool"
+ _, bb := <-c
+ asBool(bb) // ERROR "cannot use.*type bool.*as type Bool"
+ _, b = <-c // ERROR "cannot .* bool.*type Bool"
_ = b
- asString(String(slice)) // ERROR "cannot .*type Slice.*type String"
+ asString(String(slice)) // ok
}