Attackathon _ Fuel Network 33101 - [Smart Contract - Insight] Associated functions that were impleme
Description
Brief/Intro
Bug Details
204: let expr = parse_statement_expr(parser)?;
205: if let Some(semicolon_token) = parser.take() {
206: return stmt(Statement::Expr {
207: expr,
208: semicolon_token_opt: Some(semicolon_token),
209: });
210: }
211:
212: // Reached EOF? Then an expression is a statement.
213: if let Some(consumed) = parser.check_empty() {
214: return Ok(StmtOrTail::Tail(Box::new(expr), consumed));
215: }
216:
217: // For statements like `if`,
218: // they don't need to be terminated by `;` to be statements.
219: if expr.is_control_flow() {
220: return stmt(Statement::Expr {
221: expr,
222: semicolon_token_opt: None,
223: });
224: }
225:
226: Err(parser.emit_error(ParseErrorKind::UnexpectedTokenInStatement))Impact Details
References
Proof of concept
Proof of Concept
PreviousAttackathon _ Fuel Network 33045 - [Smart Contract - Low] Compiler Dead Code Elimination inconsistenNextAttackathon _ Fuel Network 33139 - [Smart Contract - Insight] Unreachable panic in sway compiler whe
Last updated
Was this helpful?