From 1d4c1d15d5b22a085a9fc1f957a04bc0b384bbb2 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Thu, 4 Feb 2016 11:12:31 -0800 Subject: [PATCH] rename function --- src/compiler/checker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a3772ac78f0..6404a766738 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7298,7 +7298,7 @@ namespace ts { * Otherwise, return false * @param classDecl a class declaration to check if it extends null */ - function isClassDeclarationExtendNull(classDecl: ClassDeclaration): boolean { + function classDeclarationExtendsNull(classDecl: ClassDeclaration): boolean { const classSymbol = getSymbolOfNode(classDecl); const classInstanceType = getDeclaredTypeOfSymbol(classSymbol); const baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType); @@ -7318,7 +7318,7 @@ namespace ts { // If a containing class does not have extends clause or the class extends null // skip checking whether super statement is called before "this" accessing. - if (baseTypeNode && !isClassDeclarationExtendNull(containingClassDecl)) { + if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) { const superCall = getSuperCallInConstructor(container); // We should give an error in the following cases: @@ -11842,7 +11842,7 @@ namespace ts { // whereas constructors of derived classes must contain at least one super call somewhere in their function body. const containingClassDecl = node.parent; if (getClassExtendsHeritageClauseElement(containingClassDecl)) { - const isClassExtendNull = isClassDeclarationExtendNull(containingClassDecl); + const isClassExtendNull = classDeclarationExtendsNull(containingClassDecl); if (getSuperCallInConstructor(node)) { if (isClassExtendNull) {