Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6-rc-3, 1.6.1
-
None
-
None
Description
When I'm calling the following closure making the range of days of a month:
test.gr
month = { String date = new Date().format("yyyyMM") -> GregorianCalendar.instance.with { time = Date.parse("yyyyMM", date) (time .. time+(getActualMaximum(Calendar.DAY_OF_MONTH)-1)) } } month("200101")
I'm getting the following exception:
Caught: BUG! exception in phase 'class generation' in source unit 'C:\Groovy\test.gr' ClassNode#getTypeClass for Date is called before the type class is set
When I'm making the same in method:
def getDays(String date = new Date().format("yyyyMM")) { ... }
everything works fine.
Tried both 1.6.1 and 1.6