Commit Graph

163 Commits

Author SHA1 Message Date
Chris Lattner
02999cac51 Reinstate the @ on the @objc attribute. This is largely a revert of r19555 with a few tweaks.
Swift SVN r19706
2014-07-08 21:50:34 +00:00
Chris Lattner
7a56499d61 Start making @objc not start with an @ sign:
- Change the parser to accept "objc" without an @ sign as a contextual
   keyword, including the dance to handle the general parenthesized case.
 - Update all comments to refer to "objc" instead of "@objc".
 - Update all diagnostics accordingly.
 - Update all tests that fail due to the diagnostics change.
 - Switch the stdlib to use the new syntax.

This does not switch all tests to use the new syntax, nor does it warn about
the old syntax yet.  That will be forthcoming.  Also, this needs a bit of 
refactoring, which will be coming up.



Swift SVN r19555
2014-07-04 05:57:57 +00:00
Joe Groff
a87e9fa40c Make the diagnostic for unsupported existentials more accurate and helpful.
Better to describe how the protocol can be used than how it can't. Also include a mention of Self type requirements as a source of non-existentiability.

Swift SVN r19207
2014-06-26 01:02:03 +00:00
Doug Gregor
55df89aabe Print array types as [T] instead of T[].
Swift SVN r19195
2014-06-25 23:59:51 +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
Chris Lattner
e7b26e54f1 fix <rdar://problem/17074673> QoI: Property observer error message mentions "variable with getter/setter"
by refering to "computed properties" instead of "variable with getter/setter" in a diagnostic.


Swift SVN r19036
2014-06-20 05:28:04 +00:00
Chris Lattner
50f96500fc fix <rdar://problem/16789886> Assert on protocol property requirement without a type
Swift SVN r19035
2014-06-20 05:20:49 +00:00
Chris Lattner
91e658488a fix <rdar://problem/17200672> Let in protocol causes unclear errors and crashes
We were correctly rejecting 'let' decls in a protocol if it had a get/set specifier,
but not if a stored let.


Swift SVN r19034
2014-06-20 05:08:54 +00:00
Joe Groff
5c09ca5ee5 Sema: Don't allow protocols to be used as non-self-conforming existential types.
These types are often useless and confusing to users who expect to be able to use Sequence or Generator as types in their own right like in C# or Java. While we're here, relax the rules for self-conformance to admit methods returning 'Self'. Covariant return types should not actually prevent a protocol type from conforming to itself, and the stdlib makes particular use of protocols with 'init' requirements which implicitly return Self.

Swift SVN r18989
2014-06-18 23:01:55 +00:00
Chris Lattner
c02489c57f Enable support for class properties in protocols.
This fixes <rdar://problem/16953517> Class properties should be allowed in protocols, even without stored class properties



Swift SVN r18345
2014-05-18 20:17:20 +00:00
Doug Gregor
1efd9fba5b Start accepting '#' in addition to '`' to mark a keyword argument <rdar://problem/16891828>.
Update the standard library, tests, diagnostics, and Fix-Its.

Swift SVN r17981
2014-05-13 00:03:04 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Doug Gregor
faf1c45d14 Shuffle the files in the testsuite a bit to try to reflect language structure.
There's a lot more work to do here, but start to categorize tests
along the lines of what a specification might look like, with
directories (chapters) for basic concepts, declarations, expressions,
statements, etc.


Swift SVN r9958
2013-11-05 15:12:57 +00:00