Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.0-rc-1
-
None
-
groovy-2.1.0-rc-1
Description
This code works:
new ByteArrayOutputStream().withObjectOutputStream { ObjectOutputStream oos -> oos << new Object()}
but this one, doesn't:
new ByteArrayOutputStream().withObjectOutputStream { it << new Object() }
Exception:
Cannot find matching method java.lang.Object#leftShift(java.lang.Object). Please check if the declared type is right and if the method exists.
Attachments
Issue Links
- depends upon
-
GROOVY-5924 Provide a mechanism to allow the type checker to know what are the expected argument types of a closure
- Closed