aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2026-01-22 15:20:39 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2026-01-22 15:20:39 +0100
commitce71227b6bba4bbe74d53c681264a9cba974403a (patch)
tree7bf7e628b19e69ab6b3c85efae1b2214b045576e /src/parser.cpp
parent5072d5c776eb53afb2439f43dfa40ccadb68dfb9 (diff)
Fix #6130
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;
}