Skip to content

Commit 103ddf4

Browse files
committed
pony: type expressions
1 parent 904cc82 commit 103ddf4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
actor Main
2+
new create(env: Env) =>
3+
var tuple: (String, U32)
4+
tuple = ("oi", 42)
5+
env.out.print(tuple._1)
6+
var age_or_name: (String | U32)
7+
age_or_name = "name"
8+
env.out.print(age_or_name.string())
9+
age_or_name = 42
10+
env.out.print(age_or_name.string())

0 commit comments

Comments
 (0)