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

Commitc0a90f7

Browse files
committed
FX_NO_CHAR_PARSE --- dead code
1 parent96ca3a6 commitc0a90f7

File tree

3 files changed

+7
-28
lines changed

3 files changed

+7
-28
lines changed

‎src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule2.fs‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -695,28 +695,26 @@ type SeqModule2() =
695695

696696
VerifySeqsEqual expectedint resultInt
697697

698-
#if!FX_NO_CHAR_PARSE
699698
// string Seq
700699
letfuncStr(y:string)= y+"ist"
701-
700+
702701
letresultStr= Seq.collect funcStr(seq["L"])
703-
704-
702+
705703
letexpectedSeq= seq['L';'i';'s';'t']
706-
704+
707705
VerifySeqsEqual expectedSeq resultStr
708-
#endif
706+
709707
// empty Seq
710708
letresultEpt= Seq.collect funcInt Seq.empty
711709
VerifySeqsEqual Seq.empty resultEpt
712710

713711
// null Seq
714712
letnullSeq:seq<'a>=null
715-
713+
716714
CheckThrowsArgumentNullException(fun()-> Seq.collect funcInt nullSeq|> ignore)
717-
715+
718716
()
719-
717+
720718
[<Test>]
721719
memberthis.Mapi()=
722720

‎src/fsharp/FSharp.Core.Unittests/FSharp.Core/PrimTypes.fs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,7 @@ type LanguagePrimitivesModule() =
466466
CheckThrowsArgumentNullException2"float32"(fun()-> float32 s|> ignore)
467467
CheckThrowsArgumentNullException2"float"(fun()-> float s|> ignore)
468468
CheckThrowsArgumentNullException2"decimal"(fun()-> decimal s|> ignore)
469-
// SL and Portable Runtimes are compiled with FX_NO_CHAR_PARSE
470-
#if!FX_NO_CHAR_PARSE
471469
CheckThrowsArgumentNullException2"char"(fun()-> char s|> ignore)
472-
#endif
473470

474471
[<Test>]
475472
memberthis.PhysicalEquality()=

‎src/fsharp/FSharp.Core/prim-types.fs‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4067,14 +4067,6 @@ namespace Microsoft.FSharp.Core
40674067

40684068
letinlinecastToString(x:'T)=(#"" x: string#)//internal
40694069

4070-
#ifFX_NO_CHAR_PARSE
4071-
//replaceSystem.Char.Parse
4072-
letinlinecharParse(s: string)=
4073-
ifisNullsthenraise(System.ArgumentNullException())
4074-
elifs.Length=1thens.[0]
4075-
elseraise(System.FormatException"String must be exactly one character long.")
4076-
#endif
4077-
40784070
//letrec(@)xy=matchxwith[]->y|(h::t)->h::(t@ y)
40794071
let(@)l1l2=
40804072
matchl1with
@@ -4445,11 +4437,7 @@ namespace Microsoft.FSharp.Core
44454437
[<CompiledName("ToChar")>]
44464438
let inlinechar(x:^T)=
44474439
(^T:(static memberop_Explicit:^T-> char)(x))
4448-
#if FX_NO_CHAR_PARSE
4449-
when^T: string=(charParse(castToString x))
4450-
#else
44514440
when^T: string=(System.Char.Parse(castToString x))
4452-
#endif
44534441
when^T: float=(#"conv.u2" x: char #)
44544442
when^T: float32=(#"conv.u2" x: char #)
44554443
when^T: int64=(#"conv.u2" x: char #)
@@ -4889,11 +4877,7 @@ namespace Microsoft.FSharp.Core
48894877
[<CompiledName("ToChar")>]
48904878
let inlinechar(x:^T)=
48914879
(^T:(static memberop_Explicit:^T-> char)(x))
4892-
#if FX_NO_CHAR_PARSE
4893-
when^T: string=(charParse(castToString x))
4894-
#else
48954880
when^T: string=(System.Char.Parse(castToString x))
4896-
#endif
48974881
when^T: float=(#"conv.ovf.u2" x: char #)
48984882
when^T: float32=(#"conv.ovf.u2" x: char #)
48994883
when^T: int64=(#"conv.ovf.u2" x: char #)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp