Allow imports anywhere in the module outside of ct statements.

This commit is contained in:
Christoffer Lerno
2022-10-20 23:54:36 +02:00
parent e6a5f98606
commit bd0e8f1ef1
6 changed files with 31 additions and 24 deletions

View File

@@ -2,4 +2,8 @@ module foo;
fn void hello() {}
import bar; // #error: Imports are only allowed directly after the module declaration
$if (true):
import bar; // #error: 'import' may not appear inside a compile
$endif;

View File

@@ -2,4 +2,8 @@ module foo;
fn void hello() {}
import bar; // #error: Imports are only allowed directly after the module declaration
$if (true):
import bar; // #error: 'import' may not appear inside a compile
$endif;