|
113 | 113 | /// Index a client reading from a broken swiftinterface |
114 | 114 | // RUN: %empty-directory(%t/idx) |
115 | 115 | // RUN: %empty-directory(%t/modulecache) |
116 | | -// RUN: echo "breaking_the_swifinterface" >> %t/SDK/Frameworks/SystemModule.framework/Modules/SystemModule.swiftmodule/%module-target-triple.swiftinterface |
| 116 | +// RUN: echo "breaking_the_swiftinterface" >> %t/SDK/Frameworks/SystemModule.framework/Modules/SystemModule.swiftmodule/%module-target-triple.swiftinterface |
117 | 117 |
|
118 | 118 | // RUN: %target-swift-frontend -typecheck -parse-stdlib \ |
119 | 119 | // RUN: -index-system-modules \ |
|
128 | 128 |
|
129 | 129 | /// We don't expect to see the swiftinterface error for indexing |
130 | 130 | // BROKEN-BUILD-NOT: error |
131 | | -// BROKEN-BUILD-NOT: breaking_the_swifinterface |
| 131 | +// BROKEN-BUILD-NOT: breaking_the_swiftinterface |
132 | 132 | // BROKEN-BUILD: indexing system module {{.*}} skipping |
133 | 133 |
|
134 | 134 | /// We don't expect SystemModule to be indexed with a broken swiftinterface |
@@ -178,6 +178,19 @@ import SystemDepB |
178 | 178 | public func systemFunc() {} |
179 | 179 | func leakyFunc(_ a: SecretType) {} |
180 | 180 |
|
| 181 | +// Currently requires salvaging, which we need to make sure runs when the |
| 182 | +// interface is rebuilt (as it produces a solution), we'll crash if it isn't. |
| 183 | +public struct SysA { public init() {} } |
| 184 | +public struct SysB { public init() {} } |
| 185 | +@available(macOS, unavailable) |
| 186 | +public func forceDisjunction() -> SysA { return SysA() } |
| 187 | +public func forceDisjunction() -> SysB { return SysB() } |
| 188 | +@available(macOS, unavailable) |
| 189 | +@inlinable |
| 190 | +public func requireSalvage() -> SysA { |
| 191 | + return forceDisjunction() |
| 192 | +} |
| 193 | + |
181 | 194 | //--- SystemDepA.swift |
182 | 195 | import SystemDepCommon |
183 | 196 | public func systemDepAFunc() {} |
|
0 commit comments