]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/typeswitch2.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / typeswitch2.go
index 5958b7db8ebd73d5e7b4f747236e6f3fd9a056c0..62c96c8330f6010333dce002269511ba3ee49fff 100644 (file)
@@ -35,13 +35,3 @@ func whatis(x interface{}) string {
        }
        return ""
 }
-
-func notused(x interface{}) {
-       // The first t is in a different scope than the 2nd t; it cannot
-       // be accessed (=> declared and not used error); but it is legal
-       // to declare it.
-       switch t := 0; t := x.(type) { // ERROR "declared and not used"
-       case int:
-               _ = t // this is using the t of "t := x.(type)"
-       }
-}