mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These are tests that fail in the next commit without this flag. This does not add -verify-ignore-unrelated to all tests with -verify, only the ones that would fail without it. This is NFC since this flag is currently a no-op.
24 lines
635 B
Swift
24 lines
635 B
Swift
/// @_implementationOnly imports should be compatible with @_spi imports
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module -DLIB_A %s -module-name A -emit-module-path %t/A.swiftmodule
|
|
// RUN: %target-swift-frontend -emit-module -DLIB_B %s -module-name B -emit-module-path %t/B.swiftmodule -I %t
|
|
// RUN: rm %t/A.swiftmodule
|
|
// RUN: %target-swift-frontend -typecheck -verify -verify-ignore-unrelated -DLIB_C %s -I %t
|
|
|
|
#if LIB_A
|
|
|
|
@_spi(A) public func foo() {}
|
|
|
|
#elseif LIB_B
|
|
|
|
@_spi(A) @_implementationOnly import A
|
|
foo() // OK
|
|
|
|
#elseif LIB_C
|
|
|
|
import B
|
|
foo() // expected-error{{cannot find 'foo' in scope}}
|
|
|
|
#endif
|