@@ -2238,7 +2238,6 @@ module ts {
22382238 return emptyObjectType ;
22392239 }
22402240 var type = getDeclaredTypeOfSymbol ( symbol ) ;
2241- var name = symbol . name ;
22422241 if ( ! ( type . flags & TypeFlags . ObjectType ) ) {
22432242 error ( getTypeDeclaration ( symbol ) , Diagnostics . Global_type_0_must_be_a_class_or_interface_type , symbol . name ) ;
22442243 return emptyObjectType ;
@@ -3547,7 +3546,8 @@ module ts {
35473546 return false ;
35483547 }
35493548
3550- function checkSuperExpression ( node : Node , isCallExpression : boolean ) : Type {
3549+ function checkSuperExpression ( node : Node ) : Type {
3550+ var isCallExpression = node . parent . kind === SyntaxKind . CallExpression && ( < CallExpression > node . parent ) . func === node ;
35513551 var enclosingClass = < ClassDeclaration > getAncestor ( node , SyntaxKind . ClassDeclaration ) ;
35523552 var baseClass : Type ;
35533553 if ( enclosingClass && enclosingClass . baseType ) {
@@ -4181,7 +4181,7 @@ module ts {
41814181
41824182 function resolveCallExpression ( node : CallExpression ) : Signature {
41834183 if ( node . func . kind === SyntaxKind . SuperKeyword ) {
4184- var superType = checkSuperExpression ( node . func , true ) ;
4184+ var superType = checkSuperExpression ( node . func ) ;
41854185 if ( superType !== unknownType ) {
41864186 return resolveCall ( node , getSignaturesOfType ( superType , SignatureKind . Construct ) ) ;
41874187 }
@@ -4829,7 +4829,7 @@ module ts {
48294829 case SyntaxKind . ThisKeyword :
48304830 return checkThisExpression ( node ) ;
48314831 case SyntaxKind . SuperKeyword :
4832- return checkSuperExpression ( node , false ) ;
4832+ return checkSuperExpression ( node ) ;
48334833 case SyntaxKind . NullKeyword :
48344834 return nullType ;
48354835 case SyntaxKind . TrueKeyword :
@@ -6940,8 +6940,7 @@ module ts {
69406940 }
69416941
69426942 if ( isInRightSideOfImportOrExportAssignment ( node ) ) {
6943- var symbol : Symbol ;
6944- symbol = getSymbolInfo ( node ) ;
6943+ var symbol = getSymbolInfo ( node ) ;
69456944 var declaredType = getDeclaredTypeOfSymbol ( symbol ) ;
69466945 return declaredType !== unknownType ? declaredType : getTypeOfSymbol ( symbol ) ;
69476946 }
0 commit comments