checker: add support for `-d debug_stmts` to ease debugging checker panics
parent
40da32a141
commit
23c8e1f06d
|
@ -2044,6 +2044,10 @@ fn (mut c Checker) stmts(stmts []ast.Stmt) {
|
||||||
}
|
}
|
||||||
c.expected_type = table.void_type
|
c.expected_type = table.void_type
|
||||||
for stmt in stmts {
|
for stmt in stmts {
|
||||||
|
$if debug_stmts? {
|
||||||
|
stmt_pos := stmt.position()
|
||||||
|
eprintln('file: ${c.file.path:-30} | stmt pos: $stmt_pos')
|
||||||
|
}
|
||||||
if c.scope_returns {
|
if c.scope_returns {
|
||||||
if unreachable.line_nr == -1 {
|
if unreachable.line_nr == -1 {
|
||||||
unreachable = stmt.position()
|
unreachable = stmt.position()
|
||||||
|
|
Loading…
Reference in New Issue