@@ -919,8 +919,6 @@ class ResultBuilderTransform
919919
920920 using UnsupportedElt = SkipUnhandledConstructInResultBuilder::UnhandledNode;
921921
922- // / The constraint system this transform is associated with.
923- ConstraintSystem &CS;
924922 // / The result type of this result builder body.
925923 Type ResultType;
926924
@@ -930,8 +928,7 @@ class ResultBuilderTransform
930928public:
931929 ResultBuilderTransform (ConstraintSystem &cs, DeclContext *dc,
932930 Type builderType, Type resultTy)
933- : BuilderTransformerBase(&cs, dc, builderType), CS(cs),
934- ResultType (resultTy) {}
931+ : BuilderTransformerBase(&cs, dc, builderType), ResultType(resultTy) {}
935932
936933 UnsupportedElt getUnsupportedElement () const { return FirstUnsupported; }
937934
@@ -1180,10 +1177,6 @@ class ResultBuilderTransform
11801177 {buildBlockResult}, {Identifier ()});
11811178 }
11821179
1183- // Type erase return if the result type requires it.
1184- buildBlockResult = CS.buildTypeErasedExpr (buildBlockResult, dc,
1185- ResultType, CTP_ReturnStmt);
1186-
11871180 elements.push_back (new (ctx) ReturnStmt (resultLoc, buildBlockResult,
11881181 /* Implicit=*/ true ));
11891182 }
0 commit comments