API Notes File: Add the notes generated as the product of the first nullability audit of Foundation

As well as the required test modifications.

Swift SVN r21126
This commit is contained in:
Anna Zaks
2014-08-09 01:40:48 +00:00
parent 40d5448bde
commit ca03e527c3
6 changed files with 7182 additions and 267 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -17,6 +17,6 @@
// RUN: FileCheck -input-file %t/Foundation.NSString.printed.txt -check-prefix=CHECK_DICTIONARY %s
// Make sure that we don't qualify 'NSErrorPointer'.
// CHECK_NSSTRING: init(contentsOfFile path: String!, encoding enc: UInt, error: NSErrorPointer)
// CHECK_NSSTRING: init(contentsOfFile path: String, encoding enc: UInt, error: NSErrorPointer)
// CHECK_DICTIONARY: func propertyListFromStringsFileFormat() -> [NSObject : AnyObject]!
// CHECK_DICTIONARY: func propertyListFromStringsFileFormat() -> [NSObject : AnyObject]

View File

@@ -48,7 +48,7 @@ assert(!NSString.instancesRespondToSelector("wobble"))
var array2 : NSArray = [hello, hello]
// Switch on strings
switch asNSString("world").uppercaseString! {
switch asNSString("world").uppercaseString {
case "WORLD":
print("Found it\n")

View File

@@ -1,7 +1,7 @@
// RUN: %target-run-simple-swift | FileCheck %s
import Foundation
func foo(f: String! -> String!) {
func foo(f: String -> String) {
println(f(", "))
println(f(""))
}

View File

@@ -95,7 +95,7 @@ func testConvertArrayOfImplicitUnwrappedArray() {
// CHECK: )
for (index, obj) in enumerate(nsarr) {
if let innerNSArr = obj as? NSArray {
println("Element \(index) has value \(innerNSArr.description!)")
println("Element \(index) has value \(innerNSArr.description)")
} else {
println("Element \(index) is not an NSArray")
}

View File

@@ -13,7 +13,7 @@ import Foundation
// The most simple subclass of NSString that CoreFoundation does not know
// about.
class NonContiguousNSString : NSString {
required init(coder aDecoder: NSCoder!) {
required init(coder aDecoder: NSCoder) {
fatalError("don't call this initializer")
}