mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Rearranged some internal initialization to support multiple files being run
This commit is contained in:
11
scripts/test/separate-exports.toy
Normal file
11
scripts/test/separate-exports.toy
Normal file
@@ -0,0 +1,11 @@
|
||||
//test exports
|
||||
var field: int = 42;
|
||||
|
||||
fn function() {
|
||||
return 69;
|
||||
}
|
||||
|
||||
export field;
|
||||
export function;
|
||||
|
||||
print "All good";
|
||||
10
scripts/test/separate-imports.toy
Normal file
10
scripts/test/separate-imports.toy
Normal file
@@ -0,0 +1,10 @@
|
||||
//test imports
|
||||
import field;
|
||||
//import function;
|
||||
|
||||
//assert field == 42, "import field failed";
|
||||
|
||||
//assert function() == 69, "import function failed";
|
||||
|
||||
print "All good";
|
||||
|
||||
Reference in New Issue
Block a user