From d4b622bdc25e473bc764b9c29e19a7c3bebdccea Mon Sep 17 00:00:00 2001 From: yuyi Date: Tue, 9 Aug 2022 12:43:59 +0800 Subject: [PATCH] checker: add pref.is_verbose for print_backtrace (#15385) --- vlib/v/checker/checker.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 26d46d2b30..d724257b53 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -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) } ast.EmptyExpr { - print_backtrace() + if c.pref.is_verbose { + print_backtrace() + } c.error('checker.expr(): unhandled EmptyExpr', token.Pos{}) return ast.void_type }