aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-04-21 14:58:33 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-04-21 14:58:33 -0400
commit3590bf34071bfdfe4d18bb8b32e4c88869bc5f7b (patch)
tree57416b6d0a2f0dafa2b9ea7f56f1452ea1fdbf6e /test
parent3f10460a6e04f014d3fe7a911f6afa844f975585 (diff)
Better imports for types
Diffstat (limited to 'test')
-rw-r--r--test/use.tm9
-rw-r--r--test/use_import.tm7
2 files changed, 16 insertions, 0 deletions
diff --git a/test/use.tm b/test/use.tm
new file mode 100644
index 00000000..a759180a
--- /dev/null
+++ b/test/use.tm
@@ -0,0 +1,9 @@
+imported := use ./use_import
+
+func asdf()->imported.ImportedType
+ return imported.get_value()
+
+func main()
+ >> [:imported.ImportedType]
+ >> asdf()
+ = ImportedType(name="Hello")
diff --git a/test/use_import.tm b/test/use_import.tm
new file mode 100644
index 00000000..fb5f71e9
--- /dev/null
+++ b/test/use_import.tm
@@ -0,0 +1,7 @@
+struct ImportedType(name:Text)
+
+func get_value()->ImportedType
+ return ImportedType("Hello")
+
+func main()
+ pass