aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-01-13 17:44:38 +0000
committergingerBill <bill@gingerbill.org>2019-01-13 17:44:38 +0000
commit493f11521d28027dac94454e2f75724391c4e39c (patch)
tree098cf069243006f868f2a39d42f8527707b9cabe /src/checker.cpp
parent3363e2c1994face8a51677d430df60862bd9b99c (diff)
Check for `_` for import names too
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 388c71689..6eb14e556 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -2888,7 +2888,7 @@ void check_add_import_decl(CheckerContext *ctx, Ast *decl) {
String import_name = path_to_entity_name(id->import_name.string, id->fullpath, false);
// String import_name = id->import_name.string;
- if (import_name.len == 0) {
+ if (import_name.len == 0 || import_name == "_") {
import_name = scope->pkg->name;
}
if (is_blank_ident(import_name)) {