Skip to content

Commit 80607ff

Browse files
authored
Add InlineIfLambda to Array.init (dotnet#19869)
1 parent aefec6b commit 80607ff

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

docs/release-notes/.FSharp.Core/11.0.100.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
* Fix `Array.exists2` documentation examples to use equal-length arrays; the previous examples would throw `ArgumentException` at runtime instead of returning the documented `false`/`true` values. ([PR #19672](https://github.com/dotnet/fsharp/pull/19672))
44
* Move `Async.StartChild` to the "Starting Async Computations" docs category alongside `Async.StartChildAsTask`. ([Issue #19667](https://github.com/dotnet/fsharp/issues/19667))
5+
* Add `InlineIfLambda` to `Array.init` ([PR #19869](https://github.com/dotnet/fsharp/pull/19869))

src/FSharp.Core/array.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module Array =
4747
Some array.[array.Length - 1]
4848

4949
[<CompiledName("Initialize")>]
50-
let inline init count initializer =
50+
let inline init count ([<InlineIfLambda>] initializer) =
5151
Microsoft.FSharp.Primitives.Basics.Array.init count initializer
5252

5353
[<CompiledName("ZeroCreate")>]

0 commit comments

Comments
 (0)