File tree 1 file changed +13
-1
lines changed
end-to-end-tests/src/test/java/net/orfjackal/retrolambda/test
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
import net .orfjackal .retrolambda .test .anotherpackage .DifferentPackageBase ;
8
8
import org .apache .commons .lang .SystemUtils ;
9
- import org .junit .Test ;
9
+ import org .junit .* ;
10
10
import org .objectweb .asm .*;
11
11
import org .objectweb .asm .Type ;
12
12
@@ -247,6 +247,18 @@ private static String privateClassMethod() {
247
247
return "foo" ;
248
248
}
249
249
250
+
251
+ @ Test
252
+ @ Ignore // TODO: fix issue #121
253
+ public void enclosing_method_of_anonymous_class_inside_lambda_expression () throws Exception {
254
+ Callable <Object > lambda = () -> new Object () {
255
+ };
256
+ Class <?> anonymousClass = lambda .call ().getClass ();
257
+
258
+ assertThat (anonymousClass .getEnclosingMethod ().getName (),
259
+ startsWith ("lambda$enclosing_method_of_anonymous_class_inside_lambda_expression$" ));
260
+ }
261
+
250
262
/**
251
263
* We could make private lambda implementation methods package-private,
252
264
* so that the lambda class may call them, but we should not make any
You can’t perform that action at this time.
0 commit comments