Skip to content

Commit

Permalink
Test for reproducing issue #121
Browse files Browse the repository at this point in the history
  • Loading branch information
luontola committed Jan 26, 2017
1 parent 78d3833 commit db04059
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import net.orfjackal.retrolambda.test.anotherpackage.DifferentPackageBase;
import org.apache.commons.lang.SystemUtils;
import org.junit.Test;
import org.junit.*;
import org.objectweb.asm.*;
import org.objectweb.asm.Type;

Expand Down Expand Up @@ -247,6 +247,18 @@ private static String privateClassMethod() {
return "foo";
}


@Test
@Ignore // TODO: fix issue #121
public void enclosing_method_of_anonymous_class_inside_lambda_expression() throws Exception {
Callable<Object> lambda = () -> new Object() {
};
Class<?> anonymousClass = lambda.call().getClass();

assertThat(anonymousClass.getEnclosingMethod().getName(),
startsWith("lambda$enclosing_method_of_anonymous_class_inside_lambda_expression$"));
}

/**
* We could make private lambda implementation methods package-private,
* so that the lambda class may call them, but we should not make any
Expand Down

0 comments on commit db04059

Please sign in to comment.