Commit Graph

14 Commits

Author SHA1 Message Date
Max Moiseev
3a3984877a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-15 15:43:34 -08:00
Jordan Rose
006a016e04 [test] Remove a hackaround for supporting last year's SDKs.
We have much stronger dependencies on this year's SDKs now.

rdar://problem/19494514

Swift SVN r29451
2015-06-17 17:52:42 +00:00
Arnold Schwaighofer
859fbc0162 More executable_test for the test directory
Swift SVN r29280
2015-06-03 23:28:51 +00:00
Chris Willmore
acf4ee662e Update test for newer SDK (on behalf of Jordan Rose).
<rdar://problem/21118391> Xcode 7 submission test failure

Swift SVN r29071
2015-05-27 19:05:48 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
Dmitri Hrybenko
ab408d4dc3 Update the compiler and SDK overlay for nullability and generics in Foundation
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
2015-03-24 02:18:06 +00:00
Jordan Rose
4dfa4edbd4 [test] Hack to handle API differences between SDKs.
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
2015-01-16 03:06:54 +00:00
Chris Willmore
03a6190a1f <rdar://problem/19031957> Change failable casts from "as" to "as!"
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
2015-01-08 00:33:59 +00:00
Doug Gregor
5fc8ac7fd1 Require the 'override' keyword for initializers that override designated initializers.
Swift SVN r20490
2014-07-24 15:38:33 +00:00
Doug Gregor
eee00ca58b Require 'required' keyword when overriding a required initializer.
Swift SVN r20489
2014-07-24 15:30:15 +00:00
Doug Gregor
070ee7713a Treat imported initializers from Objective-C protocols as 'required'.
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
2014-07-23 22:16:35 +00:00
Ted Kremenek
a8259489cf Mark test 'CALayer.swift' as requiring OSX as it has APIs that are marked unavailable on iOS.
Swift SVN r19217
2014-06-26 04:25:51 +00:00
Joe Groff
ef52068e43 SILGen: Don't +1 'self' references for direct property access in constructors.
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
2014-05-26 18:09:25 +00:00
Joe Groff
456284464d SILGen: Carefully preserve 'self' at +1 through init delegation.
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
2014-05-23 23:50:53 +00:00