step to achieve this goal, this change allows the first parameter of
@availability to be completed with either one of the following four
platforms: *, iOS, iOSApplicationExtension, and OSX.
rdar://19541135
Swift SVN r25703
The previous commit enabled this; now it's just about removing the
restriction in the parser and tightening up code completion.
Using 'super' in a closure where 'self' is captured weak or unowned still
doesn't work; the reference to 'self' within the closure is treated as
strong regardless of how it's declared. Fixing this requires a cascade of
effort, so instead I just cloned rdar://problem/19755221.
rdar://problem/14883824
Swift SVN r25065
Curried function parameters (i.e., those past the first written
parameter list) default to having argument labels (which they always
have), but any attempt to change or remove the argument labels would
fail. Use the fact that we keep both the argument labels and the
parameter names in patterns to generalize our handling of argument
labels to address this problem.
The IDE changes are due to some positive fallout from this change: we
were using the body parameters as labels in code completions for
subscript operations, which was annoying and wrong.
Fixes rdar://problem/17237268.
Swift SVN r24525
This affects the MacTypes.h header in the Darwin module as well as the
CarbonCore and OSServices sub-frameworks of the CoreServices framework.
API hidden in this way can still be accessed through qualified lookup
in case it's really needed, but will not appear in the module interface
or in code completion.
This is a hack, and it would be nice to remove it if/when all of this API
is officially marked as deprecated. I did check with Nick for MacTypes.h
and Chris Linn from CoreServices that this was a reasonable action to take.
rdar://problem/16806148
Swift SVN r24424
llvm::Optional lives in "llvm/ADT/Optional.h". Like Clang, we can get
Optional in the 'swift' namespace by including "swift/Basic/LLVM.h".
We're now fully switched over to llvm::Optional!
Swift SVN r22477
A shortcut to skip validation if the type is set does not work since the
underlying type might not be set.
No tests since I can not reproduce outside of Xcode.
rdar://18502983
Swift SVN r22428
When trying to implement deduplication of results, found and fixed an issue
with loose checks for generic overload checking.
rdar://17995317
Swift SVN r21276
declarations exhaustively, including protocol conformances.
Refactor and simplify copyAssociatedUSRs() to copy each USR one by one.
Manually copy the string array into the sink allocator, to work around
a clang-600 merge failure.
Swift SVN r20910
If the completion result is a declaration, it contains the USR of the specified declaration and all overridden declarations.
Additional tests on SourceKit side.
This addresses <rdar://problem/17600891>.
Swift SVN r20877
This includes proper printing support as well as proper platform checking
when seeing if a decl is unavailable. A few other places in the code will
now use AvailabilityAttr::isUnavailable instead of just checking the
is-unavailable-always flag (and not always checking the platform).
No new tests yet because this doesn't include /parsing/ the other fields
of AvailabilityAttr. That will come next, at which point we'll test each
of the cases that has been switched over to use
AvailabilityAttr::isUnavailable.
Part of <rdar://problem/17024498>
Swift SVN r20844
The former is for debugging, the latter is for detailed presentation to users.
swift -print-ast will continue using printEverything, as will swift-ide-test,
but all other features should use printVerbose.
Swift SVN r20432
Expose Substitution's archetype, replacement, and conformances only through getters so we can actually assert invariants about them. To start, require replacement types to be materializable in order to catch cases where the type-checker tries to bind type variables to lvalue or inout types, and require the conformance array to match the number of protocol conformances required by the archetype. This exposes some latent bugs in the test suite I've marked as failures for now:
- test/Constraints/overload.swift was quietly suffering from <rdar://problem/17507421>, but we didn't notice because we never tried to codegen it.
- test/SIL/Parser/array_roundtrip.swift doesn't correctly roundtrip substitutions, which I filed as <rdar://problem/17781140>.
Swift SVN r20418
optional & alias types for closure type parameters.
This allows code completion placeholder expansion to properly expand
closure parameters utilizing a typealias, e.g. dispatch_block_t.
Update and add test for the above.
Work for <rdar://problem/15860693>.
Swift SVN r20206
Completely disable the AST transformation for single-expression closures. When
this transformation picks up an incomplete expression, the resulting AST is
almost guaranteed to have type mismatches, and the type checker just marks
everything with error types.
rdar://17193319 rdar://17086137
Swift SVN r20153
attribute is a "modifier" of a decl, not an "attribute" and thus shouldn't
be spelt with an @ sign. Teach the parser to parse "@foo" but reject it with
a nice diagnostic and a fixit if "foo" is a decl modifier.
Move 'dynamic' over to this (since it simplifies some code), and switch the
@optional and @required attributes to be declmodifiers (eliminating their @'s).
Swift SVN r19787
Introduce the new BooleanLiteralConvertible protocol for Boolean
literals. Take "true" and "false" as real keywords (which is most of the
reason for the testsuite churn). Make Bool BooleanLiteralConvertible
and the default Boolean literal type, and ObjCBool
BooleanLiteralConvertible. Fixes <rdar://problem/17405310> and the
recent regression that made ObjCBool not work with true/false.
Swift SVN r19728
We want to complete foo(p: (Int, Int)) as foo({#(p): (Int, Int)#}), not
as foo({#Int#}, {#Int#}). Also, make initializers go through the
function parameter code path rather than the enum one, since we don't
want to recursively find parameters in tuples.
<rdar://problem/17461862>
Swift SVN r19514
Leading paren in constructor patterns should be included in the description
text, but not in the name.
This addresses the first part of <rdar://problem/17004638>.
Swift SVN r19114
LLVM's system_error.h has been changed to forward to the standard
version of the same. Update usage for the minor API changes that this
entails.
Based in part on a patch by Justin Bogner.
Swift SVN r18832