diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-10-08 19:45:19 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-10-08 19:45:19 +0200 |
| commit | 7d07bef760a8807fe49fbe5c90799a1822f95973 (patch) | |
| tree | 8b8d8ed0003dc61c4bd7313df86f6cbaea3d4b82 /testsuite | |
| parent | d392f0c54a7748b816ab327758ae835f73cd1c0a (diff) | |
| download | elna-7d07bef760a8807fe49fbe5c90799a1822f95973.tar.gz | |
Make modules re-exportable
Diffstat (limited to 'testsuite')
| -rw-r--r-- | testsuite/fail_compilation/transitive_import/helper.elna | 6 | ||||
| -rw-r--r-- | testsuite/fail_compilation/transitive_import/middle.elna | 5 | ||||
| -rw-r--r-- | testsuite/fail_compilation/transitive_import/sut.elna | 8 | ||||
| -rw-r--r-- | testsuite/runnable/reexport/helper.elna | 6 | ||||
| -rw-r--r-- | testsuite/runnable/reexport/left.elna | 5 | ||||
| -rw-r--r-- | testsuite/runnable/reexport/middle.elna | 5 | ||||
| -rw-r--r-- | testsuite/runnable/reexport/right.elna | 5 | ||||
| -rw-r--r-- | testsuite/runnable/reexport/sut.elna | 6 |
8 files changed, 46 insertions, 0 deletions
diff --git a/testsuite/fail_compilation/transitive_import/helper.elna b/testsuite/fail_compilation/transitive_import/helper.elna new file mode 100644 index 0000000..c3c0bfd --- /dev/null +++ b/testsuite/fail_compilation/transitive_import/helper.elna @@ -0,0 +1,6 @@ +module + +proc multiply*(x, y: Int) -> Int +return x * y + +end. diff --git a/testsuite/fail_compilation/transitive_import/middle.elna b/testsuite/fail_compilation/transitive_import/middle.elna new file mode 100644 index 0000000..0aab392 --- /dev/null +++ b/testsuite/fail_compilation/transitive_import/middle.elna @@ -0,0 +1,5 @@ +module + +import helper + +end. diff --git a/testsuite/fail_compilation/transitive_import/sut.elna b/testsuite/fail_compilation/transitive_import/sut.elna new file mode 100644 index 0000000..5423dbd --- /dev/null +++ b/testsuite/fail_compilation/transitive_import/sut.elna @@ -0,0 +1,8 @@ +module + +import middle + +proc call() -> Int +return multiply(3, 4) (* @Error Symbol 'multiply' not declared *) + +end. diff --git a/testsuite/runnable/reexport/helper.elna b/testsuite/runnable/reexport/helper.elna new file mode 100644 index 0000000..c3c0bfd --- /dev/null +++ b/testsuite/runnable/reexport/helper.elna @@ -0,0 +1,6 @@ +module + +proc multiply*(x, y: Int) -> Int +return x * y + +end. diff --git a/testsuite/runnable/reexport/left.elna b/testsuite/runnable/reexport/left.elna new file mode 100644 index 0000000..f149065 --- /dev/null +++ b/testsuite/runnable/reexport/left.elna @@ -0,0 +1,5 @@ +module + +import helper* + +end. diff --git a/testsuite/runnable/reexport/middle.elna b/testsuite/runnable/reexport/middle.elna new file mode 100644 index 0000000..0e593db --- /dev/null +++ b/testsuite/runnable/reexport/middle.elna @@ -0,0 +1,5 @@ +module + +import left*, right* + +end. diff --git a/testsuite/runnable/reexport/right.elna b/testsuite/runnable/reexport/right.elna new file mode 100644 index 0000000..f149065 --- /dev/null +++ b/testsuite/runnable/reexport/right.elna @@ -0,0 +1,5 @@ +module + +import helper* + +end. diff --git a/testsuite/runnable/reexport/sut.elna b/testsuite/runnable/reexport/sut.elna new file mode 100644 index 0000000..8ddb567 --- /dev/null +++ b/testsuite/runnable/reexport/sut.elna @@ -0,0 +1,6 @@ +program() +import middle + +begin + assert(multiply(3, 4) = 12) +end. |
