compiler: Change return type comma-ok assignments to untyped bools.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Aug 2014 19:27:21 +0000 (19:27 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Aug 2014 19:27:21 +0000 (19:27 +0000)
Fixes https://code.google.com/p/go/issues/detail?id=8476. The test will be submitted once this is fixed in gc and go/types.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213833 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/go.test/test/named1.go

index 62b874c..4f122e4 100644 (file)
@@ -41,21 +41,21 @@ func main() {
        asBool(1 != 2) // ok now
        asBool(i < j)  // ok now
 
-       _, b = m[2] // ERROR "cannot .* bool.*type Bool"
+       _, b = m[2]
 
        var inter interface{}
-       _, b = inter.(Map) // ERROR "cannot .* bool.*type Bool"
+       _, b = inter.(Map)
        _ = b
 
        var minter interface {
                M()
        }
-       _, b = minter.(Map) // ERROR "cannot .* bool.*type Bool"
+       _, b = minter.(Map)
        _ = b
 
        _, bb := <-c
        asBool(bb) // ERROR "cannot use.*type bool.*as type Bool"
-       _, b = <-c // ERROR "cannot .* bool.*type Bool"
+       _, b = <-c
        _ = b
 
        asString(String(slice)) // ok