mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If a partial module fails to load, the main module may be left without files, so let's set the failed to load bit.
8 lines
387 B
Swift
8 lines
387 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// Make sure we don't crash if we fail to load a partial module.
|
|
// RUN: %target-swift-frontend -emit-module -primary-file %s -module-name A -o %t/a.partial.swiftmodule
|
|
// RUN: not %target-swift-frontend -emit-module -merge-modules %t/a.partial.swiftmodule -module-name Unrelated 2>&1 | %FileCheck %s
|
|
|
|
// CHECK: error: cannot load module 'A' as 'Unrelated'
|