mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This converts the instances of the pattern for which we have a proper substitution in lit. This will make it easier to replace it appropriately with Windows equivalents.
23 lines
376 B
Swift
23 lines
376 B
Swift
enum E {
|
|
case e1
|
|
case e2
|
|
case e3
|
|
case e4
|
|
case e5
|
|
}
|
|
|
|
func foo(e: E) -> Int {
|
|
switch(e) {
|
|
case .e1:
|
|
return 0
|
|
case .e2:
|
|
return 0
|
|
default:
|
|
return 1
|
|
}
|
|
}
|
|
|
|
// RUN: %empty-directory(%t.result)
|
|
// RUN: %refactor -expand-default -source-filename %s -pos=15:8 >> %t.result/L15.swift
|
|
// RUN: diff -u %S/Outputs/basic/L15.swift.expected %t.result/L15.swift
|