mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Fix error reporting position
This commit is contained in:
@@ -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