plaidgroup / plaid-lang

The Plaid Programming Language Tools
11 stars 1 forks source link

Field Assignments are broken #51

Closed GoogleCodeExporter closed 9 years ago

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

The following does not work at the moment:

state S {
    var z = 3;

    method foo() {
        this.z = 5;
    }
}

method main() {
    var s = new S;
    s.foo();
    java.lang.System.out.println(s.z);
}

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

It says it can't find 'z' in foo().  If you omit "this.", i.e. just write "z = 
5;", it works.  "s.z = 5;" in main() doesn't work either.

Original issue reported on code.google.com by manuelmohr@gmail.com on 19 Jul 2010 at 7:24

GoogleCodeExporter commented 9 years ago
Fixed by reverting the recent parser changes.  The plan is to implement the AST 
transformation necessary to create let normal form in a visitor on the Plaid 
side of things.

Original comment by manuelmohr@gmail.com on 20 Jul 2010 at 5:11