groovy

MissingPropertyException is thrown when calling a method with a default arg set to a static field of another class.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-JSR-6
  • Fix Version/s: 1.0-JSR-6
  • Component/s: class generator
  • Labels:
    None
  • Environment:
    Groovy Version: 1.0-RC-01-SNAPSHOT JVM: 1.5.0_06-b05
  • Testcase included:
    yes
  • Number of attachments :
    1

Description

class Something {
static int VALUE = 10
}

class AnotherThing {
def method(int somearg=Something.VALUE) { }
}

new AnotherThing().method()

The above throws a MissingPropertyException:
groovy.lang.MissingPropertyException: No such property: Something for class: AnotherThing

Activity

Hide
blackdrag blackdrag added a comment -

fixed

Show
blackdrag blackdrag added a comment - fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: