@@ -429,7 +429,7 @@ LookupTypeResult TypeChecker::lookupMemberType(DeclContext *dc,
429
429
// Add the type to the result set, so that we can diagnose the
430
430
// reference instead of just saying the member does not exist.
431
431
if (types.insert (memberType->getCanonicalType ()).second )
432
- result.Results . push_back ({typeDecl, memberType, nullptr });
432
+ result.addResult ({typeDecl, memberType, nullptr });
433
433
434
434
continue ;
435
435
}
@@ -475,10 +475,10 @@ LookupTypeResult TypeChecker::lookupMemberType(DeclContext *dc,
475
475
476
476
// If we haven't seen this type result yet, add it to the result set.
477
477
if (types.insert (memberType->getCanonicalType ()).second )
478
- result.Results . push_back ({typeDecl, memberType, nullptr });
478
+ result.addResult ({typeDecl, memberType, nullptr });
479
479
}
480
480
481
- if (result. Results . empty () ) {
481
+ if (! result) {
482
482
// We couldn't find any normal declarations. Let's try inferring
483
483
// associated types.
484
484
ConformanceCheckOptions conformanceOptions;
@@ -517,7 +517,7 @@ LookupTypeResult TypeChecker::lookupMemberType(DeclContext *dc,
517
517
auto memberType =
518
518
substMemberTypeWithBase (dc->getParentModule (), typeDecl, type);
519
519
if (types.insert (memberType->getCanonicalType ()).second )
520
- result.Results . push_back ({typeDecl, memberType, assocType});
520
+ result.addResult ({typeDecl, memberType, assocType});
521
521
}
522
522
}
523
523
0 commit comments