Skip to content

Commit

Permalink
restore vlib/v/checker/return.v
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Jan 13, 2023
1 parent 61240ec commit dad2e34
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vlib/v/checker/return.v
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,7 @@ fn has_top_return(stmts []ast.Stmt) bool {
}
ast.ExprStmt {
if stmt.expr is ast.CallExpr {
// do not ignore panic() calls on non checked stmts
if stmt.expr.is_noreturn
|| (stmt.expr.is_method == false && stmt.expr.name == 'panic') {
if stmt.expr.is_noreturn {
return true
}
}
Expand Down

0 comments on commit dad2e34

Please sign in to comment.