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

changeset 1510
7873d37f5b37
parent 1415
01c9d4161882
child 2227
998b10c43157
equal deleted inserted replaced
1509:1985e35e97b2 1510:7873d37f5b37
184 if(methodDef == MethodDef.METHOD7 || methodDef == MethodDef.METHOD8)//method signature mismatch 184 if(methodDef == MethodDef.METHOD7 || methodDef == MethodDef.METHOD8)//method signature mismatch
185 return false; 185 return false;
186 if(context != Context.CONSTRUCTOR && fInterface != FInterface.C && methodDef == MethodDef.METHOD6) 186 if(context != Context.CONSTRUCTOR && fInterface != FInterface.C && methodDef == MethodDef.METHOD6)
187 //method that throws exceptions not thrown by the interface method is a mismatch 187 //method that throws exceptions not thrown by the interface method is a mismatch
188 return false; 188 return false;
189 if(context == Context.CONSTRUCTOR && 189 if(context == Context.CONSTRUCTOR)
190 methodReference != MethodReference.METHOD1 &&
191 methodReference != MethodReference.METHOD2 &&
192 methodReference != MethodReference.METHOD3)//ambiguous reference
193 return false; 190 return false;
194 return true; 191 return true;
195 } 192 }
196 193
197 void test() throws Exception { 194 void test() throws Exception {

mercurial