diff --git a/src/validator/index.ts b/src/validator/index.ts index 11d52765..f8e4c44b 100644 --- a/src/validator/index.ts +++ b/src/validator/index.ts @@ -111,7 +111,7 @@ export const methodShouldHaveDifferentSignature = error(node => export const shouldNotOnlyCallToSuper = warning(node => { const callsSuperWithSameArgs = (sentence?: Sentence) => sentence?.is(Super) && sentence.args.every((arg, index) => arg.is(Reference) && arg.target === node.parameters[index]) return isEmpty(node.sentences) || !node.sentences.every(sentence => - callsSuperWithSameArgs(sentence) || sentence.is(Return) && callsSuperWithSameArgs(sentence.value) + callsSuperWithSameArgs(sentence) && node.sentences.length == 1 || sentence.is(Return) && callsSuperWithSameArgs(sentence.value) ) }, undefined, sourceMapForBody)