mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We should hold off actually building the binary module file until it is imported. `canImport` queries can happen, for example, during dependency scanning, when we do not wish to have the scanner tool execute any module builds. Resolves rdar://82603098
10 lines
245 B
Swift
10 lines
245 B
Swift
// RUN: %target-swift-frontend -c -primary-file %s -Rmodule-interface-rebuild -I %S/Inputs/Swift/
|
|
|
|
#if canImport(Foo)
|
|
print("Can indeed import Foo!")
|
|
#else
|
|
print("Cannot import Foo!")
|
|
#endif
|
|
|
|
// CHECK-NOT: rebuilding module 'Foo' from interface
|