[Fixes #972] 1-arg lambdas with explicit typing on the argument did not pretty print correctly.

This commit is contained in:
Reinier Zwitserloot committed 2015-11-22 23:32:15 +01:00
1 parent e05feead3f
commit ba2cde332a
4 files changed
+33 -4

No files matched your search

+17 -1
View File
@@ -5,4 +5,20 @@ public class Lambda {
java.util.Comparator<Integer> c2 = (Integer a, Integer b) -> {
return a - b;
};
}
java.util.function.Function<String, String> fnc = (String c) -> c;
void testLambdaInArgsList(String name, java.util.function.Function<String, String> f) {
}
void testLambdaInArgsList2(java.util.function.Function<String, String> f, String name) {
}
void test() {
testLambdaInArgsList("hello", (String c) -> c);
testLambdaInArgsList("hello", c -> c);
testLambdaInArgsList2((String c) -> c, "hello");
testLambdaInArgsList2(c -> c, "hello");
}
}