We have an SPI between the Swift compiler and Foundation based on the
SWIFT_SDK_OVERLAY_FOUNDATION_EPOCH preprocessor macro that allows us to
request the new API. rdar://20270080 tracks removing it.
Swift SVN r26475
objc_AssociationPolicy is now a proper enum, but the official build of Swift
doesn't use those SDKs yet. Accomodate those of us who are with a hack
(and filed rdar://problem/19494514 to remove it).
Swift SVN r24470
Previously the "as" keyword could either represent coercion or or forced
downcasting. This change separates the two notions. "as" now only means
type conversion, while the new "as!" operator is used to perform forced
downcasting. If a program uses "as" where "as!" is called for, we emit a
diagnostic and fixit.
Internally, this change removes the UnresolvedCheckedCastExpr class, in
favor of directly instantiating CoerceExpr when parsing the "as"
operator, and ForcedCheckedCastExpr when parsing the "as!" operator.
Swift SVN r24253
Initializers for non-final classes will soon need to be 'required' to
conform to an initializer requirement in a protocol, so start
marking imported initializers from Objective-C protocols as
'required'. This is part of <rdar://problem/17408284> and
<rdar://problem/17415607>.
Swift SVN r20428
The CALayer brittleness in <rdar://problem/17014037> is worse than we thought—we can't r/r *at all* before super.init. Go through some contortions to ensure that, when doing direct stored property access in an initializer, we always base off of a +0 value. I tried fixing this in a more general and principled way using SGFContext::AllowPlusZero, but that introduced miscompiles we don't have the luxury of tracking down right now, so hack a more targeted fix that only affects class initializers.
Swift SVN r18635
CALayer and potentially other framework classes implement their own refcounting
schemes that assume [self retainCount] == 1 at initialization time, a guarantee
SILGen didn't attempt to meet until now. Set a flag in SILGenFunction while
doing initializer delegations to indicate that a 'self' reference can consume
the current 'self' binding, and reinitialize rather than reassign 'self' with
the result of the delegation if it was successfully consumed. Fixes
<rdar://problem/17014037>.
Swift SVN r18608