Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tidy
  • Loading branch information
charlesroddie committed Jun 19, 2026
commit c7beb02d6f1a2a1de197f0e43d346171f9273a5c
10 changes: 5 additions & 5 deletions src/Compiler/Checking/Expressions/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7587,11 +7587,11 @@ and TcInterpolatedStringViaConcat (cenv: cenv, overallTy: OverallTy, env: TcEnv,
mkSynApp1 (mkSynLidGet mSynth [ "System"; "String" ] "Format") args mSynth

// Build one string expression per part, consuming one 'holeIsString' flag per fill expression.
let rec build acc parts (holeIsString: bool list) =
let rec build (acc: SynExpr list, parts: SynInterpolatedStringPart list, holeIsString: bool list) =
match parts with
| [] -> List.rev acc
| SynInterpolatedStringPart.String ("", _) :: rest -> build acc rest holeIsString
| SynInterpolatedStringPart.String (s, _) :: rest -> build (strLit (s.Replace("%%", "%")) :: acc) rest holeIsString
| SynInterpolatedStringPart.String ("", _) :: rest -> build (acc, rest, holeIsString)
| SynInterpolatedStringPart.String (s, _) :: rest -> build (strLit (s.Replace("%%", "%")) :: acc, rest, holeIsString)
| SynInterpolatedStringPart.FillExpr (e, formatting) :: rest ->
let isStr, rest' = match holeIsString with b :: bs -> b, bs | [] -> false, []
let argExpr =
Expand All @@ -7600,9 +7600,9 @@ and TcInterpolatedStringViaConcat (cenv: cenv, overallTy: OverallTy, env: TcEnv,
| SynInterpolationFormatting.DotNet (None, None) -> if isStr then e else stringOp e
| SynInterpolationFormatting.DotNet (alignment, format) -> stringFormatOp (alignment, format, e)
| SynInterpolationFormatting.Printf (spec, _) -> sprintfOp (spec, e)
build (argExpr :: acc) rest rest'
build (argExpr :: acc, rest, rest')

let argExprs = build [] parts holeIsString
let argExprs = build ([], parts, holeIsString)

let concatLid = mkSynLidGet mSynth [ "System"; "String" ] "Concat"

Expand Down
Loading