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

checker: add pref.is_verbose for print_backtrace (#15385)

This commit is contained in:
yuyi 2022-08-09 12:43:59 +08:00 committed by GitHub
parent 27c5ad03f6
commit d4b622bdc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2049,7 +2049,9 @@ pub fn (mut c Checker) expr(node_ ast.Expr) ast.Type {
c.error('incorrect use of compile-time type', node.pos) c.error('incorrect use of compile-time type', node.pos)
} }
ast.EmptyExpr { ast.EmptyExpr {
print_backtrace() if c.pref.is_verbose {
print_backtrace()
}
c.error('checker.expr(): unhandled EmptyExpr', token.Pos{}) c.error('checker.expr(): unhandled EmptyExpr', token.Pos{})
return ast.void_type return ast.void_type
} }