Details
Description
I've hit an issue in groovy 1.6 where one statically defined closure can't seem to access another static closure in the same class without prefixing the actual name of the class on the call to the closure.
This test case demonstrates the issue:
—
#! /usr/bin/env groovy
class Foo {
static first =
// works as expected
static second =
// doesn't work, apparently "first" is not in scope, is this expected behavior?
static third =
}
assert "first second" == Foo.second() // OK in 1.6
assert "first third" == Foo.third() // blows up in 1.6!
Activity
blackdrag blackdrag
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Roshan Dawrani [ roshandawrani ] | |
| Fix Version/s | 1.5.8 [ 14630 ] | |
| Fix Version/s | 1.7-beta-1 [ 14014 ] | |
| Fix Version/s | 1.6.1 [ 14852 ] |
blackdrag blackdrag
made changes -
| Fix Version/s | 1.5.8 [ 14630 ] |
blackdrag blackdrag
made changes -
| Comment | [ removing 1.5.8 as fix version, because it is no issue there ] |
blackdrag blackdrag
made changes -
| Fix Version/s | 1.5.8 [ 14630 ] |
Roshan Dawrani
made changes -
| Assignee | Roshan Dawrani [ roshandawrani ] | Jochen Theodorou [ blackdrag ] |
Roshan Dawrani
made changes -
| Attachment | 3422_v15X.txt [ 41085 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.6.2 [ 15151 ] | |
| Fix Version/s | 1.6.1 [ 14852 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.5.8 [ 14630 ] |
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.6.3 [ 15251 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.7-beta-1 [ 14014 ] | |
| Fix Version/s | 1.7-beta-x [ 15538 ] |
blackdrag blackdrag
made changes -
| Fix Version/s | 1.8.x [ 15750 ] | |
| Fix Version/s | 2.x [ 17013 ] | |
| Fix Version/s | 1.7.x [ 15538 ] |