From 652e4932f6db92ca6dc3c2b112b1b28733db5529 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 21 Apr 2018 09:32:46 -0700 Subject: [PATCH] Address CR feedback --- src/compiler/checker.ts | 8 ++++---- src/compiler/types.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index af069d548a7..7963614789d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5629,7 +5629,7 @@ namespace ts { * @param lateSymbols The late-bound symbols of the parent. * @param decl The member to bind. */ - function lateBindMember(parent: Symbol, earlySymbols: SymbolTable | undefined, lateSymbols: UnderscoreEscapedMap, decl: LateBoundDeclaration) { + function lateBindMember(parent: Symbol, earlySymbols: SymbolTable | undefined, lateSymbols: SymbolTable, decl: LateBoundDeclaration) { Debug.assert(!!decl.symbol, "The member is expected to have a symbol."); const links = getNodeLinks(decl); if (!links.resolvedSymbol) { @@ -5686,7 +5686,7 @@ namespace ts { links[resolutionKind] = earlySymbols || emptySymbols; // fill in any as-yet-unresolved late-bound members. - const lateSymbols = createMap() as UnderscoreEscapedMap; + const lateSymbols = createSymbolTable(); for (const decl of symbol.declarations) { const members = getMembersOfDeclaration(decl); if (members) { @@ -6606,8 +6606,8 @@ namespace ts { } else { if (type !== commonType) { - checkFlags |= CheckFlags.HasNonUniformType; - } + checkFlags |= CheckFlags.HasNonUniformType; + } } propTypes.push(type); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4db1c342098..f288d0f8c59 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3369,11 +3369,11 @@ namespace ts { members?: SymbolTable; // Class, interface or object literal instance members exports?: SymbolTable; // Module exports globalExports?: SymbolTable; // Conditional global UMD exports - nameType?: Type; // Type associated with a late-bound symbol /* @internal */ id?: number; // Unique id (used to look up SymbolLinks) /* @internal */ mergeId?: number; // Merge id (used to look up merged symbol) /* @internal */ parent?: Symbol; // Parent symbol /* @internal */ exportSymbol?: Symbol; // Exported symbol associated with this symbol + /* @internal */ nameType?: Type; // Type associated with a late-bound symbol /* @internal */ constEnumOnlyModule?: boolean; // True if module contains only const enums or other modules with only const enums /* @internal */ isReferenced?: SymbolFlags; // True if the symbol is referenced elsewhere. Keeps track of the meaning of a reference in case a symbol is both a type parameter and parameter. /* @internal */ isReplaceableByMethod?: boolean; // Can this Javascript class property be replaced by a method symbol?