mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-10 21:58:30 +00:00
Use u64
instead of i64
in Int type (#11356)
## Summary I believe the value here is always unsigned, since we represent `-42` as a unary operator on `42`.
This commit is contained in:
parent
1f794077ec
commit
35ba3c91ce
5 changed files with 35 additions and 39 deletions
|
@ -1777,7 +1777,7 @@ def f(arg=%timeit a = b):
|
|||
#[test]
|
||||
fn test_numbers() {
|
||||
let source =
|
||||
"0x2f 0o12 0b1101 0 123 123_45_67_890 0.2 1e+2 2.1e3 2j 2.2j 000 0x995DC9BBDF1939FA";
|
||||
"0x2f 0o12 0b1101 0 123 123_45_67_890 0.2 1e+2 2.1e3 2j 2.2j 000 0x995DC9BBDF1939FA 0x995DC9BBDF1939FA995DC9BBDF1939FA";
|
||||
assert_debug_snapshot!(lex_source(source));
|
||||
}
|
||||
|
||||
|
|
|
@ -79,12 +79,18 @@ expression: lex_source(source)
|
|||
),
|
||||
(
|
||||
Int {
|
||||
value: 0x995DC9BBDF1939FA,
|
||||
value: 11051210869376104954,
|
||||
},
|
||||
64..82,
|
||||
),
|
||||
(
|
||||
Int {
|
||||
value: 0x995DC9BBDF1939FA995DC9BBDF1939FA,
|
||||
},
|
||||
83..117,
|
||||
),
|
||||
(
|
||||
Newline,
|
||||
82..82,
|
||||
117..117,
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue