Re: Comparator argument type inference

2015-10-12 Thread Jochen Theodorou
On 12.10.2015 15:35, Peter Ledbrook wrote: > So, does it make sense to add a special case for Comparator so that type > inference works? Or perhaps a special case for any interface that only > has one method that's not defined on Object as well? The later, yes. So bas

Re: Comparator argument type inference

2015-10-12 Thread Peter Ledbrook
> > > So, does it make sense to add a special case for Comparator so that type > > inference works? Or perhaps a special case for any interface that only > > has one method that's not defined on Object as well? > > The later, yes. So basically hashcode(), toString() and equals(Object) > need speci

Re: Comparator argument type inference

2015-10-12 Thread Jochen Theodorou
On 12.10.2015 07:51, Peter Ledbrook wrote: Hi, So, I had a difference of opinion with Marcin Erdmann on camera about closure parameter type inference with functional interfaces. I said it didn't work in my experience. Thankfully, Marcin worked out why my example: import groovy.transform.Ty

Comparator argument type inference

2015-10-11 Thread Peter Ledbrook
Hi, So, I had a difference of opinion with Marcin Erdmann on camera about closure parameter type inference with functional interfaces. I said it didn't work in my experience. Thankfully, Marcin worked out why my example: import groovy.transform.TypeChecked @TypeChecked def someMethod