repond to feedback

This commit is contained in:
Arthur Ozga
2017-06-01 16:03:11 -07:00
parent c1d466a716
commit 2fb9ab798c
3 changed files with 2 additions and 3 deletions

View File

@@ -49,7 +49,8 @@ namespace ts.codefix {
const symbol = leftExpressionType.symbol;
if (symbol.flags & SymbolFlags.Class) {
classDeclaration = symbol.declarations && <ClassLikeDeclaration>symbol.declarations[0];
if (getObjectFlags(leftExpressionType) & ObjectFlags.Anonymous && symbol.flags & SymbolFlags.Class && !checker.getBaseTypeVariableOfClass(symbol)) {
if (leftExpressionType !== checker.getDeclaredTypeOfSymbol(symbol)) {
// The expression is a class symbol but the type is not the instance-side.
makeStatic = true;
}
}