mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
File diff suppressed because it is too large
Load Diff
@@ -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]
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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(" • "))
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user