Skip to content

Commit 3b41508

Browse files
committed
Fix F# diagnostic locations
1 parent fd025d9 commit 3b41508

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Bot/Sharp/Compilation/FSharpCompiler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public async ValueTask<bool> CompileAsync(ulong operationId, string code, IColle
8686
private static Diagnostic ConvertToDiagnostic(FSharpDiagnostic fSharpDiagnostic)
8787
{
8888
LinePositionSpan position = new(
89-
new(fSharpDiagnostic.StartLine, fSharpDiagnostic.StartColumn),
90-
new(fSharpDiagnostic.EndLine, fSharpDiagnostic.EndColumn)
89+
new(fSharpDiagnostic.StartLine - 1, fSharpDiagnostic.StartColumn),
90+
new(fSharpDiagnostic.EndLine - 1, fSharpDiagnostic.EndColumn)
9191
);
9292
var location = Location.Create(string.Empty, default, position);
9393

0 commit comments

Comments
 (0)