Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Core/10.0.300.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Fix tuple/multi-value projections in queries to use Queryable.Select instead of Enumerable.Select when the source is IQueryable, preserving query composition and enabling async operations like ToListAsync() in Entity Framework Core. ([Issue #3782](https://github.com/dotnet/fsharp/issues/3782), [Issue #15133](https://github.com/dotnet/fsharp/issues/15133))
* Fix EvaluateQuotation to handle Sequential expressions, void method calls (unit return), and other patterns that were previously throwing NotSupportedException. Also properly handles unit-returning expressions by using Action delegates instead of Func delegates. ([Issue #19099](https://github.com/dotnet/fsharp/issues/19099))
* Fix query conditionals without else branch (if-then only) that were causing type mismatch errors. Now properly extracts element type from IQueryable for creating empty sequences. ([Issue #3445](https://github.com/dotnet/fsharp/issues/3445))
* Ensure culture-independent parsing of .NET-style interpolated string holes. ([Issue #19367](https://github.com/dotnet/fsharp/issues/19367), [PR #19370](https://github.com/dotnet/fsharp/pull/19370))

### Added

Expand Down
2 changes: 1 addition & 1 deletion src/FSharp.Core/printf.fs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ module internal PrintfImpl =
let parseInterpolatedHoleDotNetFormat typeChar (s: string) (i: byref<int>) =
if typeChar = 'P' then
if i < s.Length && s.[i] = '(' then
let i2 = s.IndexOf(")", i)
let i2 = s.IndexOf(')', i)
if i2 = -1 then
ValueNone
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,26 @@ printfn "%%s" (System.Globalization.CultureInfo "en-US" |> x.ToString)
"""
|> compileExeAndRun
|> shouldSucceed
|> withStdOutContains "abcde"
|> withStdOutContains "abcde"

// See https://github.com/dotnet/fsharp/issues/19367.
[<CulturedFact([|"th"|])>]
let ``Hole without specifier parsed correctly when culture set to Thai`` () =
Fsx
"""
let s = $"{3}"
if s <> "3" then
failwith $"Expected \"3\" but got \"%s{s}\"."
"""
|> compileExeAndRun
|> shouldSucceed

// See https://github.com/dotnet/fsharp/issues/19367.
[<CulturedFact([|"th"|])>]
let ``Explicit %P does not cause exception when culture set to Thai`` () =
Fsx
"""
let s = $"%P({3})"
"""
|> compileExeAndRun
|> shouldSucceed
Loading