未验证 提交 0063f20f 编写于 作者: K Kevin Ransom (msft) 提交者: GitHub

Make GetReverseIndex Experimental again (#13788)

上级 5a72e586
......@@ -4107,6 +4107,7 @@ namespace Microsoft.FSharp.Collections
let start = if i < 0 then 0 else i
PrivateListHelpers.sliceTake (j - start) (PrivateListHelpers.sliceSkip start l)
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member l.GetReverseIndex(_: int, offset: int) =
l.Length - offset - 1
......@@ -6902,6 +6903,7 @@ namespace Microsoft.FSharp.Core
[<AutoOpen>]
module ArrayExtensions =
type ``[,,,]``<'T> with
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member arr.GetReverseIndex(dim: int, offset: int) =
let len =
match dim with
......@@ -6914,6 +6916,7 @@ namespace Microsoft.FSharp.Core
len - offset - 1
type ``[,,]``<'T> with
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member arr.GetReverseIndex(dim: int, offset: int) =
let len =
match dim with
......@@ -6925,6 +6928,7 @@ namespace Microsoft.FSharp.Core
len - offset - 1
type ``[,]``<'T> with
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member arr.GetReverseIndex(dim: int, offset: int) =
let len =
match dim with
......@@ -6935,9 +6939,11 @@ namespace Microsoft.FSharp.Core
len - offset - 1
type ``[]``<'T> with
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member arr.GetReverseIndex (_: int, offset: int) = arr.Length - offset - 1
type String with
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member str.GetReverseIndex (_: int, offset: int) = str.Length - offset - 1
namespace Microsoft.FSharp.Control
......
......@@ -2555,6 +2555,7 @@ namespace Microsoft.FSharp.Collections
/// <param name="offset">The offset from the end.</param>
///
/// <returns>The corresponding index from the start.</returns>
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member GetReverseIndex: rank: int * offset: int -> int
/// <summary>Returns a list with <c>head</c> as its first element and <c>tail</c> as its subsequent elements</summary>
......@@ -4608,6 +4609,7 @@ namespace Microsoft.FSharp.Core
/// <param name="offset">The offset from the end.</param>
///
/// <returns>The corresponding index from the start.</returns>
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member GetReverseIndex: rank: int * offset: int -> int
type ``[,,]``<'T> with
......@@ -4617,6 +4619,7 @@ namespace Microsoft.FSharp.Core
/// <param name="offset">The offset from the end.</param>
///
/// <returns>The corresponding index from the start.</returns>
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member GetReverseIndex: rank: int * offset: int -> int
type ``[,]``<'T> with
......@@ -4626,6 +4629,7 @@ namespace Microsoft.FSharp.Core
/// <param name="offset">The offset from the end.</param>
///
/// <returns>The corresponding index from the start.</returns>
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member GetReverseIndex: rank: int * offset: int -> int
type ``[]``<'T> with
......@@ -4635,6 +4639,7 @@ namespace Microsoft.FSharp.Core
/// <param name="offset">The offset from the end.</param>
///
/// <returns>The corresponding index from the start.</returns>
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member GetReverseIndex: rank: int * offset: int -> int
type System.String with
......@@ -4644,6 +4649,7 @@ namespace Microsoft.FSharp.Core
/// <param name="offset">The offset from the end.</param>
///
/// <returns>The corresponding index from the start.</returns>
[<Experimental("Experimental library feature, requires '--langversion:preview'")>]
member GetReverseIndex: rank: int * offset: int -> int
/// <summary>A module of compiler intrinsic functions for efficient implementations of F# integer ranges
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册