4
4
5
5
// RUN: %empty-directory(%t)
6
6
// RUN: cp %S/Inputs/xref-nested-clang-type/NestedClangTypes.h %t
7
- // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t -import-objc-header %t/NestedClangTypes.h %s -module-name Lib -DNO_MODULE
8
- // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %t -import-objc-header %t/NestedClangTypes.h %s -DCLIENT -verify
7
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t -import-objc-header %t/NestedClangTypes.h -I %S/Inputs/xref-nested-clang-type/ %s -module-name Lib -DNO_MODULE
8
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %t -I %S/Inputs/xref-nested-clang-type/ - import-objc-header %t/NestedClangTypes.h %s -DCLIENT -verify
9
9
10
10
// RUN: %empty-directory(%t)
11
11
// RUN: cp %S/Inputs/xref-nested-clang-type/NestedClangTypes.h %t
12
- // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t -import-objc-header %t/NestedClangTypes.h -pch-output-dir %t/PCHCache %s -module-name Lib -DNO_MODULE
13
- // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %t -pch-output-dir %t/PCHCache -import-objc-header %t/NestedClangTypes.h %s -DCLIENT -verify
12
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t -import-objc-header %t/NestedClangTypes.h -I %S/Inputs/xref-nested-clang-type/ -pch-output-dir %t/PCHCache %s -module-name Lib -DNO_MODULE
13
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %t -I %S/Inputs/xref-nested-clang-type/ -pch-output-dir %t/PCHCache -import-objc-header %t/NestedClangTypes.h %s -DCLIENT -verify
14
+
15
+ #if _runtime(_ObjC)
16
+ import Foundation
17
+ #endif // ObjC
14
18
15
19
#if CLIENT
16
20
17
21
import Lib
18
22
19
23
func test( x: MyInner ) { }
20
-
21
- #if _runtime(_ObjC)
22
- import Foundation
24
+ func test( x: MyOtherInner ) { }
23
25
func test( x: MyCode ) { }
24
- #endif // ObjC
25
26
26
27
#else // CLIENT
27
28
@@ -36,13 +37,18 @@ extension MyOuter {
36
37
public func use( inner: MyInner ) { }
37
38
}
38
39
39
- #if _runtime(_ObjC)
40
- import Foundation
40
+ public typealias MyOtherInner = OuterFromOtherModule . InterestingValue
41
+ extension OuterFromOtherModule {
42
+ public func use( inner: MyOtherInner ) { }
43
+ }
41
44
45
+ #if _runtime(_ObjC)
42
46
public typealias MyCode = ErrorCodeEnum . Code
43
47
extension ErrorCodeEnum {
44
48
public func whatever( code: MyCode ) { }
45
49
}
50
+ #else
51
+ public typealias MyCode = Int
46
52
#endif // ObjC
47
53
48
54
#endif // CLIENT
0 commit comments