diff --git a/src/compiler/program.ts b/src/compiler/program.ts index cd63aa93893..835cd004d3d 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -406,7 +406,7 @@ namespace ts { if (diagnostic) { if (refFile !== undefined && refEnd !== undefined && refPos !== undefined) { - diagnostics.add(createFileDiagnostic(refFile, start, refEnd - refPos, diagnostic, ...diagnosticArgument)); + diagnostics.add(createFileDiagnostic(refFile, refPos, refEnd - refPos, diagnostic, ...diagnosticArgument)); } else { diagnostics.add(createCompilerDiagnostic(diagnostic, ...diagnosticArgument));