sstork / plaid-lang

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

Cannot use Java keywords as Plaid variable names #21

Closed GoogleCodeExporter closed 9 years ago

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

method main() {
  var do = 23;
}

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

This is a legal Plaid program and compiles without errors but the 
generated Java code is incorrect. That's because "do" is a keyword in Java 
and Plaid variable names are used without modification which leads to a 
line like "PlaidObject do = null;". Programmers should be free to choose 
any variable name that is not a Plaid keyword and get correct Java output.

Original issue reported on code.google.com by manuelmohr@gmail.com on 20 May 2010 at 9:41

GoogleCodeExporter commented 9 years ago

Original comment by manuelmohr@gmail.com on 21 May 2010 at 5:32

GoogleCodeExporter commented 9 years ago
Actually, this problem was already accounted for but only for field 
declarations and 
not for let bindings.

Original comment by manuelmohr@gmail.com on 21 May 2010 at 6:34

GoogleCodeExporter commented 9 years ago
LGTM. 
(http://code.google.com/p/plaid-lang/source/detail?r=374d42d84ecdddcb20a8b311d9a
adfaeb4b794be)

Original comment by mhahn...@gmail.com on 24 May 2010 at 4:23