Deprecate uXX and iXX bit suffixes.

Add experimental LL / ULL suffixes for int128 and uint128 literals.
This commit is contained in:
Christoffer Lerno
2025-05-13 23:48:59 +02:00
parent c528f53d58
commit abe4727c3a
25 changed files with 126 additions and 68 deletions

View File

@@ -10,7 +10,7 @@ $foreach $c : $chars:
int $offset = ($c - $from) / BITS;
int $rem = ($c - $from) % BITS;
uint128 $value = $bitmap[$offset]; // #error: is out of range
$value |= 1u128 << $rem;
$value |= 1ULL << $rem;
$bitmap = $bitmap[:$offset] +++ $value +++ $bitmap[$offset+1..]; // #error: End index out of bounds
$endforeach
}

View File

@@ -2,13 +2,13 @@ module foo;
fn void a()
{
$typeof(9146744073709551615i64) ef;
$typeof(9146744073709551615L) ef;
int fffx = ef; // #error: 'long'
}
fn void b()
{
$typeof(9223372036854775809u64) ef;
$typeof(9223372036854775809UL) ef;
int fffx = ef; // #error: 'ulong'
}