@@ -475,12 +475,9 @@ class ResolvePattern : public ASTVisitor<ResolvePattern,
475475 // For now, just return the unbound generic type.
476476 return unboundTy;
477477 },
478- /* placeholderHandler*/
479- [&](auto placeholderRepr) {
480- // FIXME: Don't let placeholder types escape type resolution.
481- // For now, just return the placeholder type.
482- return PlaceholderType::get (Context, placeholderRepr);
483- });
478+ // FIXME: Don't let placeholder types escape type resolution.
479+ // For now, just return the placeholder type.
480+ PlaceholderType::get);
484481 const auto ty = resolution.resolveType (repr);
485482 auto *enumDecl = dyn_cast_or_null<EnumDecl>(ty->getAnyNominal ());
486483 if (!enumDecl)
@@ -600,12 +597,9 @@ class ResolvePattern : public ASTVisitor<ResolvePattern,
600597 // resolution. For now, just return the unbound generic type.
601598 return unboundTy;
602599 },
603- /* placeholderHandler*/
604- [&](auto placeholderRepr) {
605- // FIXME: Don't let placeholder types escape type resolution.
606- // For now, just return the placeholder type.
607- return PlaceholderType::get (Context, placeholderRepr);
608- })
600+ // FIXME: Don't let placeholder types escape type resolution.
601+ // For now, just return the placeholder type.
602+ PlaceholderType::get)
609603 .resolveType (prefixRepr);
610604 auto *enumDecl = dyn_cast_or_null<EnumDecl>(enumTy->getAnyNominal ());
611605 if (!enumDecl)
@@ -813,11 +807,9 @@ Type PatternTypeRequest::evaluate(Evaluator &evaluator,
813807 // For now, just return the unbound generic type.
814808 return unboundTy;
815809 };
816- placeholderHandler = [&](auto placeholderRepr) {
817- // FIXME: Don't let placeholder types escape type resolution.
818- // For now, just return the placeholder type.
819- return PlaceholderType::get (Context, placeholderRepr);
820- };
810+ // FIXME: Don't let placeholder types escape type resolution.
811+ // For now, just return the placeholder type.
812+ placeholderHandler = PlaceholderType::get;
821813 }
822814 return validateTypedPattern (
823815 cast<TypedPattern>(P),
@@ -883,11 +875,9 @@ Type PatternTypeRequest::evaluate(Evaluator &evaluator,
883875 // For now, just return the unbound generic type.
884876 return unboundTy;
885877 };
886- placeholderHandler = [&](auto placeholderRepr) {
887- // FIXME: Don't let placeholder types escape type resolution.
888- // For now, just return the placeholder type.
889- return PlaceholderType::get (Context, placeholderRepr);
890- };
878+ // FIXME: Don't let placeholder types escape type resolution.
879+ // For now, just return the placeholder type.
880+ placeholderHandler = PlaceholderType::get;
891881 }
892882 TypedPattern *TP = cast<TypedPattern>(somePat->getSubPattern ());
893883 const auto type = validateTypedPattern (
0 commit comments