@@ -81,8 +81,6 @@ static FuncDecl *getInsertFunc(NominalTypeDecl *decl,
81
81
FuncDecl *insert = nullptr ;
82
82
for (auto candidate : inserts) {
83
83
if (auto candidateMethod = dyn_cast<FuncDecl>(candidate)) {
84
- if (!candidateMethod->hasParameterList ())
85
- continue ;
86
84
auto params = candidateMethod->getParameters ();
87
85
if (params->size () != 1 )
88
86
continue ;
@@ -158,7 +156,7 @@ static ValueDecl *lookupOperator(NominalTypeDecl *decl, Identifier id,
158
156
static ValueDecl *getEqualEqualOperator (NominalTypeDecl *decl) {
159
157
auto isValid = [&](ValueDecl *equalEqualOp) -> bool {
160
158
auto equalEqual = dyn_cast<FuncDecl>(equalEqualOp);
161
- if (!equalEqual || !equalEqual-> hasParameterList () )
159
+ if (!equalEqual)
162
160
return false ;
163
161
auto params = equalEqual->getParameters ();
164
162
if (params->size () != 2 )
@@ -187,7 +185,7 @@ static FuncDecl *getMinusOperator(NominalTypeDecl *decl) {
187
185
188
186
auto isValid = [&](ValueDecl *minusOp) -> bool {
189
187
auto minus = dyn_cast<FuncDecl>(minusOp);
190
- if (!minus || !minus-> hasParameterList () )
188
+ if (!minus)
191
189
return false ;
192
190
auto params = minus->getParameters ();
193
191
if (params->size () != 2 )
@@ -218,7 +216,7 @@ static FuncDecl *getMinusOperator(NominalTypeDecl *decl) {
218
216
static FuncDecl *getPlusEqualOperator (NominalTypeDecl *decl, Type distanceTy) {
219
217
auto isValid = [&](ValueDecl *plusEqualOp) -> bool {
220
218
auto plusEqual = dyn_cast<FuncDecl>(plusEqualOp);
221
- if (!plusEqual || !plusEqual-> hasParameterList () )
219
+ if (!plusEqual)
222
220
return false ;
223
221
auto params = plusEqual->getParameters ();
224
222
if (params->size () != 2 )
0 commit comments