summaryrefslogtreecommitdiff
path: root/test/asset/parser/type-annotation.et
diff options
context:
space:
mode:
Diffstat (limited to 'test/asset/parser/type-annotation.et')
-rw-r--r--test/asset/parser/type-annotation.et15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/asset/parser/type-annotation.et b/test/asset/parser/type-annotation.et
new file mode 100644
index 0000000..9740768
--- /dev/null
+++ b/test/asset/parser/type-annotation.et
@@ -0,0 +1,15 @@
+def fun (a : String) and (b : Integer) proc (p : Process):
+ let c = [ a, "x" ] : [ String ]
+ let d = [ a ]
+ let e = [ b : Integer, 43 : Integer ]:[Integer]
+ let f = [[ c, ["y"]]] : [[[ String ] ] ]
+ guard (c /= d)
+ guard (e == e)
+
+test Test:
+ let x = "" : String
+ let y = (2 : Integer)
+ let z = (2 : Integer) + (y : Integer) : Integer
+ let re = /xyz/ : Regex
+ spawn as p
+ fun "a" and ((z) : Integer) proc (p : Process)