File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ # E046: unexpected characters in binary literal
2
+
3
+ Binary number literals start with ` 0b ` and can only contain ` 0 ` or ` 1 ` digits
4
+ (and optionally an ` n ` to signify a ` BigInt ` ). It is an error to include other
5
+ digits in binary number literals:
6
+
7
+ let minInt64 = 0b1000000000000000000000000000000000000000000000000000000000000000N;
8
+ let mouse = [0xf09f, 0b196];
9
+
10
+ To fix this error, fix or remove the extra digits or letters:
11
+
12
+ let minInt64 = 0b1000000000000000000000000000000000000000000000000000000000000000n;
13
+
14
+ Alternatively, convert the binary number literal into a decimal, hexadecimal, or
15
+ octal number literal:
16
+
17
+ let mouse = [0xf09f, 0xb196];
Original file line number Diff line number Diff line change
1
+ # E047: unexpected characters in octal literal
2
+
3
+ Octal number literals start with ` 0 ` or ` 0o ` and can only contain digits ` 0 `
4
+ through ` 7 ` (and optionally an ` n ` to signify a ` BigInt ` ). It is an error to
5
+ include other digits in octal number literals:
6
+
7
+ let permissions = 0o755N;
8
+ let bcdDigits = 0o0123456789;
9
+ let million = 0o1e6;
10
+
11
+ To fix this error, fix or remove the extra digits or letters:
12
+
13
+ let permissions = 0o755n;
14
+
15
+ Alternatively, convert the octal number literal into a decimal or hexadecimal
16
+ number literal:
17
+
18
+ let bcdDigits = 123456789;
19
+ let million = 1e6;
Original file line number Diff line number Diff line change
1
+ # E048: unexpected characters in hex literal
2
+
3
+ Hexadecimal (hex) number literals start with ` 0x ` and can only contain digits
4
+ ` 0 ` through ` 9 ` and ` a ` through ` f ` (and optionally an ` n ` to signify a
5
+ ` BigInt ` ). It is an error to include other letters in hex number literals:
6
+
7
+ let hungry = 0xfeedme;
8
+
9
+ To fix this error, fix or remove the extra digits or letters:
10
+
11
+ let hungry = 0xfeedad00d;
You can’t perform that action at this time.
0 commit comments