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.
22 lines
1.1 KiB
Swift
22 lines
1.1 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: mkdir -p %t/tmp
|
|
|
|
// Test with the normal bridging header.
|
|
// RUN: %target-typecheck-verify-swift -verify-ignore-unrelated -internal-import-bridging-header %S/../Inputs/c-bridging-header.h -sdk %clang-importer-sdk -verify-ignore-unknown
|
|
|
|
// RUN: not %target-swift-frontend -typecheck -internal-import-bridging-header %S/../Inputs/c-bridging-header.h -sdk %clang-importer-sdk %s 2>&1 | %FileCheck %s
|
|
|
|
// Test with a precompiled bridging header.
|
|
// RUN: %target-swift-frontend -emit-pch -o %t/c-bridging-header.pch %S/../Inputs/c-bridging-header.h -sdk %clang-importer-sdk
|
|
// RUN: %target-typecheck-verify-swift -verify-ignore-unrelated -internal-import-bridging-header %t/c-bridging-header.pch -sdk %clang-importer-sdk -verify-ignore-unknown
|
|
|
|
|
|
@inlinable
|
|
public func f() -> Any {
|
|
return red
|
|
// expected-error@-1{{var 'red' is internal and cannot be referenced from an '@inlinable' function}}
|
|
// expected-warning@-2{{getter for var 'red' is internal and should not be referenced from an '@inlinable' function}}
|
|
}
|
|
|
|
// CHECK: var 'red' imported as 'internal' from bridging header
|