plaidgroup / plaid-lang

The Plaid Programming Language Tools
11 stars 1 forks source link

Having equally named method parameter and local variable generates broken code #43

Open GoogleCodeExporter opened 9 years ago

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

state S {
    method bar(foo) {
        var foo = 1;
    }
}

method main() {
    (new S).bar(0);
}

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

This should print some kind of error, instead the generated Java code contains 
two variables with the name "foo" which is not allowed in Java.

Original issue reported on code.google.com by manuelmohr@gmail.com on 14 Jun 2010 at 9:39