From b77c220c6351378357da0472d8c8614346fc3525 Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Mon, 28 Oct 2019 18:16:54 +0100
Subject: [PATCH] Allow multiple import of a module

Multiple import are treated as one. Produce a warning message.
---
 tests/test_ASTModulesImporter.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/test_ASTModulesImporter.cpp b/tests/test_ASTModulesImporter.cpp
index 1ee9120f4..a85927783 100644
--- a/tests/test_ASTModulesImporter.cpp
+++ b/tests/test_ASTModulesImporter.cpp
@@ -59,6 +59,20 @@ import math;
     CHECK_AST(data, result);
   }
 
+  SECTION("module multiple import")
+  {
+    std::string_view data = R"(
+import math;
+import math;
+)";
+
+    std::string_view result = R"(
+(root:undefined)
+)";
+
+    CHECK_AST(data, result);
+  }
+
   SECTION("error")
   {
     SECTION("unknown module")
-- 
GitLab