Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.21, 5.0.0-alpha-8, 4.0.21
-
None
Description
Consider the following:
void test(Map map) {
println map.empty
println map.with{ empty }
println map.with{ delegate.empty }
println map.with{ {->owner.empty}() }
}
test( [:].withDefault{ 'entry' } )
When run as-is, the script prints "entry entry entry entry". With STC or SC enabled, Groovy 3 or 4 prints "entry true true true".