diff options
| author | gingerBill <bill@gingerbill.org> | 2023-02-21 16:25:28 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-02-21 16:25:28 +0000 |
| commit | ee4ed126e1423d7566470b31e86f4ad1021328f2 (patch) | |
| tree | 805ee57d319ffe228a57d7a5dda08fd0d327197e /src/check_stmt.cpp | |
| parent | c36dc918497106c6a017a41ff8a2c33081b22a44 (diff) | |
Improve error message for accidentally using a type as an expression statement
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 f688b7f9c..3039995b9 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1921,7 +1921,7 @@ gb_internal void check_expr_stmt(CheckerContext *ctx, Ast *node) { case Addressing_Type: { gbString str = type_to_string(operand.type); - error(node, "'%s' is not an expression", str); + error(node, "'%s' is not an expression but a type and cannot be used as a statement", str); gb_string_free(str); break; } |