mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 13:45:34 -05:00
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:
committed by
Mohamed Hegazy
parent
48f947f50d
commit
66c1178134
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user