From 96181c023b98e6feede6e8b7477abb3709215051 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 3 Feb 2017 16:36:48 -0800 Subject: [PATCH] Shortcut for class/namespace merge --- src/compiler/checker.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e1db046d0d0..e17144c7878 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -18557,8 +18557,12 @@ namespace ts { const links = getSymbolLinks(symbol); if (!links.typeParametersChecked) { links.typeParametersChecked = true; - const type = getDeclaredTypeOfSymbol(symbol); const declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol); + if (declarations.length <= 1) { + return; + } + + const type = getDeclaredTypeOfSymbol(symbol); if (!areTypeParametersIdentical(declarations, type.localTypeParameters)) { // Report an error on every conflicting declaration. const name = symbolToString(symbol);