diff options
-rw-r--r-- | test/return.go | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/test/return.go b/test/return.go index dcf32f86f..6e02b782d 100644 --- a/test/return.go +++ b/test/return.go @@ -666,17 +666,6 @@ func _() int { } } -func _() int { - print(1) - switch x.(type) { - case int: - print(2) - fallthrough - default: - return 4 - } -} - // if no default or some case doesn't terminate, switch is no longer okay func _() int { @@ -713,17 +702,6 @@ func _() int { switch x.(type) { case int: print(2) - fallthrough - case float64: - return 4 - } -} // ERROR "missing return" - -func _() int { - print(1) - switch x.(type) { - case int: - print(2) panic(3) } } // ERROR "missing return" @@ -1356,16 +1334,6 @@ func _() int { } } -func _() int { - switch x.(type) { - case int: - print(2) - fallthrough - default: - return 4 - } -} - // if no default or some case doesn't terminate, switch is no longer okay func _() int { @@ -1398,16 +1366,6 @@ func _() int { switch x.(type) { case int: print(2) - fallthrough - case float64: - return 4 - } -} // ERROR "missing return" - -func _() int { - switch x.(type) { - case int: - print(2) panic(3) } } // ERROR "missing return" @@ -2102,17 +2060,6 @@ var _ = func() int { } } -var _ = func() int { - print(1) - switch x.(type) { - case int: - print(2) - fallthrough - default: - return 4 - } -} - // if no default or some case doesn't terminate, switch is no longer okay var _ = func() int { @@ -2149,17 +2096,6 @@ var _ = func() int { switch x.(type) { case int: print(2) - fallthrough - case float64: - return 4 - } -} // ERROR "missing return" - -var _ = func() int { - print(1) - switch x.(type) { - case int: - print(2) panic(3) } } // ERROR "missing return" @@ -2792,16 +2728,6 @@ var _ = func() int { } } -var _ = func() int { - switch x.(type) { - case int: - print(2) - fallthrough - default: - return 4 - } -} - // if no default or some case doesn't terminate, switch is no longer okay var _ = func() int { @@ -2834,16 +2760,6 @@ var _ = func() int { switch x.(type) { case int: print(2) - fallthrough - case float64: - return 4 - } -} // ERROR "missing return" - -var _ = func() int { - switch x.(type) { - case int: - print(2) panic(3) } } // ERROR "missing return" |