Issue Details (XML | Word | Printable)

Key: GROOVY-1347
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jochen Theodorou
Reporter: Edward Povazan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

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

Created: 14/Jun/06 07:39 PM   Updated: 15/Jun/06 02:22 PM   Resolved: 15/Jun/06 02:22 PM
Component/s: class generator
Affects Version/s: 1.0-JSR-6
Fix Version/s: 1.0-JSR-6

Time Tracking:
Not Specified

File Attachments: 1. File NoThrowMissingPropertyExceptionTest.groovy (0.7 kB)

Environment: Groovy Version: 1.0-RC-01-SNAPSHOT JVM: 1.5.0_06-b05

Testcase included: yes


 Description  « Hide

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



Jochen Theodorou added a comment - 15/Jun/06 02:22 PM

fixed