1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: wrap print_backtraces with if is_verbose (#9595)

This commit is contained in:
Ned Palacios
2021-04-05 23:19:20 +08:00
committed by GitHub
parent a016ac39c0
commit 98e1dd4b22

View File

@@ -3421,8 +3421,10 @@ fn (mut c Checker) stmt(node ast.Stmt) {
// c.expected_type = ast.void_type
match mut node {
ast.EmptyStmt {
print_backtrace()
eprintln('Checker.stmt() EmptyStmt')
if c.pref.is_verbose {
eprintln('Checker.stmt() EmptyStmt')
print_backtrace()
}
}
ast.NodeError {}
ast.AsmStmt {
@@ -4023,7 +4025,6 @@ pub fn (mut c Checker) expr(node ast.Expr) ast.Type {
match mut node {
ast.NodeError {}
ast.EmptyExpr {
print_backtrace()
c.error('checker.expr(): unhandled EmptyExpr', token.Position{})
}
ast.CTempVar {