mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
14 lines
382 B
Swift
14 lines
382 B
Swift
public class C {
|
|
/// Insert before this.
|
|
public func foo() -> Int{
|
|
var aaa = 1 + 2
|
|
aaa = aaa + 3
|
|
if aaa == 3 { aaa = 4 }
|
|
return aaa
|
|
}
|
|
}
|
|
|
|
// RUN: rm -rf %t.result && mkdir -p %t.result
|
|
// RUN: %refactor -extract-function -source-filename %s -pos=5:1 -end-pos=6:26 >> %t.result/L5-6.swift
|
|
// RUN: diff -u %S/Outputs/extract_attributes/L5-6.swift.expected %t.result/L5-6.swift
|