Project Lambda: Java Language Specification draft

Tom Hawtin Thomas.Hawtin at Sun.COM
Sun Jan 24 15:52:11 PST 2010


Alex Buckley wrote:

> Lawrence Kesteloot wrote:
>>>  #() { if (..) return "1"; else return 2; } has type #Integer()
>> Is the string "1" really assignable to Integer? Did you mean #Object()?
> 
> Oops, yes!

Shouldn't that be 
#java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends j
ava.lang.Object&java.io.Serializable&java.lang.Comparable<?>>()?

(Thanks to javac for coming up with that - my JLS fu is not strong.)

(I'm not a particular fan of multiple inheritance of interface and 
certainly not of function types.)

Tom Hawtin


More information about the lambda-dev mailing list