Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
2.2.0-beta-1
-
None
-
None
Description
For this class:
class MapSet { @Delegate Set d1 = [5] @Delegate Map d2 = [a: 1] } println new MapSet()
We get this error:
Cannot override method java.lang.Object remove(java.lang.Object) in java.util.Map with new method having a primitive return type and old method not . At [-1:-1] at line: -1, column: -1
Some kind of error is to be expected since with have conflicting primitive "boolean" and "Object" return types but Groovy should attempt to detect this earlier in the @Delegate annotation and give a more meaningful error message.