Skip to content

Commit 0da9745

Browse files
committed
Sema: Simplify TypeResolution::areSameType()
1 parent c37a4ba commit 0da9745

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -242,21 +242,8 @@ bool TypeResolution::areSameType(Type type1, Type type2) const {
242242
}
243243
}
244244

245-
// Otherwise, perform a structural check.
246245
assert(stage == TypeResolutionStage::Structural);
247-
248-
// FIXME: We should be performing a deeper equality check here.
249-
// If both refer to associated types with the same name, they'll implicitly
250-
// be considered equivalent.
251-
auto depMem1 = type1->getAs<DependentMemberType>();
252-
if (!depMem1) return false;
253-
254-
auto depMem2 = type2->getAs<DependentMemberType>();
255-
if (!depMem2) return false;
256-
257-
if (depMem1->getName() != depMem2->getName()) return false;
258-
259-
return areSameType(depMem1->getBase(), depMem2->getBase());
246+
return false;
260247
}
261248

262249
Type TypeChecker::getOptionalType(SourceLoc loc, Type elementType) {

0 commit comments

Comments
 (0)