In the current JSR 335 draft, it's mentioned in the change log entry for 0.6.0 that it "eliminated support for unbound inner class constructor references".
To illustrate, suppose you have an outer class named A
and an inner class named B
, and you want a function that takes an A
and creates a new B
instance:
Function<A, A.B> foo = a -> a.new B();
Prior to 0.6.0, you can also use the constructor reference syntax to do the same thing (it's even documented in State of the Lambda):
Function<A, A.B> foo = A.B::new;
As mentioned above, that syntax is no longer supported in 0.6.0. I'm really curious to know why.
I've looked through the archives for the lambda-spec-experts
and lambda-dev
mailing lists, and cannot find any information about it.