Skip to content

Commit 569b7ce

Browse files
Revereted to using [] for missing names.
1 parent 78f7c22 commit 569b7ce

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8554,7 +8554,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
85548554
moduleName.symbol = symbol;
85558555
return moduleName;
85568556
}
8557-
if ((symbolNameSource && isIdentifier(symbolNameSource)) || canUsePropertyAccess(symbolName, languageVersion)) {
8557+
if ((symbolNameSource && isIdentifier(symbolNameSource) && getFullWidth(symbolNameSource) !== 0) || canUsePropertyAccess(symbolName, languageVersion)) {
85588558
const identifier = setEmitFlags(factory.createIdentifier(symbolName), EmitFlags.NoAsciiEscaping);
85598559
if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray<TypeNode | TypeParameterDeclaration>(typeParameterNodes));
85608560
identifier.symbol = symbol;

src/harness/typeWriter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export class TypeWriterWalker {
304304
if (!symbol) {
305305
return;
306306
}
307-
let symbolString = "Symbol(" + this.checker.symbolToString(symbol, node.parent, /*meaning*/ undefined, ts.SymbolFormatFlags.AllowAnyNodeKind);
307+
let symbolString = "Symbol(" + this.checker.symbolToString(symbol, node.parent);
308308
if (symbol.declarations) {
309309
let count = 0;
310310
for (const declaration of symbol.declarations) {

tests/baselines/reference/MemberFunctionDeclaration4_es6.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ class C {
55
>C : Symbol(C, Decl(MemberFunctionDeclaration4_es6.ts, 0, 0))
66

77
*() { }
8-
> : Symbol(C.(Missing), Decl(MemberFunctionDeclaration4_es6.ts, 0, 9))
8+
> : Symbol(C[(Missing)], Decl(MemberFunctionDeclaration4_es6.ts, 0, 9))
99
}

tests/baselines/reference/MemberFunctionDeclaration5_es6.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ class C {
66

77
*
88
}
9-
> : Symbol(C.(Missing), Decl(MemberFunctionDeclaration5_es6.ts, 0, 9))
9+
> : Symbol(C[(Missing)], Decl(MemberFunctionDeclaration5_es6.ts, 0, 9))
1010

tests/baselines/reference/classMemberWithMissingIdentifier.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ class C {
55
>C : Symbol(C, Decl(classMemberWithMissingIdentifier.ts, 0, 0))
66

77
public {};
8-
> : Symbol(C.(Missing), Decl(classMemberWithMissingIdentifier.ts, 0, 9))
8+
> : Symbol(C[(Missing)], Decl(classMemberWithMissingIdentifier.ts, 0, 9))
99
}

tests/baselines/reference/classMemberWithMissingIdentifier2.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ class C {
55
>C : Symbol(C, Decl(classMemberWithMissingIdentifier2.ts, 0, 0))
66

77
public {[name:string]:VariableDeclaration};
8-
> : Symbol(C.(Missing), Decl(classMemberWithMissingIdentifier2.ts, 0, 9))
8+
> : Symbol(C[(Missing)], Decl(classMemberWithMissingIdentifier2.ts, 0, 9))
99
>name : Symbol(name, Decl(lib.dom.d.ts, --, --))
1010
}

0 commit comments

Comments
 (0)