File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2224,17 +2224,19 @@ type internal FsiDynamicCompiler
22242224 inputs
22252225 ))
22262226
2227- // typeCheckOnly stops processing after type-checking
2228- // For loaded files, we skip code generation but continue to process the main script
2229- // For main script, we report errors and stop processing
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
22302232 if tcConfig.typeCheckOnly then
2233+ // Update state with type-checking results but skip code generation
2234+ let newIState = { istate with tcState = tcState }
2235+ // Only raise StopProcessing for main script, not for loaded files
22312236 if not isLoadedFile then
2232- diagnosticsLogger.AbortOnError( fsiConsoleOutput)
22332237 raise StopProcessing
2234- else
2235- // For loaded files, update state with type-checking results but skip code generation
2236- let newIState = { istate with tcState = tcState }
2237- newIState, tcEnvAtEndOfLastInput, []
2238+
2239+ newIState, tcEnvAtEndOfLastInput, []
22382240 else
22392241 let codegenResults , optEnv , fragName =
22402242 ProcessTypedImpl(
You can’t perform that action at this time.
0 commit comments