From a733ac9e004781dc10a4c45aa7552a257b3c94f8 Mon Sep 17 00:00:00 2001 From: Eugenia Fajardo <116763549+MEUFAJ@users.noreply.github.com> Date: Thu, 12 Dec 2024 22:54:13 -0300 Subject: [PATCH] fix super incorrecto (#318) * fix super incorrecto * Linter fix --------- Co-authored-by: Fernando Dodino --- src/validator/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)