@@ -72,13 +72,13 @@ class AnyFunctionRef {
7272 CaptureInfo getCaptureInfo () const {
7373 if (auto *AFD = TheFunction.dyn_cast <AbstractFunctionDecl *>())
7474 return AFD->getCaptureInfo ();
75- return TheFunction. get <AbstractClosureExpr *>()->getCaptureInfo ();
75+ return cast <AbstractClosureExpr *>(TheFunction )->getCaptureInfo ();
7676 }
7777
7878 ParameterList *getParameters () const {
7979 if (auto *AFD = TheFunction.dyn_cast <AbstractFunctionDecl *>())
8080 return AFD->getParameters ();
81- return TheFunction. get <AbstractClosureExpr *>()->getParameters ();
81+ return cast <AbstractClosureExpr *>(TheFunction )->getParameters ();
8282 }
8383
8484 bool hasExternalPropertyWrapperParameters () const {
@@ -90,7 +90,7 @@ class AnyFunctionRef {
9090 Type getType () const {
9191 if (auto *AFD = TheFunction.dyn_cast <AbstractFunctionDecl *>())
9292 return AFD->getInterfaceType ();
93- return TheFunction. get <AbstractClosureExpr *>()->getType ();
93+ return cast <AbstractClosureExpr *>(TheFunction )->getType ();
9494 }
9595
9696 Type getBodyResultType () const {
@@ -99,7 +99,7 @@ class AnyFunctionRef {
9999 return FD->mapTypeIntoContext (FD->getResultInterfaceType ());
100100 return TupleType::getEmpty (AFD->getASTContext ());
101101 }
102- return TheFunction. get <AbstractClosureExpr *>()->getResultType ();
102+ return cast <AbstractClosureExpr *>(TheFunction )->getResultType ();
103103 }
104104
105105 ArrayRef<AnyFunctionType::Yield>
@@ -115,7 +115,7 @@ class AnyFunctionRef {
115115 BraceStmt *getBody () const {
116116 if (auto *AFD = TheFunction.dyn_cast <AbstractFunctionDecl *>())
117117 return AFD->getBody ();
118- auto *ACE = TheFunction. get <AbstractClosureExpr *>();
118+ auto *ACE = cast <AbstractClosureExpr *>(TheFunction );
119119 if (auto *CE = dyn_cast<ClosureExpr>(ACE))
120120 return CE->getBody ();
121121 return cast<AutoClosureExpr>(ACE)->getBody ();
@@ -127,7 +127,7 @@ class AnyFunctionRef {
127127 return ;
128128 }
129129
130- auto *ACE = TheFunction. get <AbstractClosureExpr *>();
130+ auto *ACE = cast <AbstractClosureExpr *>(TheFunction );
131131 if (auto *CE = dyn_cast<ClosureExpr>(ACE)) {
132132 CE->setBody (stmt);
133133 CE->setBodyState (ClosureExpr::BodyState::Parsed);
@@ -143,7 +143,7 @@ class AnyFunctionRef {
143143 return ;
144144 }
145145
146- auto *ACE = TheFunction. get <AbstractClosureExpr *>();
146+ auto *ACE = cast <AbstractClosureExpr *>(TheFunction );
147147 if (auto *CE = dyn_cast<ClosureExpr>(ACE)) {
148148 CE->setBody (stmt);
149149 CE->setBodyState (ClosureExpr::BodyState::TypeChecked);
@@ -168,7 +168,7 @@ class AnyFunctionRef {
168168 DeclContext *getAsDeclContext () const {
169169 if (auto *AFD = TheFunction.dyn_cast <AbstractFunctionDecl *>())
170170 return AFD;
171- return TheFunction. get <AbstractClosureExpr *>();
171+ return cast <AbstractClosureExpr *>(TheFunction );
172172 }
173173
174174 AbstractFunctionDecl *getAbstractFunctionDecl () const {
0 commit comments