Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.6-beta-2
-
Fix Version/s: 1.8.1
-
Component/s: ast builder
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
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?
Issue Links
- is related to
-
GROOVY-1628
Inconsistent checking of final
-
- relates to
-
GROOVY-1628
Inconsistent checking of final
-
now only final is permitted