Skip to content

Commit 9deaf6c

Browse files
committed
Sema: Fixes for partial application of protocol methods
Previously the placement of the OpenExistentialExpr was determined entirely from the natural argument count of the function. There was a hack to add any missing OpenExistentialExprs at the top level, but this didn't work if the method had a Self return value and there were intermediate expressions, eg, if someMethod has a Self return, foo(anExistential.someMethod) would generate a diagnostic about open existentials. Change ExprRewriter to use a new existential placement algorithm that instead walks up the expression stack to determine the outermost function application of an existential base, and insert the OpenExistentialExpr there. Progress on <rdar://problem/21289579>. Swift SVN r29448
1 parent 72c44b4 commit 9deaf6c

File tree

7 files changed

+389
-242
lines changed

7 files changed

+389
-242
lines changed

0 commit comments

Comments
 (0)