From ce71227b6bba4bbe74d53c681264a9cba974403a Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Thu, 22 Jan 2026 15:20:39 +0100 Subject: [PATCH] Fix #6130 --- src/parser.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; }