Skip to content

Commit 09744f8

Browse files
committed
[CS] Remove dead logic
This code seems to be ancient and dates back to when `boundType` may have been a function type. Nowadays it should always be a type variable.
1 parent aeec32b commit 09744f8

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3436,18 +3436,6 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
34363436
}
34373437
}
34383438

3439-
// If we're binding to an init member, the 'throws' need to line up
3440-
// between the bound and reference types.
3441-
if (auto CD = dyn_cast<ConstructorDecl>(decl)) {
3442-
auto boundFunctionType = boundType->getAs<AnyFunctionType>();
3443-
3444-
if (boundFunctionType &&
3445-
CD->hasThrows() != boundFunctionType->isThrowing()) {
3446-
boundType = boundFunctionType->withExtInfo(
3447-
boundFunctionType->getExtInfo().withThrows());
3448-
}
3449-
}
3450-
34513439
if (isa<SubscriptDecl>(decl)) {
34523440
if (locator->isResultOfKeyPathDynamicMemberLookup() ||
34533441
locator->isKeyPathSubscriptComponent()) {

0 commit comments

Comments
 (0)