You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.ArgumentException: The input list was empty. (Parameter 'list')
at Microsoft.FSharp.Collections.ListModule.Tail[T](FSharpList`1 list)in D:\a\_work\1\s\src\fsharp\FSharp.Core\list.fs:line 126
at Fantomas.TokenParser.getDefineExprs@402-1.Invoke(Tuple`2 tupledArg)in/home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/TokenParser.fs:line 424
at Microsoft.FSharp.Collections.ListModule.Fold[T,TState](FSharpFunc`2 folder, TState state, FSharpList`1 list)in D:\a\_work\1\s\src\fsharp\FSharp.Core\list.fs:line 221
at Fantomas.TokenParser.getDefineExprs(FSharpList`1 hashTokens)in/home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/TokenParser.fs:line 400
at Fantomas.TokenParser.getOptimizedDefinesSets(FSharpList`1 hashTokens)in/home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/TokenParser.fs:line 433
at Fantomas.TokenParser.getDefines(String sourceCode)in/home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/TokenParser.fs:line 449
at Fantomas.CodeFormatterImpl.parse(FSharpChecker checker, FSharpParsingOptions parsingOptions, FormatContext _arg1)
at Fantomas.CodeFormatterImpl.format@401.Invoke(Unit unitVar)in/home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/CodeFormatterImpl.fs:line 401
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)in D:\a\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 446
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)in D:\a\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 105
Problem description
Same problem with #if true.
Not crash with more complex constant like #if (true||false) but output is not correct. This could be different issue.
Extra information
The formatted result breaks by code.
The formatted result gives compiler warnings.
I or my company would be willing to help fix this.
Options
Fantomas 4.6 branch at 1/1/1990
Default Fantomas configuration
The text was updated successfully, but these errors were encountered:
Issue created from fantomas-online
Code
Error
Problem description
Same problem with
#if true
.Not crash with more complex constant like
#if (true||false)
but output is not correct. This could be different issue.Extra information
Options
Fantomas 4.6 branch at 1/1/1990
Default Fantomas configuration
The text was updated successfully, but these errors were encountered: