File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,8 @@ bool constraints::areConservativelyCompatibleArgumentLabels(
131131 hasCurriedSelf = false ;
132132 } else if (baseType->is <AnyMetatypeType>() && decl->isInstanceMember ()) {
133133 hasCurriedSelf = false ;
134+ } else if (isa<EnumElementDecl>(decl)) {
135+ hasCurriedSelf = false ;
134136 } else {
135137 hasCurriedSelf = true ;
136138 }
@@ -142,6 +144,8 @@ bool constraints::areConservativelyCompatibleArgumentLabels(
142144 } else if (auto subscript = dyn_cast<SubscriptDecl>(decl)) {
143145 assert (!hasCurriedSelf && " Subscripts never have curried 'self'" );
144146 fTy = subscript->getInterfaceType ()->castTo <AnyFunctionType>();
147+ } else if (auto enumElement = dyn_cast<EnumElementDecl>(decl)) {
148+ fTy = enumElement->getInterfaceType ()->castTo <AnyFunctionType>();
145149 } else {
146150 return true ;
147151 }
You can’t perform that action at this time.
0 commit comments