mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix error reporting position
This commit is contained in:
1 parent
c2d86711e8
commit
fe80647a7a
2 files changed
+2
-2
No files matched your search
@@ -89,7 +89,7 @@ module ts {
|
||||
forEach(symbol.declarations, (declaration) => {
|
||||
file.semanticErrors.push(createDiagnosticForNode(declaration.name, Diagnostics.Duplicate_identifier_0, getDisplayName(declaration)));
|
||||
});
|
||||
file.semanticErrors.push(createDiagnosticForNode(node, Diagnostics.Duplicate_identifier_0, getDisplayName(node)));
|
||||
file.semanticErrors.push(createDiagnosticForNode(node.name, Diagnostics.Duplicate_identifier_0, getDisplayName(node)));
|
||||
|
||||
symbol = createSymbol(0, name);
|
||||
}
|
||||
|
||||
@@ -5727,7 +5727,7 @@ module ts {
|
||||
|
||||
if (duplicateFunctionDeclaration) {
|
||||
forEach( declarations, declaration => {
|
||||
error(declaration, Diagnostics.Duplicate_function_implementation);
|
||||
error(declaration.name, Diagnostics.Duplicate_function_implementation);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user