@@ -919,8 +919,6 @@ class ResultBuilderTransform
919
919
920
920
using UnsupportedElt = SkipUnhandledConstructInResultBuilder::UnhandledNode;
921
921
922
- // / The constraint system this transform is associated with.
923
- ConstraintSystem &CS;
924
922
// / The result type of this result builder body.
925
923
Type ResultType;
926
924
@@ -930,8 +928,7 @@ class ResultBuilderTransform
930
928
public:
931
929
ResultBuilderTransform (ConstraintSystem &cs, DeclContext *dc,
932
930
Type builderType, Type resultTy)
933
- : BuilderTransformerBase(&cs, dc, builderType), CS(cs),
934
- ResultType (resultTy) {}
931
+ : BuilderTransformerBase(&cs, dc, builderType), ResultType(resultTy) {}
935
932
936
933
UnsupportedElt getUnsupportedElement () const { return FirstUnsupported; }
937
934
@@ -1180,10 +1177,6 @@ class ResultBuilderTransform
1180
1177
{buildBlockResult}, {Identifier ()});
1181
1178
}
1182
1179
1183
- // Type erase return if the result type requires it.
1184
- buildBlockResult = CS.buildTypeErasedExpr (buildBlockResult, dc,
1185
- ResultType, CTP_ReturnStmt);
1186
-
1187
1180
elements.push_back (new (ctx) ReturnStmt (resultLoc, buildBlockResult,
1188
1181
/* Implicit=*/ true ));
1189
1182
}
0 commit comments