- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathmove-to-extension.swift
23 lines (16 loc) · 786 Bytes
/
move-to-extension.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -o %t/Foo.swiftmodule -emit-abi-descriptor-path %t/abi-before.json %s -enable-library-evolution -DBASELINE -emit-tbd-path %t/abi-before.tbd -tbd-install_name Foo
// RUN: %target-swift-frontend -emit-module -o %t/Foo.swiftmodule -emit-abi-descriptor-path %t/abi-after.json %s -enable-library-evolution -emit-tbd-path %t/abi-after.tbd -tbd-install_name Foo
// RUN: %api-digester -diagnose-sdk --input-paths %t/abi-before.json -input-paths %t/abi-after.json -abi -o %t/result.txt
// RUN: %FileCheck %s < %t/result.txt
#if BASELINE
publicclassC{
publicfunc foo(){}
}
#else
publicclassC{}
extensionC{
publicfunc foo(){}
}
#endif
// CHECK: Non-final class member Func C.foo() is moved to extension