Skip to content

Commit 06e858f

Browse files
committed
fix --declaration typechecking (complex case)
This fixes generation of typescriptServices.d.ts, although this is not a current requirement ( #465 ).
1 parent eea8409 commit 06e858f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ module ts {
780780
// But it cant, hence the accessible is going to be undefined, but that doesnt mean m.c is accessible
781781
// It is accessible if the parent m is accessible because then m.c can be accessed through qualification
782782
meaningToLook = getQualifiedLeftMeaning(meaning);
783-
symbol = symbol.parent;
783+
symbol = getParentOfSymbol(symbol);
784784
}
785785

786786
// This could be a symbol that is not exported in the external module
@@ -903,7 +903,7 @@ module ts {
903903
if (accessibleSymbolChain && !needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
904904
break;
905905
}
906-
symbol = accessibleSymbolChain ? accessibleSymbolChain[0].parent : symbol.parent;
906+
symbol = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
907907
meaning = getQualifiedLeftMeaning(meaning);
908908
}
909909

0 commit comments

Comments
 (0)