aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index fc55dae97..277a405b7 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -5071,6 +5071,10 @@ gb_internal Ast *parse_import_decl(AstFile *f, ImportDeclKind kind) {
syntax_error(import_name, "'using import' is not allowed, please use the import name explicitly");
}
+ if (file_path.string == "\".\"") {
+ syntax_error(import_name, "Cannot cyclicly import packages");
+ }
+
expect_semicolon(f);
return s;
}