Files
swift-mirror/test/refactoring/ExtractFunction/extract_sugar.swift
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

11 lines
318 B
Swift

func foo(_ a : inout [Int]) -> [Int] {
a[0] = 3
a[1] = 4
a[3] = 4
return a
}
// RUN: rm -rf %t.result && mkdir -p %t.result
// RUN: %refactor -extract-function -source-filename %s -pos=2:1 -end-pos=5:11 >> %t.result/L2-5.swift
// RUN: diff -u %S/Outputs/extract_sugar/L2-5.swift.expected %t.result/L2-5.swift