aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 52f785ef6..96827590d 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -365,7 +365,7 @@ void init_entity_foreign_library(Checker *c, Entity *e) {
String name = ident->Ident.token.string;
Entity *found = scope_lookup_entity(c->context.scope, name);
if (found == nullptr) {
- if (name == "_") {
+ if (is_blank_ident(name)) {
error(ident, "`_` cannot be used as a value type");
} else {
error(ident, "Undeclared name: %.*s", LIT(name));