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
Fantomas cannot parse the code it produced. The diagnostics are about that code.
A type test that does not fit on one line is broken before :?, which then starts its line on the column of the expression. For the offside rule :? is not an infix token, unlike :> and :?>, so the parser reads it as the start of a new expression. The F# compiler rejects the result with FS0010 too (SDK 8.0.426 and 10.0.402).
The same happens when a multiline parenthesized function type follows :?, and when the type test sits inside parentheses (f (someValue :? (A -> B -> ...))). In an if condition the result parses. :, :> and :?> in the same position are fine.
Not a regression: 7.0.6, 8.0.10, main and the 9.0.0-alpha-001 preview all fail.
I or my company would be willing to help fix this.
I would like a release if this problem is solved.
Options
Fantomas main branch at 2026-10-20T12:59:18Z - 79babfa
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.
Activity
Indent a long :? type test, and a tuple after a cast operator