checker: wrap print_backtraces with if is_verbose (#9595)

pull/9610/head
Ned Palacios 2021-04-05 23:19:20 +08:00 committed by GitHub
parent a016ac39c0
commit 98e1dd4b22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

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 {