Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.5
-
None
-
None
Description
Test.groovy
/* both the .* or .foo/.bar ways of static importing don't work import static Helper.* //import static Helper.foo //import static Helper.bar println foo() // fails MissingMethodException println bar // fails MissingPropertyException
Helper.groovy
class Helper { static foo(){ println 'foo called' } static bar = 'bar' }
But the following static import, which uses a class under a package, works:
import static java.lang.Integer.* println MIN_VALUE