-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Errors for invalid trigraph &
\U
in String span complete string
prev: ```fsharp > "foo\U12345678bar";; ^^^^^^^^^^^^^^^^^^ stdin(1,1): error FS1245: \U12345678 is not a valid Unicode character escape sequence ``` now: ```fsharp > "foo\U12345678bar";; ----^^^^^^^^^^ stdin(1,5): error FS1245: \U12345678 is not a valid Unicode character escape sequence ``` Note: In Byte Strings that's only the case for invalid chars (-> invalid in normal string too), but not for chars invalid only inside byte string: ```fsharp > "foo\U000003C0bar";; val it: string = "fooπbar" > "foo\U000003C0bar"B;; ^^^^^^^^^^^^^^^^^^^ stdin(8,1): error FS1140: This byte array literal contains characters that do not encode as a single byte ``` Reason: We only now at end of string if it's a Byte String. At this point we don't have direct/simple access to the invalid element (and its notation) any more -> we know the value and can validate it -- but don't know exactly where it's located
- Loading branch information
Showing
3 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters