Commit Graph

13 Commits

Author SHA1 Message Date
Joe Groff
3ff48d95c4 Runtime: Fix memory leak when swift_dynamicCast does a copy_on_success bridging cast.
In the course of preparing the bridging object to be bridged to a Swift value, we forwarded the cast flags to _dynamicCastUnknownClass unaltered, which caused a leak for copy-on-success casts since it introduced an extra retain. Fix this by simplifying _dynamicCastUnknownClass to have no retain/release behavior of its own. Fixes rdar://problem/22587077.

Swift SVN r31841
2015-09-10 00:51:10 +00:00
David Farler
9aa7663ad3 Always debugPrint containers' elements
rdar://problem/19312992

Swift SVN r31067
2015-08-07 06:14:19 +00:00
Arnold Schwaighofer
859fbc0162 More executable_test for the test directory
Swift SVN r29280
2015-06-03 23:28:51 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
Graham Batty
83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +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
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Doug Gregor
df9fd70421 Dynamic casting: test class-existential-to-value casts via bridging.
These casts were already functional. <rdar://problem/17637959> appears
to be done.


Swift SVN r20965
2014-08-03 05:22:01 +00:00
Doug Gregor
c66a1ef98f Dynamic casting: handle value-to-class-existential casts via bridging.
This allows one to cast a value type (say, [String]) to AnyObject or
NSCoding, for example. It's another piece of <rdar://problem/17637959>.


Swift SVN r20964
2014-08-03 05:15:47 +00:00
Doug Gregor
4c06dff759 Dynamic casting: Handle object-to-value casts that use bridging.
For example, this allows dynamic casts from NSArray to [Int], using
bridging. Part of <rdar://problem/17637959>.


Swift SVN r20963
2014-08-03 04:11:45 +00:00
Doug Gregor
439e7ecafe Separate forced from conditional tests. NFC
Swift SVN r20907
2014-08-01 18:51:24 +00:00
Doug Gregor
fd3fa7228f Dynamic casting from Objective-C bridged value types to class types.
First part of <rdar://problem/17637959>.

Swift SVN r20906
2014-08-01 18:44:05 +00:00