-
Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathsdk.swift
19 lines (12 loc) · 1.02 KB
/
sdk.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: %target-swift-frontend -parse -verify %s
// XFAIL: linux
import Foundation
// Swift and Foundation types should work.
func available_Int(_ a: Int) {}
func available_NSDateFormatter(_ a: NSDateFormatter) {}
// Some traditional Objective-C types should fail with fixits.
func unavailable_id(_ a: id) {} // expected-error {{use of undeclared type 'id'; did you mean to use 'AnyObject'?}} {{26-28=AnyObject}}
func unavailable_Class(_ a: Class) {} // expected-error {{use of undeclared type 'Class'; did you mean to use 'AnyClass'?}} {{29-34=AnyClass}}
func unavailable_BOOL(_ a: BOOL) {} // expected-error {{use of undeclared type 'BOOL'; did you mean to use 'ObjCBool'?}} {{28-32=ObjCBool}}
func unavailable_SEL(_ a: SEL) {} // expected-error {{use of undeclared type 'SEL'; did you mean to use 'Selector'?}} {{27-30=Selector}}
func unavailable_NSUInteger(_ a: NSUInteger) {} // expected-error {{use of undeclared type 'NSUInteger'; did you mean to use 'Int'?}} {{34-44=Int}} expected-note {{did you mean to use 'UInt'?}} {{34-44=UInt}}