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
-
Activity
blackdrag blackdrag
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 1.5.8 [ 14630 ] | |
| Assignee | Guillaume Laforge [ guillaume ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.5.8 [ 14630 ] | |
| Fix Version/s | 1.6.2 [ 15151 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.6.3 [ 15251 ] | |
| Fix Version/s | 1.6.2 [ 15151 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.7-beta-1 [ 14014 ] | |
| Fix Version/s | 1.6.3 [ 15251 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.7-beta-1 [ 14014 ] | |
| Fix Version/s | 1.7-beta-x [ 15538 ] |
Martin C. Martin
made changes -
| Link | This issue relates to GROOVY-1628 [ GROOVY-1628 ] |
Martin C. Martin
made changes -
| Link | This issue is related to GROOVY-1628 [ GROOVY-1628 ] |
Paul King
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Paul King [ paulk ] | |
| Fix Version/s | 1.8.1 [ 17223 ] | |
| Fix Version/s | 1.7.x [ 15538 ] | |
| Resolution | Fixed [ 1 ] |
Paul King
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
now only final is permitted