mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
...and remove the option. This is ~technically~ CLI-breaking because Swift 5 shipped this as a hidden driver option, but it wouldn't have /done/ anything in Swift 5, so I think it's okay to remove. Note that if a parseable interface (.swiftinterface) and a binary interface (.swiftmodule) are both present, the binary one will still be preferred. This just /allows/ parseable interfaces to be used. rdar://problem/36885834
24 lines
974 B
Swift
24 lines
974 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %empty-directory(%t/modulecache)
|
|
//
|
|
// Setup builds a parseable interface for a module SomeModule (built from some-module.swift).
|
|
// This test checks we still build and load its corresponding .swiftmodule when the file that imports it contains an error prior to the import statement.
|
|
|
|
// Setup phase 1: Write the input file.
|
|
//
|
|
// RUN: echo 'public func SomeFunc() -> Int { return 42; }' >>%t/some-module.swift
|
|
|
|
// Setup phase 2: build the module.
|
|
//
|
|
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/SomeModule.swiftinterface -module-name SomeModule %t/some-module.swift -emit-module -o /dev/null
|
|
|
|
// Actual test: compile and verify the import succeeds (i.e. we only report the error in this file)
|
|
//
|
|
// RUN: %target-swift-frontend -typecheck -verify -I %t -module-cache-path %t/modulecache %s
|
|
|
|
unresolved // expected-error {{use of unresolved identifier 'unresolved'}}
|
|
|
|
import SomeModule
|
|
|
|
print(SomeFunc())
|