return type can be omitted when override
This commit is contained in:
@@ -162,7 +162,7 @@ public class DeclarationsChecker {
|
|||||||
JetFunction function = (JetFunction) member;
|
JetFunction function = (JetFunction) member;
|
||||||
hasDeferredType = function.getReturnTypeRef() == null && function.getBodyExpression() != null && !function.hasBlockBody();
|
hasDeferredType = function.getReturnTypeRef() == null && function.getBodyExpression() != null && !function.hasBlockBody();
|
||||||
}
|
}
|
||||||
if ((memberDescriptor.getVisibility().isPublicAPI()) && hasDeferredType) {
|
if ((memberDescriptor.getVisibility().isPublicAPI()) && memberDescriptor.getOverriddenDescriptors().size() == 0 && hasDeferredType) {
|
||||||
trace.report(PUBLIC_MEMBER_SHOULD_SPECIFY_TYPE.on(member));
|
trace.report(PUBLIC_MEMBER_SHOULD_SPECIFY_TYPE.on(member));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,3 +38,7 @@ class Q {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//check that 'toString' can be invoked without specifying 'public' and ': String'
|
||||||
|
class NewClass : java.util.ArrayList<Integer>() {
|
||||||
|
override fun toString() = "a"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user