|
1 | 1 | // RUN: %empty-directory(%t)
|
2 | 2 | // RUN: %empty-directory(%t/sdk)
|
3 |
| -// RUN: split-file %s %t |
| 3 | +// RUN: split-file %s %t --leading-lines |
4 | 4 |
|
5 | 5 | /// Compile two library modules A and A_related, and a middle library LibWithXRef with a reference to a type in A.
|
6 | 6 | // RUN: %target-swift-frontend %t/LibOriginal.swift -emit-module-path %t/A.swiftmodule -module-name A -I %t
|
7 | 7 | // RUN: %target-swift-frontend %t/Empty.swift -emit-module-path %t/A_related.swiftmodule -module-name A_related
|
8 | 8 | // RUN: %target-swift-frontend %t/LibWithXRef.swift -emit-module-path %t/sdk/LibWithXRef.swiftmodule -module-name LibWithXRef -I %t -swift-version 5 -enable-library-evolution
|
9 | 9 |
|
10 |
| -/// Move MyType from A to A_related, triggering most notes. |
| 10 | +/// Move BrokenType from A to A_related, triggering most notes. |
11 | 11 | // RUN: %target-swift-frontend %t/EmptyOverlay.swift -emit-module-path %t/A.swiftmodule -module-name A -I %t
|
12 | 12 | // RUN: %target-swift-frontend %t/LibOriginal.swift -emit-module-path %t/A_related.swiftmodule -module-name A_related -I %t
|
13 | 13 | // RUN: not %target-swift-frontend -c -O %t/Client.swift -I %t -I %t/sdk -Rmodule-recovery -sdk %t/sdk -swift-version 4 2>&1 \
|
14 | 14 | // RUN: | %FileCheck --check-prefixes CHECK-MOVED %s
|
15 | 15 |
|
16 | 16 | /// Main error downgraded to a remark.
|
17 |
| -// CHECK-MOVED: LibWithXRef.swiftmodule:1:1: remark: reference to type 'MyType' broken by a context change; 'MyType' was expected to be in 'A', but now a candidate is found only in 'A_related' |
| 17 | +// CHECK-MOVED: LibWithXRef.swiftmodule:1:1: remark: reference to type 'BrokenType' broken by a context change; 'BrokenType' was expected to be in 'A', but now a candidate is found only in 'A_related' |
18 | 18 |
|
19 | 19 | /// Contextual notes about the modules involved.
|
20 | 20 | // CHECK-MOVED: note: the type was expected to be found in module 'A' at '
|
|
32 | 32 | // CHECK-MOVED-SAME: LibWithXRef.swiftmodule'
|
33 | 33 | // CHECK-MOVED: note: declarations in the underlying clang module 'A' may be hidden by clang preprocessor macros
|
34 | 34 | // CHECK-MOVED: note: the distributed module 'LibWithXRef' refers to the local module 'A'; this may be caused by header maps or search paths
|
35 |
| -// CHECK-MOVED: note: the type 'MyType' moved between related modules; clang preprocessor macros may affect headers shared between these modules |
| 35 | +// CHECK-MOVED: note: the type 'BrokenType' moved between related modules; clang preprocessor macros may affect headers shared between these modules |
36 | 36 | // CHECK-MOVED: note: could not deserialize type for 'foo()'
|
37 | 37 | // CHECK-MOVED: error: cannot find 'foo' in scope
|
38 | 38 |
|
@@ -68,15 +68,15 @@ void foo() {}
|
68 | 68 | //--- LibOriginal.swift
|
69 | 69 | @_exported import A
|
70 | 70 |
|
71 |
| -public struct MyType { |
| 71 | +public struct BrokenType { |
72 | 72 | public init() {}
|
73 | 73 | }
|
74 | 74 |
|
75 | 75 | //--- LibWithXRef.swift
|
76 | 76 | import A
|
77 | 77 | import A_related
|
78 | 78 |
|
79 |
| -public func foo() -> MyType { |
| 79 | +public func foo() -> BrokenType { |
80 | 80 | fatalError()
|
81 | 81 | }
|
82 | 82 |
|
|
0 commit comments