Better error logging.
This commit is contained in:
+6
-4
@@ -229,10 +229,12 @@ public final class JavaFunctionResolver {
|
|||||||
isReturnTypeOkForOverride(JetTypeChecker.INSTANCE, superFunctionSubstituted, functionDescriptor);
|
isReturnTypeOkForOverride(JetTypeChecker.INSTANCE, superFunctionSubstituted, functionDescriptor);
|
||||||
if (!paramsOk || !returnTypeOk) {
|
if (!paramsOk || !returnTypeOk) {
|
||||||
String errorMessage = "Loaded Java method overrides another, but resolved as Kotlin function, doesn't.\n"
|
String errorMessage = "Loaded Java method overrides another, but resolved as Kotlin function, doesn't.\n"
|
||||||
+ "super function = " + superFunction + "\n"
|
+ "super function = " + superFunction + "\n"
|
||||||
+ "this function = " + functionDescriptor + "\n"
|
+ "super class = " + superFunction.getContainingDeclaration() + "\n"
|
||||||
+ "this method = " + PsiFormatUtil.getExternalName(method.getPsiMethod()) + "\n"
|
+ "sub function = " + functionDescriptor + "\n"
|
||||||
+ "@KotlinSignature = " + method.getSignatureAnnotation().signature();
|
+ "sub class = " + functionDescriptor.getContainingDeclaration() + "\n"
|
||||||
|
+ "sub method = " + PsiFormatUtil.getExternalName(method.getPsiMethod()) + "\n"
|
||||||
|
+ "@KotlinSignature = " + method.getSignatureAnnotation().signature();
|
||||||
|
|
||||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
throw new IllegalStateException(errorMessage);
|
throw new IllegalStateException(errorMessage);
|
||||||
|
|||||||
Reference in New Issue
Block a user