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
{{ message }}
Repository navigation
NamedIndexedPropertySet with two SynLongIdent remove space #3273
a.Bc.DE <-0// notice the missing space
a.B c <-0
B c.DE <-0
a.B c <-0
Problem description
Please describe here the Fantomas problem you encountered.
Check out our Contribution Guidelines.
Extra information
The formatted result breaks my code.
The formatted result gives compiler warnings.
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 2025-09-08T06:57:30Z - 31029b1
{ config with
MaxLineLength =80}
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.
I've investigated this bug and submitted a fix: see PR #3275 (pending creation).
Root cause: In CodePrinter.fs, the sep logic for Expr.NamedIndexedPropertySet only adds a separating space for Expr.Constant and Expr.Ident index expressions. A multi-segment identifier like c.DE maps to SynExpr.LongIdent → Expr.OptVar in the Oak representation, which was not in the sepSpace case. So the space was omitted, merging a.B and c.DE into a.Bc.DE.
Fix: Add Expr.OptVar _ to the sepSpace case — a one-line change in CodePrinter.fs. All 2737 tests pass.
Activity
Fix missing space in NamedIndexedPropertySet when index is a long ide…
github-actions commentedon Mar 11, 2026
🤖 This is an automated response from Repo Assist.
I've investigated this bug and submitted a fix: see PR #3275 (pending creation).
Root cause: In
CodePrinter.fs, theseplogic forExpr.NamedIndexedPropertySetonly adds a separating space forExpr.ConstantandExpr.Identindex expressions. A multi-segment identifier likec.DEmaps toSynExpr.LongIdent→Expr.OptVarin the Oak representation, which was not in thesepSpacecase. So the space was omitted, merginga.Bandc.DEintoa.Bc.DE.Fix: Add
Expr.OptVar _to thesepSpacecase — a one-line change inCodePrinter.fs. All 2737 tests pass.Fix NamedIndexedPropertySet with two SynLongIdent removing space
Bump the dotnet-sidecars group with 6 updates (#257)
Bump the packages group with 5 updates (#106)
Bump the packages group with 6 updates (#84)