aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/io.amal2
-rw-r--r--tests/main.amal3
-rw-r--r--tests/main.c1
3 files changed, 4 insertions, 2 deletions
diff --git a/tests/io.amal b/tests/io.amal
index 5505d44..0e1a682 100644
--- a/tests/io.amal
+++ b/tests/io.amal
@@ -1,5 +1,5 @@
const a = @import("sub/a.amal");
-const puts = fn {
+pub const puts = fn {
} \ No newline at end of file
diff --git a/tests/main.amal b/tests/main.amal
index d085501..65ac43b 100644
--- a/tests/main.amal
+++ b/tests/main.amal
@@ -15,7 +15,8 @@ const main = fn {
const num2 = 23232;
const num3 = num1 + num2 * 30;
const num4 = (num1 + num2) * num3 * ((34 + 32) / 234.345);
- //const num4 = 23;
+ // pub cost num34 = 45; // error, only declarations in global scope can be public
+ //const num4 = 23; // error, variable redeclaration
/*
episfjpseifipesf
*/
diff --git a/tests/main.c b/tests/main.c
index 2b57bcf..0dfd878 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -41,6 +41,7 @@ static CHECK_RESULT int test_hash_map() {
return 0;
}
+/* TODO: Restrict variables in global scope to const */
int main() {
amal_compiler compiler;
FileScopeReference *file_scope;