Files
swift-mirror/test/Serialization/failed-partial-module.swift
Hamish Knight 21b733b4a1 [Frontend] Set "failed to load" for failed partial module
If a partial module fails to load, the main module
may be left without files, so let's set the failed
to load bit.
2020-05-28 11:32:12 -07:00

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'