equal
deleted
inserted
replaced
224 if (!implDefiningClass.isAssignableFrom(receiverClass)) { |
224 if (!implDefiningClass.isAssignableFrom(receiverClass)) { |
225 throw new LambdaConversionException( |
225 throw new LambdaConversionException( |
226 String.format("Invalid receiver type %s; not a subtype of implementation type %s", |
226 String.format("Invalid receiver type %s; not a subtype of implementation type %s", |
227 receiverClass, implDefiningClass)); |
227 receiverClass, implDefiningClass)); |
228 } |
228 } |
|
229 |
|
230 Class<?> implReceiverClass = implMethod.type().parameterType(0); |
|
231 if (implReceiverClass != implDefiningClass && !implReceiverClass.isAssignableFrom(receiverClass)) { |
|
232 throw new LambdaConversionException( |
|
233 String.format("Invalid receiver type %s; not a subtype of implementation receiver type %s", |
|
234 receiverClass, implReceiverClass)); |
|
235 } |
229 } else { |
236 } else { |
230 // no receiver |
237 // no receiver |
231 capturedStart = 0; |
238 capturedStart = 0; |
232 samStart = 0; |
239 samStart = 0; |
233 } |
240 } |