Mon, 23 Jun 2014 13:14:32 -0700
8046060: Different results of floating point multiplication for lambda code block
Summary: propogate strictfp into lambda body
Reviewed-by: vromero, jlahoda
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8042759
4 * @summary Lambda returning implicitly-typed lambdas considered pertinent to applicability
5 * @compile/fail/ref=ImplicitLambdaConsideredForApplicabilityTest.out -XDrawDiagnostics ImplicitLambdaConsideredForApplicabilityTest.java
6 */
8 abstract class ImplicitLambdaConsideredForApplicabilityTest {
9 interface A {
10 B m(int a, int b);
11 }
13 interface C {
14 String m(int a, int b);
15 }
17 interface B {
18 int m(int c);
19 }
21 abstract void foo(A a);
23 abstract void foo(C c);
25 void bar() {
26 foo((int a, int b) -> {
27 if(a < b)
28 return c -> 0;
29 else
30 return c -> 0;
31 });
32 }
33 }