Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.6-beta-2
-
None
Description
In Java, at least, the only modifier allowed on local variables is "final." Groovy seems to accept and ignore all modifiers, final or otherwise. For example:
class Foo {
def bar()
}
Compiles just fine.
So there are really two issues here: (a) "final" semantics not being represented and enforced, and (b) all other modifiers not generating parse errors.
For (a), the DeclarationExpression doesn't seem to have a place to hold modifiers; perhaps it should have an isFinal field?
Attachments
Issue Links
- is related to
-
GROOVY-1628 Inconsistent checking of final
-
- Closed
-
- relates to
-
GROOVY-1628 Inconsistent checking of final
-
- Closed
-