Skip to content

Commit

Permalink
Fix F# diagnostic locations
Browse files Browse the repository at this point in the history
  • Loading branch information
KubaZ2 committed Nov 6, 2024
1 parent fd025d9 commit 3b41508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Bot/Sharp/Compilation/FSharpCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public async ValueTask<bool> CompileAsync(ulong operationId, string code, IColle
private static Diagnostic ConvertToDiagnostic(FSharpDiagnostic fSharpDiagnostic)
{
LinePositionSpan position = new(
new(fSharpDiagnostic.StartLine, fSharpDiagnostic.StartColumn),
new(fSharpDiagnostic.EndLine, fSharpDiagnostic.EndColumn)
new(fSharpDiagnostic.StartLine - 1, fSharpDiagnostic.StartColumn),
new(fSharpDiagnostic.EndLine - 1, fSharpDiagnostic.EndColumn)
);
var location = Location.Create(string.Empty, default, position);

Expand Down

0 comments on commit 3b41508

Please sign in to comment.