Commit Graph

4 Commits

Author SHA1 Message Date
Slava Pestov
478e1c7513 Partial application of @objc protocol methods 2015-12-10 16:39:48 -08:00
Joe Pamer
e079d521ac Move test from r30724 to a more appropriate place.
Swift SVN r30732
2015-07-28 23:37:06 +00:00
Chris Lattner
9fd3f3bf23 Reimplement checking for incorrect partial applications in MiscDiagnostics (instead of
CSApply).  The code is somewhat simpler there, more correct (fixing the FIXME in the 
testcase) and doesn't run afoul of CSDiags trying to type check partial AST 
subexpressions.


Swift SVN r30425
2015-07-21 00:50:05 +00:00
Slava Pestov
7319a97ab4 Sema: Rewrite witness method calls as ApplyExpr + DeclRefExpr
Special-casing these as MemberRefExprs created an asymmetry
where unbound archetype instance methods (<T : P> T.f) could
not be represented. Treating class and protocol methods
uniformly also eliminates a handful of special cases around
MemberRefExpr.

SILGen's RValue and call emission peepholes now have to know
about DeclRefExprs that point to protocol methods.

Finally, generalize the diagnostic for partially applied
mutating methods to any partially applied function with an
inout parameter, since this is not supported.

Fixes <rdar://problem/20564672>.

Swift SVN r29298
2015-06-04 15:57:58 +00:00