Skip to content

Commit 60da597

Browse files
committed
add comment
1 parent 4bd39eb commit 60da597

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/Compiler/Checking/NameResolution.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3245,7 +3245,7 @@ let rec ResolvePatternLongIdentPrim sink (ncenv: NameResolver) fullyQualified wa
32453245
not newDef
32463246
&& warnOnUpper = WarnOnUpperCase
32473247
&& id.idText.Length >= 3
3248-
&& System.Char.IsUpper id.idText[0]
3248+
&& System.Char.ToLowerInvariant id.idText[0] <> id.idText[0]
32493249
then
32503250
warning(UpperCaseIdentifierInPattern m)
32513251

src/Compiler/Utilities/illib.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ module internal PervasiveAutoOpens =
8080
member inline x.EndsWithOrdinalIgnoreCase value =
8181
x.EndsWith(value, StringComparison.OrdinalIgnoreCase)
8282

83-
let inline isDigit (c: char) = (uint) (c - '0') <= (uint) ('9' - '0')
83+
// Backport of Char.IsAsciiDigit. Do not use Char.IsDigit
84+
let inline isDigit (c: char) = uint (c - '0') <= uint ('9' - '0')
8485

8586
/// Get an initialization hole
8687
let getHole (r: _ ref) =

src/FSharp.Core/printf.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ module internal PrintfImpl =
8484
let inline isPlusForPositives flags = hasFlag flags FormatFlags.PlusForPositives
8585
let inline isSpaceForPositives flags = hasFlag flags FormatFlags.SpaceForPositives
8686

87-
let inline isDigit (c: char) = (uint)(c - '0') <= (uint)('9' - '0');
87+
// Backport of Char.IsAsciiDigit. Do not use Char.IsDigit
88+
let inline isDigit (c: char) = uint (c - '0') <= uint ('9' - '0')
8889

8990
/// Used for width and precision to denote that user has specified '*' flag
9091
[<Literal>]

0 commit comments

Comments
 (0)