plaidgroup / plaid-lang

The Plaid Programming Language Tools
11 stars 1 forks source link

Problem with type safety feature #59

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
// Why does "f" accept a String value when its type is explicitly defined?
// This method print "foo".

method main()
{
    val immutable File f = "foo";
    printLine(f);
}

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

GoogleCodeExporter commented 9 years ago
//And also, this method print "c is String!".
method main()
{
    val immutable Character c = "new String";
    match (c)
    {
        case String { printLine("c is String!"); }
        case Character  { printLine("c is Character!"); }
        default     { printLine("c is unknown!"); }
    };
}

Original comment by akefi...@gmail.com on 4 Dec 2012 at 12:06