Array did not initialize fast enumeration state if it was empty.
Surprisingly, this did not break code that is generated by Clang
currently. (But as far as I understand fast enumeration, it may abort
the program because mutation pointer is null.)
Swift SVN r21940
from a bridged NSDictionary, stable
We used to return a fresh pointer value every time an NSDictionary
element is requested, but, unfortunately, our SDK has bugs.
Fixes rdar://18191358 for Dictionary.
Swift SVN r21905
Per API review with Ali. While we're here, give the initializer a corresponding 'rawValue' argument label, and change the associated type name to RawValue to match.
Swift SVN r21888
When computing the set of potential bindings for a type variable with
a literal constraint, we suggest the default literal type as a
fallback. Suppress this suggestion in the cases where another
constraint provides a type that already has some kind of contextual
type information (that does conform to the protocol), making the
default literal type more of a fallback. When type-checking the given
declaration:
var dict: NSDictionary = [
"status": 200,
"people": [ [ "id": 255,
"name": [ "first": "John", "last": "Appleseed" ] ] ] ]
it reduces the number of solution states explored by 2/3, the number
of attempted type variable bindings by 3/4, and the number of
disjunctions explored by 1/3. This optimization is useful in general,
and lets type annotations guide the type checker to a much greater
extent. It also helps with rdar://problem/18269449.
Swift SVN r21878
Remove the overload for MutableCollectionType and make it return a
regular Array, as the comment said. Together with r21829 this fixes
<rdar://problem/18286522>
Swift SVN r21844
Expose any, all on Array and all the Lazy sequence adapters. Make the
'contains' algorithm that takes a predecate unavailable in favor of
'any', which does the same thing.
Fixes <rdar://problem/18190149> [algorithm] `contains` syntax is ambiguous
Swift SVN r21810
Redefine the RawRepresentable protocol to use an 'init?' method instead of 'fromRaw(Raw)', and a 'raw' get-only property instead of 'toRaw()'. Update the compiler to support deriving conformances for enums and option sets with the new protocol. rdar://problem/18216832
Swift SVN r21762
fail when fix for rdar://problem/18114265 is reverted, so I removed the
original test that depends on regular expressions and Foundation)
This uncovered more issues: <rdar://problem/18160335> String.replaceRange and
String.removeRange reallocate unique storage
Swift SVN r21525
the type
Printing Float32 with %0.15g not only wastes screen space, but also causes
confusion for users, and pretends that a Float32 has more precision than it
actually does.
rdar://18043123
Swift SVN r21435
The syntax being reverted added busywork and noise to the common case
where you want to say "I have the right address, but the wrong type,"
without adding any real safety.
Also it eliminated the ability to write UnsafePointer<T>(otherPointer),
without adding ".self" to T. Overall, it was not a win.
This reverts commits r21324 and r21342
Swift SVN r21424
This takes all %target-run-simple-swift and %target-run-stdlib-swift
invocations and runs them using the interpreter instead. To enable this
mode, pass --param=interpret to lit.py; you can add this flag to the
LLVM_LIT_ARGS CMake setting (which defaults to "-sv").
This doesn't support separated %target-build / %target-run steps, nor
does it work with StdlibUnittest (which uses posix_spawn to run its
subtasks). But it's a start.
<rdar://problem/17938202>
Swift SVN r21391
immutable NSArrays (which autorelease objects internally), and by building the
code in ARC mode (so that autorelease optimization kicks in).
rdar://17944094
Swift SVN r21365