Skip to content

Commit afaefd6

Browse files
committed
Add test case for failure seen in source compat suite
Master source compat suite job #4912 failed to build ReactiveKit because Combine does not have an interface for older iOS architectures that were retired before it was released, and a change to module loading diagnosis started to consider switfinterfaces. Add a test case that covers this situation.
1 parent c81a809 commit afaefd6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/ModuleInterface/can-import.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: echo 'public func externalFunc() {}' | %target-swift-frontend -typecheck -emit-module-interface-path %t/Library.swiftinterface -
3+
// RUN: %empty-directory(%t/LibraryWithoutThisArchitecture.swiftmodule)
4+
// RUN: echo 'public func externalFunc() {}' | %target-swift-frontend -typecheck -emit-module-interface-path %t/LibraryWithoutThisArchitecture.swiftmodule/arm40000-apple-ios.swiftinterface -
35
// RUN: %target-swift-frontend -typecheck %s -I %t
46

57
#if canImport(Library)
@@ -11,4 +13,8 @@ externalFunc()
1113

1214
#if canImport(LibraryThatDoesNotExist)
1315
#error("should not return true for library that does not exist")
14-
#endif
16+
#endif
17+
18+
#if canImport(LibraryWithoutThisArchitecture)
19+
#error("should not return true (or diagnose a loader failure) for library that does not exist")
20+
#endif

0 commit comments

Comments
 (0)