Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.1, 3.0.2
-
None
Description
The field-like access for a static property does not work anymore. Following is the sample code which works in Groovy 2.x but fails in Groovy 3:
class MongoEntity { static String getDB() { "default" } } MongoEntity.DB // //throws groovy.lang.MissingPropertyException: No such property: DB for class: MongoEntity
Please note that if I change the method to getDb() then I can access the property as MongoEntity.db. Also, it works when `getDB()` is an instance method.