Hi,
I saw an Introduction to Ceylon and I see this example of union type:
//union type void print(String|Named printable) {
String string; switch (printable) case (is String) { string = printable; } case (is Named) { string = printable.name; } writeLine(string);
}
I'm just curious if there is an equivalent in Fantom.
Thanks in advance, Xan.
No, there isn't. You have to use Obj instead.
Obj
Thanks
Login or Signup to reply.
Xan Sat 22 Oct 2011
Hi,
I saw an Introduction to Ceylon and I see this example of union type:
//union type void print(String|Named printable) {
}
I'm just curious if there is an equivalent in Fantom.
Thanks in advance, Xan.
helium Sat 22 Oct 2011
No, there isn't. You have to use
Obj
instead.Xan Sat 22 Oct 2011
Thanks