Skip to content

Commit 797b1ac

Browse files
Copilotabonie
andcommitted
Fix AbortOnError to only be called when typecheck-only is enabled
Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
1 parent acff810 commit 797b1ac

File tree

1 file changed

+3
-5
lines changed
  • src/Compiler/Interactive

1 file changed

+3
-5
lines changed

src/Compiler/Interactive/fsi.fs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,12 +2224,10 @@ type internal FsiDynamicCompiler
22242224
inputs
22252225
))
22262226

2227-
// typeCheckOnly: check for errors after type-checking
2228-
// Always abort on errors (for both loaded files and main script)
2229-
diagnosticsLogger.AbortOnError(fsiConsoleOutput)
2230-
2231-
// typeCheckOnly: skip code generation and execution
2227+
// typeCheckOnly: check for errors and skip code generation
22322228
if tcConfig.typeCheckOnly then
2229+
// Always abort on errors (for both loaded files and main script)
2230+
diagnosticsLogger.AbortOnError(fsiConsoleOutput)
22332231
// Update state with type-checking results but skip code generation
22342232
let newIState = { istate with tcState = tcState }
22352233
// Only raise StopProcessing for main script, not for loaded files

0 commit comments

Comments
 (0)