Commit Graph

9 Commits

Author SHA1 Message Date
Max Moiseev
a49dab6bf8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-29 12:08:52 -08:00
Daniel Duan
780b58a9a5 [Parser] update tests for 'inout' syntax adjustment 2016-02-26 01:33:22 -08:00
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -08:00
Max Moiseev
3a3984877a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-15 15:43:34 -08:00
Doug Gregor
06c5e9cd5b Enable "omit needless words" by default.
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.
2015-12-11 14:46:50 -08:00
Jordan Rose
ff7b6b74fe Foundation overlay: Add a generic NSCoder.decodeObjectOfClass(_:forKey:).
Like decodeTopLevelObjectOfClass(_:forKey:), this API works very nicely
as a generic method in Swift, and this one is actually the one we expect
to be commonly used. One thing to note here is that these methods are
stricter than their ObjC counterparts: they will do a forced checked cast
even when the unarchiver does not use "secure" coding.

This depends on the previous commit; without it, we do not actually
enforce type safety for these methods.

The API notes change is to make the non-generic version of this method
unavailable so that it does not participate in overload resolution.
Without this we prefer the non-generic method unless there's a contextual
type for the result. I've filed rdar://problem/22243198 to track taking
this out once Foundation has updated their headers.

rdar://problem/17060110 (again)

Swift SVN r31154
2015-08-12 01:36:08 +00:00
Dmitri Hrybenko
adda8a980d Foundation overlay: add throwing and generic variants for NSCoder APIs
rdar://21166220

Swift SVN r29415
2015-06-17 00:27:22 +00:00
Dmitri Hrybenko
2e3bc8da98 The test Foundation_NewGenericAPIs.swift requires ObjC runtime
Swift SVN r29257
2015-06-02 22:38:46 +00:00
Dmitri Hrybenko
445ab98267 Ignore certain NS_SWIFT_UNAVAILABLE attributes in Foundation
This is a temporary workaround.  rdar://21192622 tracks reverting this
change.

Swift SVN r29252
2015-06-02 20:59:14 +00:00