diff --git a/end-to-end-tests/src/test/java/net/orfjackal/retrolambda/test/LambdaTest.java b/end-to-end-tests/src/test/java/net/orfjackal/retrolambda/test/LambdaTest.java index 6d23b7f4..b48e47a6 100644 --- a/end-to-end-tests/src/test/java/net/orfjackal/retrolambda/test/LambdaTest.java +++ b/end-to-end-tests/src/test/java/net/orfjackal/retrolambda/test/LambdaTest.java @@ -1,4 +1,4 @@ -// Copyright © 2013-2014 Esko Luontola +// Copyright © 2013-2015 Esko Luontola // This software is released under the Apache License 2.0. // The license text is at http://www.apache.org/licenses/LICENSE-2.0 @@ -85,6 +85,15 @@ public void lambda_using_local_variables_of_primitive_types() throws Exception { assertThat(lambda.call(), is(36)); } + @Test + public void lambda_in_the_constant_initializer_of_an_interface() throws Exception { + assertThat(LambdaConstant.LAMBDA.call(), is("foo")); + } + + public interface LambdaConstant { + Callable LAMBDA = () -> "foo"; + } + @Test public void method_references_to_virtual_methods() throws Exception { String foo = "foo";