Issue created from fantomas-online
Code
module M
let tests () =
let tfms = [
#if NET8_0_OR_GREATER
"net8.0"
#endif
#if NET9_0_OR_GREATER
"net9.0"
#endif
]
tfms
Error
Fantomas.Core.DefineParseException: Parsing failed for define combination(s): no defines.
at Fantomas.Core.CodeFormatterImpl.parse@61-11.Invoke(FSharpResult`2[] results) in /_//src/Fantomas.Core/CodeFormatterImpl.fs:line 69
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, b result1, FSharpFunc`2 userCode) in D:\a\_work\1\s\src\fsharp\src\FSharp.Core\async.fs:line 527
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\fsharp\src\FSharp.Core\async.fs:line 112
Problem description
error 58 at ]: "this token is offside of context started at position (4:3)" for some case.
Trivia stuff.
Extra information
Options
Fantomas main branch at 2026-08-19T11:26:11Z - 25e2376
Default Fantomas configuration
Did you know that you can ignore files when formatting by using a .fantomasignore file?
PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.
Issue created from fantomas-online
Code
Error
Problem description
error 58 at
]: "this token is offside of context started at position (4:3)" for some case.Trivia stuff.
Extra information
Options
Fantomas main branch at 2026-08-19T11:26:11Z - 25e2376
Default Fantomas configuration
Did you know that you can ignore files when formatting by using a .fantomasignore file?
PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.