mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Most of this is in updating the standard library, SDK overlays, and
piles of test cases to use the new names. No surprises here, although
this shows us some potential heuristic tweaks.
There is one substantive compiler change that needs to be factored out
involving synthesizing calls to copyWithZone()/copy(zone:). Aside from
that, there are four failing tests:
Swift :: ClangModules/objc_parse.swift
Swift :: Interpreter/SDK/Foundation_test.swift
Swift :: Interpreter/SDK/archiving_generic_swift_class.swift
Swift :: Interpreter/SDK/objc_currying.swift
due to two independent remaining compiler bugs:
* We're not getting partial ordering between NSCoder's
encode(AnyObject, forKey: String) and NSKeyedArchiver's version of
that method, and
* Dynamic lookup (into AnyObject) doesn't know how to find the new
names. We need the Swift name lookup tables enabled to address this.
32 lines
716 B
Swift
32 lines
716 B
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse %s -verify
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
// Note: this is in a separate file because -verify doesn't complain
|
|
// about diagnostics from other files.
|
|
import Foundation
|
|
import AppKit
|
|
|
|
// Okay to use an Objective-C-defined initializer to satisfy an
|
|
// initializer requirement in a protocol.
|
|
protocol URLInitializable {
|
|
init?(url: String!)
|
|
}
|
|
|
|
extension URLDocument : URLInitializable { }
|
|
|
|
// Okay to satisfy an 'init' requirement with an 'init!'.
|
|
protocol IntInitializable {
|
|
init(int value: Int)
|
|
}
|
|
|
|
extension NSTableViewController : IntInitializable {
|
|
}
|
|
|
|
func testInitWithIntIUO() {
|
|
let tvc = NSTableViewController(int: 5)
|
|
if tvc == nil { }
|
|
}
|
|
|
|
|