test/tools/javac/lambda/lambdaExpression/SamConversionComboTest.java

changeset 1510
7873d37f5b37
parent 1415
01c9d4161882
child 2227
998b10c43157
equal deleted inserted replaced
1509:1985e35e97b2 1510:7873d37f5b37
147 //match X(A a) or X(B b) or X(C c) 147 //match X(A a) or X(B b) or X(C c)
148 if (lambdaKind == LambdaKind.EXCEPTION_STMT) { 148 if (lambdaKind == LambdaKind.EXCEPTION_STMT) {
149 return false; //ambiguous target type 149 return false; //ambiguous target type
150 } 150 }
151 else if(lambdaBody == LambdaBody.IMPLICIT) { 151 else if(lambdaBody == LambdaBody.IMPLICIT) {
152 if(returnValue != ReturnValue.INTEGER) //ambiguous target type 152 return false;
153 return false;
154 } 153 }
155 else { //explicit parameter type 154 else { //explicit parameter type
156 if(fInterface.getParameterType().equals("Integer")) //ambiguous target type 155 if(fInterface.getParameterType().equals("Integer")) //ambiguous target type
157 //e.g. X x = new X((Integer i) -> i + 1); 156 //e.g. X x = new X((Integer i) -> i + 1);
158 return false; 157 return false;

mercurial