forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdk-bridging-header.swift
24 lines (16 loc) · 1.33 KB
/
sdk-bridging-header.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %target-swift-frontend -parse -verify %s -import-objc-header %S/Inputs/sdk-bridging-header.h
// RUN: not %target-swift-frontend -parse %s -import-objc-header %S/Inputs/bad-bridging-header.h 2>&1 | FileCheck -check-prefix=CHECK-FATAL %s
// RUN: %target-swift-frontend -parse -verify %s -Xcc -include -Xcc %S/Inputs/sdk-bridging-header.h -import-objc-header %S/../Inputs/empty.swift
// RUN: not %target-swift-frontend -parse %s -Xcc -include -Xcc %S/Inputs/bad-bridging-header.h 2>&1 | FileCheck -check-prefix=CHECK-INCLUDE %s
// RUN: not %target-swift-frontend -parse %s -Xcc -include -Xcc %S/Inputs/bad-bridging-header.h -import-objc-header %S/../Inputs/empty.swift 2>&1 | FileCheck -check-prefix=CHECK-INCLUDE %s
// RUN: not %target-swift-frontend -parse %s -Xcc -include -Xcc %S/Inputs/bad-bridging-header.h -import-objc-header %S/Inputs/sdk-bridging-header.h 2>&1 | FileCheck -check-prefix=CHECK-INCLUDE %s
// CHECK-FATAL: failed to import bridging header
// CHECK-INCLUDE: error: 'this-header-does-not-exist.h' file not found
// CHECK-INCLUDE: error: use of unresolved identifier 'Predicate'
// REQUIRES: objc_interop
import Foundation
let `true` = Predicate.truePredicate()
let not = Predicate.not()
let and = Predicate.and([])
let or = Predicate.or([not, and])
_ = Predicate.foobar() // expected-error{{type 'Predicate' has no member 'foobar'}}