Make the following illegal:
switch thing {
case .A(var x):
modify(x0
}
And provide a replacement 'var' -> 'let' fix-it.
rdar://problem/23172698
Swift SVN r32883
There's still work left to do. In terms of next steps, there's still rdar://problem/22126141, which covers removing the 'workaround' overloads for print (that prevent bogus overload resolution failures), as well as providing a decent diagnostic when users invoke print with 'appendNewline'.
Swift SVN r30976
Just like enums with integer raw values can get autoincrementing case values,
enums with string raw values get the name of the element. The name is /not/
prefixed with the enum type because the purpose is presumably to interoperate
with a string-based system, which may require either writing or printing the
raw value as a string.
If an enum's raw type is both integer literal convertible and string literal
convertible, the integer side wins. That is, elements without raw values
will get auto-incremented integer values, rather than string values, and will
produce an error if an auto-incremented value cannot be generated.
rdar://problem/15819953
Swift SVN r29542
The rule changes are as follows:
* All functions (introduced with the 'func' keyword) have argument
labels for arguments beyond the first, by default. Methods are no
longer special in this regard.
* The presence of a default argument no longer implies an argument
label.
The actual changes to the parser and printer are fairly simple; the
rest of the noise is updating the standard library, overlays, tests,
etc.
With the standard library, this change is intended to be API neutral:
I've added/removed #'s and _'s as appropriate to keep the user
interface the same. If we want to separately consider using argument
labels for more free functions now that the defaults in the language
have shifted, we can tackle that separately.
Fixes rdar://problem/17218256.
Swift SVN r27704
Somehow this got out of sync, and IRGen's idea of which flag it was collided with "hasExtraInhabitants", causing hilarity to ensue whenever weak or protocol types were packed in optionals. Fixes rdar://problem/17814752.
Swift SVN r21803
This only tackles the protocol case (<rdar://problem/17510790>); it
does not yet generalize to an arbitrary "class" requirement on either
existentials or generics.
Swift SVN r19896