Files
swift-mirror/test/Serialization/load-missing-dependencies.swift
Jordan Rose 0e4f6c6a12 [serialization] Record dependencies on other modules.
When loading a module, we now try to load its dependencies as well.
If one of those dependencies can't be loaded, we emit an error message.

Swift SVN r5796
2013-06-25 00:47:48 +00:00

15 lines
670 B
Swift

// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: %swift -emit-module -o %t/new_module.swiftmodule %S/empty.swift
// RUN: %swift -emit-module -o %t/another_new_module.swiftmodule %S/empty.swift
// RUN: %swift -emit-module -o %t/depends_on_new_module.swiftmodule %S/Inputs/depends_on_new_module.swift -I=%t
// RUN: %swift %s -parse -I=%t
// RUN: rm %t/new_module.swiftmodule
// RUN: rm %t/another_new_module.swiftmodule
// RUN: %swift %s -parse -I=%t -verify
// This error should happen after we've deleted the dependency module
import depends_on_new_module // expected-error{{missing required modules: 'another_new_module', 'new_module'}}
depends_on_new_module // no-warning