cairo-lang-lowering 2.4.1

Cairo lowering phase.
Documentation
//! > Literal value out of range.

//! > test_runner_name
test_function_lowering

//! > function
fn foo() {
    let a = 0x100_u8;
    let a = 0x10000_u16;
    let a = 0x100000000_u32;
    let b = 0x10000000000000000_u64;
    let c = 0x100000000000000000000000000000000_u128;
    let d = 0x800000000000011000000000000000000000000000000000000000000000001;
}

//! > function_name
foo

//! > module_code

//! > lowering_diagnostics
error: The value does not fit within the range of type core::integer::u8.
 --> lib.cairo:2:13
    let a = 0x100_u8;
            ^******^

error: The value does not fit within the range of type core::integer::u16.
 --> lib.cairo:3:13
    let a = 0x10000_u16;
            ^*********^

error: The value does not fit within the range of type core::integer::u32.
 --> lib.cairo:4:13
    let a = 0x100000000_u32;
            ^*************^

error: The value does not fit within the range of type core::integer::u64.
 --> lib.cairo:5:13
    let b = 0x10000000000000000_u64;
            ^*********************^

error: The value does not fit within the range of type core::integer::u128.
 --> lib.cairo:6:13
    let c = 0x100000000000000000000000000000000_u128;
            ^**************************************^

error: The value does not fit within the range of type core::felt252.
 --> lib.cairo:7:13
    let d = 0x800000000000011000000000000000000000000000000000000000000000001;
            ^***************************************************************^

//! > lowering_flat
Parameters:
blk0 (root):
Statements:
  (v6: ()) <- struct_construct()
End:
  Return(v6)

//! > semantic_diagnostics

//! > ==========================================================================

//! > Literal short string out of range.

//! > test_runner_name
test_function_lowering

//! > function
fn foo() {
    let a = 'aa'_u8;
    let a = 'aba'_u16;
    let b = 'abcda'_u32;
    let b = 'abcdabcda'_u64;
    let c = 'abcdabcdabcdabcda'_u128;
    let d = 'abcdabcdabcdabcdabcdabcdabcdabcd';
}

//! > function_name
foo

//! > module_code

//! > lowering_diagnostics
error: The value does not fit within the range of type core::integer::u8.
 --> lib.cairo:2:13
    let a = 'aa'_u8;
            ^*****^

error: The value does not fit within the range of type core::integer::u16.
 --> lib.cairo:3:13
    let a = 'aba'_u16;
            ^*******^

error: The value does not fit within the range of type core::integer::u32.
 --> lib.cairo:4:13
    let b = 'abcda'_u32;
            ^*********^

error: The value does not fit within the range of type core::integer::u64.
 --> lib.cairo:5:13
    let b = 'abcdabcda'_u64;
            ^*************^

error: The value does not fit within the range of type core::integer::u128.
 --> lib.cairo:6:13
    let c = 'abcdabcdabcdabcda'_u128;
            ^**********************^

error: The value does not fit within the range of type core::felt252.
 --> lib.cairo:7:13
    let d = 'abcdabcdabcdabcdabcdabcdabcdabcd';
            ^********************************^

//! > lowering_flat
Parameters:
blk0 (root):
Statements:
  (v6: ()) <- struct_construct()
End:
  Return(v6)

//! > semantic_diagnostics