From e6bcef7dc59a7bf826783453e08f2e2cf2fc1cb4 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 1 Jun 2017 09:19:34 -0700 Subject: [PATCH] Combining unknown type+value symbol->unknownSymbol Previously, when getExternalModuleMember tried to combine unknownSymbol from a type and unknownSymbol from a value, it combineValueAndTypeSymbol would create a new franken-symbol that was no longer equal to unknownSymbol. --- src/compiler/checker.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cfe2c5a6bf2..11bb737e986 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1364,6 +1364,9 @@ namespace ts { // An 'import { Point } from "graphics"' needs to create a symbol that combines the value side 'Point' // property with the type/namespace side interface 'Point'. function combineValueAndTypeSymbols(valueSymbol: Symbol, typeSymbol: Symbol): Symbol { + if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) { + return unknownSymbol; + } if (valueSymbol.flags & (SymbolFlags.Type | SymbolFlags.Namespace)) { return valueSymbol; }