aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-10-18 10:28:25 +0100
committergingerBill <bill@gingerbill.org>2022-10-18 10:28:25 +0100
commit8086c14dcc105b55bcc149b677ab44f29e92ae0b (patch)
tree9fa3dab68609cdc0dc5bb18623b6ef8ffd9957a0 /src/check_stmt.cpp
parent80ce1b7d850d264f5d8538724aa2b43e8e4a5c09 (diff)
parent075040ae057e48bb9df4cb03bc0ea39e98a804ad (diff)
Merge branch 'master' of https://github.com/odin-lang/Odin
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 630182273..9cacb4a35 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -584,7 +584,11 @@ void check_label(CheckerContext *ctx, Ast *label, Ast *parent) {
// Returns 'true' for 'continue', 'false' for 'return'
bool check_using_stmt_entity(CheckerContext *ctx, AstUsingStmt *us, Ast *expr, bool is_selector, Entity *e) {
if (e == nullptr) {
- error(us->token, "'using' applied to an unknown entity");
+ if (is_blank_ident(expr)) {
+ error(us->token, "'using' in a statement is not allowed with the blank identifier '_'");
+ } else {
+ error(us->token, "'using' applied to an unknown entity");
+ }
return true;
}