Use symbol fully-qualified name instead of node text in error message (#11761)

* Add test

* Add baselines

* Use fqn of symbol instead of node text
This commit is contained in:
Asad Saeeduddin
2016-10-25 14:45:32 -04:00
committed by Mohamed Hegazy
parent 48f947f50d
commit 66c1178134
4 changed files with 48 additions and 1 deletions

View File

@@ -17234,7 +17234,7 @@ namespace ts {
if (declaration && getModifierFlags(declaration) & ModifierFlags.Private) {
const typeClassDeclaration = <ClassLikeDeclaration>getClassLikeDeclarationOfSymbol(type.symbol);
if (!isNodeWithinClass(node, typeClassDeclaration)) {
error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, (<Identifier>node.expression).text);
error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol));
}
}
}