}
}
-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 {
}
} // ERROR "missing return"
-func _() int {
- print(1)
- switch x.(type) {
- case int:
- print(2)
- fallthrough
- case float64:
- return 4
- }
-} // ERROR "missing return"
-
func _() int {
print(1)
switch x.(type) {
}
}
-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 {
}
} // ERROR "missing return"
-func _() int {
- switch x.(type) {
- case int:
- print(2)
- fallthrough
- case float64:
- return 4
- }
-} // ERROR "missing return"
-
func _() int {
switch x.(type) {
case 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 {
}
} // ERROR "missing return"
-var _ = func() int {
- print(1)
- switch x.(type) {
- case int:
- print(2)
- fallthrough
- case float64:
- return 4
- }
-} // ERROR "missing return"
-
var _ = func() int {
print(1)
switch x.(type) {
}
}
-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 {
}
} // ERROR "missing return"
-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: