Skip to content

Commit

Permalink
Reproduced issue #17
Browse files Browse the repository at this point in the history
  • Loading branch information
luontola committed May 13, 2014
1 parent 5adcbf3 commit c6ded02
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2013 Esko Luontola <www.orfjackal.net>
// Copyright © 2013-2014 Esko Luontola <www.orfjackal.net>
// This software is released under the Apache License 2.0.
// The license text is at http://www.apache.org/licenses/LICENSE-2.0

Expand Down Expand Up @@ -113,4 +113,15 @@ public void method_references_to_constructors() throws Exception {

assertThat(ref.call(), is(instanceOf(ArrayList.class)));
}

@Test
public void method_references_to_private_methods() throws Exception {
Callable<String> ref = this::privateMethod;

assertThat(ref.call(), is("foo"));
}

private String privateMethod() {
return "foo";
}
}

0 comments on commit c6ded02

Please sign in to comment.