Skip to content

Instantly share code, notes, and snippets.

@raphw raphw/
Last active Aug 29, 2015

What would you like to do?
Example for VerifierError when using method reference within a lambda before constructor is completed.
class Example {
Example(Function<Function<Function<Consumer<Void>, Void>, Void>, Void> innerClass) {
new InnerClass(innerClass);
void foo(Void v) { }
class InnerClass {
InnerClass(Function<Function<Function<Consumer<Void>, Void>, Void>, Void> factory) {
this(factory.apply(o -> o.apply(Example.this::foo)));
InnerClass(Void unused) { }
public static void main(String[] args) {
new Example(o -> null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.