aboutsummaryrefslogtreecommitdiffstats
path: root/test/typeswitch2.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/typeswitch2.go')
-rw-r--r--test/typeswitch2.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/test/typeswitch2.go b/test/typeswitch2.go
index 5958b7db..62c96c83 100644
--- a/test/typeswitch2.go
+++ b/test/typeswitch2.go
@@ -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)"
- }
-}