sstork / plaid-lang

Automatically exported from code.google.com/p/plaid-lang
0 stars 0 forks source link

Writing to variable declared as "val" leads to generation of erroneous code #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

method main() {
    val x = 0;
    x = 1;
}

What is the expected output? What do you see instead?

Would expect an error message because according to the spec vals are 
immutable. The program is accepted but the generated Java code is broken.

Original issue reported on code.google.com by manuelmohr@gmail.com on 1 Jun 2010 at 1:56

GoogleCodeExporter commented 9 years ago
This should fail on compilation.

Original comment by mhahn...@gmail.com on 1 Jun 2010 at 2:47

GoogleCodeExporter commented 9 years ago
Fixed (currently a runtime error).

Original comment by manuelmohr@gmail.com on 10 Jun 2010 at 7:07