Issue Details (XML | Word | Printable)

Key: GROOVY-1852
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jochen Theodorou
Reporter: Guillaume Laforge
Votes: 0
Watchers: 0
Operations

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

Closure constant on interface not callable without call()

Created: 24/Apr/07 03:33 PM   Updated: 27/Apr/07 03:28 PM
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.1-beta-1

Time Tracking:
Not Specified


 Description  « Hide
If I add a closure constant in an interface, I can't call it with V.c("hello").
Instead, I have to do V.c.call("hello")

groovy> interface V { Closure c = { println it } }
groovy> V.c("hello")
groovy> go
Caught: java.lang.NullPointerException
at CommandLine.run(CommandLine.groovy:2)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jochen Theodorou added a comment - 27/Apr/07 03:28 PM
fixed