|
1 | 1 | // RUN: %empty-directory(%t)
|
2 |
| -// RUN: %target-swift-frontend -typecheck -module-name Foo -emit-module-interface-path %t/Foo.swiftinterface %s |
3 |
| -// RUN: %target-swift-frontend -compile-module-from-interface %t/Foo.swiftinterface -o %t/Foo.swiftmodule |
| 2 | +// RUN: %target-swift-emit-module-interface(%t/Foo.swiftinterface) %s -module-name Foo |
| 3 | +// RUN: %target-swift-typecheck-module-from-interface(%t/Foo.swiftinterface) -module-name Foo |
| 4 | +// RUN: %FileCheck %s < %t/Foo.swiftinterface |
4 | 5 |
|
5 |
| -// RUN: %target-swift-frontend -typecheck -enable-testing -module-name FooWithTesting -emit-module-interface-path %t/FooWithTesting.swiftinterface %s |
6 |
| -// RUN: %target-swift-frontend -compile-module-from-interface %t/FooWithTesting.swiftinterface -o %t/FooWithTesting.swiftmodule |
| 6 | +// RUN: %target-swift-emit-module-interface(%t/FooWithTesting.swiftinterface) %s -module-name FooWithTesting -enable-testing |
| 7 | +// RUN: %target-swift-typecheck-module-from-interface(%t/FooWithTesting.swiftinterface) -module-name FooWithTesting |
| 8 | +// RUN: %FileCheck %s < %t/FooWithTesting.swiftinterface |
7 | 9 |
|
| 10 | +// CHECK: @_hasMissingDesignatedInitializers public class BaseClass |
8 | 11 | public class BaseClass {
|
9 | 12 | init() { }
|
10 | 13 | var property: Int { return 1 }
|
11 | 14 | func doSomething() { }
|
12 | 15 | subscript(index: Int) -> Int { get { return 0 } set(newValue) {} }
|
| 16 | + // CHECK: @usableFromInline |
| 17 | + // CHECK-NEXT: internal func doSomethingInline() |
13 | 18 | @usableFromInline func doSomethingInline() {}
|
| 19 | + // CHECK: @usableFromInline |
| 20 | + // CHECK-NEXT: internal func doSomethingUsableFromInline() |
14 | 21 | @usableFromInline func doSomethingUsableFromInline() {}
|
15 | 22 | }
|
16 | 23 |
|
| 24 | +// CHECK: @_inheritsConvenienceInitializers public class DerivedClass : {{Foo|FooWithTesting}}.BaseClass |
17 | 25 | public class DerivedClass: BaseClass {
|
| 26 | + // CHECK: public init() |
18 | 27 | public override init() { super.init() }
|
| 28 | + // CHECK: public var property: Swift.Int |
19 | 29 | public override var property : Int { return 0 }
|
| 30 | + // CHECK: public func doSomething() |
20 | 31 | public override func doSomething() { }
|
| 32 | + // CHECK: public subscript(index: Swift.Int) -> Swift.Int |
21 | 33 | public override subscript(index: Int) -> Int { get {return 0} set(newValue) {} }
|
| 34 | + // CHECK: @inlinable override public func doSomethingInline() { super.doSomethingInline() } |
22 | 35 | @inlinable public override func doSomethingInline() { super.doSomethingInline() }
|
| 36 | + // CHECK: @usableFromInline |
| 37 | + // CHECK-NEXT: override internal func doSomethingUsableFromInline() |
23 | 38 | @usableFromInline override func doSomethingUsableFromInline() { super.doSomethingUsableFromInline() }
|
24 | 39 | }
|
0 commit comments