aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/simple.tdy26
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/simple.tdy b/tests/simple.tdy
index 28bd5e2..de6841b 100644
--- a/tests/simple.tdy
+++ b/tests/simple.tdy
@@ -1,12 +1,18 @@
-fac : fn int -> int = fn a: int -> int {
- if a <= 1 {
- ret 1
- }
- b := fac(a - 1)
- ret a * b
+blob A {
+ a: int
+ b: int
+ c: float
}
-print fac(5)
-// print b(fn a: int -> {
-// print a
-// })
+hello : fn A -> = fn a: A {
+ print a.a
+ print a.b
+ print a.c
+}
+
+a := A()
+a.a = 1
+a.b = 2
+a.c = 3.
+
+hello(a)