Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6, 2.4.3
-
None
-
groovy 1.6 java 1.6
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!