diff options
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index de9a6b911..42306489b 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1631,7 +1631,9 @@ gb_internal Entity *check_ident(CheckerContext *c, Operand *o, Ast *n, Type *nam } return e; case Entity_LibraryName: - error(n, "Use of library '%.*s' not in foreign block", LIT(name)); + if (!allow_import_name) { + error(n, "Use of library '%.*s' not in foreign block", LIT(name)); + } return e; case Entity_Label: |