]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: correct type in declbad.go
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Sun, 7 Oct 2012 19:52:57 +0000 (21:52 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Sun, 7 Oct 2012 19:52:57 +0000 (21:52 +0200)
The test is not about type mismatches and it causes
an extra error to appear.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6614062

test/declbad.go

index ff53ab0d7c5a6627d7c3d3c87c8951156cccdc93..728eceb7f1e6b9cd755def6ae347d34724eee1a0 100644 (file)
@@ -41,7 +41,8 @@ func main() {
        {
                // multiline no new variables
                i := f1
-               i := func() { // ERROR "redeclared|no new|incompatible"
+               i := func() int { // ERROR "redeclared|no new|incompatible"
+                       return 0
                }
                _ = i
        }