File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -616,21 +616,6 @@ namespace {
616
616
return !isa<FuncDecl>(member) || !cast<FuncDecl>(member)->isMutating ();
617
617
}
618
618
619
- unsigned getNaturalArgumentCount (ValueDecl *member) {
620
- if (isa<AbstractFunctionDecl>(member)) {
621
- // For functions, close the existential once the function
622
- // has been fully applied.
623
- return 2 ;
624
- } else {
625
- // For storage, close the existential either when it's
626
- // accessed (if it's an rvalue only) or when it is loaded or
627
- // stored (if it's an lvalue).
628
- assert (isa<AbstractStorageDecl>(member) &&
629
- " unknown member when opening existential" );
630
- return 1 ;
631
- }
632
- }
633
-
634
619
// / If the expression might be a dynamic method call, return the base
635
620
// / value for the call.
636
621
Expr *getBaseExpr (Expr *expr) {
@@ -730,7 +715,7 @@ namespace {
730
715
731
716
// Determine the number of applications that need to occur before
732
717
// we can close this existential, and record it.
733
- unsigned maxArgCount = getNaturalArgumentCount ( member);
718
+ unsigned maxArgCount = member-> getNumCurryLevels ( );
734
719
unsigned depth = ExprStack.size () - getArgCount (maxArgCount);
735
720
736
721
// Invalid case -- direct call of a metatype. Has one less argument
You can’t perform that action at this time.
0 commit comments