Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.8
-
Fix Version/s: 1.7.3, 1.6.9, 1.8-beta-1
-
Component/s: Compiler
-
Labels:None
-
Number of attachments :
Description
Boolean getters with "is" prefix can be accessed with property syntax:
class Foo {
boolean isValid() { true }
}
new Foo().valid
However, this doesn't work for static properties:
class Bar {
static boolean isValid() { true }
}
Bar.valid // groovy.lang.MissingPropertyException: No such property: valid for class: Bar
Also doesn't work for DGM methods but perhaps not the same thing: