diff options
| author | gingerBill <bill@gingerbill.org> | 2021-05-19 14:15:57 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-05-19 14:15:57 +0100 |
| commit | 9c54ed57924bf8ff241b0bffebaeabfa541db24c (patch) | |
| tree | b698e43332538a764fd21cd61da3e0946ab9001e /src/check_stmt.cpp | |
| parent | 5108ebf015e460e9c226a2067f6109785a20a143 (diff) | |
Add range-based error messages to `-verbose-errors`
Example:
Cannot convert '(1 + 2)' to 'untyped bool' from 'untyped integer'
x := (1 + 2) * true;
^~~~~~^
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index a62b55ab2..64d17a8c8 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -7,7 +7,7 @@ bool is_diverging_stmt(Ast *stmt) { return false; } if (expr->CallExpr.proc->kind == Ast_BasicDirective) { - String name = expr->CallExpr.proc->BasicDirective.name; + String name = expr->CallExpr.proc->BasicDirective.name.string; return name == "panic"; } Ast *proc = unparen_expr(expr->CallExpr.proc); |