@@ -2851,41 +2851,41 @@ module ts {
28512851 if ( symbolFlags & SymbolFlags . Class && ! hasAddedSymbolInfo ) {
28522852 displayParts . push ( keywordPart ( SyntaxKind . ClassKeyword ) ) ;
28532853 displayParts . push ( spacePart ( ) ) ;
2854- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) ) ;
2854+ addFullSymbolName ( symbol ) ;
28552855 writeTypeParametersOfSymbol ( symbol , sourceFile ) ;
28562856 }
28572857 if ( symbolFlags & SymbolFlags . Interface ) {
28582858 addNewLineIfDisplayPartsExist ( ) ;
28592859 displayParts . push ( keywordPart ( SyntaxKind . InterfaceKeyword ) ) ;
28602860 displayParts . push ( spacePart ( ) ) ;
2861- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) ) ;
2861+ addFullSymbolName ( symbol ) ;
28622862 writeTypeParametersOfSymbol ( symbol , sourceFile ) ;
28632863 }
28642864 if ( symbolFlags & SymbolFlags . Enum ) {
28652865 addNewLineIfDisplayPartsExist ( ) ;
28662866 displayParts . push ( keywordPart ( SyntaxKind . EnumKeyword ) ) ;
28672867 displayParts . push ( spacePart ( ) ) ;
2868- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile ) ) ;
2868+ addFullSymbolName ( symbol ) ;
28692869 }
28702870 if ( symbolFlags & SymbolFlags . Module ) {
28712871 addNewLineIfDisplayPartsExist ( ) ;
28722872 displayParts . push ( keywordPart ( SyntaxKind . ModuleKeyword ) ) ;
28732873 displayParts . push ( spacePart ( ) ) ;
2874- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile ) ) ;
2874+ addFullSymbolName ( symbol ) ;
28752875 }
28762876 if ( symbolFlags & SymbolFlags . TypeParameter ) {
28772877 addNewLineIfDisplayPartsExist ( ) ;
28782878 displayParts . push ( punctuationPart ( SyntaxKind . OpenParenToken ) ) ;
28792879 displayParts . push ( textPart ( "type parameter" ) ) ;
28802880 displayParts . push ( punctuationPart ( SyntaxKind . CloseParenToken ) ) ;
28812881 displayParts . push ( spacePart ( ) ) ;
2882- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , enclosingDeclaration ) ) ;
2882+ addFullSymbolName ( symbol ) ;
28832883 displayParts . push ( spacePart ( ) ) ;
28842884 displayParts . push ( keywordPart ( SyntaxKind . InKeyword ) ) ;
28852885 displayParts . push ( spacePart ( ) ) ;
28862886 if ( symbol . parent ) {
28872887 // Class/Interface type parameter
2888- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol . parent , enclosingDeclaration , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) )
2888+ addFullSymbolName ( symbol . parent , enclosingDeclaration ) ;
28892889 writeTypeParametersOfSymbol ( symbol . parent , enclosingDeclaration ) ;
28902890 }
28912891 else {
@@ -2897,7 +2897,7 @@ module ts {
28972897 displayParts . push ( spacePart ( ) ) ;
28982898 }
28992899 else if ( signatureDeclaration . kind !== SyntaxKind . CallSignature && signatureDeclaration . name ) {
2900- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , signatureDeclaration . symbol , sourceFile , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) )
2900+ addFullSymbolName ( signatureDeclaration . symbol ) ;
29012901 }
29022902 displayParts . push . apply ( displayParts , signatureToDisplayParts ( typeResolver , signature , sourceFile , TypeFormatFlags . WriteTypeArgumentsOfSignature ) ) ;
29032903 }
@@ -2921,7 +2921,7 @@ module ts {
29212921 displayParts . push ( textPart ( "alias" ) ) ;
29222922 displayParts . push ( punctuationPart ( SyntaxKind . CloseParenToken ) ) ;
29232923 displayParts . push ( spacePart ( ) ) ;
2924- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile ) ) ;
2924+ addFullSymbolName ( symbol ) ;
29252925 }
29262926 if ( ! hasAddedSymbolInfo ) {
29272927 if ( symbolKind !== ScriptElementKind . unknown ) {
@@ -2969,15 +2969,20 @@ module ts {
29692969 }
29702970 }
29712971
2972+ function addFullSymbolName ( symbol : Symbol , enclosingDeclaration ?: Node ) {
2973+ var fullSymbolDisplayParts = symbolToDisplayParts ( typeResolver , symbol , enclosingDeclaration || sourceFile , /*meaning*/ undefined ,
2974+ SymbolFormatFlags . WriteTypeParametersOrArguments | SymbolFormatFlags . UseOnlyExternalAliasing ) ;
2975+ displayParts . push . apply ( displayParts , fullSymbolDisplayParts ) ;
2976+ }
2977+
29722978 function addPrefixForAnyFunctionOrVar ( symbol : Symbol , symbolKind : string ) {
29732979 addNewLineIfDisplayPartsExist ( ) ;
29742980 if ( symbolKind ) {
29752981 displayParts . push ( punctuationPart ( SyntaxKind . OpenParenToken ) ) ;
29762982 displayParts . push ( textPart ( symbolKind ) ) ;
29772983 displayParts . push ( punctuationPart ( SyntaxKind . CloseParenToken ) ) ;
29782984 displayParts . push ( spacePart ( ) ) ;
2979- // Write type parameters of class/Interface if it is property/method of the generic class/interface
2980- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) ) ;
2985+ addFullSymbolName ( symbol ) ;
29812986 }
29822987 }
29832988
0 commit comments