You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is quite easy to reproduce. I created the smallest possible test set
So, I have two classes, in the first one I have a singleton (for the test the instance is not stored but it doesn't matter now) and, for some reason, I use a supplier to create the instance. This test works well if the supplier is created as an inner class or with lambda. It crashes when using the method reference (::new).
This is quite easy to reproduce. I created the smallest possible test set
So, I have two classes, in the first one I have a singleton (for the test the instance is not stored but it doesn't matter now) and, for some reason, I use a supplier to create the instance. This test works well if the supplier is created as an inner class or with lambda. It crashes when using the method reference (::new).
So there's a simple method get who creates the instance by using Test1::new method reference.
Then there's a second class who calls the get():
When compiled with retrolambda, bytecode 51, and executed, the output is
I tested with latest retrolambda 2.0.3 compiled with java 1.8.0_45
The text was updated successfully, but these errors were encountered: