]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/declbad.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / declbad.go
index eace9376a3c0c798c822743c408a66389b59b71a..b978652a2b158573a5ad4d3dd028fbaf1e92f414 100644 (file)
@@ -23,13 +23,13 @@ func main() {
        {
                // change of type for f
                i, f, s := f3()
-               f, g, t := f3() // ERROR "redeclared|cannot assign|incompatible"
+               f, g, t := f3() // ERROR "redeclared|cannot assign|incompatible|cannot use"
                _, _, _, _, _ = i, f, s, g, t
        }
        {
                // change of type for i
                i, f, s := f3()
-               j, i, t := f3() // ERROR "redeclared|cannot assign|incompatible"
+               j, i, t := f3() // ERROR "redeclared|cannot assign|incompatible|cannot use"
                _, _, _, _, _ = i, f, s, j, t
        }
        {
@@ -42,7 +42,9 @@ func main() {
                // multiline no new variables
                i := f1
                i := func() int { // ERROR "redeclared|no new|incompatible"
+                       return 0
                }
+               _ = i
        }
        {
                // single redeclaration