Files
swift-mirror/test/refactoring/ExtractFunction/Outputs/extract_switch/Int.swift.expected
Argyrios Kyrtzidis 60a91bb736 [refactoring] Upstreaming the implementation for Swift local refactoring (#11568)
[refactoring] Upstreaming the implementation for Swift local refactoring
2017-08-22 16:50:16 -07:00

30 lines
355 B
Plaintext

enum MyEnum {
case Case1
case Case2
case Case3
}
fileprivate func new_name(_ e: MyEnum) -> Int {
switch e {
case .Case1:
return 1
case .Case2:
return 2
case .Case3:
return 3
}
}
func foo2(_ e : MyEnum) -> Int {
switch e {
case .Case1:
break
case .Case2:
break
case .Case3:
break
}
return new_name(e)
}