diff --git a/ets2panda/linter/src/lib/TypeScriptLinter.ts b/ets2panda/linter/src/lib/TypeScriptLinter.ts index ca04dbcfcd70cd084c01b8f28c23f983dd279534..835491bd40c363bf8a1989ced8dc2ffe3346b546 100644 --- a/ets2panda/linter/src/lib/TypeScriptLinter.ts +++ b/ets2panda/linter/src/lib/TypeScriptLinter.ts @@ -4352,6 +4352,9 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { if (!this.options.arkts2) { return; } + if (ts.isCallExpression(tsCallExpr) && tsCallExpr.expression.kind === ts.SyntaxKind.SuperKeyword) { + return; + } const node = ts.isCallExpression(tsCallExpr) ? tsCallExpr.expression : tsCallExpr.typeName; const constructorType = this.tsTypeChecker.getTypeAtLocation(node); const callSignatures = constructorType.getCallSignatures(); diff --git a/ets2panda/linter/test/builtin/builtin_callsignature.ets b/ets2panda/linter/test/builtin/builtin_callsignature.ets index ccb7f4de952f3bc32e079f785565ea9e8f313d9f..c728c8dc6c64ef0caae8fe6678ac2f0251caeef3 100644 --- a/ets2panda/linter/test/builtin/builtin_callsignature.ets +++ b/ets2panda/linter/test/builtin/builtin_callsignature.ets @@ -34,4 +34,10 @@ function anotherName(ctorName0: BigIntConstructor) { // ERROR type BigIntConstructor1 = BigIntConstructor; // ERROR let ctorName2:BigIntConstructor1 = ctorName1 // ERROR const rs2 = ctorName2(1); // ERROR +} + +class A extends Error { + constructor(str: string) { + super(str); + } } \ No newline at end of file