Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0-alpha-3
-
None
-
None
Description
Consider the following:
Class c = Integer Predicate p p = c::isInstance assert p.test(null) == false assert p.test('xx') == false assert p.test(1234) == true p = c.&isInstance assert p.test(null) == false assert p.test('xx') == false assert p.test(1234) == true p = o -> c.isInstance(o) assert p.test(null) == false assert p.test('xx') == false assert p.test(1234) == true p = { c.isInstance(it) } assert p.test(null) == false assert p.test('xx') == false assert p.test(1234) == true
The reference and pointer groups fail while the lambda and closure groups succeed. This is excerpted from GROOVY-10053 testing without SC.
Attachments
Attachments
Issue Links
- relates to
-
GROOVY-8633 MME on Class receiver via method closure
- Closed