Commit Graph

11 Commits

Author SHA1 Message Date
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
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
Dave Abrahams
d47835a301 Robustify test/Interpreter/SDK/objc_switch.swift
Tests were written such that FileCheck could easily mis-report the wrong
thing as failing.

Swift SVN r22494
2014-10-03 15:50:45 +00:00
Doug Gregor
bb02b85e74 Implicitly introduce .Some(x) to balance out optionals in is/as patterns.
This allows us to switch on an optional value and match it to concrete
values without explicitly writing the ".Some"'s. Better testing to follow...

Swift SVN r21018
2014-08-04 17:01:53 +00:00
Jordan Rose
5197f3c506 [test] Don't assume Dictionary contents are ordered.
Swift SVN r21000
2014-08-04 07:00:40 +00:00
Doug Gregor
1c484d91a0 Allow bridging "as" patterns in switch cases <rdar://problem/17408934>.
We now allow switches like this:

  switch anyObject {
  case let str as String: // bridged via NSString
    println(str) 

  case let intArr as [Int]: // bridged via NSArray
    println(intArr)

  default:
  }

Note that we do not allow collection downcasting in switch statements
(yet); that's covered by <rdar://problem/17897378>.



Swift SVN r20976
2014-08-03 19:58:49 +00:00
Joe Pamer
94dac129d4 Remove the BooleanType conformance from optional types (rdar://problem/17110911)
To limit user confusion when using conditional expressions of type Bool?, we've decided to remove the BooleanType (aka "LogicValue") conformance from optional types. (If users would like to use an expression of type Bool? as a conditional, they'll need to check against nil.)

Note: This change effectively regresses the "case is" pattern over types, since it currently demands a BooleanType conformance. I've filed rdar://problem/17791533 to track reinstating it if necessary.

Swift SVN r20637
2014-07-28 19:20:39 +00:00
Doug Gregor
4c49802c15 Drop the ~= overload for NSObject <rdar://problem/17639977>.
Swift SVN r20254
2014-07-21 15:32:06 +00:00
Doug Gregor
9210cd5ff4 Replace T[] array syntax with [T] in the test suite
Swift SVN r19192
2014-06-25 23:39:24 +00:00
Doug Gregor
2b8923e3ef Allow "isa" patterns to downcast collections and bridge through Objective-C classes.
When checking an isa pattern that requires either collection
downcasting or bridging through an Objective-C class (e.g., 
"is String" or "is Dictionary<String, Int>"), form a conditional
downcast and place it in an expression pattern.

With this change, we can test for these cases (with "is") but we can't
capture the value produced on success (e.g., for "let str as
String"). This is a first small step toward <rdar://problem/17408934>.


Swift SVN r19070
2014-06-21 22:46:15 +00:00