@@ -2970,7 +2970,7 @@ namespace {
29702970 DeclName constrName (ctx, DeclBaseName::createConstructor (), argLabels);
29712971
29722972 ConcreteDeclRef witness =
2973- conformance.getWitnessByName (type-> getRValueType (), constrName);
2973+ conformance.getWitnessByName (constrName);
29742974 if (!witness || !isa<AbstractFunctionDecl>(witness.getDecl ()))
29752975 return nullptr ;
29762976 return witness;
@@ -3108,8 +3108,7 @@ namespace {
31083108
31093109 auto constrName = TypeChecker::getObjectLiteralConstructorName (ctx, expr);
31103110
3111- ConcreteDeclRef witness = conformance.getWitnessByName (
3112- conformingType->getRValueType (), constrName);
3111+ ConcreteDeclRef witness = conformance.getWitnessByName (constrName);
31133112
31143113 auto selectedOverload = solution.getOverloadChoiceIfAvailable (
31153114 cs.getConstraintLocator (expr, ConstraintLocator::ConstructorMember));
@@ -3822,7 +3821,7 @@ namespace {
38223821 DeclName name (ctx, DeclBaseName::createConstructor (),
38233822 {ctx.Id_arrayLiteral });
38243823 ConcreteDeclRef witness =
3825- conformance.getWitnessByName (arrayTy-> getRValueType (), name);
3824+ conformance.getWitnessByName (name);
38263825 if (!witness || !isa<AbstractFunctionDecl>(witness.getDecl ()))
38273826 return nullptr ;
38283827 expr->setInitializer (witness);
@@ -3868,7 +3867,7 @@ namespace {
38683867 DeclName name (ctx, DeclBaseName::createConstructor (),
38693868 {ctx.Id_dictionaryLiteral });
38703869 ConcreteDeclRef witness =
3871- conformance.getWitnessByName (dictionaryTy-> getRValueType (), name);
3870+ conformance.getWitnessByName (name);
38723871 if (!witness || !isa<AbstractFunctionDecl>(witness.getDecl ()))
38733872 return nullptr ;
38743873 expr->setInitializer (witness);
@@ -8081,7 +8080,7 @@ Expr *ExprRewriter::convertLiteralInPlace(
80818080 // Find the witness that we'll use to initialize the type via a builtin
80828081 // literal.
80838082 auto witness = builtinConformance.getWitnessByName (
8084- type-> getRValueType (), builtinLiteralFuncName);
8083+ builtinLiteralFuncName);
80858084 if (!witness || !isa<AbstractFunctionDecl>(witness.getDecl ()))
80868085 return nullptr ;
80878086
@@ -8120,7 +8119,7 @@ Expr *ExprRewriter::convertLiteralInPlace(
81208119
81218120 // Find the witness that we'll use to initialize the literal value.
81228121 auto witness =
8123- conformance.getWitnessByName (type-> getRValueType (), literalFuncName);
8122+ conformance.getWitnessByName (literalFuncName);
81248123 if (!witness || !isa<AbstractFunctionDecl>(witness.getDecl ()))
81258124 return nullptr ;
81268125
0 commit comments