Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The following code runs successfully.
class Foo { static void main(String[] args) { assert "${this.name} ${super.name}" == 'Foo java.lang.Object' super = true this = false assert "${this.name} ${super.name}" == 'Foo java.lang.Object' } }
The attempt to change these 'special' variables is ignored but there should be some kind of error. I think it makes sense for this to be a compilation error and it should come late in the compilation phases to allow DSLs to include 'this' or 'super' and transform them into something sensible.
Attachments
Issue Links
- links to