Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita24d85b

Browse files
committed
Revert to all old code
1 parent9cf81de commita24d85b

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

‎src/fsharp/FSharp.Core/array.fs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ namespace Microsoft.FSharp.Collections
204204
[<CompiledName("Head")>]
205205
lethead(array:'T[])=
206206
checkNonNull"array" array
207-
if array.Length=0then invalidArg"array"(SR.GetString(SR.arrayWasEmpty))else array.[0]
207+
if array.Length=0then invalidArg"array"LanguagePrimitives.ErrorStrings.InputArrayEmptyStringelse array.[0]
208208

209209
[<CompiledName("Copy")>]
210210
letcopy(array:'T[])=
@@ -754,7 +754,7 @@ namespace Microsoft.FSharp.Collections
754754
checkNonNull"array" array
755755
letlen= array.Length
756756
if len=0then
757-
invalidArg"array"(SR.GetString(SR.arrayWasEmpty))
757+
invalidArg"array"LanguagePrimitives.ErrorStrings.InputArrayEmptyString
758758
else
759759
letf= OptimizedClosures.FSharpFunc<_,_,_>.Adapt(f)
760760
let mutableres= array.[0]
@@ -766,7 +766,7 @@ namespace Microsoft.FSharp.Collections
766766
letreduceBack f(array:_[])=
767767
checkNonNull"array" array
768768
letlen= array.Length
769-
if len=0then invalidArg"array"(SR.GetString(SR.arrayWasEmpty))
769+
if len=0then invalidArg"array"LanguagePrimitives.ErrorStrings.InputArrayEmptyString
770770
else foldSubRight f array0(len-2) array.[len-1]
771771

772772
[<CompiledName("SortInPlaceWith")>]
@@ -995,7 +995,7 @@ namespace Microsoft.FSharp.Collections
995995
letexactlyOne(array:'T[])=
996996
checkNonNull"array" array
997997
if array.Length=1then array.[0]
998-
elif array.Length=0then invalidArg"array"(SR.GetString(SR.inputSequenceEmpty))
998+
elif array.Length=0then invalidArg"array"LanguagePrimitives.ErrorStrings.InputSequenceEmptyString
999999
else invalidArg"array"(SR.GetString(SR.inputSequenceTooLong))
10001000

10011001
[<CompiledName("Truncate")>]

‎src/fsharp/FSharp.Core/list.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ namespace Microsoft.FSharp.Collections
605605
letexactlyOne(source:list<_>)=
606606
match sourcewith
607607
|[x]-> x
608-
|[]-> invalidArg"source"(SR.GetString(SR.inputSequenceEmpty))
608+
|[]-> invalidArg"source"LanguagePrimitives.ErrorStrings.InputSequenceEmptyString
609609
|_-> invalidArg"source"(SR.GetString(SR.inputSequenceTooLong))
610610

611611
[<CompiledName("Truncate")>]

‎src/fsharp/FSharp.Core/local.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ module internal List =
326326

327327

328328
letinit count f=
329-
if count<0then invalidArg"count"(SR.GetString(SR.inputMustBeNonNegative))
329+
if count<0then invalidArg"count"LanguagePrimitives.ErrorStrings.InputMustBeNonNegativeString
330330
if count=0then[]
331331
else
332332
letres= freshConsNoTail(f0)
@@ -343,7 +343,7 @@ module internal List =
343343
takeFreshConsTail cons2(n-1) xs
344344

345345
lettake n l=
346-
if n<0then invalidArg"count"(SR.GetString(SR.inputMustBeNonNegative))
346+
if n<0then invalidArg"count"LanguagePrimitives.ErrorStrings.InputMustBeNonNegativeString
347347
if n=0then[]else
348348
match lwith
349349
|[]-> raise<| System.InvalidOperationException(SR.GetString(SR.notEnoughElements))

‎src/fsharp/FSharp.Core/seq.fs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ namespace Microsoft.FSharp.Collections
11601160
letreduce f(source:seq<'T>)=
11611161
checkNonNull"source" source
11621162
use e= source.GetEnumerator()
1163-
ifnot(e.MoveNext())then invalidArg"source"(SR.GetString(SR.inputSequenceEmpty));
1163+
ifnot(e.MoveNext())then invalidArg"source"LanguagePrimitives.ErrorStrings.InputSequenceEmptyString;
11641164
letf= OptimizedClosures.FSharpFunc<_,_,_>.Adapt(f)
11651165
let mutablestate= e.Current
11661166
while e.MoveNext()do
@@ -1264,7 +1264,7 @@ namespace Microsoft.FSharp.Collections
12641264
checkNonNull"source" source
12651265
letarr= toArray source
12661266
match arr.Lengthwith
1267-
|0-> invalidArg"source"(SR.GetString(SR.inputSequenceEmpty))
1267+
|0-> invalidArg"source"LanguagePrimitives.ErrorStrings.InputSequenceEmptyString
12681268
| len->
12691269
letf= OptimizedClosures.FSharpFunc<_,_,_>.Adapt(f)
12701270
foldArraySubRight f arr0(len-2) arr.[len-1]
@@ -1734,7 +1734,7 @@ namespace Microsoft.FSharp.Collections
17341734
checkNonNull"source" source
17351735
use e= source.GetEnumerator()
17361736
if(e.MoveNext())then e.Current
1737-
else invalidArg"source"(SR.GetString(SR.inputSequenceEmpty))
1737+
else invalidArg"source"LanguagePrimitives.ErrorStrings.InputSequenceEmptyString
17381738

17391739
[<CompiledName("TryHead")>]
17401740
lettryHead(source:seq<_>)=
@@ -1761,7 +1761,7 @@ namespace Microsoft.FSharp.Collections
17611761
while(e.MoveNext())do res<- e.Current
17621762
res
17631763
else
1764-
invalidArg"source"(SR.GetString(SR.inputSequenceEmpty))
1764+
invalidArg"source"LanguagePrimitives.ErrorStrings.InputSequenceEmptyString
17651765

17661766
[<CompiledName("TryLast")>]
17671767
lettryLast(source:seq<_>)=
@@ -1785,7 +1785,7 @@ namespace Microsoft.FSharp.Collections
17851785
else
17861786
v
17871787
else
1788-
invalidArg"source"(SR.GetString(SR.inputSequenceEmpty))
1788+
invalidArg"source"LanguagePrimitives.ErrorStrings.InputSequenceEmptyString
17891789

17901790
[<CompiledName("Reverse")>]
17911791
letrev source=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp