BlockFunctionBodyExt extension
Extension for the BlockFunctionBody class from the analyzer package.
Adds helper methods for working with return statements in block-style function bodies.
- on
-
- BlockFunctionBody
Methods
-
getReturnStatement(
) → ReturnStatement? -
Available on BlockFunctionBody, provided by the BlockFunctionBodyExt extension
Returns the return statement from the function block, if present. -
getReturnStatementExpressionOfExactType<
T> () → T? -
Available on BlockFunctionBody, provided by the BlockFunctionBodyExt extension
Returns the expression from the return statement if it matches the typeT.