plaidgroup / plaid-lang

The Plaid Programming Language Tools
11 stars 1 forks source link

Problem with Type Casting #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
// How can we cast a java type object into plaid type object,
// for example cast java.lang.String into plaid.lang.String?
// This method prints "o is unknown!".
method main()
{
    val immutable String o = (immutable String) java.io.File.pathSeparator;
    match (o)
    {
        case String { printLine("o is String!"); }
        default     { printLine("o is unknown!"); }
    };
}

Original issue reported on code.google.com by akefi...@gmail.com on 4 Dec 2012 at 12:04