@@ -3544,7 +3544,7 @@ module ts {
3544
3544
}
3545
3545
3546
3546
function getPropertySymbolsFromBaseTypes ( symbol : Symbol , propertyName : string , result : Symbol [ ] ) : void {
3547
- if ( symbol . flags & ( SymbolFlags . Class | SymbolFlags . Interface ) ) {
3547
+ if ( symbol && symbol . flags & ( SymbolFlags . Class | SymbolFlags . Interface ) ) {
3548
3548
forEach ( symbol . getDeclarations ( ) , declaration => {
3549
3549
if ( declaration . kind === SyntaxKind . ClassDeclaration ) {
3550
3550
getPropertySymbolFromTypeReference ( ( < ClassDeclaration > declaration ) . baseType ) ;
@@ -3559,14 +3559,15 @@ module ts {
3559
3559
3560
3560
function getPropertySymbolFromTypeReference ( typeReference : TypeReferenceNode ) {
3561
3561
if ( typeReference ) {
3562
- // TODO: move to getTypeOfNode instead
3563
- var typeReferenceSymbol = typeInfoResolver . getSymbolInfo ( typeReference . typeName ) ;
3564
- if ( typeReferenceSymbol ) {
3565
- var propertySymbol = typeReferenceSymbol . members [ propertyName ] ;
3566
- if ( propertySymbol ) result . push ( typeReferenceSymbol . members [ propertyName ] ) ;
3562
+ var type = typeInfoResolver . getTypeOfNode ( typeReference ) ;
3563
+ if ( type ) {
3564
+ var propertySymbol = typeInfoResolver . getPropertyOfType ( type , propertyName ) ;
3565
+ if ( propertySymbol ) {
3566
+ result . push ( propertySymbol ) ;
3567
+ }
3567
3568
3568
3569
// Visit the typeReference as well to see if it directly or indirectly use that property
3569
- getPropertySymbolsFromBaseTypes ( typeReferenceSymbol , propertyName , result ) ;
3570
+ getPropertySymbolsFromBaseTypes ( type . symbol , propertyName , result ) ;
3570
3571
}
3571
3572
}
3572
3573
}
0 commit comments