diff --git a/README.md b/README.md
index 002141429b..851aac3b0b 100644
--- a/README.md
+++ b/README.md
@@ -55,21 +55,25 @@ Run `fe --help` to explore further options.
The following is a simple contract implemented in Fe.
-```python
+```rust
use std::context::Context
-contract GuestBook:
+contract GuestBook {
messages: Map
>
- event Signed:
+ event Signed {
book_msg: String<100>
+ }
- pub fn sign(self, ctx: Context, book_msg: String<100>):
+ pub fn sign(self, ctx: Context, book_msg: String<100>) {
self.messages[ctx.msg_sender()] = book_msg
emit Signed(ctx, book_msg: book_msg)
+ }
- pub fn get_msg(self, addr: address) -> String<100>:
+ pub fn get_msg(self, addr: address) -> String<100> {
return self.messages[addr].to_mem()
+ }
+}
```
A lot more working examples can be found in our [test fixtures directory](https://github.com/ethereum/fe/tree/master/crates/test-files/fixtures/demos).
diff --git a/crates/analyzer/src/traversal/functions.rs b/crates/analyzer/src/traversal/functions.rs
index ad5ff71664..22ff5f0fdf 100644
--- a/crates/analyzer/src/traversal/functions.rs
+++ b/crates/analyzer/src/traversal/functions.rs
@@ -33,7 +33,6 @@ fn func_stmt(scope: &mut BlockScope, stmt: &Node) -> Result<(), Fa
Unsafe { .. } => unsafe_block(scope, stmt),
Assert { .. } => assert(scope, stmt),
Expr { value } => expressions::expr(scope, value, None).map(|_| ()),
- Pass => Ok(()),
Revert { .. } => revert(scope, stmt),
Break | Continue => {
loop_flow_statement(scope, stmt);
diff --git a/crates/analyzer/tests/errors.rs b/crates/analyzer/tests/errors.rs
index 5d079c455f..0def76286f 100644
--- a/crates/analyzer/tests/errors.rs
+++ b/crates/analyzer/tests/errors.rs
@@ -81,28 +81,7 @@ macro_rules! test_stmt {
#[wasm_bindgen_test]
fn $name() {
let src = format!(
- "contract C:\n pub fn f(self):\n {}",
- $stmt.replace('\n', "\n ")
- );
- if cfg!(target_arch = "wasm32") {
- fe_common::assert_snapshot_wasm!(
- concat!("snapshots/errors__", stringify!($name), ".snap"),
- error_string("[snippet]", &src)
- );
- } else {
- assert_snapshot!(error_string("[snippet]", &src));
- }
- }
- };
-}
-
-macro_rules! test_stmt_unsafe {
- ($name:ident, $stmt:expr) => {
- #[test]
- #[wasm_bindgen_test]
- fn $name() {
- let src = format!(
- "contract C:\n pub fn f(self):\n unsafe:\n {}",
+ "contract C {{\n pub fn f(self) {{\n {}\n }}\n}}",
$stmt.replace('\n', "\n ")
);
if cfg!(target_arch = "wasm32") {
@@ -136,7 +115,7 @@ test_stmt! { binary_op_boolean_mismatch3, "1 or 2" }
test_stmt! { bool_constructor, "bool(true)" }
test_stmt! { bool_cast, "bool(0)" }
test_stmt! { break_without_loop, "break" }
-test_stmt! { break_without_loop_2, "if true:\n break" }
+test_stmt! { break_without_loop_2, "if true { break }" }
test_stmt! { call_undefined_function_on_contract, "self.doesnt_exist()" }
test_stmt! { call_address_with_wrong_type, "address(true)" }
test_stmt! { call_keccak_without_parameter, "keccak256()" }
@@ -145,13 +124,13 @@ test_stmt! { call_keccak_with_2_args, "keccak256(1, 2)" }
test_stmt! { call_keccak_with_generic_args, "keccak256<10>(1)" }
test_stmt! { cast_address_to_u64, "u64(address(0))" }
-test_stmt_unsafe! { call_balance_of_without_parameter, "std::evm::balance_of()" }
-test_stmt_unsafe! { call_balance_of_with_wrong_type, "std::evm::balance_of(true)" }
-test_stmt_unsafe! { call_balance_of_with_2_args, "std::evm::balance_of(address(0), 2)" }
-test_stmt_unsafe! { call_balance_with_arg, "std::evm::balance(address(0))" }
+test_stmt! { call_balance_of_without_parameter, "unsafe { std::evm::balance_of() }" }
+test_stmt! { call_balance_of_with_wrong_type, "unsafe { std::evm::balance_of(true) }" }
+test_stmt! { call_balance_of_with_2_args, "unsafe { std::evm::balance_of(address(0), 2) }" }
+test_stmt! { call_balance_with_arg, "unsafe { std::evm::balance(address(0)) }" }
test_stmt! { clone_arg_count, "let x: Array = [5, 6]\nlet y: Array = x.clone(y)" }
test_stmt! { continue_without_loop, "continue" }
-test_stmt! { continue_without_loop_2, "if true:\n continue" }
+test_stmt! { continue_without_loop_2, "if true { continue }" }
test_stmt! { emit_undefined_event, "emit MyEvent()" }
test_stmt! { emit_type_name, "emit u8()" }
test_stmt! { emit_variable, "let x: u8 = 10\nemit x()" }
diff --git a/crates/analyzer/tests/snapshots/analysis__abi_encoding_stress.snap b/crates/analyzer/tests/snapshots/analysis__abi_encoding_stress.snap
index 7fd546442f..3d4840c3a0 100644
--- a/crates/analyzer/tests/snapshots/analysis__abi_encoding_stress.snap
+++ b/crates/analyzer/tests/snapshots/analysis__abi_encoding_stress.snap
@@ -16,43 +16,44 @@ note:
│ ^^^^^^^^^^^^^^^^^^^^ address
note:
- ┌─ abi_encoding_stress.fe:10:5
+ ┌─ abi_encoding_stress.fe:11:5
│
-10 │ my_addrs: Array
+11 │ my_addrs: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Array
-11 │ my_u128: u128
+12 │ my_u128: u128
│ ^^^^^^^^^^^^^ u128
-12 │ my_string: String<10>
+13 │ my_string: String<10>
│ ^^^^^^^^^^^^^^^^^^^^^ String<10>
-13 │ my_u16s: Array
+14 │ my_u16s: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^ Array
-14 │ my_bool: bool
+15 │ my_bool: bool
│ ^^^^^^^^^^^^^ bool
-15 │ my_bytes: Array
+16 │ my_bytes: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^ Array
note:
- ┌─ abi_encoding_stress.fe:18:9
+ ┌─ abi_encoding_stress.fe:19:9
│
-18 │ my_addrs: Array
+19 │ my_addrs: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Array
-19 │ my_u128: u128
+20 │ my_u128: u128
│ ^^^^^^^^^^^^^ u128
-20 │ my_string: String<10>
+21 │ my_string: String<10>
│ ^^^^^^^^^^^^^^^^^^^^^ String<10>
-21 │ my_u16s: Array
+22 │ my_u16s: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^ Array
-22 │ my_bool: bool
+23 │ my_bool: bool
│ ^^^^^^^^^^^^^ bool
-23 │ my_bytes: Array
+24 │ my_bytes: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^ Array
note:
- ┌─ abi_encoding_stress.fe:25:5
+ ┌─ abi_encoding_stress.fe:27:5
│
-25 │ ╭ pub fn set_my_addrs(self, my_addrs: Array):
-26 │ │ self.my_addrs = my_addrs
- │ ╰────────────────────────────────^ attributes hash: 8893819222299525150
+27 │ ╭ pub fn set_my_addrs(self, my_addrs: Array) {
+28 │ │ self.my_addrs = my_addrs
+29 │ │ }
+ │ ╰─────^ attributes hash: 8893819222299525150
│
= FunctionSignature {
self_decl: Some(
@@ -81,25 +82,26 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:26:9
+ ┌─ abi_encoding_stress.fe:28:9
│
-26 │ self.my_addrs = my_addrs
+28 │ self.my_addrs = my_addrs
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:26:9
+ ┌─ abi_encoding_stress.fe:28:9
│
-26 │ self.my_addrs = my_addrs
+28 │ self.my_addrs = my_addrs
│ ^^^^^^^^^^^^^ ^^^^^^^^ Array: Memory
│ │
│ Array: Storage { nonce: Some(0) }
note:
- ┌─ abi_encoding_stress.fe:28:5
+ ┌─ abi_encoding_stress.fe:31:5
│
-28 │ ╭ pub fn get_my_addrs(self) -> Array:
-29 │ │ return self.my_addrs.to_mem()
- │ ╰─────────────────────────────────────^ attributes hash: 1736881624347502724
+31 │ ╭ pub fn get_my_addrs(self) -> Array {
+32 │ │ return self.my_addrs.to_mem()
+33 │ │ }
+ │ ╰─────^ attributes hash: 1736881624347502724
│
= FunctionSignature {
self_decl: Some(
@@ -118,29 +120,30 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:29:16
+ ┌─ abi_encoding_stress.fe:32:16
│
-29 │ return self.my_addrs.to_mem()
+32 │ return self.my_addrs.to_mem()
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:29:16
+ ┌─ abi_encoding_stress.fe:32:16
│
-29 │ return self.my_addrs.to_mem()
+32 │ return self.my_addrs.to_mem()
│ ^^^^^^^^^^^^^ Array: Storage { nonce: Some(0) }
note:
- ┌─ abi_encoding_stress.fe:29:16
+ ┌─ abi_encoding_stress.fe:32:16
│
-29 │ return self.my_addrs.to_mem()
+32 │ return self.my_addrs.to_mem()
│ ^^^^^^^^^^^^^^^^^^^^^^ Array: Storage { nonce: Some(0) } => Memory
note:
- ┌─ abi_encoding_stress.fe:31:5
+ ┌─ abi_encoding_stress.fe:35:5
│
-31 │ ╭ pub fn set_my_u128(self, my_u128: u128):
-32 │ │ self.my_u128 = my_u128
- │ ╰──────────────────────────────^ attributes hash: 15199964699853061770
+35 │ ╭ pub fn set_my_u128(self, my_u128: u128) {
+36 │ │ self.my_u128 = my_u128
+37 │ │ }
+ │ ╰─────^ attributes hash: 15199964699853061770
│
= FunctionSignature {
self_decl: Some(
@@ -168,25 +171,26 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:32:9
+ ┌─ abi_encoding_stress.fe:36:9
│
-32 │ self.my_u128 = my_u128
+36 │ self.my_u128 = my_u128
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:32:9
+ ┌─ abi_encoding_stress.fe:36:9
│
-32 │ self.my_u128 = my_u128
+36 │ self.my_u128 = my_u128
│ ^^^^^^^^^^^^ ^^^^^^^ u128: Value
│ │
│ u128: Storage { nonce: Some(1) }
note:
- ┌─ abi_encoding_stress.fe:34:5
+ ┌─ abi_encoding_stress.fe:39:5
│
-34 │ ╭ pub fn get_my_u128(self) -> u128:
-35 │ │ return self.my_u128
- │ ╰───────────────────────────^ attributes hash: 15343208064821852867
+39 │ ╭ pub fn get_my_u128(self) -> u128 {
+40 │ │ return self.my_u128
+41 │ │ }
+ │ ╰─────^ attributes hash: 15343208064821852867
│
= FunctionSignature {
self_decl: Some(
@@ -204,23 +208,24 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:35:16
+ ┌─ abi_encoding_stress.fe:40:16
│
-35 │ return self.my_u128
+40 │ return self.my_u128
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:35:16
+ ┌─ abi_encoding_stress.fe:40:16
│
-35 │ return self.my_u128
+40 │ return self.my_u128
│ ^^^^^^^^^^^^ u128: Storage { nonce: Some(1) } => Value
note:
- ┌─ abi_encoding_stress.fe:37:5
+ ┌─ abi_encoding_stress.fe:43:5
│
-37 │ ╭ pub fn set_my_string(self, my_string: String<10>):
-38 │ │ self.my_string = my_string
- │ ╰──────────────────────────────────^ attributes hash: 241116312146617781
+43 │ ╭ pub fn set_my_string(self, my_string: String<10>) {
+44 │ │ self.my_string = my_string
+45 │ │ }
+ │ ╰─────^ attributes hash: 241116312146617781
│
= FunctionSignature {
self_decl: Some(
@@ -248,25 +253,26 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:38:9
+ ┌─ abi_encoding_stress.fe:44:9
│
-38 │ self.my_string = my_string
+44 │ self.my_string = my_string
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:38:9
+ ┌─ abi_encoding_stress.fe:44:9
│
-38 │ self.my_string = my_string
+44 │ self.my_string = my_string
│ ^^^^^^^^^^^^^^ ^^^^^^^^^ String<10>: Memory
│ │
│ String<10>: Storage { nonce: Some(2) }
note:
- ┌─ abi_encoding_stress.fe:40:5
+ ┌─ abi_encoding_stress.fe:47:5
│
-40 │ ╭ pub fn get_my_string(self) -> String<10>:
-41 │ │ return self.my_string.to_mem()
- │ ╰──────────────────────────────────────^ attributes hash: 1556448784000816371
+47 │ ╭ pub fn get_my_string(self) -> String<10> {
+48 │ │ return self.my_string.to_mem()
+49 │ │ }
+ │ ╰─────^ attributes hash: 1556448784000816371
│
= FunctionSignature {
self_decl: Some(
@@ -284,29 +290,30 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:41:16
+ ┌─ abi_encoding_stress.fe:48:16
│
-41 │ return self.my_string.to_mem()
+48 │ return self.my_string.to_mem()
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:41:16
+ ┌─ abi_encoding_stress.fe:48:16
│
-41 │ return self.my_string.to_mem()
+48 │ return self.my_string.to_mem()
│ ^^^^^^^^^^^^^^ String<10>: Storage { nonce: Some(2) }
note:
- ┌─ abi_encoding_stress.fe:41:16
+ ┌─ abi_encoding_stress.fe:48:16
│
-41 │ return self.my_string.to_mem()
+48 │ return self.my_string.to_mem()
│ ^^^^^^^^^^^^^^^^^^^^^^^ String<10>: Storage { nonce: Some(2) } => Memory
note:
- ┌─ abi_encoding_stress.fe:43:5
+ ┌─ abi_encoding_stress.fe:51:5
│
-43 │ ╭ pub fn set_my_u16s(self, my_u16s: Array):
-44 │ │ self.my_u16s = my_u16s
- │ ╰──────────────────────────────^ attributes hash: 15015381430419725173
+51 │ ╭ pub fn set_my_u16s(self, my_u16s: Array) {
+52 │ │ self.my_u16s = my_u16s
+53 │ │ }
+ │ ╰─────^ attributes hash: 15015381430419725173
│
= FunctionSignature {
self_decl: Some(
@@ -337,25 +344,26 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:44:9
+ ┌─ abi_encoding_stress.fe:52:9
│
-44 │ self.my_u16s = my_u16s
+52 │ self.my_u16s = my_u16s
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:44:9
+ ┌─ abi_encoding_stress.fe:52:9
│
-44 │ self.my_u16s = my_u16s
+52 │ self.my_u16s = my_u16s
│ ^^^^^^^^^^^^ ^^^^^^^ Array: Memory
│ │
│ Array: Storage { nonce: Some(3) }
note:
- ┌─ abi_encoding_stress.fe:46:5
+ ┌─ abi_encoding_stress.fe:55:5
│
-46 │ ╭ pub fn get_my_u16s(self) -> Array:
-47 │ │ return self.my_u16s.to_mem()
- │ ╰────────────────────────────────────^ attributes hash: 14119474618304681318
+55 │ ╭ pub fn get_my_u16s(self) -> Array {
+56 │ │ return self.my_u16s.to_mem()
+57 │ │ }
+ │ ╰─────^ attributes hash: 14119474618304681318
│
= FunctionSignature {
self_decl: Some(
@@ -376,29 +384,30 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:47:16
+ ┌─ abi_encoding_stress.fe:56:16
│
-47 │ return self.my_u16s.to_mem()
+56 │ return self.my_u16s.to_mem()
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:47:16
+ ┌─ abi_encoding_stress.fe:56:16
│
-47 │ return self.my_u16s.to_mem()
+56 │ return self.my_u16s.to_mem()
│ ^^^^^^^^^^^^ Array: Storage { nonce: Some(3) }
note:
- ┌─ abi_encoding_stress.fe:47:16
+ ┌─ abi_encoding_stress.fe:56:16
│
-47 │ return self.my_u16s.to_mem()
+56 │ return self.my_u16s.to_mem()
│ ^^^^^^^^^^^^^^^^^^^^^ Array: Storage { nonce: Some(3) } => Memory
note:
- ┌─ abi_encoding_stress.fe:49:5
+ ┌─ abi_encoding_stress.fe:59:5
│
-49 │ ╭ pub fn set_my_bool(self, my_bool: bool):
-50 │ │ self.my_bool = my_bool
- │ ╰──────────────────────────────^ attributes hash: 3845928701529339179
+59 │ ╭ pub fn set_my_bool(self, my_bool: bool) {
+60 │ │ self.my_bool = my_bool
+61 │ │ }
+ │ ╰─────^ attributes hash: 3845928701529339179
│
= FunctionSignature {
self_decl: Some(
@@ -424,25 +433,26 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:50:9
+ ┌─ abi_encoding_stress.fe:60:9
│
-50 │ self.my_bool = my_bool
+60 │ self.my_bool = my_bool
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:50:9
+ ┌─ abi_encoding_stress.fe:60:9
│
-50 │ self.my_bool = my_bool
+60 │ self.my_bool = my_bool
│ ^^^^^^^^^^^^ ^^^^^^^ bool: Value
│ │
│ bool: Storage { nonce: Some(4) }
note:
- ┌─ abi_encoding_stress.fe:52:5
+ ┌─ abi_encoding_stress.fe:63:5
│
-52 │ ╭ pub fn get_my_bool(self) -> bool:
-53 │ │ return self.my_bool
- │ ╰───────────────────────────^ attributes hash: 2163156009319630199
+63 │ ╭ pub fn get_my_bool(self) -> bool {
+64 │ │ return self.my_bool
+65 │ │ }
+ │ ╰─────^ attributes hash: 2163156009319630199
│
= FunctionSignature {
self_decl: Some(
@@ -458,23 +468,24 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:53:16
+ ┌─ abi_encoding_stress.fe:64:16
│
-53 │ return self.my_bool
+64 │ return self.my_bool
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:53:16
+ ┌─ abi_encoding_stress.fe:64:16
│
-53 │ return self.my_bool
+64 │ return self.my_bool
│ ^^^^^^^^^^^^ bool: Storage { nonce: Some(4) } => Value
note:
- ┌─ abi_encoding_stress.fe:55:5
+ ┌─ abi_encoding_stress.fe:67:5
│
-55 │ ╭ pub fn set_my_bytes(self, my_bytes: Array):
-56 │ │ self.my_bytes = my_bytes
- │ ╰────────────────────────────────^ attributes hash: 11573101353594183790
+67 │ ╭ pub fn set_my_bytes(self, my_bytes: Array) {
+68 │ │ self.my_bytes = my_bytes
+69 │ │ }
+ │ ╰─────^ attributes hash: 11573101353594183790
│
= FunctionSignature {
self_decl: Some(
@@ -505,25 +516,26 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:56:9
+ ┌─ abi_encoding_stress.fe:68:9
│
-56 │ self.my_bytes = my_bytes
+68 │ self.my_bytes = my_bytes
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:56:9
+ ┌─ abi_encoding_stress.fe:68:9
│
-56 │ self.my_bytes = my_bytes
+68 │ self.my_bytes = my_bytes
│ ^^^^^^^^^^^^^ ^^^^^^^^ Array: Memory
│ │
│ Array: Storage { nonce: Some(5) }
note:
- ┌─ abi_encoding_stress.fe:58:5
+ ┌─ abi_encoding_stress.fe:71:5
│
-58 │ ╭ pub fn get_my_bytes(self) -> Array:
-59 │ │ return self.my_bytes.to_mem()
- │ ╰─────────────────────────────────────^ attributes hash: 157798734366762321
+71 │ ╭ pub fn get_my_bytes(self) -> Array {
+72 │ │ return self.my_bytes.to_mem()
+73 │ │ }
+ │ ╰─────^ attributes hash: 157798734366762321
│
= FunctionSignature {
self_decl: Some(
@@ -544,34 +556,30 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:59:16
+ ┌─ abi_encoding_stress.fe:72:16
│
-59 │ return self.my_bytes.to_mem()
+72 │ return self.my_bytes.to_mem()
│ ^^^^ Foo: Value
note:
- ┌─ abi_encoding_stress.fe:59:16
+ ┌─ abi_encoding_stress.fe:72:16
│
-59 │ return self.my_bytes.to_mem()
+72 │ return self.my_bytes.to_mem()
│ ^^^^^^^^^^^^^ Array: Storage { nonce: Some(5) }
note:
- ┌─ abi_encoding_stress.fe:59:16
+ ┌─ abi_encoding_stress.fe:72:16
│
-59 │ return self.my_bytes.to_mem()
+72 │ return self.my_bytes.to_mem()
│ ^^^^^^^^^^^^^^^^^^^^^^ Array: Storage { nonce: Some(5) } => Memory
note:
- ┌─ abi_encoding_stress.fe:61:5
+ ┌─ abi_encoding_stress.fe:75:5
│
-61 │ ╭ pub fn get_my_struct() -> MyStruct:
-62 │ │ return MyStruct(
-63 │ │ my_num: 42,
-64 │ │ my_num2: u8(26),
-65 │ │ my_bool: true,
-66 │ │ my_addr: address(123456)
-67 │ │ )
- │ ╰─────────^ attributes hash: 16166951200114277325
+75 │ ╭ pub fn get_my_struct() -> MyStruct {
+76 │ │ return MyStruct(my_num: 42, my_num2: u8(26), my_bool: true, my_addr: address(123456))
+77 │ │ }
+ │ ╰─────^ attributes hash: 16166951200114277325
│
= FunctionSignature {
self_decl: None,
@@ -588,51 +596,45 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:63:21
+ ┌─ abi_encoding_stress.fe:76:33
│
-63 │ my_num: 42,
- │ ^^ u256: Value
-64 │ my_num2: u8(26),
- │ ^^ u8: Value
+76 │ return MyStruct(my_num: 42, my_num2: u8(26), my_bool: true, my_addr: address(123456))
+ │ ^^ ^^ u8: Value
+ │ │
+ │ u256: Value
note:
- ┌─ abi_encoding_stress.fe:64:22
+ ┌─ abi_encoding_stress.fe:76:46
│
-64 │ my_num2: u8(26),
- │ ^^^^^^ u8: Value
-65 │ my_bool: true,
- │ ^^^^ bool: Value
-66 │ my_addr: address(123456)
- │ ^^^^^^ u256: Value
+76 │ return MyStruct(my_num: 42, my_num2: u8(26), my_bool: true, my_addr: address(123456))
+ │ ^^^^^^ ^^^^ ^^^^^^ u256: Value
+ │ │ │
+ │ │ bool: Value
+ │ u8: Value
note:
- ┌─ abi_encoding_stress.fe:66:22
+ ┌─ abi_encoding_stress.fe:76:78
│
-66 │ my_addr: address(123456)
- │ ^^^^^^^^^^^^^^^ address: Value
+76 │ return MyStruct(my_num: 42, my_num2: u8(26), my_bool: true, my_addr: address(123456))
+ │ ^^^^^^^^^^^^^^^ address: Value
note:
- ┌─ abi_encoding_stress.fe:62:16
- │
-62 │ return MyStruct(
- │ ╭────────────────^
-63 │ │ my_num: 42,
-64 │ │ my_num2: u8(26),
-65 │ │ my_bool: true,
-66 │ │ my_addr: address(123456)
-67 │ │ )
- │ ╰─────────^ MyStruct: Memory
+ ┌─ abi_encoding_stress.fe:76:16
+ │
+76 │ return MyStruct(my_num: 42, my_num2: u8(26), my_bool: true, my_addr: address(123456))
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MyStruct: Memory
note:
- ┌─ abi_encoding_stress.fe:69:5
+ ┌─ abi_encoding_stress.fe:79:5
│
-69 │ ╭ pub fn mod_my_struct(my_struct: MyStruct) -> MyStruct:
-70 │ │ my_struct.my_num = 12341234
-71 │ │ my_struct.my_num2 = u8(42)
-72 │ │ my_struct.my_bool = false
-73 │ │ my_struct.my_addr = address(9999)
-74 │ │ return my_struct
- │ ╰────────────────────────^ attributes hash: 11747697140833990696
+79 │ ╭ pub fn mod_my_struct(my_struct: MyStruct) -> MyStruct {
+80 │ │ my_struct.my_num = 12341234
+81 │ │ my_struct.my_num2 = u8(42)
+82 │ │ my_struct.my_bool = false
+83 │ │ my_struct.my_addr = address(9999)
+84 │ │ return my_struct
+85 │ │ }
+ │ ╰─────^ attributes hash: 11747697140833990696
│
= FunctionSignature {
self_decl: None,
@@ -662,74 +664,70 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:70:9
+ ┌─ abi_encoding_stress.fe:80:9
│
-70 │ my_struct.my_num = 12341234
+80 │ my_struct.my_num = 12341234
│ ^^^^^^^^^ MyStruct: Memory
note:
- ┌─ abi_encoding_stress.fe:70:9
+ ┌─ abi_encoding_stress.fe:80:9
│
-70 │ my_struct.my_num = 12341234
+80 │ my_struct.my_num = 12341234
│ ^^^^^^^^^^^^^^^^ ^^^^^^^^ u256: Value
│ │
│ u256: Memory
-71 │ my_struct.my_num2 = u8(42)
+81 │ my_struct.my_num2 = u8(42)
│ ^^^^^^^^^ MyStruct: Memory
note:
- ┌─ abi_encoding_stress.fe:71:9
+ ┌─ abi_encoding_stress.fe:81:9
│
-71 │ my_struct.my_num2 = u8(42)
+81 │ my_struct.my_num2 = u8(42)
│ ^^^^^^^^^^^^^^^^^ ^^ u8: Value
│ │
│ u8: Memory
note:
- ┌─ abi_encoding_stress.fe:71:29
+ ┌─ abi_encoding_stress.fe:81:29
│
-71 │ my_struct.my_num2 = u8(42)
+81 │ my_struct.my_num2 = u8(42)
│ ^^^^^^ u8: Value
-72 │ my_struct.my_bool = false
+82 │ my_struct.my_bool = false
│ ^^^^^^^^^ MyStruct: Memory
note:
- ┌─ abi_encoding_stress.fe:72:9
+ ┌─ abi_encoding_stress.fe:82:9
│
-72 │ my_struct.my_bool = false
+82 │ my_struct.my_bool = false
│ ^^^^^^^^^^^^^^^^^ ^^^^^ bool: Value
│ │
│ bool: Memory
-73 │ my_struct.my_addr = address(9999)
+83 │ my_struct.my_addr = address(9999)
│ ^^^^^^^^^ MyStruct: Memory
note:
- ┌─ abi_encoding_stress.fe:73:9
+ ┌─ abi_encoding_stress.fe:83:9
│
-73 │ my_struct.my_addr = address(9999)
+83 │ my_struct.my_addr = address(9999)
│ ^^^^^^^^^^^^^^^^^ ^^^^ u256: Value
│ │
│ address: Memory
note:
- ┌─ abi_encoding_stress.fe:73:29
+ ┌─ abi_encoding_stress.fe:83:29
│
-73 │ my_struct.my_addr = address(9999)
+83 │ my_struct.my_addr = address(9999)
│ ^^^^^^^^^^^^^ address: Value
-74 │ return my_struct
+84 │ return my_struct
│ ^^^^^^^^^ MyStruct: Memory
note:
- ┌─ abi_encoding_stress.fe:76:5
+ ┌─ abi_encoding_stress.fe:87:5
│
-76 │ ╭ pub fn emit_my_event(self, ctx: Context):
-77 │ │ emit MyEvent(
-78 │ │ ctx,
-79 │ │ my_addrs: self.my_addrs.to_mem(),
- · │
-84 │ │ my_bytes: self.my_bytes.to_mem()
-85 │ │ )
- │ ╰─────────^ attributes hash: 1731341862738941170
+87 │ ╭ pub fn emit_my_event(self, ctx: Context) {
+88 │ │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+89 │ │ }
+ │ ╰─────^ attributes hash: 1731341862738941170
│
= FunctionSignature {
self_decl: Some(
@@ -760,95 +758,89 @@ note:
}
note:
- ┌─ abi_encoding_stress.fe:78:13
+ ┌─ abi_encoding_stress.fe:88:22
│
-78 │ ctx,
- │ ^^^ Context: Memory
-79 │ my_addrs: self.my_addrs.to_mem(),
- │ ^^^^ Foo: Value
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^ ^^^^ Foo: Value
+ │ │
+ │ Context: Memory
note:
- ┌─ abi_encoding_stress.fe:79:23
+ ┌─ abi_encoding_stress.fe:88:37
│
-79 │ my_addrs: self.my_addrs.to_mem(),
- │ ^^^^^^^^^^^^^ Array: Storage { nonce: Some(0) }
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^^ Array: Storage { nonce: Some(0) }
note:
- ┌─ abi_encoding_stress.fe:79:23
+ ┌─ abi_encoding_stress.fe:88:37
│
-79 │ my_addrs: self.my_addrs.to_mem(),
- │ ^^^^^^^^^^^^^^^^^^^^^^ Array: Storage { nonce: Some(0) } => Memory
-80 │ my_u128: self.my_u128,
- │ ^^^^ Foo: Value
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ Foo: Value
+ │ │
+ │ Array: Storage { nonce: Some(0) } => Memory
note:
- ┌─ abi_encoding_stress.fe:80:22
+ ┌─ abi_encoding_stress.fe:88:70
│
-80 │ my_u128: self.my_u128,
- │ ^^^^^^^^^^^^ u128: Storage { nonce: Some(1) } => Value
-81 │ my_string: self.my_string.to_mem(),
- │ ^^^^ Foo: Value
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^ ^^^^ Foo: Value
+ │ │
+ │ u128: Storage { nonce: Some(1) } => Value
note:
- ┌─ abi_encoding_stress.fe:81:24
+ ┌─ abi_encoding_stress.fe:88:95
│
-81 │ my_string: self.my_string.to_mem(),
- │ ^^^^^^^^^^^^^^ String<10>: Storage { nonce: Some(2) }
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^^^ String<10>: Storage { nonce: Some(2) }
note:
- ┌─ abi_encoding_stress.fe:81:24
+ ┌─ abi_encoding_stress.fe:88:95
│
-81 │ my_string: self.my_string.to_mem(),
- │ ^^^^^^^^^^^^^^^^^^^^^^^ String<10>: Storage { nonce: Some(2) } => Memory
-82 │ my_u16s: self.my_u16s.to_mem(),
- │ ^^^^ Foo: Value
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ Foo: Value
+ │ │
+ │ String<10>: Storage { nonce: Some(2) } => Memory
note:
- ┌─ abi_encoding_stress.fe:82:22
+ ┌─ abi_encoding_stress.fe:88:129
│
-82 │ my_u16s: self.my_u16s.to_mem(),
- │ ^^^^^^^^^^^^ Array: Storage { nonce: Some(3) }
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^ Array: Storage { nonce: Some(3) }
note:
- ┌─ abi_encoding_stress.fe:82:22
+ ┌─ abi_encoding_stress.fe:88:129
│
-82 │ my_u16s: self.my_u16s.to_mem(),
- │ ^^^^^^^^^^^^^^^^^^^^^ Array: Storage { nonce: Some(3) } => Memory
-83 │ my_bool: self.my_bool,
- │ ^^^^ Foo: Value
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^^^^^^^^^^ ^^^^ Foo: Value
+ │ │
+ │ Array: Storage { nonce: Some(3) } => Memory
note:
- ┌─ abi_encoding_stress.fe:83:22
+ ┌─ abi_encoding_stress.fe:88:161
│
-83 │ my_bool: self.my_bool,
- │ ^^^^^^^^^^^^ bool: Storage { nonce: Some(4) } => Value
-84 │ my_bytes: self.my_bytes.to_mem()
- │ ^^^^ Foo: Value
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^ ^^^^ Foo: Value
+ │ │
+ │ bool: Storage { nonce: Some(4) } => Value
note:
- ┌─ abi_encoding_stress.fe:84:23
+ ┌─ abi_encoding_stress.fe:88:185
│
-84 │ my_bytes: self.my_bytes.to_mem()
- │ ^^^^^^^^^^^^^ Array: Storage { nonce: Some(5) }
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^^ Array: Storage { nonce: Some(5) }
note:
- ┌─ abi_encoding_stress.fe:84:23
+ ┌─ abi_encoding_stress.fe:88:185
│
-84 │ my_bytes: self.my_bytes.to_mem()
- │ ^^^^^^^^^^^^^^^^^^^^^^ Array: Storage { nonce: Some(5) } => Memory
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^^^^^^^^^^^ Array: Storage { nonce: Some(5) } => Memory
note:
- ┌─ abi_encoding_stress.fe:77:9
- │
-77 │ ╭ emit MyEvent(
-78 │ │ ctx,
-79 │ │ my_addrs: self.my_addrs.to_mem(),
-80 │ │ my_u128: self.my_u128,
- · │
-84 │ │ my_bytes: self.my_bytes.to_mem()
-85 │ │ )
- │ ╰─────────^ attributes hash: 2185685122923697263
- │
+ ┌─ abi_encoding_stress.fe:88:9
+ │
+88 │ emit MyEvent(ctx, my_addrs: self.my_addrs.to_mem(), my_u128: self.my_u128, my_string: self.my_string.to_mem(), my_u16s: self.my_u16s.to_mem(), my_bool: self.my_bool, my_bytes: self.my_bytes.to_mem())
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 2185685122923697263
+ │
= Event {
name: "MyEvent",
fields: [
diff --git a/crates/analyzer/tests/snapshots/analysis__address_bytes10_map.snap b/crates/analyzer/tests/snapshots/analysis__address_bytes10_map.snap
index ca8cd9645f..5cd353e9fb 100644
--- a/crates/analyzer/tests/snapshots/analysis__address_bytes10_map.snap
+++ b/crates/analyzer/tests/snapshots/analysis__address_bytes10_map.snap
@@ -12,9 +12,10 @@ note:
note:
┌─ address_bytes10_map.fe:4:5
│
-4 │ ╭ pub fn read_bar(self, key: address) -> Array:
+4 │ ╭ pub fn read_bar(self, key: address) -> Array {
5 │ │ return self.bar[key].to_mem()
- │ ╰─────────────────────────────────────^ attributes hash: 7365261960972751402
+6 │ │ }
+ │ ╰─────^ attributes hash: 7365261960972751402
│
= FunctionSignature {
self_decl: Some(
@@ -71,67 +72,68 @@ note:
│ ^^^^^^^^^^^^^^^^^^^^^^ Array: Storage { nonce: None } => Memory
note:
- ┌─ address_bytes10_map.fe:7:5
- │
-7 │ ╭ pub fn write_bar(self, key: address, value: Array):
-8 │ │ self.bar[key] = value
- │ ╰─────────────────────────────^ attributes hash: 10331226497424577374
- │
- = FunctionSignature {
- self_decl: Some(
- Mutable,
- ),
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "key",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "value",
- typ: Ok(
- Array(
- Array {
- size: 10,
- inner: Numeric(
- U8,
- ),
- },
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Unit,
- ),
- ),
- }
+ ┌─ address_bytes10_map.fe:8:5
+ │
+ 8 │ ╭ pub fn write_bar(self, key: address, value: Array) {
+ 9 │ │ self.bar[key] = value
+10 │ │ }
+ │ ╰─────^ attributes hash: 10331226497424577374
+ │
+ = FunctionSignature {
+ self_decl: Some(
+ Mutable,
+ ),
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "key",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "value",
+ typ: Ok(
+ Array(
+ Array {
+ size: 10,
+ inner: Numeric(
+ U8,
+ ),
+ },
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Unit,
+ ),
+ ),
+ }
note:
- ┌─ address_bytes10_map.fe:8:9
+ ┌─ address_bytes10_map.fe:9:9
│
-8 │ self.bar[key] = value
+9 │ self.bar[key] = value
│ ^^^^ Foo: Value
note:
- ┌─ address_bytes10_map.fe:8:9
+ ┌─ address_bytes10_map.fe:9:9
│
-8 │ self.bar[key] = value
+9 │ self.bar[key] = value
│ ^^^^^^^^ ^^^ address: Value
│ │
│ Map>: Storage { nonce: Some(0) }
note:
- ┌─ address_bytes10_map.fe:8:9
+ ┌─ address_bytes10_map.fe:9:9
│
-8 │ self.bar[key] = value
+9 │ self.bar[key] = value
│ ^^^^^^^^^^^^^ ^^^^^ Array: Memory
│ │
│ Array: Storage { nonce: None }
diff --git a/crates/analyzer/tests/snapshots/analysis__assert.snap b/crates/analyzer/tests/snapshots/analysis__assert.snap
index 8697cf7847..8caccc07a7 100644
--- a/crates/analyzer/tests/snapshots/analysis__assert.snap
+++ b/crates/analyzer/tests/snapshots/analysis__assert.snap
@@ -14,9 +14,10 @@ note:
note:
┌─ assert.fe:5:5
│
-5 │ ╭ pub fn bar(baz: u256):
+5 │ ╭ pub fn bar(baz: u256) {
6 │ │ assert baz > 5
- │ ╰──────────────────────^ attributes hash: 2614610269237134179
+7 │ │ }
+ │ ╰─────^ attributes hash: 2614610269237134179
│
= FunctionSignature {
self_decl: None,
@@ -56,57 +57,59 @@ note:
│ ^^^^^^^ bool: Value
note:
- ┌─ assert.fe:8:5
- │
-8 │ ╭ pub fn revert_with_static_string(baz: u256):
-9 │ │ assert baz > 5, "Must be greater than five"
- │ ╰───────────────────────────────────────────────────^ attributes hash: 2614610269237134179
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "baz",
- typ: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Unit,
- ),
- ),
- }
+ ┌─ assert.fe:9:5
+ │
+ 9 │ ╭ pub fn revert_with_static_string(baz: u256) {
+10 │ │ assert baz > 5, "Must be greater than five"
+11 │ │ }
+ │ ╰─────^ attributes hash: 2614610269237134179
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "baz",
+ typ: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Unit,
+ ),
+ ),
+ }
note:
- ┌─ assert.fe:9:16
- │
-9 │ assert baz > 5, "Must be greater than five"
- │ ^^^ ^ u256: Value
- │ │
- │ u256: Value
+ ┌─ assert.fe:10:16
+ │
+10 │ assert baz > 5, "Must be greater than five"
+ │ ^^^ ^ u256: Value
+ │ │
+ │ u256: Value
note:
- ┌─ assert.fe:9:16
- │
-9 │ assert baz > 5, "Must be greater than five"
- │ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ String<25>: Memory
- │ │
- │ bool: Value
+ ┌─ assert.fe:10:16
+ │
+10 │ assert baz > 5, "Must be greater than five"
+ │ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ String<25>: Memory
+ │ │
+ │ bool: Value
note:
- ┌─ assert.fe:11:5
+ ┌─ assert.fe:13:5
│
-11 │ ╭ pub fn revert_with(baz: u256, reason: String<1000>):
-12 │ │ assert baz > 5, reason
- │ ╰──────────────────────────────^ attributes hash: 10044481770469626577
+13 │ ╭ pub fn revert_with(baz: u256, reason: String<1000>) {
+14 │ │ assert baz > 5, reason
+15 │ │ }
+ │ ╰─────^ attributes hash: 10044481770469626577
│
= FunctionSignature {
self_decl: None,
@@ -143,28 +146,29 @@ note:
}
note:
- ┌─ assert.fe:12:16
+ ┌─ assert.fe:14:16
│
-12 │ assert baz > 5, reason
+14 │ assert baz > 5, reason
│ ^^^ ^ u256: Value
│ │
│ u256: Value
note:
- ┌─ assert.fe:12:16
+ ┌─ assert.fe:14:16
│
-12 │ assert baz > 5, reason
+14 │ assert baz > 5, reason
│ ^^^^^^^ ^^^^^^ String<1000>: Memory
│ │
│ bool: Value
note:
- ┌─ assert.fe:14:5
+ ┌─ assert.fe:17:5
│
-14 │ ╭ pub fn assert_sto_bool(self):
-15 │ │ self.my_bool = false
-16 │ │ assert self.my_bool
- │ ╰───────────────────────────^ attributes hash: 18235041182630809162
+17 │ ╭ pub fn assert_sto_bool(self) {
+18 │ │ self.my_bool = false
+19 │ │ assert self.my_bool
+20 │ │ }
+ │ ╰─────^ attributes hash: 18235041182630809162
│
= FunctionSignature {
self_decl: Some(
@@ -180,34 +184,35 @@ note:
}
note:
- ┌─ assert.fe:15:9
+ ┌─ assert.fe:18:9
│
-15 │ self.my_bool = false
+18 │ self.my_bool = false
│ ^^^^ Foo: Value
note:
- ┌─ assert.fe:15:9
+ ┌─ assert.fe:18:9
│
-15 │ self.my_bool = false
+18 │ self.my_bool = false
│ ^^^^^^^^^^^^ ^^^^^ bool: Value
│ │
│ bool: Storage { nonce: Some(0) }
-16 │ assert self.my_bool
+19 │ assert self.my_bool
│ ^^^^ Foo: Value
note:
- ┌─ assert.fe:16:16
+ ┌─ assert.fe:19:16
│
-16 │ assert self.my_bool
+19 │ assert self.my_bool
│ ^^^^^^^^^^^^ bool: Storage { nonce: Some(0) } => Value
note:
- ┌─ assert.fe:18:5
+ ┌─ assert.fe:22:5
│
-18 │ ╭ pub fn assert_sto_string_msg(self):
-19 │ │ self.my_string = "hello"
-20 │ │ assert false, self.my_string.to_mem()
- │ ╰─────────────────────────────────────────────^ attributes hash: 18235041182630809162
+22 │ ╭ pub fn assert_sto_string_msg(self) {
+23 │ │ self.my_string = "hello"
+24 │ │ assert false, self.my_string.to_mem()
+25 │ │ }
+ │ ╰─────^ attributes hash: 18235041182630809162
│
= FunctionSignature {
self_decl: Some(
@@ -223,33 +228,33 @@ note:
}
note:
- ┌─ assert.fe:19:9
+ ┌─ assert.fe:23:9
│
-19 │ self.my_string = "hello"
+23 │ self.my_string = "hello"
│ ^^^^ Foo: Value
note:
- ┌─ assert.fe:19:9
+ ┌─ assert.fe:23:9
│
-19 │ self.my_string = "hello"
+23 │ self.my_string = "hello"
│ ^^^^^^^^^^^^^^ ^^^^^^^ String<5>: Memory
│ │
│ String<5>: Storage { nonce: Some(1) }
-20 │ assert false, self.my_string.to_mem()
+24 │ assert false, self.my_string.to_mem()
│ ^^^^^ ^^^^ Foo: Value
│ │
│ bool: Value
note:
- ┌─ assert.fe:20:23
+ ┌─ assert.fe:24:23
│
-20 │ assert false, self.my_string.to_mem()
+24 │ assert false, self.my_string.to_mem()
│ ^^^^^^^^^^^^^^ String<5>: Storage { nonce: Some(1) }
note:
- ┌─ assert.fe:20:23
+ ┌─ assert.fe:24:23
│
-20 │ assert false, self.my_string.to_mem()
+24 │ assert false, self.my_string.to_mem()
│ ^^^^^^^^^^^^^^^^^^^^^^^ String<5>: Storage { nonce: Some(1) } => Memory
diff --git a/crates/analyzer/tests/snapshots/analysis__associated_fns.snap b/crates/analyzer/tests/snapshots/analysis__associated_fns.snap
index 3b64ebc6bb..6dd61318bb 100644
--- a/crates/analyzer/tests/snapshots/analysis__associated_fns.snap
+++ b/crates/analyzer/tests/snapshots/analysis__associated_fns.snap
@@ -4,11 +4,12 @@ expression: "build_snapshot(&db, module)"
---
note:
- ┌─ associated_fns.fe:3:3
+ ┌─ associated_fns.fe:2:5
│
-3 │ ╭ pub fn square(x: u256) -> u256:
-4 │ │ return x * x
- │ ╰────────────────^ attributes hash: 6622018637299644818
+2 │ ╭ pub fn square(x: u256) -> u256 {
+3 │ │ return x * x
+4 │ │ }
+ │ ╰─────^ attributes hash: 6622018637299644818
│
= FunctionSignature {
self_decl: None,
@@ -36,83 +37,85 @@ note:
}
note:
- ┌─ associated_fns.fe:4:12
+ ┌─ associated_fns.fe:3:16
│
-4 │ return x * x
- │ ^ ^ u256: Value
- │ │
- │ u256: Value
+3 │ return x * x
+ │ ^ ^ u256: Value
+ │ │
+ │ u256: Value
note:
- ┌─ associated_fns.fe:4:12
+ ┌─ associated_fns.fe:3:16
│
-4 │ return x * x
- │ ^^^^^ u256: Value
+3 │ return x * x
+ │ ^^^^^ u256: Value
note:
- ┌─ associated_fns.fe:7:3
+ ┌─ associated_fns.fe:8:5
│
-7 │ pub x: u256
- │ ^^^^^^^^^^^ u256
+8 │ pub x: u256
+ │ ^^^^^^^^^^^ u256
note:
- ┌─ associated_fns.fe:8:3
- │
-8 │ ╭ pub fn new(x: u256) -> MyStruct:
-9 │ │ return MyStruct(x)
- │ ╰──────────────────────^ attributes hash: 2145703897684373991
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "x",
- typ: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Struct(
- Struct {
- name: "MyStruct",
- field_count: 1,
- },
- ),
- ),
- }
+ ┌─ associated_fns.fe:10:5
+ │
+10 │ ╭ pub fn new(x: u256) -> MyStruct {
+11 │ │ return MyStruct(x)
+12 │ │ }
+ │ ╰─────^ attributes hash: 2145703897684373991
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "x",
+ typ: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Struct(
+ Struct {
+ name: "MyStruct",
+ field_count: 1,
+ },
+ ),
+ ),
+ }
note:
- ┌─ associated_fns.fe:9:21
- │
-9 │ return MyStruct(x)
- │ ^ u256: Value
+ ┌─ associated_fns.fe:11:25
+ │
+11 │ return MyStruct(x)
+ │ ^ u256: Value
note:
- ┌─ associated_fns.fe:9:12
- │
-9 │ return MyStruct(x)
- │ ^^^^^^^^^^^ MyStruct: Memory
+ ┌─ associated_fns.fe:11:16
+ │
+11 │ return MyStruct(x)
+ │ ^^^^^^^^^^^ MyStruct: Memory
note:
- ┌─ associated_fns.fe:12:3
+ ┌─ associated_fns.fe:16:5
│
-12 │ my_struct: MyStruct
- │ ^^^^^^^^^^^^^^^^^^^ MyStruct
+16 │ my_struct: MyStruct
+ │ ^^^^^^^^^^^^^^^^^^^ MyStruct
note:
- ┌─ associated_fns.fe:14:3
+ ┌─ associated_fns.fe:18:5
│
-14 │ ╭ pub fn bar(self, val: u256) -> u256:
-15 │ │ self.my_struct = MyStruct::new(x: val)
-16 │ │ return Lib::square(x: self.my_struct.x)
- │ ╰───────────────────────────────────────────^ attributes hash: 2950430758151367369
+18 │ ╭ pub fn bar(self, val: u256) -> u256 {
+19 │ │ self.my_struct = MyStruct::new(x: val)
+20 │ │ return Lib::square(x: self.my_struct.x)
+21 │ │ }
+ │ ╰─────^ attributes hash: 2950430758151367369
│
= FunctionSignature {
self_decl: Some(
@@ -142,43 +145,43 @@ note:
}
note:
- ┌─ associated_fns.fe:15:5
+ ┌─ associated_fns.fe:19:9
│
-15 │ self.my_struct = MyStruct::new(x: val)
- │ ^^^^ Foo: Value
+19 │ self.my_struct = MyStruct::new(x: val)
+ │ ^^^^ Foo: Value
note:
- ┌─ associated_fns.fe:15:5
+ ┌─ associated_fns.fe:19:9
│
-15 │ self.my_struct = MyStruct::new(x: val)
- │ ^^^^^^^^^^^^^^ ^^^ u256: Value
- │ │
- │ MyStruct: Storage { nonce: Some(0) }
+19 │ self.my_struct = MyStruct::new(x: val)
+ │ ^^^^^^^^^^^^^^ ^^^ u256: Value
+ │ │
+ │ MyStruct: Storage { nonce: Some(0) }
note:
- ┌─ associated_fns.fe:15:22
+ ┌─ associated_fns.fe:19:26
│
-15 │ self.my_struct = MyStruct::new(x: val)
- │ ^^^^^^^^^^^^^^^^^^^^^ MyStruct: Memory
-16 │ return Lib::square(x: self.my_struct.x)
- │ ^^^^ Foo: Value
+19 │ self.my_struct = MyStruct::new(x: val)
+ │ ^^^^^^^^^^^^^^^^^^^^^ MyStruct: Memory
+20 │ return Lib::square(x: self.my_struct.x)
+ │ ^^^^ Foo: Value
note:
- ┌─ associated_fns.fe:16:27
+ ┌─ associated_fns.fe:20:31
│
-16 │ return Lib::square(x: self.my_struct.x)
- │ ^^^^^^^^^^^^^^ MyStruct: Storage { nonce: Some(0) }
+20 │ return Lib::square(x: self.my_struct.x)
+ │ ^^^^^^^^^^^^^^ MyStruct: Storage { nonce: Some(0) }
note:
- ┌─ associated_fns.fe:16:27
+ ┌─ associated_fns.fe:20:31
│
-16 │ return Lib::square(x: self.my_struct.x)
- │ ^^^^^^^^^^^^^^^^ u256: Storage { nonce: Some(0) } => Value
+20 │ return Lib::square(x: self.my_struct.x)
+ │ ^^^^^^^^^^^^^^^^ u256: Storage { nonce: Some(0) } => Value
note:
- ┌─ associated_fns.fe:16:12
+ ┌─ associated_fns.fe:20:16
│
-16 │ return Lib::square(x: self.my_struct.x)
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
+20 │ return Lib::square(x: self.my_struct.x)
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
diff --git a/crates/analyzer/tests/snapshots/analysis__aug_assign.snap b/crates/analyzer/tests/snapshots/analysis__aug_assign.snap
index 5361ebc923..f22675eb02 100644
--- a/crates/analyzer/tests/snapshots/analysis__aug_assign.snap
+++ b/crates/analyzer/tests/snapshots/analysis__aug_assign.snap
@@ -12,10 +12,11 @@ note:
note:
┌─ aug_assign.fe:4:5
│
-4 │ ╭ pub fn add(a: u256, b: u256) -> u256:
+4 │ ╭ pub fn add(a: u256, b: u256) -> u256 {
5 │ │ a += b
6 │ │ return a
- │ ╰────────────────^ attributes hash: 14373109651426912995
+7 │ │ }
+ │ ╰─────^ attributes hash: 14373109651426912995
│
= FunctionSignature {
self_decl: None,
@@ -64,12 +65,13 @@ note:
│ ^ u256: Value
note:
- ┌─ aug_assign.fe:8:5
+ ┌─ aug_assign.fe:9:5
│
- 8 │ ╭ pub fn sub(a: u256, b: u256) -> u256:
- 9 │ │ a -= b
-10 │ │ return a
- │ ╰────────────────^ attributes hash: 14373109651426912995
+ 9 │ ╭ pub fn sub(a: u256, b: u256) -> u256 {
+10 │ │ a -= b
+11 │ │ return a
+12 │ │ }
+ │ ╰─────^ attributes hash: 14373109651426912995
│
= FunctionSignature {
self_decl: None,
@@ -108,22 +110,23 @@ note:
}
note:
- ┌─ aug_assign.fe:9:9
+ ┌─ aug_assign.fe:10:9
│
- 9 │ a -= b
+10 │ a -= b
│ ^ ^ u256: Value
│ │
│ u256: Value
-10 │ return a
+11 │ return a
│ ^ u256: Value
note:
- ┌─ aug_assign.fe:12:5
+ ┌─ aug_assign.fe:14:5
│
-12 │ ╭ pub fn mul(a: u256, b: u256) -> u256:
-13 │ │ a *= b
-14 │ │ return a
- │ ╰────────────────^ attributes hash: 14373109651426912995
+14 │ ╭ pub fn mul(a: u256, b: u256) -> u256 {
+15 │ │ a *= b
+16 │ │ return a
+17 │ │ }
+ │ ╰─────^ attributes hash: 14373109651426912995
│
= FunctionSignature {
self_decl: None,
@@ -162,22 +165,23 @@ note:
}
note:
- ┌─ aug_assign.fe:13:9
+ ┌─ aug_assign.fe:15:9
│
-13 │ a *= b
+15 │ a *= b
│ ^ ^ u256: Value
│ │
│ u256: Value
-14 │ return a
+16 │ return a
│ ^ u256: Value
note:
- ┌─ aug_assign.fe:16:5
+ ┌─ aug_assign.fe:19:5
│
-16 │ ╭ pub fn div(a: u256, b: u256) -> u256:
-17 │ │ a /= b
-18 │ │ return a
- │ ╰────────────────^ attributes hash: 14373109651426912995
+19 │ ╭ pub fn div(a: u256, b: u256) -> u256 {
+20 │ │ a /= b
+21 │ │ return a
+22 │ │ }
+ │ ╰─────^ attributes hash: 14373109651426912995
│
= FunctionSignature {
self_decl: None,
@@ -216,22 +220,23 @@ note:
}
note:
- ┌─ aug_assign.fe:17:9
+ ┌─ aug_assign.fe:20:9
│
-17 │ a /= b
+20 │ a /= b
│ ^ ^ u256: Value
│ │
│ u256: Value
-18 │ return a
+21 │ return a
│ ^ u256: Value
note:
- ┌─ aug_assign.fe:20:5
+ ┌─ aug_assign.fe:24:5
│
-20 │ ╭ pub fn mod(a: u256, b: u256) -> u256:
-21 │ │ a %= b
-22 │ │ return a
- │ ╰────────────────^ attributes hash: 14373109651426912995
+24 │ ╭ pub fn mod(a: u256, b: u256) -> u256 {
+25 │ │ a %= b
+26 │ │ return a
+27 │ │ }
+ │ ╰─────^ attributes hash: 14373109651426912995
│
= FunctionSignature {
self_decl: None,
@@ -270,22 +275,23 @@ note:
}
note:
- ┌─ aug_assign.fe:21:9
+ ┌─ aug_assign.fe:25:9
│
-21 │ a %= b
+25 │ a %= b
│ ^ ^ u256: Value
│ │
│ u256: Value
-22 │ return a
+26 │ return a
│ ^ u256: Value
note:
- ┌─ aug_assign.fe:24:5
+ ┌─ aug_assign.fe:29:5
│
-24 │ ╭ pub fn pow(a: u256, b: u256) -> u256:
-25 │ │ a **= b
-26 │ │ return a
- │ ╰────────────────^ attributes hash: 14373109651426912995
+29 │ ╭ pub fn pow(a: u256, b: u256) -> u256 {
+30 │ │ a **= b
+31 │ │ return a
+32 │ │ }
+ │ ╰─────^ attributes hash: 14373109651426912995
│
= FunctionSignature {
self_decl: None,
@@ -324,22 +330,23 @@ note:
}
note:
- ┌─ aug_assign.fe:25:9
+ ┌─ aug_assign.fe:30:9
│
-25 │ a **= b
+30 │ a **= b
│ ^ ^ u256: Value
│ │
│ u256: Value
-26 │ return a
+31 │ return a
│ ^ u256: Value
note:
- ┌─ aug_assign.fe:28:5
+ ┌─ aug_assign.fe:34:5
│
-28 │ ╭ pub fn lshift(a: u8, b: u8) -> u8:
-29 │ │ a <<= b
-30 │ │ return a
- │ ╰────────────────^ attributes hash: 3365128954177167387
+34 │ ╭ pub fn lshift(a: u8, b: u8) -> u8 {
+35 │ │ a <<= b
+36 │ │ return a
+37 │ │ }
+ │ ╰─────^ attributes hash: 3365128954177167387
│
= FunctionSignature {
self_decl: None,
@@ -378,22 +385,23 @@ note:
}
note:
- ┌─ aug_assign.fe:29:9
+ ┌─ aug_assign.fe:35:9
│
-29 │ a <<= b
+35 │ a <<= b
│ ^ ^ u8: Value
│ │
│ u8: Value
-30 │ return a
+36 │ return a
│ ^ u8: Value
note:
- ┌─ aug_assign.fe:32:5
+ ┌─ aug_assign.fe:39:5
│
-32 │ ╭ pub fn rshift(a: u8, b: u8) -> u8:
-33 │ │ a >>= b
-34 │ │ return a
- │ ╰────────────────^ attributes hash: 3365128954177167387
+39 │ ╭ pub fn rshift(a: u8, b: u8) -> u8 {
+40 │ │ a >>= b
+41 │ │ return a
+42 │ │ }
+ │ ╰─────^ attributes hash: 3365128954177167387
│
= FunctionSignature {
self_decl: None,
@@ -432,22 +440,23 @@ note:
}
note:
- ┌─ aug_assign.fe:33:9
+ ┌─ aug_assign.fe:40:9
│
-33 │ a >>= b
+40 │ a >>= b
│ ^ ^ u8: Value
│ │
│ u8: Value
-34 │ return a
+41 │ return a
│ ^ u8: Value
note:
- ┌─ aug_assign.fe:36:5
+ ┌─ aug_assign.fe:44:5
│
-36 │ ╭ pub fn bit_or(a: u8, b: u8) -> u8:
-37 │ │ a |= b
-38 │ │ return a
- │ ╰────────────────^ attributes hash: 3365128954177167387
+44 │ ╭ pub fn bit_or(a: u8, b: u8) -> u8 {
+45 │ │ a |= b
+46 │ │ return a
+47 │ │ }
+ │ ╰─────^ attributes hash: 3365128954177167387
│
= FunctionSignature {
self_decl: None,
@@ -486,22 +495,23 @@ note:
}
note:
- ┌─ aug_assign.fe:37:9
+ ┌─ aug_assign.fe:45:9
│
-37 │ a |= b
+45 │ a |= b
│ ^ ^ u8: Value
│ │
│ u8: Value
-38 │ return a
+46 │ return a
│ ^ u8: Value
note:
- ┌─ aug_assign.fe:40:5
+ ┌─ aug_assign.fe:49:5
│
-40 │ ╭ pub fn bit_xor(a: u8, b: u8) -> u8:
-41 │ │ a ^= b
-42 │ │ return a
- │ ╰────────────────^ attributes hash: 3365128954177167387
+49 │ ╭ pub fn bit_xor(a: u8, b: u8) -> u8 {
+50 │ │ a ^= b
+51 │ │ return a
+52 │ │ }
+ │ ╰─────^ attributes hash: 3365128954177167387
│
= FunctionSignature {
self_decl: None,
@@ -540,22 +550,23 @@ note:
}
note:
- ┌─ aug_assign.fe:41:9
+ ┌─ aug_assign.fe:50:9
│
-41 │ a ^= b
+50 │ a ^= b
│ ^ ^ u8: Value
│ │
│ u8: Value
-42 │ return a
+51 │ return a
│ ^ u8: Value
note:
- ┌─ aug_assign.fe:44:5
+ ┌─ aug_assign.fe:54:5
│
-44 │ ╭ pub fn bit_and(a: u8, b: u8) -> u8:
-45 │ │ a &= b
-46 │ │ return a
- │ ╰────────────────^ attributes hash: 3365128954177167387
+54 │ ╭ pub fn bit_and(a: u8, b: u8) -> u8 {
+55 │ │ a &= b
+56 │ │ return a
+57 │ │ }
+ │ ╰─────^ attributes hash: 3365128954177167387
│
= FunctionSignature {
self_decl: None,
@@ -594,23 +605,24 @@ note:
}
note:
- ┌─ aug_assign.fe:45:9
+ ┌─ aug_assign.fe:55:9
│
-45 │ a &= b
+55 │ a &= b
│ ^ ^ u8: Value
│ │
│ u8: Value
-46 │ return a
+56 │ return a
│ ^ u8: Value
note:
- ┌─ aug_assign.fe:48:5
+ ┌─ aug_assign.fe:59:5
│
-48 │ ╭ pub fn add_from_sto(self, a: u256, b: u256) -> u256:
-49 │ │ self.my_num = a
-50 │ │ self.my_num += b
-51 │ │ return self.my_num
- │ ╰──────────────────────────^ attributes hash: 3506345928150766050
+59 │ ╭ pub fn add_from_sto(self, a: u256, b: u256) -> u256 {
+60 │ │ self.my_num = a
+61 │ │ self.my_num += b
+62 │ │ return self.my_num
+63 │ │ }
+ │ ╰─────^ attributes hash: 3506345928150766050
│
= FunctionSignature {
self_decl: Some(
@@ -651,46 +663,47 @@ note:
}
note:
- ┌─ aug_assign.fe:49:9
+ ┌─ aug_assign.fe:60:9
│
-49 │ self.my_num = a
+60 │ self.my_num = a
│ ^^^^ Foo: Value
note:
- ┌─ aug_assign.fe:49:9
+ ┌─ aug_assign.fe:60:9
│
-49 │ self.my_num = a
+60 │ self.my_num = a
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Storage { nonce: Some(0) }
-50 │ self.my_num += b
+61 │ self.my_num += b
│ ^^^^ Foo: Value
note:
- ┌─ aug_assign.fe:50:9
+ ┌─ aug_assign.fe:61:9
│
-50 │ self.my_num += b
+61 │ self.my_num += b
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Storage { nonce: Some(0) }
-51 │ return self.my_num
+62 │ return self.my_num
│ ^^^^ Foo: Value
note:
- ┌─ aug_assign.fe:51:16
+ ┌─ aug_assign.fe:62:16
│
-51 │ return self.my_num
+62 │ return self.my_num
│ ^^^^^^^^^^^ u256: Storage { nonce: Some(0) } => Value
note:
- ┌─ aug_assign.fe:53:5
+ ┌─ aug_assign.fe:65:5
│
-53 │ ╭ pub fn add_from_mem(a: u256, b: u256) -> u256:
-54 │ │ let my_array: Array
-55 │ │ my_array[7] = a
-56 │ │ my_array[7] += b
-57 │ │ return my_array[7]
- │ ╰──────────────────────────^ attributes hash: 14373109651426912995
+65 │ ╭ pub fn add_from_mem(a: u256, b: u256) -> u256 {
+66 │ │ let my_array: Array
+67 │ │ my_array[7] = a
+68 │ │ my_array[7] += b
+69 │ │ return my_array[7]
+70 │ │ }
+ │ ╰─────^ attributes hash: 14373109651426912995
│
= FunctionSignature {
self_decl: None,
@@ -729,47 +742,47 @@ note:
}
note:
- ┌─ aug_assign.fe:54:23
+ ┌─ aug_assign.fe:66:23
│
-54 │ let my_array: Array
+66 │ let my_array: Array
│ ^^^^^^^^^^^^^^^ Array
note:
- ┌─ aug_assign.fe:55:9
+ ┌─ aug_assign.fe:67:9
│
-55 │ my_array[7] = a
+67 │ my_array[7] = a
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ aug_assign.fe:55:9
+ ┌─ aug_assign.fe:67:9
│
-55 │ my_array[7] = a
+67 │ my_array[7] = a
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory
-56 │ my_array[7] += b
+68 │ my_array[7] += b
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ aug_assign.fe:56:9
+ ┌─ aug_assign.fe:68:9
│
-56 │ my_array[7] += b
+68 │ my_array[7] += b
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory
-57 │ return my_array[7]
+69 │ return my_array[7]
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ aug_assign.fe:57:16
+ ┌─ aug_assign.fe:69:16
│
-57 │ return my_array[7]
+69 │ return my_array[7]
│ ^^^^^^^^^^^ u256: Memory => Value
diff --git a/crates/analyzer/tests/snapshots/analysis__balances.snap b/crates/analyzer/tests/snapshots/analysis__balances.snap
index db25123286..80543a6138 100644
--- a/crates/analyzer/tests/snapshots/analysis__balances.snap
+++ b/crates/analyzer/tests/snapshots/analysis__balances.snap
@@ -6,9 +6,10 @@ expression: "build_snapshot(&db, module)"
note:
┌─ balances.fe:5:5
│
-5 │ ╭ pub fn my_balance(self, ctx: Context) -> u256:
+5 │ ╭ pub fn my_balance(self, ctx: Context) -> u256 {
6 │ │ return ctx.self_balance()
- │ ╰─────────────────────────────────^ attributes hash: 3247318976601732237
+7 │ │ }
+ │ ╰─────^ attributes hash: 3247318976601732237
│
= FunctionSignature {
self_decl: Some(
@@ -53,63 +54,64 @@ note:
│ ^^^^^^^^^^^^^^^^^^ u256: Value
note:
- ┌─ balances.fe:8:5
- │
-8 │ ╭ pub fn other_balance(self, ctx: Context, someone: address) -> u256:
-9 │ │ return ctx.balance_of(someone)
- │ ╰──────────────────────────────────────^ attributes hash: 7590750053308816492
- │
- = FunctionSignature {
- self_decl: Some(
- Mutable,
- ),
- ctx_decl: Some(
- Mutable,
- ),
- params: [
- FunctionParam {
- label: None,
- name: "ctx",
- typ: Ok(
- Struct(
- Struct {
- name: "Context",
- field_count: 0,
- },
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "someone",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- }
+ ┌─ balances.fe:9:5
+ │
+ 9 │ ╭ pub fn other_balance(self, ctx: Context, someone: address) -> u256 {
+10 │ │ return ctx.balance_of(someone)
+11 │ │ }
+ │ ╰─────^ attributes hash: 7590750053308816492
+ │
+ = FunctionSignature {
+ self_decl: Some(
+ Mutable,
+ ),
+ ctx_decl: Some(
+ Mutable,
+ ),
+ params: [
+ FunctionParam {
+ label: None,
+ name: "ctx",
+ typ: Ok(
+ Struct(
+ Struct {
+ name: "Context",
+ field_count: 0,
+ },
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "someone",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ balances.fe:9:16
- │
-9 │ return ctx.balance_of(someone)
- │ ^^^ ^^^^^^^ address: Value
- │ │
- │ Context: Memory
+ ┌─ balances.fe:10:16
+ │
+10 │ return ctx.balance_of(someone)
+ │ ^^^ ^^^^^^^ address: Value
+ │ │
+ │ Context: Memory
note:
- ┌─ balances.fe:9:16
- │
-9 │ return ctx.balance_of(someone)
- │ ^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
+ ┌─ balances.fe:10:16
+ │
+10 │ return ctx.balance_of(someone)
+ │ ^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
diff --git a/crates/analyzer/tests/snapshots/analysis__base_tuple.snap b/crates/analyzer/tests/snapshots/analysis__base_tuple.snap
index 6f1e7390b7..d81acf2de8 100644
--- a/crates/analyzer/tests/snapshots/analysis__base_tuple.snap
+++ b/crates/analyzer/tests/snapshots/analysis__base_tuple.snap
@@ -6,9 +6,10 @@ expression: "build_snapshot(&db, module)"
note:
┌─ base_tuple.fe:2:5
│
-2 │ ╭ pub fn bar(my_num: u256, my_bool: bool) -> (u256, bool):
+2 │ ╭ pub fn bar(my_num: u256, my_bool: bool) -> (u256, bool) {
3 │ │ return (my_num, my_bool)
- │ ╰────────────────────────────────^ attributes hash: 10319049298189511667
+4 │ │ }
+ │ ╰─────^ attributes hash: 10319049298189511667
│
= FunctionSignature {
self_decl: None,
diff --git a/crates/analyzer/tests/snapshots/analysis__basic_ingot.snap b/crates/analyzer/tests/snapshots/analysis__basic_ingot.snap
index c399574387..759256df5f 100644
--- a/crates/analyzer/tests/snapshots/analysis__basic_ingot.snap
+++ b/crates/analyzer/tests/snapshots/analysis__basic_ingot.snap
@@ -6,10 +6,11 @@ expression: snapshot
note:
┌─ ingots/basic_ingot/src/main.fe:10:5
│
-10 │ ╭ pub fn get_my_baz() -> Baz:
+10 │ ╭ pub fn get_my_baz() -> Baz {
11 │ │ assert file_items_work()
12 │ │ return Baz(my_bool: true, my_u256: 26)
- │ ╰──────────────────────────────────────────────^ attributes hash: 12617626076609670469
+13 │ │ }
+ │ ╰─────^ attributes hash: 12617626076609670469
│
= FunctionSignature {
self_decl: None,
@@ -42,11 +43,12 @@ note:
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Baz: Memory
note:
- ┌─ ingots/basic_ingot/src/main.fe:14:5
+ ┌─ ingots/basic_ingot/src/main.fe:15:5
│
-14 │ ╭ pub fn get_my_bing() -> Bong:
-15 │ │ return Bong(my_address: address(42))
- │ ╰────────────────────────────────────────────^ attributes hash: 10335209349982667488
+15 │ ╭ pub fn get_my_bing() -> Bong {
+16 │ │ return Bong(my_address: address(42))
+17 │ │ }
+ │ ╰─────^ attributes hash: 10335209349982667488
│
= FunctionSignature {
self_decl: None,
@@ -63,29 +65,30 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/main.fe:15:41
+ ┌─ ingots/basic_ingot/src/main.fe:16:41
│
-15 │ return Bong(my_address: address(42))
+16 │ return Bong(my_address: address(42))
│ ^^ u256: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:15:33
+ ┌─ ingots/basic_ingot/src/main.fe:16:33
│
-15 │ return Bong(my_address: address(42))
+16 │ return Bong(my_address: address(42))
│ ^^^^^^^^^^^ address: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:15:16
+ ┌─ ingots/basic_ingot/src/main.fe:16:16
│
-15 │ return Bong(my_address: address(42))
+16 │ return Bong(my_address: address(42))
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Bing: Memory
note:
- ┌─ ingots/basic_ingot/src/main.fe:17:5
+ ┌─ ingots/basic_ingot/src/main.fe:19:5
│
-17 │ ╭ pub fn get_42() -> u256:
-18 │ │ return get_42_backend()
- │ ╰───────────────────────────────^ attributes hash: 6115314201970082834
+19 │ ╭ pub fn get_42() -> u256 {
+20 │ │ return get_42_backend()
+21 │ │ }
+ │ ╰─────^ attributes hash: 6115314201970082834
│
= FunctionSignature {
self_decl: None,
@@ -101,17 +104,18 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/main.fe:18:16
+ ┌─ ingots/basic_ingot/src/main.fe:20:16
│
-18 │ return get_42_backend()
+20 │ return get_42_backend()
│ ^^^^^^^^^^^^^^^^ u256: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:20:5
+ ┌─ ingots/basic_ingot/src/main.fe:23:5
│
-20 │ ╭ pub fn get_26() -> u256:
-21 │ │ return std::evm::add(13, 13)
- │ ╰────────────────────────────────────^ attributes hash: 6115314201970082834
+23 │ ╭ pub fn get_26() -> u256 {
+24 │ │ return std::evm::add(13, 13)
+25 │ │ }
+ │ ╰─────^ attributes hash: 6115314201970082834
│
= FunctionSignature {
self_decl: None,
@@ -127,26 +131,27 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/main.fe:21:30
+ ┌─ ingots/basic_ingot/src/main.fe:24:30
│
-21 │ return std::evm::add(13, 13)
+24 │ return std::evm::add(13, 13)
│ ^^ ^^ u256: Value
│ │
│ u256: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:21:16
+ ┌─ ingots/basic_ingot/src/main.fe:24:16
│
-21 │ return std::evm::add(13, 13)
+24 │ return std::evm::add(13, 13)
│ ^^^^^^^^^^^^^^^^^^^^^ u256: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:23:5
+ ┌─ ingots/basic_ingot/src/main.fe:27:5
│
-23 │ ╭ pub fn call_on_path():
-24 │ │ assert bar::mee::Mee::kawum() == 1
-25 │ │ assert bar::mee::Mee().rums() == 1
- │ ╰──────────────────────────────────────────^ attributes hash: 8319796915330632390
+27 │ ╭ pub fn call_on_path() {
+28 │ │ assert bar::mee::Mee::kawum() == 1
+29 │ │ assert bar::mee::Mee().rums() == 1
+30 │ │ }
+ │ ╰─────^ attributes hash: 8319796915330632390
│
= FunctionSignature {
self_decl: None,
@@ -160,45 +165,42 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/main.fe:24:16
+ ┌─ ingots/basic_ingot/src/main.fe:28:16
│
-24 │ assert bar::mee::Mee::kawum() == 1
+28 │ assert bar::mee::Mee::kawum() == 1
│ ^^^^^^^^^^^^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:24:16
+ ┌─ ingots/basic_ingot/src/main.fe:28:16
│
-24 │ assert bar::mee::Mee::kawum() == 1
+28 │ assert bar::mee::Mee::kawum() == 1
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ bool: Value
-25 │ assert bar::mee::Mee().rums() == 1
+29 │ assert bar::mee::Mee().rums() == 1
│ ^^^^^^^^^^^^^^^ Mee: Memory
note:
- ┌─ ingots/basic_ingot/src/main.fe:25:16
+ ┌─ ingots/basic_ingot/src/main.fe:29:16
│
-25 │ assert bar::mee::Mee().rums() == 1
+29 │ assert bar::mee::Mee().rums() == 1
│ ^^^^^^^^^^^^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:25:16
+ ┌─ ingots/basic_ingot/src/main.fe:29:16
│
-25 │ assert bar::mee::Mee().rums() == 1
+29 │ assert bar::mee::Mee().rums() == 1
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ bool: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:27:5
+ ┌─ ingots/basic_ingot/src/main.fe:32:5
│
-27 │ ╭ pub fn get_my_dyng() -> dong::Dyng:
-28 │ │ return dong::Dyng(
-29 │ │ my_address: address(8),
-30 │ │ my_u256: 42,
-31 │ │ my_i8: -1
-32 │ │ )
- │ ╰─────────^ attributes hash: 13186223862505072309
+32 │ ╭ pub fn get_my_dyng() -> dong::Dyng {
+33 │ │ return dong::Dyng(my_address: address(8), my_u256: 42, my_i8: -1)
+34 │ │ }
+ │ ╰─────^ attributes hash: 13186223862505072309
│
= FunctionSignature {
self_decl: None,
@@ -215,45 +217,40 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/main.fe:29:33
+ ┌─ ingots/basic_ingot/src/main.fe:33:47
│
-29 │ my_address: address(8),
- │ ^ u256: Value
+33 │ return dong::Dyng(my_address: address(8), my_u256: 42, my_i8: -1)
+ │ ^ u256: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:29:25
+ ┌─ ingots/basic_ingot/src/main.fe:33:39
│
-29 │ my_address: address(8),
- │ ^^^^^^^^^^ address: Value
-30 │ my_u256: 42,
- │ ^^ u256: Value
-31 │ my_i8: -1
- │ ^ u256: Value
+33 │ return dong::Dyng(my_address: address(8), my_u256: 42, my_i8: -1)
+ │ ^^^^^^^^^^ ^^ ^ u256: Value
+ │ │ │
+ │ │ u256: Value
+ │ address: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:31:20
+ ┌─ ingots/basic_ingot/src/main.fe:33:71
│
-31 │ my_i8: -1
- │ ^^ i8: Value
+33 │ return dong::Dyng(my_address: address(8), my_u256: 42, my_i8: -1)
+ │ ^^ i8: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:28:16
- │
-28 │ return dong::Dyng(
- │ ╭────────────────^
-29 │ │ my_address: address(8),
-30 │ │ my_u256: 42,
-31 │ │ my_i8: -1
-32 │ │ )
- │ ╰─────────^ Dyng: Memory
+ ┌─ ingots/basic_ingot/src/main.fe:33:16
+ │
+33 │ return dong::Dyng(my_address: address(8), my_u256: 42, my_i8: -1)
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dyng: Memory
note:
- ┌─ ingots/basic_ingot/src/main.fe:34:5
+ ┌─ ingots/basic_ingot/src/main.fe:36:5
│
-34 │ ╭ pub fn create_bing_contract(ctx: Context) -> u256:
-35 │ │ let bing_contract: BingContract = BingContract.create(ctx, 0)
-36 │ │ return bing_contract.add(40, 50)
- │ ╰────────────────────────────────────────^ attributes hash: 10526263819290319263
+36 │ ╭ pub fn create_bing_contract(ctx: Context) -> u256 {
+37 │ │ let bing_contract: BingContract = BingContract.create(ctx, 0)
+38 │ │ return bing_contract.add(40, 50)
+39 │ │ }
+ │ ╰─────^ attributes hash: 10526263819290319263
│
= FunctionSignature {
self_decl: None,
@@ -284,43 +281,44 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/main.fe:35:28
+ ┌─ ingots/basic_ingot/src/main.fe:37:28
│
-35 │ let bing_contract: BingContract = BingContract.create(ctx, 0)
+37 │ let bing_contract: BingContract = BingContract.create(ctx, 0)
│ ^^^^^^^^^^^^ BingContract
note:
- ┌─ ingots/basic_ingot/src/main.fe:35:63
+ ┌─ ingots/basic_ingot/src/main.fe:37:63
│
-35 │ let bing_contract: BingContract = BingContract.create(ctx, 0)
+37 │ let bing_contract: BingContract = BingContract.create(ctx, 0)
│ ^^^ ^ u256: Value
│ │
│ Context: Memory
note:
- ┌─ ingots/basic_ingot/src/main.fe:35:43
+ ┌─ ingots/basic_ingot/src/main.fe:37:43
│
-35 │ let bing_contract: BingContract = BingContract.create(ctx, 0)
+37 │ let bing_contract: BingContract = BingContract.create(ctx, 0)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ BingContract: Value
-36 │ return bing_contract.add(40, 50)
+38 │ return bing_contract.add(40, 50)
│ ^^^^^^^^^^^^^ ^^ ^^ u256: Value
│ │ │
│ │ u256: Value
│ BingContract: Value
note:
- ┌─ ingots/basic_ingot/src/main.fe:36:16
+ ┌─ ingots/basic_ingot/src/main.fe:38:16
│
-36 │ return bing_contract.add(40, 50)
+38 │ return bing_contract.add(40, 50)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
note:
- ┌─ ingots/basic_ingot/src/bar.fe:2:1
+ ┌─ ingots/basic_ingot/src/bar.fe:1:1
│
-2 │ ╭ pub fn file_items_work() -> bool:
-3 │ │ return true
- │ ╰─────────────^ attributes hash: 5583437014632790429
+1 │ ╭ pub fn file_items_work() -> bool {
+2 │ │ return true
+3 │ │ }
+ │ ╰─^ attributes hash: 5583437014632790429
│
= FunctionSignature {
self_decl: None,
@@ -334,10 +332,10 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/bar.fe:3:10
+ ┌─ ingots/basic_ingot/src/bar.fe:2:12
│
-3 │ return true
- │ ^^^^ bool: Value
+2 │ return true
+ │ ^^^^ bool: Value
note:
@@ -347,11 +345,12 @@ note:
│ ^^^^^^^^^^^^^^^^^^^^^^^ address
note:
- ┌─ ingots/basic_ingot/src/bing.fe:6:1
+ ┌─ ingots/basic_ingot/src/bing.fe:7:1
│
-6 │ ╭ pub fn get_42_backend() -> u256:
-7 │ │ return std::evm::add(21, 21)
- │ ╰────────────────────────────────^ attributes hash: 6115314201970082834
+7 │ ╭ pub fn get_42_backend() -> u256 {
+8 │ │ return std::evm::add(21, 21)
+9 │ │ }
+ │ ╰─^ attributes hash: 6115314201970082834
│
= FunctionSignature {
self_decl: None,
@@ -367,25 +366,26 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/bing.fe:7:26
+ ┌─ ingots/basic_ingot/src/bing.fe:8:26
│
-7 │ return std::evm::add(21, 21)
+8 │ return std::evm::add(21, 21)
│ ^^ ^^ u256: Value
│ │
│ u256: Value
note:
- ┌─ ingots/basic_ingot/src/bing.fe:7:12
+ ┌─ ingots/basic_ingot/src/bing.fe:8:12
│
-7 │ return std::evm::add(21, 21)
+8 │ return std::evm::add(21, 21)
│ ^^^^^^^^^^^^^^^^^^^^^ u256: Value
note:
- ┌─ ingots/basic_ingot/src/bing.fe:10:4
+ ┌─ ingots/basic_ingot/src/bing.fe:12:5
│
-10 │ ╭ pub fn add(_ x: u256, _ y: u256) -> u256:
-11 │ │ return x + y
- │ ╰───────────────────^ attributes hash: 4448606202021980030
+12 │ ╭ pub fn add(_ x: u256, _ y: u256) -> u256 {
+13 │ │ return x + y
+14 │ │ }
+ │ ╰─────^ attributes hash: 4448606202021980030
│
= FunctionSignature {
self_decl: None,
@@ -428,18 +428,18 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/bing.fe:11:15
+ ┌─ ingots/basic_ingot/src/bing.fe:13:16
│
-11 │ return x + y
- │ ^ ^ u256: Value
- │ │
- │ u256: Value
+13 │ return x + y
+ │ ^ ^ u256: Value
+ │ │
+ │ u256: Value
note:
- ┌─ ingots/basic_ingot/src/bing.fe:11:15
+ ┌─ ingots/basic_ingot/src/bing.fe:13:16
│
-11 │ return x + y
- │ ^^^^^ u256: Value
+13 │ return x + y
+ │ ^^^^^ u256: Value
@@ -455,9 +455,10 @@ note:
note:
┌─ ingots/basic_ingot/src/bar/mee.fe:2:5
│
-2 │ ╭ pub fn kawum() -> u256:
+2 │ ╭ pub fn kawum() -> u256 {
3 │ │ return 1
- │ ╰────────────────^ attributes hash: 6115314201970082834
+4 │ │ }
+ │ ╰─────^ attributes hash: 6115314201970082834
│
= FunctionSignature {
self_decl: None,
@@ -479,11 +480,12 @@ note:
│ ^ u256: Value
note:
- ┌─ ingots/basic_ingot/src/bar/mee.fe:5:5
+ ┌─ ingots/basic_ingot/src/bar/mee.fe:6:5
│
-5 │ ╭ pub fn rums(self) -> u256:
-6 │ │ return 1
- │ ╰────────────────^ attributes hash: 11773348765973600208
+6 │ ╭ pub fn rums(self) -> u256 {
+7 │ │ return 1
+8 │ │ }
+ │ ╰─────^ attributes hash: 11773348765973600208
│
= FunctionSignature {
self_decl: Some(
@@ -501,9 +503,9 @@ note:
}
note:
- ┌─ ingots/basic_ingot/src/bar/mee.fe:6:16
+ ┌─ ingots/basic_ingot/src/bar/mee.fe:7:16
│
-6 │ return 1
+7 │ return 1
│ ^ u256: Value
@@ -515,52 +517,53 @@ note:
note:
- ┌─ ingots/basic_ingot/src/ding/dong.fe:4:3
+ ┌─ ingots/basic_ingot/src/ding/dong.fe:4:5
│
-4 │ pub my_address: address
- │ ^^^^^^^^^^^^^^^^^^^^^^^ address
-5 │ pub my_u256: u256
- │ ^^^^^^^^^^^^^^^^^ u256
-6 │ pub my_i8: i8
- │ ^^^^^^^^^^^^^ i8
+4 │ pub my_address: address
+ │ ^^^^^^^^^^^^^^^^^^^^^^^ address
+5 │ pub my_u256: u256
+ │ ^^^^^^^^^^^^^^^^^ u256
+6 │ pub my_i8: i8
+ │ ^^^^^^^^^^^^^ i8
note:
- ┌─ ingots/basic_ingot/src/ding/dong.fe:8:1
- │
-8 │ ╭ fn get_bing() -> Bing:
-9 │ │ return Bing(my_address: address(0))
- │ ╰───────────────────────────────────────^ attributes hash: 10335209349982667488
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [],
- return_type: Ok(
- Struct(
- Struct {
- name: "Bing",
- field_count: 1,
- },
- ),
- ),
- }
+ ┌─ ingots/basic_ingot/src/ding/dong.fe:9:1
+ │
+ 9 │ ╭ fn get_bing() -> Bing {
+10 │ │ return Bing(my_address: address(0))
+11 │ │ }
+ │ ╰─^ attributes hash: 10335209349982667488
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [],
+ return_type: Ok(
+ Struct(
+ Struct {
+ name: "Bing",
+ field_count: 1,
+ },
+ ),
+ ),
+ }
note:
- ┌─ ingots/basic_ingot/src/ding/dong.fe:9:37
- │
-9 │ return Bing(my_address: address(0))
- │ ^ u256: Value
+ ┌─ ingots/basic_ingot/src/ding/dong.fe:10:37
+ │
+10 │ return Bing(my_address: address(0))
+ │ ^ u256: Value
note:
- ┌─ ingots/basic_ingot/src/ding/dong.fe:9:29
- │
-9 │ return Bing(my_address: address(0))
- │ ^^^^^^^^^^ address: Value
+ ┌─ ingots/basic_ingot/src/ding/dong.fe:10:29
+ │
+10 │ return Bing(my_address: address(0))
+ │ ^^^^^^^^^^ address: Value
note:
- ┌─ ingots/basic_ingot/src/ding/dong.fe:9:12
- │
-9 │ return Bing(my_address: address(0))
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Bing: Memory
+ ┌─ ingots/basic_ingot/src/ding/dong.fe:10:12
+ │
+10 │ return Bing(my_address: address(0))
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Bing: Memory
diff --git a/crates/analyzer/tests/snapshots/analysis__call_statement_with_args.snap b/crates/analyzer/tests/snapshots/analysis__call_statement_with_args.snap
index 9c9b2ce6ae..6315e99df2 100644
--- a/crates/analyzer/tests/snapshots/analysis__call_statement_with_args.snap
+++ b/crates/analyzer/tests/snapshots/analysis__call_statement_with_args.snap
@@ -12,9 +12,10 @@ note:
note:
┌─ call_statement_with_args.fe:4:5
│
-4 │ ╭ fn assign(self, _ val: u256):
+4 │ ╭ fn assign(self, _ val: u256) {
5 │ │ self.baz[0] = val
- │ ╰─────────────────────────^ attributes hash: 15254234582808678866
+6 │ │ }
+ │ ╰─────^ attributes hash: 15254234582808678866
│
= FunctionSignature {
self_decl: Some(
@@ -66,56 +67,57 @@ note:
│ u256: Storage { nonce: None }
note:
- ┌─ call_statement_with_args.fe:7:5
- │
-7 │ ╭ pub fn bar(self) -> u256:
-8 │ │ self.assign(100)
-9 │ │ return self.baz[0]
- │ ╰──────────────────────────^ attributes hash: 11773348765973600208
- │
- = FunctionSignature {
- self_decl: Some(
- Mutable,
- ),
- ctx_decl: None,
- params: [],
- return_type: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- }
+ ┌─ call_statement_with_args.fe:8:5
+ │
+ 8 │ ╭ pub fn bar(self) -> u256 {
+ 9 │ │ self.assign(100)
+10 │ │ return self.baz[0]
+11 │ │ }
+ │ ╰─────^ attributes hash: 11773348765973600208
+ │
+ = FunctionSignature {
+ self_decl: Some(
+ Mutable,
+ ),
+ ctx_decl: None,
+ params: [],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ call_statement_with_args.fe:8:9
+ ┌─ call_statement_with_args.fe:9:9
│
-8 │ self.assign(100)
+9 │ self.assign(100)
│ ^^^^ ^^^ u256: Value
│ │
│ Foo: Value
note:
- ┌─ call_statement_with_args.fe:8:9
- │
-8 │ self.assign(100)
- │ ^^^^^^^^^^^^^^^^ (): Value
-9 │ return self.baz[0]
- │ ^^^^ Foo: Value
+ ┌─ call_statement_with_args.fe:9:9
+ │
+ 9 │ self.assign(100)
+ │ ^^^^^^^^^^^^^^^^ (): Value
+10 │ return self.baz[0]
+ │ ^^^^ Foo: Value
note:
- ┌─ call_statement_with_args.fe:9:16
- │
-9 │ return self.baz[0]
- │ ^^^^^^^^ ^ u256: Value
- │ │
- │ Map: Storage { nonce: Some(0) }
+ ┌─ call_statement_with_args.fe:10:16
+ │
+10 │ return self.baz[0]
+ │ ^^^^^^^^ ^ u256: Value
+ │ │
+ │ Map: Storage { nonce: Some(0) }
note:
- ┌─ call_statement_with_args.fe:9:16
- │
-9 │ return self.baz[0]
- │ ^^^^^^^^^^^ u256: Storage { nonce: None } => Value
+ ┌─ call_statement_with_args.fe:10:16
+ │
+10 │ return self.baz[0]
+ │ ^^^^^^^^^^^ u256: Storage { nonce: None } => Value
diff --git a/crates/analyzer/tests/snapshots/analysis__call_statement_with_args_2.snap b/crates/analyzer/tests/snapshots/analysis__call_statement_with_args_2.snap
index e1c41eb08a..5735079ec7 100644
--- a/crates/analyzer/tests/snapshots/analysis__call_statement_with_args_2.snap
+++ b/crates/analyzer/tests/snapshots/analysis__call_statement_with_args_2.snap
@@ -12,10 +12,11 @@ note:
note:
┌─ call_statement_with_args_2.fe:4:5
│
-4 │ ╭ fn assign(self, _ val: u256) -> u256:
+4 │ ╭ fn assign(self, _ val: u256) -> u256 {
5 │ │ self.baz[0] = val
6 │ │ return val
- │ ╰──────────────────^ attributes hash: 11102768331449211201
+7 │ │ }
+ │ ╰─────^ attributes hash: 11102768331449211201
│
= FunctionSignature {
self_decl: Some(
@@ -71,12 +72,13 @@ note:
│ ^^^ u256: Value
note:
- ┌─ call_statement_with_args_2.fe:8:5
+ ┌─ call_statement_with_args_2.fe:9:5
│
- 8 │ ╭ pub fn bar(self) -> u256:
- 9 │ │ self.assign(100)
-10 │ │ return self.baz[0]
- │ ╰──────────────────────────^ attributes hash: 11773348765973600208
+ 9 │ ╭ pub fn bar(self) -> u256 {
+10 │ │ self.assign(100)
+11 │ │ return self.baz[0]
+12 │ │ }
+ │ ╰─────^ attributes hash: 11773348765973600208
│
= FunctionSignature {
self_decl: Some(
@@ -94,33 +96,33 @@ note:
}
note:
- ┌─ call_statement_with_args_2.fe:9:9
- │
-9 │ self.assign(100)
- │ ^^^^ ^^^ u256: Value
- │ │
- │ Foo: Value
+ ┌─ call_statement_with_args_2.fe:10:9
+ │
+10 │ self.assign(100)
+ │ ^^^^ ^^^ u256: Value
+ │ │
+ │ Foo: Value
note:
- ┌─ call_statement_with_args_2.fe:9:9
+ ┌─ call_statement_with_args_2.fe:10:9
│
- 9 │ self.assign(100)
+10 │ self.assign(100)
│ ^^^^^^^^^^^^^^^^ u256: Value
-10 │ return self.baz[0]
+11 │ return self.baz[0]
│ ^^^^ Foo: Value
note:
- ┌─ call_statement_with_args_2.fe:10:16
+ ┌─ call_statement_with_args_2.fe:11:16
│
-10 │ return self.baz[0]
+11 │ return self.baz[0]
│ ^^^^^^^^ ^ u256: Value
│ │
│ Map: Storage { nonce: Some(0) }
note:
- ┌─ call_statement_with_args_2.fe:10:16
+ ┌─ call_statement_with_args_2.fe:11:16
│
-10 │ return self.baz[0]
+11 │ return self.baz[0]
│ ^^^^^^^^^^^ u256: Storage { nonce: None } => Value
diff --git a/crates/analyzer/tests/snapshots/analysis__call_statement_without_args.snap b/crates/analyzer/tests/snapshots/analysis__call_statement_without_args.snap
index 249d88acef..ac178ec864 100644
--- a/crates/analyzer/tests/snapshots/analysis__call_statement_without_args.snap
+++ b/crates/analyzer/tests/snapshots/analysis__call_statement_without_args.snap
@@ -12,9 +12,10 @@ note:
note:
┌─ call_statement_without_args.fe:4:5
│
-4 │ ╭ fn assign(self):
+4 │ ╭ fn assign(self) {
5 │ │ self.baz[0] = 100
- │ ╰─────────────────────────^ attributes hash: 18235041182630809162
+6 │ │ }
+ │ ╰─────^ attributes hash: 18235041182630809162
│
= FunctionSignature {
self_decl: Some(
@@ -52,54 +53,55 @@ note:
│ u256: Storage { nonce: None }
note:
- ┌─ call_statement_without_args.fe:7:5
- │
-7 │ ╭ pub fn bar(self) -> u256:
-8 │ │ self.assign()
-9 │ │ return self.baz[0]
- │ ╰──────────────────────────^ attributes hash: 11773348765973600208
- │
- = FunctionSignature {
- self_decl: Some(
- Mutable,
- ),
- ctx_decl: None,
- params: [],
- return_type: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- }
+ ┌─ call_statement_without_args.fe:8:5
+ │
+ 8 │ ╭ pub fn bar(self) -> u256 {
+ 9 │ │ self.assign()
+10 │ │ return self.baz[0]
+11 │ │ }
+ │ ╰─────^ attributes hash: 11773348765973600208
+ │
+ = FunctionSignature {
+ self_decl: Some(
+ Mutable,
+ ),
+ ctx_decl: None,
+ params: [],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ call_statement_without_args.fe:8:9
+ ┌─ call_statement_without_args.fe:9:9
│
-8 │ self.assign()
+9 │ self.assign()
│ ^^^^ Foo: Value
note:
- ┌─ call_statement_without_args.fe:8:9
- │
-8 │ self.assign()
- │ ^^^^^^^^^^^^^ (): Value
-9 │ return self.baz[0]
- │ ^^^^ Foo: Value
+ ┌─ call_statement_without_args.fe:9:9
+ │
+ 9 │ self.assign()
+ │ ^^^^^^^^^^^^^ (): Value
+10 │ return self.baz[0]
+ │ ^^^^ Foo: Value
note:
- ┌─ call_statement_without_args.fe:9:16
- │
-9 │ return self.baz[0]
- │ ^^^^^^^^ ^ u256: Value
- │ │
- │ Map: Storage { nonce: Some(0) }
+ ┌─ call_statement_without_args.fe:10:16
+ │
+10 │ return self.baz[0]
+ │ ^^^^^^^^ ^ u256: Value
+ │ │
+ │ Map: Storage { nonce: Some(0) }
note:
- ┌─ call_statement_without_args.fe:9:16
- │
-9 │ return self.baz[0]
- │ ^^^^^^^^^^^ u256: Storage { nonce: None } => Value
+ ┌─ call_statement_without_args.fe:10:16
+ │
+10 │ return self.baz[0]
+ │ ^^^^^^^^^^^ u256: Storage { nonce: None } => Value
diff --git a/crates/analyzer/tests/snapshots/analysis__checked_arithmetic.snap b/crates/analyzer/tests/snapshots/analysis__checked_arithmetic.snap
index 1d14519585..6ddf7ea3ad 100644
--- a/crates/analyzer/tests/snapshots/analysis__checked_arithmetic.snap
+++ b/crates/analyzer/tests/snapshots/analysis__checked_arithmetic.snap
@@ -4,11 +4,12 @@ expression: "build_snapshot(&db, module)"
---
note:
- ┌─ checked_arithmetic.fe:3:5
+ ┌─ checked_arithmetic.fe:2:5
│
-3 │ ╭ pub fn add_u256(left: u256, right: u256) -> u256:
-4 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 8877497213208027149
+2 │ ╭ pub fn add_u256(left: u256, right: u256) -> u256 {
+3 │ │ return left + right
+4 │ │ }
+ │ ╰─────^ attributes hash: 8877497213208027149
│
= FunctionSignature {
self_decl: None,
@@ -47,25 +48,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:4:16
+ ┌─ checked_arithmetic.fe:3:16
│
-4 │ return left + right
+3 │ return left + right
│ ^^^^ ^^^^^ u256: Value
│ │
│ u256: Value
note:
- ┌─ checked_arithmetic.fe:4:16
+ ┌─ checked_arithmetic.fe:3:16
│
-4 │ return left + right
+3 │ return left + right
│ ^^^^^^^^^^^^ u256: Value
note:
┌─ checked_arithmetic.fe:6:5
│
-6 │ ╭ pub fn add_u128(left: u128, right: u128) -> u128:
+6 │ ╭ pub fn add_u128(left: u128, right: u128) -> u128 {
7 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 11187416061572591496
+8 │ │ }
+ │ ╰─────^ attributes hash: 11187416061572591496
│
= FunctionSignature {
self_decl: None,
@@ -118,11 +120,12 @@ note:
│ ^^^^^^^^^^^^ u128: Value
note:
- ┌─ checked_arithmetic.fe:9:5
+ ┌─ checked_arithmetic.fe:10:5
│
- 9 │ ╭ pub fn add_u64(left: u64, right: u64) -> u64:
-10 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 9316585824156398552
+10 │ ╭ pub fn add_u64(left: u64, right: u64) -> u64 {
+11 │ │ return left + right
+12 │ │ }
+ │ ╰─────^ attributes hash: 9316585824156398552
│
= FunctionSignature {
self_decl: None,
@@ -161,25 +164,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:10:16
+ ┌─ checked_arithmetic.fe:11:16
│
-10 │ return left + right
+11 │ return left + right
│ ^^^^ ^^^^^ u64: Value
│ │
│ u64: Value
note:
- ┌─ checked_arithmetic.fe:10:16
+ ┌─ checked_arithmetic.fe:11:16
│
-10 │ return left + right
+11 │ return left + right
│ ^^^^^^^^^^^^ u64: Value
note:
- ┌─ checked_arithmetic.fe:12:5
+ ┌─ checked_arithmetic.fe:14:5
│
-12 │ ╭ pub fn add_u32(left: u32, right: u32) -> u32:
-13 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 6948562809403003686
+14 │ ╭ pub fn add_u32(left: u32, right: u32) -> u32 {
+15 │ │ return left + right
+16 │ │ }
+ │ ╰─────^ attributes hash: 6948562809403003686
│
= FunctionSignature {
self_decl: None,
@@ -218,25 +222,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:13:16
+ ┌─ checked_arithmetic.fe:15:16
│
-13 │ return left + right
+15 │ return left + right
│ ^^^^ ^^^^^ u32: Value
│ │
│ u32: Value
note:
- ┌─ checked_arithmetic.fe:13:16
+ ┌─ checked_arithmetic.fe:15:16
│
-13 │ return left + right
+15 │ return left + right
│ ^^^^^^^^^^^^ u32: Value
note:
- ┌─ checked_arithmetic.fe:15:5
+ ┌─ checked_arithmetic.fe:18:5
│
-15 │ ╭ pub fn add_u16(left: u16, right: u16) -> u16:
-16 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 4214429573900255413
+18 │ ╭ pub fn add_u16(left: u16, right: u16) -> u16 {
+19 │ │ return left + right
+20 │ │ }
+ │ ╰─────^ attributes hash: 4214429573900255413
│
= FunctionSignature {
self_decl: None,
@@ -275,25 +280,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:16:16
+ ┌─ checked_arithmetic.fe:19:16
│
-16 │ return left + right
+19 │ return left + right
│ ^^^^ ^^^^^ u16: Value
│ │
│ u16: Value
note:
- ┌─ checked_arithmetic.fe:16:16
+ ┌─ checked_arithmetic.fe:19:16
│
-16 │ return left + right
+19 │ return left + right
│ ^^^^^^^^^^^^ u16: Value
note:
- ┌─ checked_arithmetic.fe:18:5
+ ┌─ checked_arithmetic.fe:22:5
│
-18 │ ╭ pub fn add_u8(left: u8, right: u8) -> u8:
-19 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 3749617961046563034
+22 │ ╭ pub fn add_u8(left: u8, right: u8) -> u8 {
+23 │ │ return left + right
+24 │ │ }
+ │ ╰─────^ attributes hash: 3749617961046563034
│
= FunctionSignature {
self_decl: None,
@@ -332,25 +338,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:19:16
+ ┌─ checked_arithmetic.fe:23:16
│
-19 │ return left + right
+23 │ return left + right
│ ^^^^ ^^^^^ u8: Value
│ │
│ u8: Value
note:
- ┌─ checked_arithmetic.fe:19:16
+ ┌─ checked_arithmetic.fe:23:16
│
-19 │ return left + right
+23 │ return left + right
│ ^^^^^^^^^^^^ u8: Value
note:
- ┌─ checked_arithmetic.fe:21:5
+ ┌─ checked_arithmetic.fe:26:5
│
-21 │ ╭ pub fn add_i256(left: i256, right: i256) -> i256:
-22 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 17908204859155721295
+26 │ ╭ pub fn add_i256(left: i256, right: i256) -> i256 {
+27 │ │ return left + right
+28 │ │ }
+ │ ╰─────^ attributes hash: 17908204859155721295
│
= FunctionSignature {
self_decl: None,
@@ -389,25 +396,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:22:16
+ ┌─ checked_arithmetic.fe:27:16
│
-22 │ return left + right
+27 │ return left + right
│ ^^^^ ^^^^^ i256: Value
│ │
│ i256: Value
note:
- ┌─ checked_arithmetic.fe:22:16
+ ┌─ checked_arithmetic.fe:27:16
│
-22 │ return left + right
+27 │ return left + right
│ ^^^^^^^^^^^^ i256: Value
note:
- ┌─ checked_arithmetic.fe:24:5
+ ┌─ checked_arithmetic.fe:30:5
│
-24 │ ╭ pub fn add_i128(left: i128, right: i128) -> i128:
-25 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 1332431709112937827
+30 │ ╭ pub fn add_i128(left: i128, right: i128) -> i128 {
+31 │ │ return left + right
+32 │ │ }
+ │ ╰─────^ attributes hash: 1332431709112937827
│
= FunctionSignature {
self_decl: None,
@@ -446,25 +454,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:25:16
+ ┌─ checked_arithmetic.fe:31:16
│
-25 │ return left + right
+31 │ return left + right
│ ^^^^ ^^^^^ i128: Value
│ │
│ i128: Value
note:
- ┌─ checked_arithmetic.fe:25:16
+ ┌─ checked_arithmetic.fe:31:16
│
-25 │ return left + right
+31 │ return left + right
│ ^^^^^^^^^^^^ i128: Value
note:
- ┌─ checked_arithmetic.fe:27:5
+ ┌─ checked_arithmetic.fe:34:5
│
-27 │ ╭ pub fn add_i64(left: i64, right: i64) -> i64:
-28 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 3549113083347694903
+34 │ ╭ pub fn add_i64(left: i64, right: i64) -> i64 {
+35 │ │ return left + right
+36 │ │ }
+ │ ╰─────^ attributes hash: 3549113083347694903
│
= FunctionSignature {
self_decl: None,
@@ -503,25 +512,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:28:16
+ ┌─ checked_arithmetic.fe:35:16
│
-28 │ return left + right
+35 │ return left + right
│ ^^^^ ^^^^^ i64: Value
│ │
│ i64: Value
note:
- ┌─ checked_arithmetic.fe:28:16
+ ┌─ checked_arithmetic.fe:35:16
│
-28 │ return left + right
+35 │ return left + right
│ ^^^^^^^^^^^^ i64: Value
note:
- ┌─ checked_arithmetic.fe:30:5
+ ┌─ checked_arithmetic.fe:38:5
│
-30 │ ╭ pub fn add_i32(left: i32, right: i32) -> i32:
-31 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 15117649447142800500
+38 │ ╭ pub fn add_i32(left: i32, right: i32) -> i32 {
+39 │ │ return left + right
+40 │ │ }
+ │ ╰─────^ attributes hash: 15117649447142800500
│
= FunctionSignature {
self_decl: None,
@@ -560,25 +570,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:31:16
+ ┌─ checked_arithmetic.fe:39:16
│
-31 │ return left + right
+39 │ return left + right
│ ^^^^ ^^^^^ i32: Value
│ │
│ i32: Value
note:
- ┌─ checked_arithmetic.fe:31:16
+ ┌─ checked_arithmetic.fe:39:16
│
-31 │ return left + right
+39 │ return left + right
│ ^^^^^^^^^^^^ i32: Value
note:
- ┌─ checked_arithmetic.fe:33:5
+ ┌─ checked_arithmetic.fe:42:5
│
-33 │ ╭ pub fn add_i16(left: i16, right: i16) -> i16:
-34 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 16520261699954225452
+42 │ ╭ pub fn add_i16(left: i16, right: i16) -> i16 {
+43 │ │ return left + right
+44 │ │ }
+ │ ╰─────^ attributes hash: 16520261699954225452
│
= FunctionSignature {
self_decl: None,
@@ -617,25 +628,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:34:16
+ ┌─ checked_arithmetic.fe:43:16
│
-34 │ return left + right
+43 │ return left + right
│ ^^^^ ^^^^^ i16: Value
│ │
│ i16: Value
note:
- ┌─ checked_arithmetic.fe:34:16
+ ┌─ checked_arithmetic.fe:43:16
│
-34 │ return left + right
+43 │ return left + right
│ ^^^^^^^^^^^^ i16: Value
note:
- ┌─ checked_arithmetic.fe:36:5
+ ┌─ checked_arithmetic.fe:46:5
│
-36 │ ╭ pub fn add_i8(left: i8, right: i8) -> i8:
-37 │ │ return left + right
- │ ╰───────────────────────────^ attributes hash: 2984879578165475690
+46 │ ╭ pub fn add_i8(left: i8, right: i8) -> i8 {
+47 │ │ return left + right
+48 │ │ }
+ │ ╰─────^ attributes hash: 2984879578165475690
│
= FunctionSignature {
self_decl: None,
@@ -674,25 +686,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:37:16
+ ┌─ checked_arithmetic.fe:47:16
│
-37 │ return left + right
+47 │ return left + right
│ ^^^^ ^^^^^ i8: Value
│ │
│ i8: Value
note:
- ┌─ checked_arithmetic.fe:37:16
+ ┌─ checked_arithmetic.fe:47:16
│
-37 │ return left + right
+47 │ return left + right
│ ^^^^^^^^^^^^ i8: Value
note:
- ┌─ checked_arithmetic.fe:39:5
+ ┌─ checked_arithmetic.fe:50:5
│
-39 │ ╭ pub fn sub_u256(left: u256, right: u256) -> u256:
-40 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 8877497213208027149
+50 │ ╭ pub fn sub_u256(left: u256, right: u256) -> u256 {
+51 │ │ return left - right
+52 │ │ }
+ │ ╰─────^ attributes hash: 8877497213208027149
│
= FunctionSignature {
self_decl: None,
@@ -731,25 +744,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:40:16
+ ┌─ checked_arithmetic.fe:51:16
│
-40 │ return left - right
+51 │ return left - right
│ ^^^^ ^^^^^ u256: Value
│ │
│ u256: Value
note:
- ┌─ checked_arithmetic.fe:40:16
+ ┌─ checked_arithmetic.fe:51:16
│
-40 │ return left - right
+51 │ return left - right
│ ^^^^^^^^^^^^ u256: Value
note:
- ┌─ checked_arithmetic.fe:42:5
+ ┌─ checked_arithmetic.fe:54:5
│
-42 │ ╭ pub fn sub_u128(left: u128, right: u128) -> u128:
-43 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 11187416061572591496
+54 │ ╭ pub fn sub_u128(left: u128, right: u128) -> u128 {
+55 │ │ return left - right
+56 │ │ }
+ │ ╰─────^ attributes hash: 11187416061572591496
│
= FunctionSignature {
self_decl: None,
@@ -788,25 +802,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:43:16
+ ┌─ checked_arithmetic.fe:55:16
│
-43 │ return left - right
+55 │ return left - right
│ ^^^^ ^^^^^ u128: Value
│ │
│ u128: Value
note:
- ┌─ checked_arithmetic.fe:43:16
+ ┌─ checked_arithmetic.fe:55:16
│
-43 │ return left - right
+55 │ return left - right
│ ^^^^^^^^^^^^ u128: Value
note:
- ┌─ checked_arithmetic.fe:45:5
+ ┌─ checked_arithmetic.fe:58:5
│
-45 │ ╭ pub fn sub_u64(left: u64, right: u64) -> u64:
-46 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 9316585824156398552
+58 │ ╭ pub fn sub_u64(left: u64, right: u64) -> u64 {
+59 │ │ return left - right
+60 │ │ }
+ │ ╰─────^ attributes hash: 9316585824156398552
│
= FunctionSignature {
self_decl: None,
@@ -845,25 +860,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:46:16
+ ┌─ checked_arithmetic.fe:59:16
│
-46 │ return left - right
+59 │ return left - right
│ ^^^^ ^^^^^ u64: Value
│ │
│ u64: Value
note:
- ┌─ checked_arithmetic.fe:46:16
+ ┌─ checked_arithmetic.fe:59:16
│
-46 │ return left - right
+59 │ return left - right
│ ^^^^^^^^^^^^ u64: Value
note:
- ┌─ checked_arithmetic.fe:48:5
+ ┌─ checked_arithmetic.fe:62:5
│
-48 │ ╭ pub fn sub_u32(left: u32, right: u32) -> u32:
-49 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 6948562809403003686
+62 │ ╭ pub fn sub_u32(left: u32, right: u32) -> u32 {
+63 │ │ return left - right
+64 │ │ }
+ │ ╰─────^ attributes hash: 6948562809403003686
│
= FunctionSignature {
self_decl: None,
@@ -902,25 +918,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:49:16
+ ┌─ checked_arithmetic.fe:63:16
│
-49 │ return left - right
+63 │ return left - right
│ ^^^^ ^^^^^ u32: Value
│ │
│ u32: Value
note:
- ┌─ checked_arithmetic.fe:49:16
+ ┌─ checked_arithmetic.fe:63:16
│
-49 │ return left - right
+63 │ return left - right
│ ^^^^^^^^^^^^ u32: Value
note:
- ┌─ checked_arithmetic.fe:51:5
+ ┌─ checked_arithmetic.fe:66:5
│
-51 │ ╭ pub fn sub_u16(left: u16, right: u16) -> u16:
-52 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 4214429573900255413
+66 │ ╭ pub fn sub_u16(left: u16, right: u16) -> u16 {
+67 │ │ return left - right
+68 │ │ }
+ │ ╰─────^ attributes hash: 4214429573900255413
│
= FunctionSignature {
self_decl: None,
@@ -959,25 +976,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:52:16
+ ┌─ checked_arithmetic.fe:67:16
│
-52 │ return left - right
+67 │ return left - right
│ ^^^^ ^^^^^ u16: Value
│ │
│ u16: Value
note:
- ┌─ checked_arithmetic.fe:52:16
+ ┌─ checked_arithmetic.fe:67:16
│
-52 │ return left - right
+67 │ return left - right
│ ^^^^^^^^^^^^ u16: Value
note:
- ┌─ checked_arithmetic.fe:54:5
+ ┌─ checked_arithmetic.fe:70:5
│
-54 │ ╭ pub fn sub_u8(left: u8, right: u8) -> u8:
-55 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 3749617961046563034
+70 │ ╭ pub fn sub_u8(left: u8, right: u8) -> u8 {
+71 │ │ return left - right
+72 │ │ }
+ │ ╰─────^ attributes hash: 3749617961046563034
│
= FunctionSignature {
self_decl: None,
@@ -1016,25 +1034,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:55:16
+ ┌─ checked_arithmetic.fe:71:16
│
-55 │ return left - right
+71 │ return left - right
│ ^^^^ ^^^^^ u8: Value
│ │
│ u8: Value
note:
- ┌─ checked_arithmetic.fe:55:16
+ ┌─ checked_arithmetic.fe:71:16
│
-55 │ return left - right
+71 │ return left - right
│ ^^^^^^^^^^^^ u8: Value
note:
- ┌─ checked_arithmetic.fe:57:5
+ ┌─ checked_arithmetic.fe:74:5
│
-57 │ ╭ pub fn sub_i256(left: i256, right: i256) -> i256:
-58 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 17908204859155721295
+74 │ ╭ pub fn sub_i256(left: i256, right: i256) -> i256 {
+75 │ │ return left - right
+76 │ │ }
+ │ ╰─────^ attributes hash: 17908204859155721295
│
= FunctionSignature {
self_decl: None,
@@ -1073,25 +1092,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:58:16
+ ┌─ checked_arithmetic.fe:75:16
│
-58 │ return left - right
+75 │ return left - right
│ ^^^^ ^^^^^ i256: Value
│ │
│ i256: Value
note:
- ┌─ checked_arithmetic.fe:58:16
+ ┌─ checked_arithmetic.fe:75:16
│
-58 │ return left - right
+75 │ return left - right
│ ^^^^^^^^^^^^ i256: Value
note:
- ┌─ checked_arithmetic.fe:60:5
+ ┌─ checked_arithmetic.fe:78:5
│
-60 │ ╭ pub fn sub_i128(left: i128, right: i128) -> i128:
-61 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 1332431709112937827
+78 │ ╭ pub fn sub_i128(left: i128, right: i128) -> i128 {
+79 │ │ return left - right
+80 │ │ }
+ │ ╰─────^ attributes hash: 1332431709112937827
│
= FunctionSignature {
self_decl: None,
@@ -1130,25 +1150,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:61:16
+ ┌─ checked_arithmetic.fe:79:16
│
-61 │ return left - right
+79 │ return left - right
│ ^^^^ ^^^^^ i128: Value
│ │
│ i128: Value
note:
- ┌─ checked_arithmetic.fe:61:16
+ ┌─ checked_arithmetic.fe:79:16
│
-61 │ return left - right
+79 │ return left - right
│ ^^^^^^^^^^^^ i128: Value
note:
- ┌─ checked_arithmetic.fe:63:5
+ ┌─ checked_arithmetic.fe:82:5
│
-63 │ ╭ pub fn sub_i64(left: i64, right: i64) -> i64:
-64 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 3549113083347694903
+82 │ ╭ pub fn sub_i64(left: i64, right: i64) -> i64 {
+83 │ │ return left - right
+84 │ │ }
+ │ ╰─────^ attributes hash: 3549113083347694903
│
= FunctionSignature {
self_decl: None,
@@ -1187,25 +1208,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:64:16
+ ┌─ checked_arithmetic.fe:83:16
│
-64 │ return left - right
+83 │ return left - right
│ ^^^^ ^^^^^ i64: Value
│ │
│ i64: Value
note:
- ┌─ checked_arithmetic.fe:64:16
+ ┌─ checked_arithmetic.fe:83:16
│
-64 │ return left - right
+83 │ return left - right
│ ^^^^^^^^^^^^ i64: Value
note:
- ┌─ checked_arithmetic.fe:66:5
+ ┌─ checked_arithmetic.fe:86:5
│
-66 │ ╭ pub fn sub_i32(left: i32, right: i32) -> i32:
-67 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 15117649447142800500
+86 │ ╭ pub fn sub_i32(left: i32, right: i32) -> i32 {
+87 │ │ return left - right
+88 │ │ }
+ │ ╰─────^ attributes hash: 15117649447142800500
│
= FunctionSignature {
self_decl: None,
@@ -1244,25 +1266,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:67:16
+ ┌─ checked_arithmetic.fe:87:16
│
-67 │ return left - right
+87 │ return left - right
│ ^^^^ ^^^^^ i32: Value
│ │
│ i32: Value
note:
- ┌─ checked_arithmetic.fe:67:16
+ ┌─ checked_arithmetic.fe:87:16
│
-67 │ return left - right
+87 │ return left - right
│ ^^^^^^^^^^^^ i32: Value
note:
- ┌─ checked_arithmetic.fe:69:5
+ ┌─ checked_arithmetic.fe:90:5
│
-69 │ ╭ pub fn sub_i16(left: i16, right: i16) -> i16:
-70 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 16520261699954225452
+90 │ ╭ pub fn sub_i16(left: i16, right: i16) -> i16 {
+91 │ │ return left - right
+92 │ │ }
+ │ ╰─────^ attributes hash: 16520261699954225452
│
= FunctionSignature {
self_decl: None,
@@ -1301,25 +1324,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:70:16
+ ┌─ checked_arithmetic.fe:91:16
│
-70 │ return left - right
+91 │ return left - right
│ ^^^^ ^^^^^ i16: Value
│ │
│ i16: Value
note:
- ┌─ checked_arithmetic.fe:70:16
+ ┌─ checked_arithmetic.fe:91:16
│
-70 │ return left - right
+91 │ return left - right
│ ^^^^^^^^^^^^ i16: Value
note:
- ┌─ checked_arithmetic.fe:72:5
+ ┌─ checked_arithmetic.fe:94:5
│
-72 │ ╭ pub fn sub_i8(left: i8, right: i8) -> i8:
-73 │ │ return left - right
- │ ╰───────────────────────────^ attributes hash: 2984879578165475690
+94 │ ╭ pub fn sub_i8(left: i8, right: i8) -> i8 {
+95 │ │ return left - right
+96 │ │ }
+ │ ╰─────^ attributes hash: 2984879578165475690
│
= FunctionSignature {
self_decl: None,
@@ -1358,481 +1382,490 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:73:16
+ ┌─ checked_arithmetic.fe:95:16
│
-73 │ return left - right
+95 │ return left - right
│ ^^^^ ^^^^^ i8: Value
│ │
│ i8: Value
note:
- ┌─ checked_arithmetic.fe:73:16
+ ┌─ checked_arithmetic.fe:95:16
│
-73 │ return left - right
+95 │ return left - right
│ ^^^^^^^^^^^^ i8: Value
note:
- ┌─ checked_arithmetic.fe:75:5
- │
-75 │ ╭ pub fn div_u256(left: u256, right: u256) -> u256:
-76 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 8877497213208027149
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "left",
- typ: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "right",
- typ: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- }
+ ┌─ checked_arithmetic.fe:98:5
+ │
+ 98 │ ╭ pub fn div_u256(left: u256, right: u256) -> u256 {
+ 99 │ │ return left / right
+100 │ │ }
+ │ ╰─────^ attributes hash: 8877497213208027149
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "left",
+ typ: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "right",
+ typ: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ checked_arithmetic.fe:76:16
+ ┌─ checked_arithmetic.fe:99:16
│
-76 │ return left / right
+99 │ return left / right
│ ^^^^ ^^^^^ u256: Value
│ │
│ u256: Value
note:
- ┌─ checked_arithmetic.fe:76:16
+ ┌─ checked_arithmetic.fe:99:16
│
-76 │ return left / right
+99 │ return left / right
│ ^^^^^^^^^^^^ u256: Value
note:
- ┌─ checked_arithmetic.fe:78:5
- │
-78 │ ╭ pub fn div_u128(left: u128, right: u128) -> u128:
-79 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 11187416061572591496
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "left",
- typ: Ok(
- Base(
- Numeric(
- U128,
- ),
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "right",
- typ: Ok(
- Base(
- Numeric(
- U128,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Numeric(
- U128,
- ),
- ),
- ),
- }
+ ┌─ checked_arithmetic.fe:102:5
+ │
+102 │ ╭ pub fn div_u128(left: u128, right: u128) -> u128 {
+103 │ │ return left / right
+104 │ │ }
+ │ ╰─────^ attributes hash: 11187416061572591496
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "left",
+ typ: Ok(
+ Base(
+ Numeric(
+ U128,
+ ),
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "right",
+ typ: Ok(
+ Base(
+ Numeric(
+ U128,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U128,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ checked_arithmetic.fe:79:16
- │
-79 │ return left / right
- │ ^^^^ ^^^^^ u128: Value
- │ │
- │ u128: Value
+ ┌─ checked_arithmetic.fe:103:16
+ │
+103 │ return left / right
+ │ ^^^^ ^^^^^ u128: Value
+ │ │
+ │ u128: Value
note:
- ┌─ checked_arithmetic.fe:79:16
- │
-79 │ return left / right
- │ ^^^^^^^^^^^^ u128: Value
+ ┌─ checked_arithmetic.fe:103:16
+ │
+103 │ return left / right
+ │ ^^^^^^^^^^^^ u128: Value
note:
- ┌─ checked_arithmetic.fe:81:5
- │
-81 │ ╭ pub fn div_u64(left: u64, right: u64) -> u64:
-82 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 9316585824156398552
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "left",
- typ: Ok(
- Base(
- Numeric(
- U64,
- ),
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "right",
- typ: Ok(
- Base(
- Numeric(
- U64,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Numeric(
- U64,
- ),
- ),
- ),
- }
+ ┌─ checked_arithmetic.fe:106:5
+ │
+106 │ ╭ pub fn div_u64(left: u64, right: u64) -> u64 {
+107 │ │ return left / right
+108 │ │ }
+ │ ╰─────^ attributes hash: 9316585824156398552
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "left",
+ typ: Ok(
+ Base(
+ Numeric(
+ U64,
+ ),
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "right",
+ typ: Ok(
+ Base(
+ Numeric(
+ U64,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U64,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ checked_arithmetic.fe:82:16
- │
-82 │ return left / right
- │ ^^^^ ^^^^^ u64: Value
- │ │
- │ u64: Value
+ ┌─ checked_arithmetic.fe:107:16
+ │
+107 │ return left / right
+ │ ^^^^ ^^^^^ u64: Value
+ │ │
+ │ u64: Value
note:
- ┌─ checked_arithmetic.fe:82:16
- │
-82 │ return left / right
- │ ^^^^^^^^^^^^ u64: Value
+ ┌─ checked_arithmetic.fe:107:16
+ │
+107 │ return left / right
+ │ ^^^^^^^^^^^^ u64: Value
note:
- ┌─ checked_arithmetic.fe:84:5
- │
-84 │ ╭ pub fn div_u32(left: u32, right: u32) -> u32:
-85 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 6948562809403003686
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "left",
- typ: Ok(
- Base(
- Numeric(
- U32,
- ),
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "right",
- typ: Ok(
- Base(
- Numeric(
- U32,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Numeric(
- U32,
- ),
- ),
- ),
- }
+ ┌─ checked_arithmetic.fe:110:5
+ │
+110 │ ╭ pub fn div_u32(left: u32, right: u32) -> u32 {
+111 │ │ return left / right
+112 │ │ }
+ │ ╰─────^ attributes hash: 6948562809403003686
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "left",
+ typ: Ok(
+ Base(
+ Numeric(
+ U32,
+ ),
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "right",
+ typ: Ok(
+ Base(
+ Numeric(
+ U32,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U32,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ checked_arithmetic.fe:85:16
- │
-85 │ return left / right
- │ ^^^^ ^^^^^ u32: Value
- │ │
- │ u32: Value
+ ┌─ checked_arithmetic.fe:111:16
+ │
+111 │ return left / right
+ │ ^^^^ ^^^^^ u32: Value
+ │ │
+ │ u32: Value
note:
- ┌─ checked_arithmetic.fe:85:16
- │
-85 │ return left / right
- │ ^^^^^^^^^^^^ u32: Value
+ ┌─ checked_arithmetic.fe:111:16
+ │
+111 │ return left / right
+ │ ^^^^^^^^^^^^ u32: Value
note:
- ┌─ checked_arithmetic.fe:87:5
- │
-87 │ ╭ pub fn div_u16(left: u16, right: u16) -> u16:
-88 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 4214429573900255413
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "left",
- typ: Ok(
- Base(
- Numeric(
- U16,
- ),
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "right",
- typ: Ok(
- Base(
- Numeric(
- U16,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Numeric(
- U16,
- ),
- ),
- ),
- }
+ ┌─ checked_arithmetic.fe:114:5
+ │
+114 │ ╭ pub fn div_u16(left: u16, right: u16) -> u16 {
+115 │ │ return left / right
+116 │ │ }
+ │ ╰─────^ attributes hash: 4214429573900255413
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "left",
+ typ: Ok(
+ Base(
+ Numeric(
+ U16,
+ ),
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "right",
+ typ: Ok(
+ Base(
+ Numeric(
+ U16,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U16,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ checked_arithmetic.fe:88:16
- │
-88 │ return left / right
- │ ^^^^ ^^^^^ u16: Value
- │ │
- │ u16: Value
+ ┌─ checked_arithmetic.fe:115:16
+ │
+115 │ return left / right
+ │ ^^^^ ^^^^^ u16: Value
+ │ │
+ │ u16: Value
note:
- ┌─ checked_arithmetic.fe:88:16
- │
-88 │ return left / right
- │ ^^^^^^^^^^^^ u16: Value
+ ┌─ checked_arithmetic.fe:115:16
+ │
+115 │ return left / right
+ │ ^^^^^^^^^^^^ u16: Value
note:
- ┌─ checked_arithmetic.fe:90:5
- │
-90 │ ╭ pub fn div_u8(left: u8, right: u8) -> u8:
-91 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 3749617961046563034
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "left",
- typ: Ok(
- Base(
- Numeric(
- U8,
- ),
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "right",
- typ: Ok(
- Base(
- Numeric(
- U8,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Numeric(
- U8,
- ),
- ),
- ),
- }
+ ┌─ checked_arithmetic.fe:118:5
+ │
+118 │ ╭ pub fn div_u8(left: u8, right: u8) -> u8 {
+119 │ │ return left / right
+120 │ │ }
+ │ ╰─────^ attributes hash: 3749617961046563034
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "left",
+ typ: Ok(
+ Base(
+ Numeric(
+ U8,
+ ),
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "right",
+ typ: Ok(
+ Base(
+ Numeric(
+ U8,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U8,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ checked_arithmetic.fe:91:16
- │
-91 │ return left / right
- │ ^^^^ ^^^^^ u8: Value
- │ │
- │ u8: Value
+ ┌─ checked_arithmetic.fe:119:16
+ │
+119 │ return left / right
+ │ ^^^^ ^^^^^ u8: Value
+ │ │
+ │ u8: Value
note:
- ┌─ checked_arithmetic.fe:91:16
- │
-91 │ return left / right
- │ ^^^^^^^^^^^^ u8: Value
+ ┌─ checked_arithmetic.fe:119:16
+ │
+119 │ return left / right
+ │ ^^^^^^^^^^^^ u8: Value
note:
- ┌─ checked_arithmetic.fe:93:5
- │
-93 │ ╭ pub fn div_i256(left: i256, right: i256) -> i256:
-94 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 17908204859155721295
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "left",
- typ: Ok(
- Base(
- Numeric(
- I256,
- ),
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "right",
- typ: Ok(
- Base(
- Numeric(
- I256,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Numeric(
- I256,
- ),
- ),
- ),
- }
+ ┌─ checked_arithmetic.fe:122:5
+ │
+122 │ ╭ pub fn div_i256(left: i256, right: i256) -> i256 {
+123 │ │ return left / right
+124 │ │ }
+ │ ╰─────^ attributes hash: 17908204859155721295
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "left",
+ typ: Ok(
+ Base(
+ Numeric(
+ I256,
+ ),
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "right",
+ typ: Ok(
+ Base(
+ Numeric(
+ I256,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Numeric(
+ I256,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ checked_arithmetic.fe:94:16
- │
-94 │ return left / right
- │ ^^^^ ^^^^^ i256: Value
- │ │
- │ i256: Value
+ ┌─ checked_arithmetic.fe:123:16
+ │
+123 │ return left / right
+ │ ^^^^ ^^^^^ i256: Value
+ │ │
+ │ i256: Value
note:
- ┌─ checked_arithmetic.fe:94:16
- │
-94 │ return left / right
- │ ^^^^^^^^^^^^ i256: Value
+ ┌─ checked_arithmetic.fe:123:16
+ │
+123 │ return left / right
+ │ ^^^^^^^^^^^^ i256: Value
note:
- ┌─ checked_arithmetic.fe:96:5
- │
-96 │ ╭ pub fn div_i128(left: i128, right: i128) -> i128:
-97 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 1332431709112937827
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "left",
- typ: Ok(
- Base(
- Numeric(
- I128,
- ),
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "right",
- typ: Ok(
- Base(
- Numeric(
- I128,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Numeric(
- I128,
- ),
- ),
- ),
- }
+ ┌─ checked_arithmetic.fe:126:5
+ │
+126 │ ╭ pub fn div_i128(left: i128, right: i128) -> i128 {
+127 │ │ return left / right
+128 │ │ }
+ │ ╰─────^ attributes hash: 1332431709112937827
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "left",
+ typ: Ok(
+ Base(
+ Numeric(
+ I128,
+ ),
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "right",
+ typ: Ok(
+ Base(
+ Numeric(
+ I128,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Numeric(
+ I128,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ checked_arithmetic.fe:97:16
- │
-97 │ return left / right
- │ ^^^^ ^^^^^ i128: Value
- │ │
- │ i128: Value
+ ┌─ checked_arithmetic.fe:127:16
+ │
+127 │ return left / right
+ │ ^^^^ ^^^^^ i128: Value
+ │ │
+ │ i128: Value
note:
- ┌─ checked_arithmetic.fe:97:16
- │
-97 │ return left / right
- │ ^^^^^^^^^^^^ i128: Value
+ ┌─ checked_arithmetic.fe:127:16
+ │
+127 │ return left / right
+ │ ^^^^^^^^^^^^ i128: Value
note:
- ┌─ checked_arithmetic.fe:99:5
+ ┌─ checked_arithmetic.fe:130:5
│
- 99 │ ╭ pub fn div_i64(left: i64, right: i64) -> i64:
-100 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 3549113083347694903
+130 │ ╭ pub fn div_i64(left: i64, right: i64) -> i64 {
+131 │ │ return left / right
+132 │ │ }
+ │ ╰─────^ attributes hash: 3549113083347694903
│
= FunctionSignature {
self_decl: None,
@@ -1871,25 +1904,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:100:16
+ ┌─ checked_arithmetic.fe:131:16
│
-100 │ return left / right
+131 │ return left / right
│ ^^^^ ^^^^^ i64: Value
│ │
│ i64: Value
note:
- ┌─ checked_arithmetic.fe:100:16
+ ┌─ checked_arithmetic.fe:131:16
│
-100 │ return left / right
+131 │ return left / right
│ ^^^^^^^^^^^^ i64: Value
note:
- ┌─ checked_arithmetic.fe:102:5
+ ┌─ checked_arithmetic.fe:134:5
│
-102 │ ╭ pub fn div_i32(left: i32, right: i32) -> i32:
-103 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 15117649447142800500
+134 │ ╭ pub fn div_i32(left: i32, right: i32) -> i32 {
+135 │ │ return left / right
+136 │ │ }
+ │ ╰─────^ attributes hash: 15117649447142800500
│
= FunctionSignature {
self_decl: None,
@@ -1928,25 +1962,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:103:16
+ ┌─ checked_arithmetic.fe:135:16
│
-103 │ return left / right
+135 │ return left / right
│ ^^^^ ^^^^^ i32: Value
│ │
│ i32: Value
note:
- ┌─ checked_arithmetic.fe:103:16
+ ┌─ checked_arithmetic.fe:135:16
│
-103 │ return left / right
+135 │ return left / right
│ ^^^^^^^^^^^^ i32: Value
note:
- ┌─ checked_arithmetic.fe:105:5
+ ┌─ checked_arithmetic.fe:138:5
│
-105 │ ╭ pub fn div_i16(left: i16, right: i16) -> i16:
-106 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 16520261699954225452
+138 │ ╭ pub fn div_i16(left: i16, right: i16) -> i16 {
+139 │ │ return left / right
+140 │ │ }
+ │ ╰─────^ attributes hash: 16520261699954225452
│
= FunctionSignature {
self_decl: None,
@@ -1985,25 +2020,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:106:16
+ ┌─ checked_arithmetic.fe:139:16
│
-106 │ return left / right
+139 │ return left / right
│ ^^^^ ^^^^^ i16: Value
│ │
│ i16: Value
note:
- ┌─ checked_arithmetic.fe:106:16
+ ┌─ checked_arithmetic.fe:139:16
│
-106 │ return left / right
+139 │ return left / right
│ ^^^^^^^^^^^^ i16: Value
note:
- ┌─ checked_arithmetic.fe:108:5
+ ┌─ checked_arithmetic.fe:142:5
│
-108 │ ╭ pub fn div_i8(left: i8, right: i8) -> i8:
-109 │ │ return left / right
- │ ╰───────────────────────────^ attributes hash: 2984879578165475690
+142 │ ╭ pub fn div_i8(left: i8, right: i8) -> i8 {
+143 │ │ return left / right
+144 │ │ }
+ │ ╰─────^ attributes hash: 2984879578165475690
│
= FunctionSignature {
self_decl: None,
@@ -2042,25 +2078,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:109:16
+ ┌─ checked_arithmetic.fe:143:16
│
-109 │ return left / right
+143 │ return left / right
│ ^^^^ ^^^^^ i8: Value
│ │
│ i8: Value
note:
- ┌─ checked_arithmetic.fe:109:16
+ ┌─ checked_arithmetic.fe:143:16
│
-109 │ return left / right
+143 │ return left / right
│ ^^^^^^^^^^^^ i8: Value
note:
- ┌─ checked_arithmetic.fe:111:5
+ ┌─ checked_arithmetic.fe:146:5
│
-111 │ ╭ pub fn mul_u256(left: u256, right: u256) -> u256:
-112 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 8877497213208027149
+146 │ ╭ pub fn mul_u256(left: u256, right: u256) -> u256 {
+147 │ │ return left * right
+148 │ │ }
+ │ ╰─────^ attributes hash: 8877497213208027149
│
= FunctionSignature {
self_decl: None,
@@ -2099,25 +2136,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:112:16
+ ┌─ checked_arithmetic.fe:147:16
│
-112 │ return left * right
+147 │ return left * right
│ ^^^^ ^^^^^ u256: Value
│ │
│ u256: Value
note:
- ┌─ checked_arithmetic.fe:112:16
+ ┌─ checked_arithmetic.fe:147:16
│
-112 │ return left * right
+147 │ return left * right
│ ^^^^^^^^^^^^ u256: Value
note:
- ┌─ checked_arithmetic.fe:114:5
+ ┌─ checked_arithmetic.fe:150:5
│
-114 │ ╭ pub fn mul_u128(left: u128, right: u128) -> u128:
-115 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 11187416061572591496
+150 │ ╭ pub fn mul_u128(left: u128, right: u128) -> u128 {
+151 │ │ return left * right
+152 │ │ }
+ │ ╰─────^ attributes hash: 11187416061572591496
│
= FunctionSignature {
self_decl: None,
@@ -2156,25 +2194,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:115:16
+ ┌─ checked_arithmetic.fe:151:16
│
-115 │ return left * right
+151 │ return left * right
│ ^^^^ ^^^^^ u128: Value
│ │
│ u128: Value
note:
- ┌─ checked_arithmetic.fe:115:16
+ ┌─ checked_arithmetic.fe:151:16
│
-115 │ return left * right
+151 │ return left * right
│ ^^^^^^^^^^^^ u128: Value
note:
- ┌─ checked_arithmetic.fe:117:5
+ ┌─ checked_arithmetic.fe:154:5
│
-117 │ ╭ pub fn mul_u64(left: u64, right: u64) -> u64:
-118 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 9316585824156398552
+154 │ ╭ pub fn mul_u64(left: u64, right: u64) -> u64 {
+155 │ │ return left * right
+156 │ │ }
+ │ ╰─────^ attributes hash: 9316585824156398552
│
= FunctionSignature {
self_decl: None,
@@ -2213,25 +2252,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:118:16
+ ┌─ checked_arithmetic.fe:155:16
│
-118 │ return left * right
+155 │ return left * right
│ ^^^^ ^^^^^ u64: Value
│ │
│ u64: Value
note:
- ┌─ checked_arithmetic.fe:118:16
+ ┌─ checked_arithmetic.fe:155:16
│
-118 │ return left * right
+155 │ return left * right
│ ^^^^^^^^^^^^ u64: Value
note:
- ┌─ checked_arithmetic.fe:120:5
+ ┌─ checked_arithmetic.fe:158:5
│
-120 │ ╭ pub fn mul_u32(left: u32, right: u32) -> u32:
-121 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 6948562809403003686
+158 │ ╭ pub fn mul_u32(left: u32, right: u32) -> u32 {
+159 │ │ return left * right
+160 │ │ }
+ │ ╰─────^ attributes hash: 6948562809403003686
│
= FunctionSignature {
self_decl: None,
@@ -2270,25 +2310,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:121:16
+ ┌─ checked_arithmetic.fe:159:16
│
-121 │ return left * right
+159 │ return left * right
│ ^^^^ ^^^^^ u32: Value
│ │
│ u32: Value
note:
- ┌─ checked_arithmetic.fe:121:16
+ ┌─ checked_arithmetic.fe:159:16
│
-121 │ return left * right
+159 │ return left * right
│ ^^^^^^^^^^^^ u32: Value
note:
- ┌─ checked_arithmetic.fe:123:5
+ ┌─ checked_arithmetic.fe:162:5
│
-123 │ ╭ pub fn mul_u16(left: u16, right: u16) -> u16:
-124 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 4214429573900255413
+162 │ ╭ pub fn mul_u16(left: u16, right: u16) -> u16 {
+163 │ │ return left * right
+164 │ │ }
+ │ ╰─────^ attributes hash: 4214429573900255413
│
= FunctionSignature {
self_decl: None,
@@ -2327,25 +2368,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:124:16
+ ┌─ checked_arithmetic.fe:163:16
│
-124 │ return left * right
+163 │ return left * right
│ ^^^^ ^^^^^ u16: Value
│ │
│ u16: Value
note:
- ┌─ checked_arithmetic.fe:124:16
+ ┌─ checked_arithmetic.fe:163:16
│
-124 │ return left * right
+163 │ return left * right
│ ^^^^^^^^^^^^ u16: Value
note:
- ┌─ checked_arithmetic.fe:126:5
+ ┌─ checked_arithmetic.fe:166:5
│
-126 │ ╭ pub fn mul_u8(left: u8, right: u8) -> u8:
-127 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 3749617961046563034
+166 │ ╭ pub fn mul_u8(left: u8, right: u8) -> u8 {
+167 │ │ return left * right
+168 │ │ }
+ │ ╰─────^ attributes hash: 3749617961046563034
│
= FunctionSignature {
self_decl: None,
@@ -2384,25 +2426,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:127:16
+ ┌─ checked_arithmetic.fe:167:16
│
-127 │ return left * right
+167 │ return left * right
│ ^^^^ ^^^^^ u8: Value
│ │
│ u8: Value
note:
- ┌─ checked_arithmetic.fe:127:16
+ ┌─ checked_arithmetic.fe:167:16
│
-127 │ return left * right
+167 │ return left * right
│ ^^^^^^^^^^^^ u8: Value
note:
- ┌─ checked_arithmetic.fe:129:5
+ ┌─ checked_arithmetic.fe:170:5
│
-129 │ ╭ pub fn mul_i256(left: i256, right: i256) -> i256:
-130 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 17908204859155721295
+170 │ ╭ pub fn mul_i256(left: i256, right: i256) -> i256 {
+171 │ │ return left * right
+172 │ │ }
+ │ ╰─────^ attributes hash: 17908204859155721295
│
= FunctionSignature {
self_decl: None,
@@ -2441,25 +2484,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:130:16
+ ┌─ checked_arithmetic.fe:171:16
│
-130 │ return left * right
+171 │ return left * right
│ ^^^^ ^^^^^ i256: Value
│ │
│ i256: Value
note:
- ┌─ checked_arithmetic.fe:130:16
+ ┌─ checked_arithmetic.fe:171:16
│
-130 │ return left * right
+171 │ return left * right
│ ^^^^^^^^^^^^ i256: Value
note:
- ┌─ checked_arithmetic.fe:132:5
+ ┌─ checked_arithmetic.fe:174:5
│
-132 │ ╭ pub fn mul_i128(left: i128, right: i128) -> i128:
-133 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 1332431709112937827
+174 │ ╭ pub fn mul_i128(left: i128, right: i128) -> i128 {
+175 │ │ return left * right
+176 │ │ }
+ │ ╰─────^ attributes hash: 1332431709112937827
│
= FunctionSignature {
self_decl: None,
@@ -2498,25 +2542,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:133:16
+ ┌─ checked_arithmetic.fe:175:16
│
-133 │ return left * right
+175 │ return left * right
│ ^^^^ ^^^^^ i128: Value
│ │
│ i128: Value
note:
- ┌─ checked_arithmetic.fe:133:16
+ ┌─ checked_arithmetic.fe:175:16
│
-133 │ return left * right
+175 │ return left * right
│ ^^^^^^^^^^^^ i128: Value
note:
- ┌─ checked_arithmetic.fe:135:5
+ ┌─ checked_arithmetic.fe:178:5
│
-135 │ ╭ pub fn mul_i64(left: i64, right: i64) -> i64:
-136 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 3549113083347694903
+178 │ ╭ pub fn mul_i64(left: i64, right: i64) -> i64 {
+179 │ │ return left * right
+180 │ │ }
+ │ ╰─────^ attributes hash: 3549113083347694903
│
= FunctionSignature {
self_decl: None,
@@ -2555,25 +2600,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:136:16
+ ┌─ checked_arithmetic.fe:179:16
│
-136 │ return left * right
+179 │ return left * right
│ ^^^^ ^^^^^ i64: Value
│ │
│ i64: Value
note:
- ┌─ checked_arithmetic.fe:136:16
+ ┌─ checked_arithmetic.fe:179:16
│
-136 │ return left * right
+179 │ return left * right
│ ^^^^^^^^^^^^ i64: Value
note:
- ┌─ checked_arithmetic.fe:138:5
+ ┌─ checked_arithmetic.fe:182:5
│
-138 │ ╭ pub fn mul_i32(left: i32, right: i32) -> i32:
-139 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 15117649447142800500
+182 │ ╭ pub fn mul_i32(left: i32, right: i32) -> i32 {
+183 │ │ return left * right
+184 │ │ }
+ │ ╰─────^ attributes hash: 15117649447142800500
│
= FunctionSignature {
self_decl: None,
@@ -2612,25 +2658,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:139:16
+ ┌─ checked_arithmetic.fe:183:16
│
-139 │ return left * right
+183 │ return left * right
│ ^^^^ ^^^^^ i32: Value
│ │
│ i32: Value
note:
- ┌─ checked_arithmetic.fe:139:16
+ ┌─ checked_arithmetic.fe:183:16
│
-139 │ return left * right
+183 │ return left * right
│ ^^^^^^^^^^^^ i32: Value
note:
- ┌─ checked_arithmetic.fe:141:5
+ ┌─ checked_arithmetic.fe:186:5
│
-141 │ ╭ pub fn mul_i16(left: i16, right: i16) -> i16:
-142 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 16520261699954225452
+186 │ ╭ pub fn mul_i16(left: i16, right: i16) -> i16 {
+187 │ │ return left * right
+188 │ │ }
+ │ ╰─────^ attributes hash: 16520261699954225452
│
= FunctionSignature {
self_decl: None,
@@ -2669,25 +2716,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:142:16
+ ┌─ checked_arithmetic.fe:187:16
│
-142 │ return left * right
+187 │ return left * right
│ ^^^^ ^^^^^ i16: Value
│ │
│ i16: Value
note:
- ┌─ checked_arithmetic.fe:142:16
+ ┌─ checked_arithmetic.fe:187:16
│
-142 │ return left * right
+187 │ return left * right
│ ^^^^^^^^^^^^ i16: Value
note:
- ┌─ checked_arithmetic.fe:144:5
+ ┌─ checked_arithmetic.fe:190:5
│
-144 │ ╭ pub fn mul_i8(left: i8, right: i8) -> i8:
-145 │ │ return left * right
- │ ╰───────────────────────────^ attributes hash: 2984879578165475690
+190 │ ╭ pub fn mul_i8(left: i8, right: i8) -> i8 {
+191 │ │ return left * right
+192 │ │ }
+ │ ╰─────^ attributes hash: 2984879578165475690
│
= FunctionSignature {
self_decl: None,
@@ -2726,25 +2774,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:145:16
+ ┌─ checked_arithmetic.fe:191:16
│
-145 │ return left * right
+191 │ return left * right
│ ^^^^ ^^^^^ i8: Value
│ │
│ i8: Value
note:
- ┌─ checked_arithmetic.fe:145:16
+ ┌─ checked_arithmetic.fe:191:16
│
-145 │ return left * right
+191 │ return left * right
│ ^^^^^^^^^^^^ i8: Value
note:
- ┌─ checked_arithmetic.fe:147:5
+ ┌─ checked_arithmetic.fe:194:5
│
-147 │ ╭ pub fn mod_u256(left: u256, right: u256) -> u256:
-148 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 8877497213208027149
+194 │ ╭ pub fn mod_u256(left: u256, right: u256) -> u256 {
+195 │ │ return left % right
+196 │ │ }
+ │ ╰─────^ attributes hash: 8877497213208027149
│
= FunctionSignature {
self_decl: None,
@@ -2783,25 +2832,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:148:16
+ ┌─ checked_arithmetic.fe:195:16
│
-148 │ return left % right
+195 │ return left % right
│ ^^^^ ^^^^^ u256: Value
│ │
│ u256: Value
note:
- ┌─ checked_arithmetic.fe:148:16
+ ┌─ checked_arithmetic.fe:195:16
│
-148 │ return left % right
+195 │ return left % right
│ ^^^^^^^^^^^^ u256: Value
note:
- ┌─ checked_arithmetic.fe:150:5
+ ┌─ checked_arithmetic.fe:198:5
│
-150 │ ╭ pub fn mod_u128(left: u128, right: u128) -> u128:
-151 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 11187416061572591496
+198 │ ╭ pub fn mod_u128(left: u128, right: u128) -> u128 {
+199 │ │ return left % right
+200 │ │ }
+ │ ╰─────^ attributes hash: 11187416061572591496
│
= FunctionSignature {
self_decl: None,
@@ -2840,25 +2890,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:151:16
+ ┌─ checked_arithmetic.fe:199:16
│
-151 │ return left % right
+199 │ return left % right
│ ^^^^ ^^^^^ u128: Value
│ │
│ u128: Value
note:
- ┌─ checked_arithmetic.fe:151:16
+ ┌─ checked_arithmetic.fe:199:16
│
-151 │ return left % right
+199 │ return left % right
│ ^^^^^^^^^^^^ u128: Value
note:
- ┌─ checked_arithmetic.fe:153:5
+ ┌─ checked_arithmetic.fe:202:5
│
-153 │ ╭ pub fn mod_u64(left: u64, right: u64) -> u64:
-154 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 9316585824156398552
+202 │ ╭ pub fn mod_u64(left: u64, right: u64) -> u64 {
+203 │ │ return left % right
+204 │ │ }
+ │ ╰─────^ attributes hash: 9316585824156398552
│
= FunctionSignature {
self_decl: None,
@@ -2897,25 +2948,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:154:16
+ ┌─ checked_arithmetic.fe:203:16
│
-154 │ return left % right
+203 │ return left % right
│ ^^^^ ^^^^^ u64: Value
│ │
│ u64: Value
note:
- ┌─ checked_arithmetic.fe:154:16
+ ┌─ checked_arithmetic.fe:203:16
│
-154 │ return left % right
+203 │ return left % right
│ ^^^^^^^^^^^^ u64: Value
note:
- ┌─ checked_arithmetic.fe:156:5
+ ┌─ checked_arithmetic.fe:206:5
│
-156 │ ╭ pub fn mod_u32(left: u32, right: u32) -> u32:
-157 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 6948562809403003686
+206 │ ╭ pub fn mod_u32(left: u32, right: u32) -> u32 {
+207 │ │ return left % right
+208 │ │ }
+ │ ╰─────^ attributes hash: 6948562809403003686
│
= FunctionSignature {
self_decl: None,
@@ -2954,25 +3006,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:157:16
+ ┌─ checked_arithmetic.fe:207:16
│
-157 │ return left % right
+207 │ return left % right
│ ^^^^ ^^^^^ u32: Value
│ │
│ u32: Value
note:
- ┌─ checked_arithmetic.fe:157:16
+ ┌─ checked_arithmetic.fe:207:16
│
-157 │ return left % right
+207 │ return left % right
│ ^^^^^^^^^^^^ u32: Value
note:
- ┌─ checked_arithmetic.fe:159:5
+ ┌─ checked_arithmetic.fe:210:5
│
-159 │ ╭ pub fn mod_u16(left: u16, right: u16) -> u16:
-160 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 4214429573900255413
+210 │ ╭ pub fn mod_u16(left: u16, right: u16) -> u16 {
+211 │ │ return left % right
+212 │ │ }
+ │ ╰─────^ attributes hash: 4214429573900255413
│
= FunctionSignature {
self_decl: None,
@@ -3011,25 +3064,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:160:16
+ ┌─ checked_arithmetic.fe:211:16
│
-160 │ return left % right
+211 │ return left % right
│ ^^^^ ^^^^^ u16: Value
│ │
│ u16: Value
note:
- ┌─ checked_arithmetic.fe:160:16
+ ┌─ checked_arithmetic.fe:211:16
│
-160 │ return left % right
+211 │ return left % right
│ ^^^^^^^^^^^^ u16: Value
note:
- ┌─ checked_arithmetic.fe:162:5
+ ┌─ checked_arithmetic.fe:214:5
│
-162 │ ╭ pub fn mod_u8(left: u8, right: u8) -> u8:
-163 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 3749617961046563034
+214 │ ╭ pub fn mod_u8(left: u8, right: u8) -> u8 {
+215 │ │ return left % right
+216 │ │ }
+ │ ╰─────^ attributes hash: 3749617961046563034
│
= FunctionSignature {
self_decl: None,
@@ -3068,25 +3122,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:163:16
+ ┌─ checked_arithmetic.fe:215:16
│
-163 │ return left % right
+215 │ return left % right
│ ^^^^ ^^^^^ u8: Value
│ │
│ u8: Value
note:
- ┌─ checked_arithmetic.fe:163:16
+ ┌─ checked_arithmetic.fe:215:16
│
-163 │ return left % right
+215 │ return left % right
│ ^^^^^^^^^^^^ u8: Value
note:
- ┌─ checked_arithmetic.fe:165:5
+ ┌─ checked_arithmetic.fe:218:5
│
-165 │ ╭ pub fn mod_i256(left: i256, right: i256) -> i256:
-166 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 17908204859155721295
+218 │ ╭ pub fn mod_i256(left: i256, right: i256) -> i256 {
+219 │ │ return left % right
+220 │ │ }
+ │ ╰─────^ attributes hash: 17908204859155721295
│
= FunctionSignature {
self_decl: None,
@@ -3125,25 +3180,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:166:16
+ ┌─ checked_arithmetic.fe:219:16
│
-166 │ return left % right
+219 │ return left % right
│ ^^^^ ^^^^^ i256: Value
│ │
│ i256: Value
note:
- ┌─ checked_arithmetic.fe:166:16
+ ┌─ checked_arithmetic.fe:219:16
│
-166 │ return left % right
+219 │ return left % right
│ ^^^^^^^^^^^^ i256: Value
note:
- ┌─ checked_arithmetic.fe:168:5
+ ┌─ checked_arithmetic.fe:222:5
│
-168 │ ╭ pub fn mod_i128(left: i128, right: i128) -> i128:
-169 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 1332431709112937827
+222 │ ╭ pub fn mod_i128(left: i128, right: i128) -> i128 {
+223 │ │ return left % right
+224 │ │ }
+ │ ╰─────^ attributes hash: 1332431709112937827
│
= FunctionSignature {
self_decl: None,
@@ -3182,25 +3238,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:169:16
+ ┌─ checked_arithmetic.fe:223:16
│
-169 │ return left % right
+223 │ return left % right
│ ^^^^ ^^^^^ i128: Value
│ │
│ i128: Value
note:
- ┌─ checked_arithmetic.fe:169:16
+ ┌─ checked_arithmetic.fe:223:16
│
-169 │ return left % right
+223 │ return left % right
│ ^^^^^^^^^^^^ i128: Value
note:
- ┌─ checked_arithmetic.fe:171:5
+ ┌─ checked_arithmetic.fe:226:5
│
-171 │ ╭ pub fn mod_i64(left: i64, right: i64) -> i64:
-172 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 3549113083347694903
+226 │ ╭ pub fn mod_i64(left: i64, right: i64) -> i64 {
+227 │ │ return left % right
+228 │ │ }
+ │ ╰─────^ attributes hash: 3549113083347694903
│
= FunctionSignature {
self_decl: None,
@@ -3239,25 +3296,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:172:16
+ ┌─ checked_arithmetic.fe:227:16
│
-172 │ return left % right
+227 │ return left % right
│ ^^^^ ^^^^^ i64: Value
│ │
│ i64: Value
note:
- ┌─ checked_arithmetic.fe:172:16
+ ┌─ checked_arithmetic.fe:227:16
│
-172 │ return left % right
+227 │ return left % right
│ ^^^^^^^^^^^^ i64: Value
note:
- ┌─ checked_arithmetic.fe:174:5
+ ┌─ checked_arithmetic.fe:230:5
│
-174 │ ╭ pub fn mod_i32(left: i32, right: i32) -> i32:
-175 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 15117649447142800500
+230 │ ╭ pub fn mod_i32(left: i32, right: i32) -> i32 {
+231 │ │ return left % right
+232 │ │ }
+ │ ╰─────^ attributes hash: 15117649447142800500
│
= FunctionSignature {
self_decl: None,
@@ -3296,25 +3354,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:175:16
+ ┌─ checked_arithmetic.fe:231:16
│
-175 │ return left % right
+231 │ return left % right
│ ^^^^ ^^^^^ i32: Value
│ │
│ i32: Value
note:
- ┌─ checked_arithmetic.fe:175:16
+ ┌─ checked_arithmetic.fe:231:16
│
-175 │ return left % right
+231 │ return left % right
│ ^^^^^^^^^^^^ i32: Value
note:
- ┌─ checked_arithmetic.fe:177:5
+ ┌─ checked_arithmetic.fe:234:5
│
-177 │ ╭ pub fn mod_i16(left: i16, right: i16) -> i16:
-178 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 16520261699954225452
+234 │ ╭ pub fn mod_i16(left: i16, right: i16) -> i16 {
+235 │ │ return left % right
+236 │ │ }
+ │ ╰─────^ attributes hash: 16520261699954225452
│
= FunctionSignature {
self_decl: None,
@@ -3353,25 +3412,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:178:16
+ ┌─ checked_arithmetic.fe:235:16
│
-178 │ return left % right
+235 │ return left % right
│ ^^^^ ^^^^^ i16: Value
│ │
│ i16: Value
note:
- ┌─ checked_arithmetic.fe:178:16
+ ┌─ checked_arithmetic.fe:235:16
│
-178 │ return left % right
+235 │ return left % right
│ ^^^^^^^^^^^^ i16: Value
note:
- ┌─ checked_arithmetic.fe:180:5
+ ┌─ checked_arithmetic.fe:238:5
│
-180 │ ╭ pub fn mod_i8(left: i8, right: i8) -> i8:
-181 │ │ return left % right
- │ ╰───────────────────────────^ attributes hash: 2984879578165475690
+238 │ ╭ pub fn mod_i8(left: i8, right: i8) -> i8 {
+239 │ │ return left % right
+240 │ │ }
+ │ ╰─────^ attributes hash: 2984879578165475690
│
= FunctionSignature {
self_decl: None,
@@ -3410,25 +3470,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:181:16
+ ┌─ checked_arithmetic.fe:239:16
│
-181 │ return left % right
+239 │ return left % right
│ ^^^^ ^^^^^ i8: Value
│ │
│ i8: Value
note:
- ┌─ checked_arithmetic.fe:181:16
+ ┌─ checked_arithmetic.fe:239:16
│
-181 │ return left % right
+239 │ return left % right
│ ^^^^^^^^^^^^ i8: Value
note:
- ┌─ checked_arithmetic.fe:183:5
+ ┌─ checked_arithmetic.fe:242:5
│
-183 │ ╭ pub fn pow_u256(left: u256, right: u256) -> u256:
-184 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 8877497213208027149
+242 │ ╭ pub fn pow_u256(left: u256, right: u256) -> u256 {
+243 │ │ return left ** right
+244 │ │ }
+ │ ╰─────^ attributes hash: 8877497213208027149
│
= FunctionSignature {
self_decl: None,
@@ -3467,25 +3528,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:184:16
+ ┌─ checked_arithmetic.fe:243:16
│
-184 │ return left ** right
+243 │ return left ** right
│ ^^^^ ^^^^^ u256: Value
│ │
│ u256: Value
note:
- ┌─ checked_arithmetic.fe:184:16
+ ┌─ checked_arithmetic.fe:243:16
│
-184 │ return left ** right
+243 │ return left ** right
│ ^^^^^^^^^^^^^ u256: Value
note:
- ┌─ checked_arithmetic.fe:186:5
+ ┌─ checked_arithmetic.fe:246:5
│
-186 │ ╭ pub fn pow_u128(left: u128, right: u128) -> u128:
-187 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 11187416061572591496
+246 │ ╭ pub fn pow_u128(left: u128, right: u128) -> u128 {
+247 │ │ return left ** right
+248 │ │ }
+ │ ╰─────^ attributes hash: 11187416061572591496
│
= FunctionSignature {
self_decl: None,
@@ -3524,25 +3586,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:187:16
+ ┌─ checked_arithmetic.fe:247:16
│
-187 │ return left ** right
+247 │ return left ** right
│ ^^^^ ^^^^^ u128: Value
│ │
│ u128: Value
note:
- ┌─ checked_arithmetic.fe:187:16
+ ┌─ checked_arithmetic.fe:247:16
│
-187 │ return left ** right
+247 │ return left ** right
│ ^^^^^^^^^^^^^ u128: Value
note:
- ┌─ checked_arithmetic.fe:189:5
+ ┌─ checked_arithmetic.fe:250:5
│
-189 │ ╭ pub fn pow_u64(left: u64, right: u64) -> u64:
-190 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 9316585824156398552
+250 │ ╭ pub fn pow_u64(left: u64, right: u64) -> u64 {
+251 │ │ return left ** right
+252 │ │ }
+ │ ╰─────^ attributes hash: 9316585824156398552
│
= FunctionSignature {
self_decl: None,
@@ -3581,25 +3644,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:190:16
+ ┌─ checked_arithmetic.fe:251:16
│
-190 │ return left ** right
+251 │ return left ** right
│ ^^^^ ^^^^^ u64: Value
│ │
│ u64: Value
note:
- ┌─ checked_arithmetic.fe:190:16
+ ┌─ checked_arithmetic.fe:251:16
│
-190 │ return left ** right
+251 │ return left ** right
│ ^^^^^^^^^^^^^ u64: Value
note:
- ┌─ checked_arithmetic.fe:192:5
+ ┌─ checked_arithmetic.fe:254:5
│
-192 │ ╭ pub fn pow_u32(left: u32, right: u32) -> u32:
-193 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 6948562809403003686
+254 │ ╭ pub fn pow_u32(left: u32, right: u32) -> u32 {
+255 │ │ return left ** right
+256 │ │ }
+ │ ╰─────^ attributes hash: 6948562809403003686
│
= FunctionSignature {
self_decl: None,
@@ -3638,25 +3702,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:193:16
+ ┌─ checked_arithmetic.fe:255:16
│
-193 │ return left ** right
+255 │ return left ** right
│ ^^^^ ^^^^^ u32: Value
│ │
│ u32: Value
note:
- ┌─ checked_arithmetic.fe:193:16
+ ┌─ checked_arithmetic.fe:255:16
│
-193 │ return left ** right
+255 │ return left ** right
│ ^^^^^^^^^^^^^ u32: Value
note:
- ┌─ checked_arithmetic.fe:195:5
+ ┌─ checked_arithmetic.fe:258:5
│
-195 │ ╭ pub fn pow_u16(left: u16, right: u16) -> u16:
-196 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 4214429573900255413
+258 │ ╭ pub fn pow_u16(left: u16, right: u16) -> u16 {
+259 │ │ return left ** right
+260 │ │ }
+ │ ╰─────^ attributes hash: 4214429573900255413
│
= FunctionSignature {
self_decl: None,
@@ -3695,25 +3760,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:196:16
+ ┌─ checked_arithmetic.fe:259:16
│
-196 │ return left ** right
+259 │ return left ** right
│ ^^^^ ^^^^^ u16: Value
│ │
│ u16: Value
note:
- ┌─ checked_arithmetic.fe:196:16
+ ┌─ checked_arithmetic.fe:259:16
│
-196 │ return left ** right
+259 │ return left ** right
│ ^^^^^^^^^^^^^ u16: Value
note:
- ┌─ checked_arithmetic.fe:198:5
+ ┌─ checked_arithmetic.fe:262:5
│
-198 │ ╭ pub fn pow_u8(left: u8, right: u8) -> u8:
-199 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 3749617961046563034
+262 │ ╭ pub fn pow_u8(left: u8, right: u8) -> u8 {
+263 │ │ return left ** right
+264 │ │ }
+ │ ╰─────^ attributes hash: 3749617961046563034
│
= FunctionSignature {
self_decl: None,
@@ -3752,25 +3818,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:199:16
+ ┌─ checked_arithmetic.fe:263:16
│
-199 │ return left ** right
+263 │ return left ** right
│ ^^^^ ^^^^^ u8: Value
│ │
│ u8: Value
note:
- ┌─ checked_arithmetic.fe:199:16
+ ┌─ checked_arithmetic.fe:263:16
│
-199 │ return left ** right
+263 │ return left ** right
│ ^^^^^^^^^^^^^ u8: Value
note:
- ┌─ checked_arithmetic.fe:201:5
+ ┌─ checked_arithmetic.fe:266:5
│
-201 │ ╭ pub fn pow_i256(left: i256, right: u256) -> i256:
-202 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 10218838230504849711
+266 │ ╭ pub fn pow_i256(left: i256, right: u256) -> i256 {
+267 │ │ return left ** right
+268 │ │ }
+ │ ╰─────^ attributes hash: 10218838230504849711
│
= FunctionSignature {
self_decl: None,
@@ -3809,25 +3876,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:202:16
+ ┌─ checked_arithmetic.fe:267:16
│
-202 │ return left ** right
+267 │ return left ** right
│ ^^^^ ^^^^^ u256: Value
│ │
│ i256: Value
note:
- ┌─ checked_arithmetic.fe:202:16
+ ┌─ checked_arithmetic.fe:267:16
│
-202 │ return left ** right
+267 │ return left ** right
│ ^^^^^^^^^^^^^ i256: Value
note:
- ┌─ checked_arithmetic.fe:204:5
+ ┌─ checked_arithmetic.fe:270:5
│
-204 │ ╭ pub fn pow_i128(left: i128, right: u128) -> i128:
-205 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 8492300797170107874
+270 │ ╭ pub fn pow_i128(left: i128, right: u128) -> i128 {
+271 │ │ return left ** right
+272 │ │ }
+ │ ╰─────^ attributes hash: 8492300797170107874
│
= FunctionSignature {
self_decl: None,
@@ -3866,25 +3934,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:205:16
+ ┌─ checked_arithmetic.fe:271:16
│
-205 │ return left ** right
+271 │ return left ** right
│ ^^^^ ^^^^^ u128: Value
│ │
│ i128: Value
note:
- ┌─ checked_arithmetic.fe:205:16
+ ┌─ checked_arithmetic.fe:271:16
│
-205 │ return left ** right
+271 │ return left ** right
│ ^^^^^^^^^^^^^ i128: Value
note:
- ┌─ checked_arithmetic.fe:207:5
+ ┌─ checked_arithmetic.fe:274:5
│
-207 │ ╭ pub fn pow_i64(left: i64, right: u64) -> i64:
-208 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 8175269888119534907
+274 │ ╭ pub fn pow_i64(left: i64, right: u64) -> i64 {
+275 │ │ return left ** right
+276 │ │ }
+ │ ╰─────^ attributes hash: 8175269888119534907
│
= FunctionSignature {
self_decl: None,
@@ -3923,25 +3992,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:208:16
+ ┌─ checked_arithmetic.fe:275:16
│
-208 │ return left ** right
+275 │ return left ** right
│ ^^^^ ^^^^^ u64: Value
│ │
│ i64: Value
note:
- ┌─ checked_arithmetic.fe:208:16
+ ┌─ checked_arithmetic.fe:275:16
│
-208 │ return left ** right
+275 │ return left ** right
│ ^^^^^^^^^^^^^ i64: Value
note:
- ┌─ checked_arithmetic.fe:210:5
+ ┌─ checked_arithmetic.fe:278:5
│
-210 │ ╭ pub fn pow_i32(left: i32, right: u32) -> i32:
-211 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 9388330002377862662
+278 │ ╭ pub fn pow_i32(left: i32, right: u32) -> i32 {
+279 │ │ return left ** right
+280 │ │ }
+ │ ╰─────^ attributes hash: 9388330002377862662
│
= FunctionSignature {
self_decl: None,
@@ -3980,25 +4050,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:211:16
+ ┌─ checked_arithmetic.fe:279:16
│
-211 │ return left ** right
+279 │ return left ** right
│ ^^^^ ^^^^^ u32: Value
│ │
│ i32: Value
note:
- ┌─ checked_arithmetic.fe:211:16
+ ┌─ checked_arithmetic.fe:279:16
│
-211 │ return left ** right
+279 │ return left ** right
│ ^^^^^^^^^^^^^ i32: Value
note:
- ┌─ checked_arithmetic.fe:213:5
+ ┌─ checked_arithmetic.fe:282:5
│
-213 │ ╭ pub fn pow_i16(left: i16, right: u16) -> i16:
-214 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 8172583117888506116
+282 │ ╭ pub fn pow_i16(left: i16, right: u16) -> i16 {
+283 │ │ return left ** right
+284 │ │ }
+ │ ╰─────^ attributes hash: 8172583117888506116
│
= FunctionSignature {
self_decl: None,
@@ -4037,25 +4108,26 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:214:16
+ ┌─ checked_arithmetic.fe:283:16
│
-214 │ return left ** right
+283 │ return left ** right
│ ^^^^ ^^^^^ u16: Value
│ │
│ i16: Value
note:
- ┌─ checked_arithmetic.fe:214:16
+ ┌─ checked_arithmetic.fe:283:16
│
-214 │ return left ** right
+283 │ return left ** right
│ ^^^^^^^^^^^^^ i16: Value
note:
- ┌─ checked_arithmetic.fe:216:5
+ ┌─ checked_arithmetic.fe:286:5
│
-216 │ ╭ pub fn pow_i8(left: i8, right: u8) -> i8:
-217 │ │ return left ** right
- │ ╰────────────────────────────^ attributes hash: 783967907920544100
+286 │ ╭ pub fn pow_i8(left: i8, right: u8) -> i8 {
+287 │ │ return left ** right
+288 │ │ }
+ │ ╰─────^ attributes hash: 783967907920544100
│
= FunctionSignature {
self_decl: None,
@@ -4094,17 +4166,17 @@ note:
}
note:
- ┌─ checked_arithmetic.fe:217:16
+ ┌─ checked_arithmetic.fe:287:16
│
-217 │ return left ** right
+287 │ return left ** right
│ ^^^^ ^^^^^ u8: Value
│ │
│ i8: Value
note:
- ┌─ checked_arithmetic.fe:217:16
+ ┌─ checked_arithmetic.fe:287:16
│
-217 │ return left ** right
+287 │ return left ** right
│ ^^^^^^^^^^^^^ i8: Value
diff --git a/crates/analyzer/tests/snapshots/analysis__const_generics.snap b/crates/analyzer/tests/snapshots/analysis__const_generics.snap
index 475d450cb2..6ba16ef208 100644
--- a/crates/analyzer/tests/snapshots/analysis__const_generics.snap
+++ b/crates/analyzer/tests/snapshots/analysis__const_generics.snap
@@ -6,14 +6,14 @@ expression: "build_snapshot(&db, module)"
note:
┌─ const_generics.fe:2:5
│
- 2 │ ╭ pub fn bar():
+ 2 │ ╭ pub fn bar() {
3 │ │ # const generics with literal.
4 │ │ let array_lit: Array
5 │ │ let array_lit2: Array
· │
-45 │ │
46 │ │ let array_with_const: Array
- │ ╰───────────────────────────────────────────────────────────────────────^ attributes hash: 8319796915330632390
+47 │ │ }
+ │ ╰─────^ attributes hash: 8319796915330632390
│
= FunctionSignature {
self_decl: None,
@@ -37,9 +37,9 @@ note:
8 │ let array_ternary: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Array
·
-11 │ let array_logical_or: Array
+11 │ let array_logical_or: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Array
-12 │ let array_logical_and: Array
+12 │ let array_logical_and: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Array
·
15 │ let array_add: Array
@@ -120,7 +120,7 @@ note:
8 │ let array_ternary: Array
│ ^^^^^^^^^^^^^^^^^ u256: Value
·
-11 │ let array_logical_or: Array
+11 │ let array_logical_or: Array
│ ^^^^ ^^^^^ bool: Value
│ │
│ bool: Value
@@ -128,7 +128,7 @@ note:
note:
┌─ const_generics.fe:11:44
│
-11 │ let array_logical_or: Array
+11 │ let array_logical_or: Array
│ ^ ^^^^^^^^^^^^^^^ ^ u256: Value
│ │ │
│ │ bool: Value
@@ -137,9 +137,9 @@ note:
note:
┌─ const_generics.fe:11:44
│
-11 │ let array_logical_or: Array
+11 │ let array_logical_or: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
-12 │ let array_logical_and: Array
+12 │ let array_logical_and: Array
│ ^^^^ ^^^^^ bool: Value
│ │
│ bool: Value
@@ -147,7 +147,7 @@ note:
note:
┌─ const_generics.fe:12:45
│
-12 │ let array_logical_and: Array
+12 │ let array_logical_and: Array
│ ^ ^^^^^^^^^^^^^^^^ ^ u256: Value
│ │ │
│ │ bool: Value
@@ -156,7 +156,7 @@ note:
note:
┌─ const_generics.fe:12:45
│
-12 │ let array_logical_and: Array
+12 │ let array_logical_and: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
·
15 │ let array_add: Array
diff --git a/crates/analyzer/tests/snapshots/analysis__const_local.snap b/crates/analyzer/tests/snapshots/analysis__const_local.snap
index d267226625..dd7bce88e7 100644
--- a/crates/analyzer/tests/snapshots/analysis__const_local.snap
+++ b/crates/analyzer/tests/snapshots/analysis__const_local.snap
@@ -6,14 +6,14 @@ expression: "build_snapshot(&db, module)"
note:
┌─ const_local.fe:2:5
│
- 2 │ ╭ pub fn bar() -> u256:
+ 2 │ ╭ pub fn bar() -> u256 {
3 │ │ const C1: i64 = 1
4 │ │ const C2: i64 = 2
5 │ │ const C3: i64 = 10
· │
-14 │ │ let _arr: Array
15 │ │ return C10
- │ ╰──────────────────^ attributes hash: 6115314201970082834
+16 │ │ }
+ │ ╰─────^ attributes hash: 6115314201970082834
│
= FunctionSignature {
self_decl: None,
diff --git a/crates/analyzer/tests/snapshots/analysis__constructor.snap b/crates/analyzer/tests/snapshots/analysis__constructor.snap
index 358905bf39..e43d7fc5fb 100644
--- a/crates/analyzer/tests/snapshots/analysis__constructor.snap
+++ b/crates/analyzer/tests/snapshots/analysis__constructor.snap
@@ -10,45 +10,46 @@ note:
│ ^^^^^^^^^^^^^^^^^^^^ Map
note:
- ┌─ constructor.fe:7:5
- │
-7 │ ╭ pub fn read_bar(self) -> u256:
-8 │ │ return self.bar[42]
- │ ╰───────────────────────────^ attributes hash: 11773348765973600208
- │
- = FunctionSignature {
- self_decl: Some(
- Mutable,
- ),
- ctx_decl: None,
- params: [],
- return_type: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- }
+ ┌─ constructor.fe:8:5
+ │
+ 8 │ ╭ pub fn read_bar(self) -> u256 {
+ 9 │ │ return self.bar[42]
+10 │ │ }
+ │ ╰─────^ attributes hash: 11773348765973600208
+ │
+ = FunctionSignature {
+ self_decl: Some(
+ Mutable,
+ ),
+ ctx_decl: None,
+ params: [],
+ return_type: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ }
note:
- ┌─ constructor.fe:8:16
+ ┌─ constructor.fe:9:16
│
-8 │ return self.bar[42]
+9 │ return self.bar[42]
│ ^^^^ Foo: Value
note:
- ┌─ constructor.fe:8:16
+ ┌─ constructor.fe:9:16
│
-8 │ return self.bar[42]
+9 │ return self.bar[42]
│ ^^^^^^^^ ^^ u256: Value
│ │
│ Map: Storage { nonce: Some(0) }
note:
- ┌─ constructor.fe:8:16
+ ┌─ constructor.fe:9:16
│
-8 │ return self.bar[42]
+9 │ return self.bar[42]
│ ^^^^^^^^^^^^ u256: Storage { nonce: None } => Value
diff --git a/crates/analyzer/tests/snapshots/analysis__create2_contract.snap b/crates/analyzer/tests/snapshots/analysis__create2_contract.snap
index 16c82d9569..3ffbafc8d3 100644
--- a/crates/analyzer/tests/snapshots/analysis__create2_contract.snap
+++ b/crates/analyzer/tests/snapshots/analysis__create2_contract.snap
@@ -6,9 +6,10 @@ expression: "build_snapshot(&db, module)"
note:
┌─ create2_contract.fe:4:5
│
-4 │ ╭ pub fn get_my_num() -> u256:
+4 │ ╭ pub fn get_my_num() -> u256 {
5 │ │ return 42
- │ ╰─────────────────^ attributes hash: 6115314201970082834
+6 │ │ }
+ │ ╰─────^ attributes hash: 6115314201970082834
│
= FunctionSignature {
self_decl: None,
@@ -30,13 +31,13 @@ note:
│ ^^ u256: Value
note:
- ┌─ create2_contract.fe:8:5
+ ┌─ create2_contract.fe:10:5
│
- 8 │ ╭ pub fn create2_foo(ctx: Context) -> address:
- 9 │ │ # value and salt
-10 │ │ let foo: Foo = Foo.create2(ctx, 0, 52)
-11 │ │ return address(foo)
- │ ╰───────────────────────────^ attributes hash: 9364783648076633772
+10 │ ╭ pub fn create2_foo(ctx: Context) -> address {
+11 │ │ let foo: Foo = Foo.create2(ctx, 0, 52)
+12 │ │ return address(foo)
+13 │ │ }
+ │ ╰─────^ attributes hash: 9364783648076633772
│
= FunctionSignature {
self_decl: None,
@@ -65,32 +66,32 @@ note:
}
note:
- ┌─ create2_contract.fe:10:18
+ ┌─ create2_contract.fe:11:18
│
-10 │ let foo: Foo = Foo.create2(ctx, 0, 52)
+11 │ let foo: Foo = Foo.create2(ctx, 0, 52)
│ ^^^ Foo
note:
- ┌─ create2_contract.fe:10:36
+ ┌─ create2_contract.fe:11:36
│
-10 │ let foo: Foo = Foo.create2(ctx, 0, 52)
+11 │ let foo: Foo = Foo.create2(ctx, 0, 52)
│ ^^^ ^ ^^ u256: Value
│ │ │
│ │ u256: Value
│ Context: Memory
note:
- ┌─ create2_contract.fe:10:24
+ ┌─ create2_contract.fe:11:24
│
-10 │ let foo: Foo = Foo.create2(ctx, 0, 52)
+11 │ let foo: Foo = Foo.create2(ctx, 0, 52)
│ ^^^^^^^^^^^^^^^^^^^^^^^ Foo: Value
-11 │ return address(foo)
+12 │ return address(foo)
│ ^^^ Foo: Value
note:
- ┌─ create2_contract.fe:11:16
+ ┌─ create2_contract.fe:12:16
│
-11 │ return address(foo)
+12 │ return address(foo)
│ ^^^^^^^^^^^^ address: Value
diff --git a/crates/analyzer/tests/snapshots/analysis__create_contract.snap b/crates/analyzer/tests/snapshots/analysis__create_contract.snap
index 5ab77847ae..6e242395fe 100644
--- a/crates/analyzer/tests/snapshots/analysis__create_contract.snap
+++ b/crates/analyzer/tests/snapshots/analysis__create_contract.snap
@@ -6,9 +6,10 @@ expression: "build_snapshot(&db, module)"
note:
┌─ create_contract.fe:4:5
│
-4 │ ╭ pub fn get_my_num() -> u256:
+4 │ ╭ pub fn get_my_num() -> u256 {
5 │ │ return 42
- │ ╰─────────────────^ attributes hash: 6115314201970082834
+6 │ │ }
+ │ ╰─────^ attributes hash: 6115314201970082834
│
= FunctionSignature {
self_decl: None,
@@ -30,12 +31,13 @@ note:
│ ^^ u256: Value
note:
- ┌─ create_contract.fe:8:5
+ ┌─ create_contract.fe:10:5
│
- 8 │ ╭ pub fn create_foo(ctx: Context) -> address:
- 9 │ │ let foo: Foo = Foo.create(ctx, 0)
-10 │ │ return address(foo)
- │ ╰───────────────────────────^ attributes hash: 9364783648076633772
+10 │ ╭ pub fn create_foo(ctx: Context) -> address {
+11 │ │ let foo: Foo = Foo.create(ctx, 0)
+12 │ │ return address(foo)
+13 │ │ }
+ │ ╰─────^ attributes hash: 9364783648076633772
│
= FunctionSignature {
self_decl: None,
@@ -64,31 +66,31 @@ note:
}
note:
- ┌─ create_contract.fe:9:18
- │
-9 │ let foo: Foo = Foo.create(ctx, 0)
- │ ^^^ Foo
+ ┌─ create_contract.fe:11:18
+ │
+11 │ let foo: Foo = Foo.create(ctx, 0)
+ │ ^^^ Foo
note:
- ┌─ create_contract.fe:9:35
- │
-9 │ let foo: Foo = Foo.create(ctx, 0)
- │ ^^^ ^ u256: Value
- │ │
- │ Context: Memory
+ ┌─ create_contract.fe:11:35
+ │
+11 │ let foo: Foo = Foo.create(ctx, 0)
+ │ ^^^ ^ u256: Value
+ │ │
+ │ Context: Memory
note:
- ┌─ create_contract.fe:9:24
+ ┌─ create_contract.fe:11:24
│
- 9 │ let foo: Foo = Foo.create(ctx, 0)
+11 │ let foo: Foo = Foo.create(ctx, 0)
│ ^^^^^^^^^^^^^^^^^^ Foo: Value
-10 │ return address(foo)
+12 │ return address(foo)
│ ^^^ Foo: Value
note:
- ┌─ create_contract.fe:10:16
+ ┌─ create_contract.fe:12:16
│
-10 │ return address(foo)
+12 │ return address(foo)
│ ^^^^^^^^^^^^ address: Value
diff --git a/crates/analyzer/tests/snapshots/analysis__create_contract_from_init.snap b/crates/analyzer/tests/snapshots/analysis__create_contract_from_init.snap
index 9d6fc40bcf..e06d4c7e3e 100644
--- a/crates/analyzer/tests/snapshots/analysis__create_contract_from_init.snap
+++ b/crates/analyzer/tests/snapshots/analysis__create_contract_from_init.snap
@@ -6,9 +6,10 @@ expression: "build_snapshot(&db, module)"
note:
┌─ create_contract_from_init.fe:4:5
│
-4 │ ╭ pub fn get_my_num() -> u256:
+4 │ ╭ pub fn get_my_num() -> u256 {
5 │ │ return 42
- │ ╰─────────────────^ attributes hash: 6115314201970082834
+6 │ │ }
+ │ ╰─────^ attributes hash: 6115314201970082834
│
= FunctionSignature {
self_decl: None,
@@ -30,17 +31,18 @@ note:
│ ^^ u256: Value
note:
- ┌─ create_contract_from_init.fe:8:5
- │
-8 │ foo_addr: address
- │ ^^^^^^^^^^^^^^^^^ address
+ ┌─ create_contract_from_init.fe:10:5
+ │
+10 │ foo_addr: address
+ │ ^^^^^^^^^^^^^^^^^ address
note:
- ┌─ create_contract_from_init.fe:13:5
+ ┌─ create_contract_from_init.fe:16:5
│
-13 │ ╭ pub fn get_foo_addr(self) -> address:
-14 │ │ return self.foo_addr
- │ ╰────────────────────────────^ attributes hash: 227275695522088782
+16 │ ╭ pub fn get_foo_addr(self) -> address {
+17 │ │ return self.foo_addr
+18 │ │ }
+ │ ╰─────^ attributes hash: 227275695522088782
│
= FunctionSignature {
self_decl: Some(
@@ -56,15 +58,15 @@ note:
}
note:
- ┌─ create_contract_from_init.fe:14:16
+ ┌─ create_contract_from_init.fe:17:16
│
-14 │ return self.foo_addr
+17 │ return self.foo_addr
│ ^^^^ FooFactory: Value
note:
- ┌─ create_contract_from_init.fe:14:16
+ ┌─ create_contract_from_init.fe:17:16
│
-14 │ return self.foo_addr
+17 │ return self.foo_addr
│ ^^^^^^^^^^^^^ address: Storage { nonce: Some(0) } => Value
diff --git a/crates/analyzer/tests/snapshots/analysis__data_copying_stress.snap b/crates/analyzer/tests/snapshots/analysis__data_copying_stress.snap
index 648a537a96..1b4d6cdcdf 100644
--- a/crates/analyzer/tests/snapshots/analysis__data_copying_stress.snap
+++ b/crates/analyzer/tests/snapshots/analysis__data_copying_stress.snap
@@ -1,45 +1,42 @@
---
source: crates/analyzer/tests/analysis.rs
expression: "build_snapshot(&db, module)"
----
-note:
- ┌─ data_copying_stress.fe:4:5
- │
- 4 │ my_string: String<42>
- │ ^^^^^^^^^^^^^^^^^^^^^ String<42>
- 5 │ my_other_string: String<42>
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ String<42>
- 6 │
- 7 │ my_u256: u256
- │ ^^^^^^^^^^^^^ u256
- 8 │ my_other_u256: u256
- │ ^^^^^^^^^^^^^^^^^^^ u256
- 9 │
-10 │ my_nums: Array
- │ ^^^^^^^^^^^^^^^^^^^^^^^ Array
-11 │
-12 │ my_addrs: Array
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Array
+---
note:
- ┌─ data_copying_stress.fe:15:9
- │
-15 │ my_string: String<42>
+ ┌─ data_copying_stress.fe:4:5
+ │
+4 │ my_string: String<42>
+ │ ^^^^^^^^^^^^^^^^^^^^^ String<42>
+5 │ my_other_string: String<42>
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ String<42>
+6 │ my_u256: u256
+ │ ^^^^^^^^^^^^^ u256
+7 │ my_other_u256: u256
+ │ ^^^^^^^^^^^^^^^^^^^ u256
+8 │ my_nums: Array
+ │ ^^^^^^^^^^^^^^^^^^^^^^^ Array
+9 │ my_addrs: Array
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Array
+
+note:
+ ┌─ data_copying_stress.fe:12:9
+ │
+12 │ my_string: String<42>
│ ^^^^^^^^^^^^^^^^^^^^^ String<42>
-16 │ my_u256: u256
+13 │ my_u256: u256
│ ^^^^^^^^^^^^^ u256
note:
- ┌─ data_copying_stress.fe:18:5
+ ┌─ data_copying_stress.fe:16:5
│
-18 │ ╭ pub fn set_my_vals(
-19 │ │ self,
-20 │ │ my_string: String<42>,
-21 │ │ my_other_string: String<42>,
- · │
-27 │ │ self.my_u256 = my_u256
-28 │ │ self.my_other_u256 = my_other_u256
- │ ╰──────────────────────────────────────────^ attributes hash: 8414520425977761339
+16 │ ╭ pub fn set_my_vals(self, my_string: String<42>, my_other_string: String<42>, my_u256: u256, my_other_u256: u256) {
+17 │ │ self.my_string = my_string
+18 │ │ self.my_other_string = my_other_string
+19 │ │ self.my_u256 = my_u256
+20 │ │ self.my_other_u256 = my_other_u256
+21 │ │ }
+ │ ╰─────^ attributes hash: 8414520425977761339
│
= FunctionSignature {
self_decl: Some(
@@ -100,56 +97,57 @@ note:
}
note:
- ┌─ data_copying_stress.fe:25:9
+ ┌─ data_copying_stress.fe:17:9
│
-25 │ self.my_string = my_string
+17 │ self.my_string = my_string
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:25:9
+ ┌─ data_copying_stress.fe:17:9
│
-25 │ self.my_string = my_string
+17 │ self.my_string = my_string
│ ^^^^^^^^^^^^^^ ^^^^^^^^^ String<42>: Memory
│ │
│ String<42>: Storage { nonce: Some(0) }
-26 │ self.my_other_string = my_other_string
+18 │ self.my_other_string = my_other_string
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:26:9
+ ┌─ data_copying_stress.fe:18:9
│
-26 │ self.my_other_string = my_other_string
+18 │ self.my_other_string = my_other_string
│ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ String<42>: Memory
│ │
│ String<42>: Storage { nonce: Some(1) }
-27 │ self.my_u256 = my_u256
+19 │ self.my_u256 = my_u256
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:27:9
+ ┌─ data_copying_stress.fe:19:9
│
-27 │ self.my_u256 = my_u256
+19 │ self.my_u256 = my_u256
│ ^^^^^^^^^^^^ ^^^^^^^ u256: Value
│ │
│ u256: Storage { nonce: Some(2) }
-28 │ self.my_other_u256 = my_other_u256
+20 │ self.my_other_u256 = my_other_u256
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:28:9
+ ┌─ data_copying_stress.fe:20:9
│
-28 │ self.my_other_u256 = my_other_u256
+20 │ self.my_other_u256 = my_other_u256
│ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ u256: Value
│ │
│ u256: Storage { nonce: Some(3) }
note:
- ┌─ data_copying_stress.fe:30:5
+ ┌─ data_copying_stress.fe:23:5
│
-30 │ ╭ pub fn set_to_my_other_vals(self):
-31 │ │ self.my_string = self.my_other_string
-32 │ │ self.my_u256 = self.my_other_u256
- │ ╰─────────────────────────────────────────^ attributes hash: 18235041182630809162
+23 │ ╭ pub fn set_to_my_other_vals(self) {
+24 │ │ self.my_string = self.my_other_string
+25 │ │ self.my_u256 = self.my_other_u256
+26 │ │ }
+ │ ╰─────^ attributes hash: 18235041182630809162
│
= FunctionSignature {
self_decl: Some(
@@ -165,52 +163,52 @@ note:
}
note:
- ┌─ data_copying_stress.fe:31:9
+ ┌─ data_copying_stress.fe:24:9
│
-31 │ self.my_string = self.my_other_string
+24 │ self.my_string = self.my_other_string
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:31:9
+ ┌─ data_copying_stress.fe:24:9
│
-31 │ self.my_string = self.my_other_string
+24 │ self.my_string = self.my_other_string
│ ^^^^^^^^^^^^^^ ^^^^ Foo: Value
│ │
│ String<42>: Storage { nonce: Some(0) }
note:
- ┌─ data_copying_stress.fe:31:26
+ ┌─ data_copying_stress.fe:24:26
│
-31 │ self.my_string = self.my_other_string
+24 │ self.my_string = self.my_other_string
│ ^^^^^^^^^^^^^^^^^^^^ String<42>: Storage { nonce: Some(1) }
-32 │ self.my_u256 = self.my_other_u256
+25 │ self.my_u256 = self.my_other_u256
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:32:9
+ ┌─ data_copying_stress.fe:25:9
│
-32 │ self.my_u256 = self.my_other_u256
+25 │ self.my_u256 = self.my_other_u256
│ ^^^^^^^^^^^^ ^^^^ Foo: Value
│ │
│ u256: Storage { nonce: Some(2) }
note:
- ┌─ data_copying_stress.fe:32:24
+ ┌─ data_copying_stress.fe:25:24
│
-32 │ self.my_u256 = self.my_other_u256
+25 │ self.my_u256 = self.my_other_u256
│ ^^^^^^^^^^^^^^^^^^ u256: Storage { nonce: Some(3) }
note:
- ┌─ data_copying_stress.fe:34:5
+ ┌─ data_copying_stress.fe:28:5
│
-34 │ ╭ pub fn multiple_references_shared_memory(my_array: Array):
-35 │ │ let my_2nd_array: Array = my_array
-36 │ │ let my_3rd_array: Array = my_2nd_array
-37 │ │
+28 │ ╭ pub fn multiple_references_shared_memory(my_array: Array) {
+29 │ │ let my_2nd_array: Array = my_array
+30 │ │ let my_3rd_array: Array = my_2nd_array
+31 │ │ assert my_array[3] != 5
· │
-46 │ │ assert my_2nd_array[3] == 50
-47 │ │ assert my_3rd_array[3] == 50
- │ ╰────────────────────────────────────^ attributes hash: 16237067187800993503
+39 │ │ assert my_3rd_array[3] == 50
+40 │ │ }
+ │ ╰─────^ attributes hash: 16237067187800993503
│
= FunctionSignature {
self_decl: None,
@@ -239,180 +237,179 @@ note:
}
note:
- ┌─ data_copying_stress.fe:35:27
+ ┌─ data_copying_stress.fe:29:27
│
-35 │ let my_2nd_array: Array = my_array
+29 │ let my_2nd_array: Array = my_array
│ ^^^^^^^^^^^^^^^ Array
-36 │ let my_3rd_array: Array = my_2nd_array
+30 │ let my_3rd_array: Array = my_2nd_array
│ ^^^^^^^^^^^^^^^ Array
note:
- ┌─ data_copying_stress.fe:35:45
+ ┌─ data_copying_stress.fe:29:45
│
-35 │ let my_2nd_array: Array = my_array
+29 │ let my_2nd_array: Array = my_array
│ ^^^^^^^^ Array: Memory
-36 │ let my_3rd_array: Array = my_2nd_array
+30 │ let my_3rd_array: Array = my_2nd_array
│ ^^^^^^^^^^^^ Array: Memory
-37 │
-38 │ assert my_array[3] != 5
+31 │ assert my_array[3] != 5
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:38:16
+ ┌─ data_copying_stress.fe:31:16
│
-38 │ assert my_array[3] != 5
+31 │ assert my_array[3] != 5
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory => Value
note:
- ┌─ data_copying_stress.fe:38:16
+ ┌─ data_copying_stress.fe:31:16
│
-38 │ assert my_array[3] != 5
+31 │ assert my_array[3] != 5
│ ^^^^^^^^^^^^^^^^ bool: Value
-39 │ my_array[3] = 5
+32 │ my_array[3] = 5
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:39:9
+ ┌─ data_copying_stress.fe:32:9
│
-39 │ my_array[3] = 5
+32 │ my_array[3] = 5
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory
-40 │ assert my_array[3] == 5
+33 │ assert my_array[3] == 5
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:40:16
+ ┌─ data_copying_stress.fe:33:16
│
-40 │ assert my_array[3] == 5
+33 │ assert my_array[3] == 5
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory => Value
note:
- ┌─ data_copying_stress.fe:40:16
+ ┌─ data_copying_stress.fe:33:16
│
-40 │ assert my_array[3] == 5
+33 │ assert my_array[3] == 5
│ ^^^^^^^^^^^^^^^^ bool: Value
-41 │ assert my_2nd_array[3] == 5
+34 │ assert my_2nd_array[3] == 5
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:41:16
+ ┌─ data_copying_stress.fe:34:16
│
-41 │ assert my_2nd_array[3] == 5
+34 │ assert my_2nd_array[3] == 5
│ ^^^^^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory => Value
note:
- ┌─ data_copying_stress.fe:41:16
+ ┌─ data_copying_stress.fe:34:16
│
-41 │ assert my_2nd_array[3] == 5
+34 │ assert my_2nd_array[3] == 5
│ ^^^^^^^^^^^^^^^^^^^^ bool: Value
-42 │ assert my_3rd_array[3] == 5
+35 │ assert my_3rd_array[3] == 5
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:42:16
+ ┌─ data_copying_stress.fe:35:16
│
-42 │ assert my_3rd_array[3] == 5
+35 │ assert my_3rd_array[3] == 5
│ ^^^^^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory => Value
note:
- ┌─ data_copying_stress.fe:42:16
+ ┌─ data_copying_stress.fe:35:16
│
-42 │ assert my_3rd_array[3] == 5
+35 │ assert my_3rd_array[3] == 5
│ ^^^^^^^^^^^^^^^^^^^^ bool: Value
-43 │
-44 │ my_3rd_array[3] = 50
+36 │ my_3rd_array[3] = 50
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:44:9
+ ┌─ data_copying_stress.fe:36:9
│
-44 │ my_3rd_array[3] = 50
+36 │ my_3rd_array[3] = 50
│ ^^^^^^^^^^^^^^^ ^^ u256: Value
│ │
│ u256: Memory
-45 │ assert my_array[3] == 50
+37 │ assert my_array[3] == 50
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:45:16
+ ┌─ data_copying_stress.fe:37:16
│
-45 │ assert my_array[3] == 50
+37 │ assert my_array[3] == 50
│ ^^^^^^^^^^^ ^^ u256: Value
│ │
│ u256: Memory => Value
note:
- ┌─ data_copying_stress.fe:45:16
+ ┌─ data_copying_stress.fe:37:16
│
-45 │ assert my_array[3] == 50
+37 │ assert my_array[3] == 50
│ ^^^^^^^^^^^^^^^^^ bool: Value
-46 │ assert my_2nd_array[3] == 50
+38 │ assert my_2nd_array[3] == 50
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:46:16
+ ┌─ data_copying_stress.fe:38:16
│
-46 │ assert my_2nd_array[3] == 50
+38 │ assert my_2nd_array[3] == 50
│ ^^^^^^^^^^^^^^^ ^^ u256: Value
│ │
│ u256: Memory => Value
note:
- ┌─ data_copying_stress.fe:46:16
+ ┌─ data_copying_stress.fe:38:16
│
-46 │ assert my_2nd_array[3] == 50
+38 │ assert my_2nd_array[3] == 50
│ ^^^^^^^^^^^^^^^^^^^^^ bool: Value
-47 │ assert my_3rd_array[3] == 50
+39 │ assert my_3rd_array[3] == 50
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:47:16
+ ┌─ data_copying_stress.fe:39:16
│
-47 │ assert my_3rd_array[3] == 50
+39 │ assert my_3rd_array[3] == 50
│ ^^^^^^^^^^^^^^^ ^^ u256: Value
│ │
│ u256: Memory => Value
note:
- ┌─ data_copying_stress.fe:47:16
+ ┌─ data_copying_stress.fe:39:16
│
-47 │ assert my_3rd_array[3] == 50
+39 │ assert my_3rd_array[3] == 50
│ ^^^^^^^^^^^^^^^^^^^^^ bool: Value
note:
- ┌─ data_copying_stress.fe:49:5
+ ┌─ data_copying_stress.fe:42:5
│
-49 │ ╭ pub fn mutate_and_return(my_array: Array) -> Array:
-50 │ │ my_array[3] = 5
-51 │ │ return my_array
- │ ╰───────────────────────^ attributes hash: 15461468619504661037
+42 │ ╭ pub fn mutate_and_return(my_array: Array) -> Array {
+43 │ │ my_array[3] = 5
+44 │ │ return my_array
+45 │ │ }
+ │ ╰─────^ attributes hash: 15461468619504661037
│
= FunctionSignature {
self_decl: None,
@@ -446,29 +443,30 @@ note:
}
note:
- ┌─ data_copying_stress.fe:50:9
+ ┌─ data_copying_stress.fe:43:9
│
-50 │ my_array[3] = 5
+43 │ my_array[3] = 5
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:50:9
+ ┌─ data_copying_stress.fe:43:9
│
-50 │ my_array[3] = 5
+43 │ my_array[3] = 5
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory
-51 │ return my_array
+44 │ return my_array
│ ^^^^^^^^ Array: Memory
note:
- ┌─ data_copying_stress.fe:53:5
+ ┌─ data_copying_stress.fe:47:5
│
-53 │ ╭ pub fn clone_and_return(my_array: Array) -> Array:
-54 │ │ return my_array.clone()
- │ ╰───────────────────────────────^ attributes hash: 15461468619504661037
+47 │ ╭ pub fn clone_and_return(my_array: Array) -> Array {
+48 │ │ return my_array.clone()
+49 │ │ }
+ │ ╰─────^ attributes hash: 15461468619504661037
│
= FunctionSignature {
self_decl: None,
@@ -502,24 +500,25 @@ note:
}
note:
- ┌─ data_copying_stress.fe:54:16
+ ┌─ data_copying_stress.fe:48:16
│
-54 │ return my_array.clone()
+48 │ return my_array.clone()
│ ^^^^^^^^ Array: Memory
note:
- ┌─ data_copying_stress.fe:54:16
+ ┌─ data_copying_stress.fe:48:16
│
-54 │ return my_array.clone()
+48 │ return my_array.clone()
│ ^^^^^^^^^^^^^^^^ Array: Memory => Memory
note:
- ┌─ data_copying_stress.fe:56:5
+ ┌─ data_copying_stress.fe:51:5
│
-56 │ ╭ pub fn clone_mutate_and_return(my_array: Array) -> Array:
-57 │ │ my_array.clone()[3] = 5
-58 │ │ return my_array
- │ ╰───────────────────────^ attributes hash: 15461468619504661037
+51 │ ╭ pub fn clone_mutate_and_return(my_array: Array) -> Array {
+52 │ │ my_array.clone()[3] = 5
+53 │ │ return my_array
+54 │ │ }
+ │ ╰─────^ attributes hash: 15461468619504661037
│
= FunctionSignature {
self_decl: None,
@@ -553,40 +552,40 @@ note:
}
note:
- ┌─ data_copying_stress.fe:57:9
+ ┌─ data_copying_stress.fe:52:9
│
-57 │ my_array.clone()[3] = 5
+52 │ my_array.clone()[3] = 5
│ ^^^^^^^^ Array: Memory
note:
- ┌─ data_copying_stress.fe:57:9
+ ┌─ data_copying_stress.fe:52:9
│
-57 │ my_array.clone()[3] = 5
+52 │ my_array.clone()[3] = 5
│ ^^^^^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory => Memory
note:
- ┌─ data_copying_stress.fe:57:9
+ ┌─ data_copying_stress.fe:52:9
│
-57 │ my_array.clone()[3] = 5
+52 │ my_array.clone()[3] = 5
│ ^^^^^^^^^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory
-58 │ return my_array
+53 │ return my_array
│ ^^^^^^^^ Array: Memory
note:
- ┌─ data_copying_stress.fe:60:5
+ ┌─ data_copying_stress.fe:56:5
│
-60 │ ╭ pub fn assign_my_nums_and_return(self) -> Array:
-61 │ │ let my_nums_mem: Array
-62 │ │ self.my_nums[0] = 42
-63 │ │ self.my_nums[1] = 26
+56 │ ╭ pub fn assign_my_nums_and_return(self) -> Array {
+57 │ │ let my_nums_mem: Array
+58 │ │ self.my_nums[0] = 42
+59 │ │ self.my_nums[1] = 26
· │
-67 │ │ my_nums_mem = self.my_nums.to_mem()
-68 │ │ return my_nums_mem
- │ ╰──────────────────────────^ attributes hash: 13146367689365512086
+64 │ │ return my_nums_mem
+65 │ │ }
+ │ ╰─────^ attributes hash: 13146367689365512086
│
= FunctionSignature {
self_decl: Some(
@@ -607,133 +606,130 @@ note:
}
note:
- ┌─ data_copying_stress.fe:61:26
+ ┌─ data_copying_stress.fe:57:26
│
-61 │ let my_nums_mem: Array
+57 │ let my_nums_mem: Array
│ ^^^^^^^^^^^^^^ Array
note:
- ┌─ data_copying_stress.fe:62:9
+ ┌─ data_copying_stress.fe:58:9
│
-62 │ self.my_nums[0] = 42
+58 │ self.my_nums[0] = 42
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:62:9
+ ┌─ data_copying_stress.fe:58:9
│
-62 │ self.my_nums[0] = 42
+58 │ self.my_nums[0] = 42
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Storage { nonce: Some(4) }
note:
- ┌─ data_copying_stress.fe:62:9
+ ┌─ data_copying_stress.fe:58:9
│
-62 │ self.my_nums[0] = 42
+58 │ self.my_nums[0] = 42
│ ^^^^^^^^^^^^^^^ ^^ u256: Value
│ │
│ u256: Storage { nonce: None }
-63 │ self.my_nums[1] = 26
+59 │ self.my_nums[1] = 26
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:63:9
+ ┌─ data_copying_stress.fe:59:9
│
-63 │ self.my_nums[1] = 26
+59 │ self.my_nums[1] = 26
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Storage { nonce: Some(4) }
note:
- ┌─ data_copying_stress.fe:63:9
+ ┌─ data_copying_stress.fe:59:9
│
-63 │ self.my_nums[1] = 26
+59 │ self.my_nums[1] = 26
│ ^^^^^^^^^^^^^^^ ^^ u256: Value
│ │
│ u256: Storage { nonce: None }
-64 │ self.my_nums[2] = 0
+60 │ self.my_nums[2] = 0
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:64:9
+ ┌─ data_copying_stress.fe:60:9
│
-64 │ self.my_nums[2] = 0
+60 │ self.my_nums[2] = 0
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Storage { nonce: Some(4) }
note:
- ┌─ data_copying_stress.fe:64:9
+ ┌─ data_copying_stress.fe:60:9
│
-64 │ self.my_nums[2] = 0
+60 │ self.my_nums[2] = 0
│ ^^^^^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Storage { nonce: None }
-65 │ self.my_nums[3] = 1
+61 │ self.my_nums[3] = 1
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:65:9
+ ┌─ data_copying_stress.fe:61:9
│
-65 │ self.my_nums[3] = 1
+61 │ self.my_nums[3] = 1
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Storage { nonce: Some(4) }
note:
- ┌─ data_copying_stress.fe:65:9
+ ┌─ data_copying_stress.fe:61:9
│
-65 │ self.my_nums[3] = 1
+61 │ self.my_nums[3] = 1
│ ^^^^^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Storage { nonce: None }
-66 │ self.my_nums[4] = 255
+62 │ self.my_nums[4] = 255
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:66:9
+ ┌─ data_copying_stress.fe:62:9
│
-66 │ self.my_nums[4] = 255
+62 │ self.my_nums[4] = 255
│ ^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Storage { nonce: Some(4) }
note:
- ┌─ data_copying_stress.fe:66:9
+ ┌─ data_copying_stress.fe:62:9
│
-66 │ self.my_nums[4] = 255
+62 │ self.my_nums[4] = 255
│ ^^^^^^^^^^^^^^^ ^^^ u256: Value
│ │
│ u256: Storage { nonce: None }
-67 │ my_nums_mem = self.my_nums.to_mem()
+63 │ my_nums_mem = self.my_nums.to_mem()
│ ^^^^^^^^^^^ ^^^^ Foo: Value
│ │
│ Array: Memory
note:
- ┌─ data_copying_stress.fe:67:23
+ ┌─ data_copying_stress.fe:63:23
│
-67 │ my_nums_mem = self.my_nums.to_mem()
+63 │ my_nums_mem = self.my_nums.to_mem()
│ ^^^^^^^^^^^^ Array: Storage { nonce: Some(4) }
note:
- ┌─ data_copying_stress.fe:67:23
+ ┌─ data_copying_stress.fe:63:23
│
-67 │ my_nums_mem = self.my_nums.to_mem()
+63 │ my_nums_mem = self.my_nums.to_mem()
│ ^^^^^^^^^^^^^^^^^^^^^ Array: Storage { nonce: Some(4) } => Memory
-68 │ return my_nums_mem
+64 │ return my_nums_mem
│ ^^^^^^^^^^^ Array: Memory
note:
- ┌─ data_copying_stress.fe:70:5
+ ┌─ data_copying_stress.fe:67:5
│
-70 │ ╭ pub fn emit_my_event(self, ctx: Context):
-71 │ │ emit_my_event_internal(
-72 │ │ ctx,
-73 │ │ self.my_string.to_mem(),
-74 │ │ self.my_u256
-75 │ │ )
- │ ╰─────────^ attributes hash: 1731341862738941170
+67 │ ╭ pub fn emit_my_event(self, ctx: Context) {
+68 │ │ emit_my_event_internal(ctx, self.my_string.to_mem(), self.my_u256)
+69 │ │ }
+ │ ╰─────^ attributes hash: 1731341862738941170
│
= FunctionSignature {
self_decl: Some(
@@ -764,49 +760,46 @@ note:
}
note:
- ┌─ data_copying_stress.fe:72:13
+ ┌─ data_copying_stress.fe:68:32
│
-72 │ ctx,
- │ ^^^ Context: Memory
-73 │ self.my_string.to_mem(),
- │ ^^^^ Foo: Value
+68 │ emit_my_event_internal(ctx, self.my_string.to_mem(), self.my_u256)
+ │ ^^^ ^^^^ Foo: Value
+ │ │
+ │ Context: Memory
note:
- ┌─ data_copying_stress.fe:73:13
+ ┌─ data_copying_stress.fe:68:37
│
-73 │ self.my_string.to_mem(),
- │ ^^^^^^^^^^^^^^ String<42>: Storage { nonce: Some(0) }
+68 │ emit_my_event_internal(ctx, self.my_string.to_mem(), self.my_u256)
+ │ ^^^^^^^^^^^^^^ String<42>: Storage { nonce: Some(0) }
note:
- ┌─ data_copying_stress.fe:73:13
+ ┌─ data_copying_stress.fe:68:37
│
-73 │ self.my_string.to_mem(),
- │ ^^^^^^^^^^^^^^^^^^^^^^^ String<42>: Storage { nonce: Some(0) } => Memory
-74 │ self.my_u256
- │ ^^^^ Foo: Value
+68 │ emit_my_event_internal(ctx, self.my_string.to_mem(), self.my_u256)
+ │ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ Foo: Value
+ │ │
+ │ String<42>: Storage { nonce: Some(0) } => Memory
note:
- ┌─ data_copying_stress.fe:74:13
+ ┌─ data_copying_stress.fe:68:62
│
-74 │ self.my_u256
- │ ^^^^^^^^^^^^ u256: Storage { nonce: Some(2) } => Value
+68 │ emit_my_event_internal(ctx, self.my_string.to_mem(), self.my_u256)
+ │ ^^^^^^^^^^^^ u256: Storage { nonce: Some(2) } => Value
note:
- ┌─ data_copying_stress.fe:71:9
- │
-71 │ ╭ emit_my_event_internal(
-72 │ │ ctx,
-73 │ │ self.my_string.to_mem(),
-74 │ │ self.my_u256
-75 │ │ )
- │ ╰─────────^ (): Value
+ ┌─ data_copying_stress.fe:68:9
+ │
+68 │ emit_my_event_internal(ctx, self.my_string.to_mem(), self.my_u256)
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
note:
- ┌─ data_copying_stress.fe:77:5
+ ┌─ data_copying_stress.fe:71:5
│
-77 │ ╭ fn emit_my_event_internal(ctx: Context, _ my_string: String<42>, _ my_u256: u256):
-78 │ │ emit MyEvent(ctx, my_string, my_u256)
- │ ╰─────────────────────────────────────────────^ attributes hash: 15658342901286022244
+71 │ ╭ fn emit_my_event_internal(ctx: Context, _ my_string: String<42>, _ my_u256: u256) {
+72 │ │ emit MyEvent(ctx, my_string, my_u256)
+73 │ │ }
+ │ ╰─────^ attributes hash: 15658342901286022244
│
= FunctionSignature {
self_decl: None,
@@ -861,18 +854,18 @@ note:
}
note:
- ┌─ data_copying_stress.fe:78:22
+ ┌─ data_copying_stress.fe:72:22
│
-78 │ emit MyEvent(ctx, my_string, my_u256)
+72 │ emit MyEvent(ctx, my_string, my_u256)
│ ^^^ ^^^^^^^^^ ^^^^^^^ u256: Value
│ │ │
│ │ String<42>: Memory
│ Context: Memory
note:
- ┌─ data_copying_stress.fe:78:9
+ ┌─ data_copying_stress.fe:72:9
│
-78 │ emit MyEvent(ctx, my_string, my_u256)
+72 │ emit MyEvent(ctx, my_string, my_u256)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 595206297963940250
│
= Event {
@@ -904,11 +897,12 @@ note:
}
note:
- ┌─ data_copying_stress.fe:80:5
+ ┌─ data_copying_stress.fe:75:5
│
-80 │ ╭ pub fn set_my_addrs(self, my_addrs: Array):
-81 │ │ self.my_addrs = my_addrs
- │ ╰────────────────────────────────^ attributes hash: 1347763946351267085
+75 │ ╭ pub fn set_my_addrs(self, my_addrs: Array) {
+76 │ │ self.my_addrs = my_addrs
+77 │ │ }
+ │ ╰─────^ attributes hash: 1347763946351267085
│
= FunctionSignature {
self_decl: Some(
@@ -937,25 +931,26 @@ note:
}
note:
- ┌─ data_copying_stress.fe:81:9
+ ┌─ data_copying_stress.fe:76:9
│
-81 │ self.my_addrs = my_addrs
+76 │ self.my_addrs = my_addrs
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:81:9
+ ┌─ data_copying_stress.fe:76:9
│
-81 │ self.my_addrs = my_addrs
+76 │ self.my_addrs = my_addrs
│ ^^^^^^^^^^^^^ ^^^^^^^^ Array: Memory
│ │
│ Array: Storage { nonce: Some(5) }
note:
- ┌─ data_copying_stress.fe:83:5
+ ┌─ data_copying_stress.fe:79:5
│
-83 │ ╭ pub fn get_my_second_addr(self) -> address:
-84 │ │ return self.my_addrs[1]
- │ ╰───────────────────────────────^ attributes hash: 227275695522088782
+79 │ ╭ pub fn get_my_second_addr(self) -> address {
+80 │ │ return self.my_addrs[1]
+81 │ │ }
+ │ ╰─────^ attributes hash: 227275695522088782
│
= FunctionSignature {
self_decl: Some(
@@ -971,23 +966,23 @@ note:
}
note:
- ┌─ data_copying_stress.fe:84:16
+ ┌─ data_copying_stress.fe:80:16
│
-84 │ return self.my_addrs[1]
+80 │ return self.my_addrs[1]
│ ^^^^ Foo: Value
note:
- ┌─ data_copying_stress.fe:84:16
+ ┌─ data_copying_stress.fe:80:16
│
-84 │ return self.my_addrs[1]
+80 │ return self.my_addrs[1]
│ ^^^^^^^^^^^^^ ^ u256: Value
│ │
│ Array: Storage { nonce: Some(5) }
note:
- ┌─ data_copying_stress.fe:84:16
+ ┌─ data_copying_stress.fe:80:16
│
-84 │ return self.my_addrs[1]
+80 │ return self.my_addrs[1]
│ ^^^^^^^^^^^^^^^^ address: Storage { nonce: None } => Value
diff --git a/crates/analyzer/tests/snapshots/analysis__empty.snap b/crates/analyzer/tests/snapshots/analysis__empty.snap
index 7fcab83a3c..1c42536e4a 100644
--- a/crates/analyzer/tests/snapshots/analysis__empty.snap
+++ b/crates/analyzer/tests/snapshots/analysis__empty.snap
@@ -4,9 +4,9 @@ expression: "build_snapshot(&db, module)"
---
note:
- ┌─ empty.fe:2:3
+ ┌─ empty.fe:2:5
│
-2 │ lonely: u256
- │ ^^^^^^^^^^^^ u256
+2 │ lonely: u256
+ │ ^^^^^^^^^^^^ u256
diff --git a/crates/analyzer/tests/snapshots/analysis__erc20_token.snap b/crates/analyzer/tests/snapshots/analysis__erc20_token.snap
index b70a6a1803..e0f2aa6e45 100644
--- a/crates/analyzer/tests/snapshots/analysis__erc20_token.snap
+++ b/crates/analyzer/tests/snapshots/analysis__erc20_token.snap
@@ -1,6 +1,7 @@
---
source: crates/analyzer/tests/analysis.rs
expression: "build_snapshot(&db, module)"
+
---
note:
┌─ erc20_token.fe:4:5
@@ -29,21 +30,22 @@ note:
│ ^^^^^^^^^^^ u256
note:
- ┌─ erc20_token.fe:17:9
+ ┌─ erc20_token.fe:18:9
│
-17 │ idx from: address
+18 │ idx from: address
│ ^^^^^^^^^^^^^^^^^ address
-18 │ idx to: address
+19 │ idx to: address
│ ^^^^^^^^^^^^^^^ address
-19 │ value: u256
+20 │ value: u256
│ ^^^^^^^^^^^ u256
note:
- ┌─ erc20_token.fe:27:5
+ ┌─ erc20_token.fe:30:5
│
-27 │ ╭ pub fn name(self) -> String<100>:
-28 │ │ return self._name.to_mem()
- │ ╰──────────────────────────────────^ attributes hash: 2936475649167061923
+30 │ ╭ pub fn name(self) -> String<100> {
+31 │ │ return self._name.to_mem()
+32 │ │ }
+ │ ╰─────^ attributes hash: 2936475649167061923
│
= FunctionSignature {
self_decl: Some(
@@ -61,29 +63,30 @@ note:
}
note:
- ┌─ erc20_token.fe:28:16
+ ┌─ erc20_token.fe:31:16
│
-28 │ return self._name.to_mem()
+31 │ return self._name.to_mem()
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:28:16
+ ┌─ erc20_token.fe:31:16
│
-28 │ return self._name.to_mem()
+31 │ return self._name.to_mem()
│ ^^^^^^^^^^ String<100>: Storage { nonce: Some(3) }
note:
- ┌─ erc20_token.fe:28:16
+ ┌─ erc20_token.fe:31:16
│
-28 │ return self._name.to_mem()
+31 │ return self._name.to_mem()
│ ^^^^^^^^^^^^^^^^^^^ String<100>: Storage { nonce: Some(3) } => Memory
note:
- ┌─ erc20_token.fe:30:5
+ ┌─ erc20_token.fe:34:5
│
-30 │ ╭ pub fn symbol(self) -> String<100>:
-31 │ │ return self._symbol.to_mem()
- │ ╰────────────────────────────────────^ attributes hash: 2936475649167061923
+34 │ ╭ pub fn symbol(self) -> String<100> {
+35 │ │ return self._symbol.to_mem()
+36 │ │ }
+ │ ╰─────^ attributes hash: 2936475649167061923
│
= FunctionSignature {
self_decl: Some(
@@ -101,29 +104,30 @@ note:
}
note:
- ┌─ erc20_token.fe:31:16
+ ┌─ erc20_token.fe:35:16
│
-31 │ return self._symbol.to_mem()
+35 │ return self._symbol.to_mem()
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:31:16
+ ┌─ erc20_token.fe:35:16
│
-31 │ return self._symbol.to_mem()
+35 │ return self._symbol.to_mem()
│ ^^^^^^^^^^^^ String<100>: Storage { nonce: Some(4) }
note:
- ┌─ erc20_token.fe:31:16
+ ┌─ erc20_token.fe:35:16
│
-31 │ return self._symbol.to_mem()
+35 │ return self._symbol.to_mem()
│ ^^^^^^^^^^^^^^^^^^^^^ String<100>: Storage { nonce: Some(4) } => Memory
note:
- ┌─ erc20_token.fe:33:5
+ ┌─ erc20_token.fe:38:5
│
-33 │ ╭ pub fn decimals(self) -> u8:
-34 │ │ return self._decimals
- │ ╰─────────────────────────────^ attributes hash: 11864308689780915279
+38 │ ╭ pub fn decimals(self) -> u8 {
+39 │ │ return self._decimals
+40 │ │ }
+ │ ╰─────^ attributes hash: 11864308689780915279
│
= FunctionSignature {
self_decl: Some(
@@ -141,23 +145,24 @@ note:
}
note:
- ┌─ erc20_token.fe:34:16
+ ┌─ erc20_token.fe:39:16
│
-34 │ return self._decimals
+39 │ return self._decimals
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:34:16
+ ┌─ erc20_token.fe:39:16
│
-34 │ return self._decimals
+39 │ return self._decimals
│ ^^^^^^^^^^^^^^ u8: Storage { nonce: Some(5) } => Value
note:
- ┌─ erc20_token.fe:36:5
+ ┌─ erc20_token.fe:42:5
│
-36 │ ╭ pub fn totalSupply(self) -> u256:
-37 │ │ return self._total_supply
- │ ╰─────────────────────────────────^ attributes hash: 11773348765973600208
+42 │ ╭ pub fn totalSupply(self) -> u256 {
+43 │ │ return self._total_supply
+44 │ │ }
+ │ ╰─────^ attributes hash: 11773348765973600208
│
= FunctionSignature {
self_decl: Some(
@@ -175,23 +180,24 @@ note:
}
note:
- ┌─ erc20_token.fe:37:16
+ ┌─ erc20_token.fe:43:16
│
-37 │ return self._total_supply
+43 │ return self._total_supply
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:37:16
+ ┌─ erc20_token.fe:43:16
│
-37 │ return self._total_supply
+43 │ return self._total_supply
│ ^^^^^^^^^^^^^^^^^^ u256: Storage { nonce: Some(2) } => Value
note:
- ┌─ erc20_token.fe:39:5
+ ┌─ erc20_token.fe:46:5
│
-39 │ ╭ pub fn balanceOf(self, _ account: address) -> u256:
-40 │ │ return self._balances[account]
- │ ╰──────────────────────────────────────^ attributes hash: 5993653573135321647
+46 │ ╭ pub fn balanceOf(self, _ account: address) -> u256 {
+47 │ │ return self._balances[account]
+48 │ │ }
+ │ ╰─────^ attributes hash: 5993653573135321647
│
= FunctionSignature {
self_decl: Some(
@@ -221,32 +227,33 @@ note:
}
note:
- ┌─ erc20_token.fe:40:16
+ ┌─ erc20_token.fe:47:16
│
-40 │ return self._balances[account]
+47 │ return self._balances[account]
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:40:16
+ ┌─ erc20_token.fe:47:16
│
-40 │ return self._balances[account]
+47 │ return self._balances[account]
│ ^^^^^^^^^^^^^^ ^^^^^^^ address: Value
│ │
│ Map: Storage { nonce: Some(0) }
note:
- ┌─ erc20_token.fe:40:16
+ ┌─ erc20_token.fe:47:16
│
-40 │ return self._balances[account]
+47 │ return self._balances[account]
│ ^^^^^^^^^^^^^^^^^^^^^^^ u256: Storage { nonce: None } => Value
note:
- ┌─ erc20_token.fe:42:5
+ ┌─ erc20_token.fe:50:5
│
-42 │ ╭ pub fn transfer(self, ctx: Context, recipient: address, value: u256) -> bool:
-43 │ │ self._transfer(ctx, sender: ctx.msg_sender(), recipient, value)
-44 │ │ return true
- │ ╰───────────────────^ attributes hash: 9700541873563816287
+50 │ ╭ pub fn transfer(self, ctx: Context, recipient: address, value: u256) -> bool {
+51 │ │ self._transfer(ctx, sender: ctx.msg_sender(), recipient, value)
+52 │ │ return true
+53 │ │ }
+ │ ╰─────^ attributes hash: 9700541873563816287
│
= FunctionSignature {
self_decl: Some(
@@ -297,37 +304,38 @@ note:
}
note:
- ┌─ erc20_token.fe:43:9
+ ┌─ erc20_token.fe:51:9
│
-43 │ self._transfer(ctx, sender: ctx.msg_sender(), recipient, value)
+51 │ self._transfer(ctx, sender: ctx.msg_sender(), recipient, value)
│ ^^^^ ^^^ ^^^ Context: Memory
│ │ │
│ │ Context: Memory
│ ERC20: Value
note:
- ┌─ erc20_token.fe:43:37
+ ┌─ erc20_token.fe:51:37
│
-43 │ self._transfer(ctx, sender: ctx.msg_sender(), recipient, value)
+51 │ self._transfer(ctx, sender: ctx.msg_sender(), recipient, value)
│ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ u256: Value
│ │ │
│ │ address: Value
│ address: Value
note:
- ┌─ erc20_token.fe:43:9
+ ┌─ erc20_token.fe:51:9
│
-43 │ self._transfer(ctx, sender: ctx.msg_sender(), recipient, value)
+51 │ self._transfer(ctx, sender: ctx.msg_sender(), recipient, value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
-44 │ return true
+52 │ return true
│ ^^^^ bool: Value
note:
- ┌─ erc20_token.fe:46:5
+ ┌─ erc20_token.fe:55:5
│
-46 │ ╭ pub fn allowance(self, owner: address, spender: address) -> u256:
-47 │ │ return self._allowances[owner][spender]
- │ ╰───────────────────────────────────────────────^ attributes hash: 3316599995530573429
+55 │ ╭ pub fn allowance(self, owner: address, spender: address) -> u256 {
+56 │ │ return self._allowances[owner][spender]
+57 │ │ }
+ │ ╰─────^ attributes hash: 3316599995530573429
│
= FunctionSignature {
self_decl: Some(
@@ -364,40 +372,41 @@ note:
}
note:
- ┌─ erc20_token.fe:47:16
+ ┌─ erc20_token.fe:56:16
│
-47 │ return self._allowances[owner][spender]
+56 │ return self._allowances[owner][spender]
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:47:16
+ ┌─ erc20_token.fe:56:16
│
-47 │ return self._allowances[owner][spender]
+56 │ return self._allowances[owner][spender]
│ ^^^^^^^^^^^^^^^^ ^^^^^ address: Value
│ │
│ Map>: Storage { nonce: Some(1) }
note:
- ┌─ erc20_token.fe:47:16
+ ┌─ erc20_token.fe:56:16
│
-47 │ return self._allowances[owner][spender]
+56 │ return self._allowances[owner][spender]
│ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ address: Value
│ │
│ Map: Storage { nonce: None }
note:
- ┌─ erc20_token.fe:47:16
+ ┌─ erc20_token.fe:56:16
│
-47 │ return self._allowances[owner][spender]
+56 │ return self._allowances[owner][spender]
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Storage { nonce: None } => Value
note:
- ┌─ erc20_token.fe:49:5
+ ┌─ erc20_token.fe:59:5
│
-49 │ ╭ pub fn approve(self, ctx: Context, spender: address, value: u256) -> bool:
-50 │ │ self._approve(ctx, owner: ctx.msg_sender(), spender, value)
-51 │ │ return true
- │ ╰───────────────────^ attributes hash: 8309406699454253603
+59 │ ╭ pub fn approve(self, ctx: Context, spender: address, value: u256) -> bool {
+60 │ │ self._approve(ctx, owner: ctx.msg_sender(), spender, value)
+61 │ │ return true
+62 │ │ }
+ │ ╰─────^ attributes hash: 8309406699454253603
│
= FunctionSignature {
self_decl: Some(
@@ -448,40 +457,41 @@ note:
}
note:
- ┌─ erc20_token.fe:50:9
+ ┌─ erc20_token.fe:60:9
│
-50 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value)
+60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value)
│ ^^^^ ^^^ ^^^ Context: Memory
│ │ │
│ │ Context: Memory
│ ERC20: Value
note:
- ┌─ erc20_token.fe:50:35
+ ┌─ erc20_token.fe:60:35
│
-50 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value)
+60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value)
│ ^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^ u256: Value
│ │ │
│ │ address: Value
│ address: Value
note:
- ┌─ erc20_token.fe:50:9
+ ┌─ erc20_token.fe:60:9
│
-50 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value)
+60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
-51 │ return true
+61 │ return true
│ ^^^^ bool: Value
note:
- ┌─ erc20_token.fe:53:5
+ ┌─ erc20_token.fe:64:5
│
-53 │ ╭ pub fn transferFrom(self, ctx: Context, sender: address, recipient: address, value: u256) -> bool:
-54 │ │ assert self._allowances[sender][ctx.msg_sender()] >= value
-55 │ │ self._transfer(ctx, sender, recipient, value)
-56 │ │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
-57 │ │ return true
- │ ╰───────────────────^ attributes hash: 14464733394183378558
+64 │ ╭ pub fn transferFrom(self, ctx: Context, sender: address, recipient: address, value: u256) -> bool {
+65 │ │ assert self._allowances[sender][ctx.msg_sender()] >= value
+66 │ │ self._transfer(ctx, sender, recipient, value)
+67 │ │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
+68 │ │ return true
+69 │ │ }
+ │ ╰─────^ attributes hash: 14464733394183378558
│
= FunctionSignature {
self_decl: Some(
@@ -541,47 +551,47 @@ note:
}
note:
- ┌─ erc20_token.fe:54:16
+ ┌─ erc20_token.fe:65:16
│
-54 │ assert self._allowances[sender][ctx.msg_sender()] >= value
+65 │ assert self._allowances[sender][ctx.msg_sender()] >= value
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:54:16
+ ┌─ erc20_token.fe:65:16
│
-54 │ assert self._allowances[sender][ctx.msg_sender()] >= value
+65 │ assert self._allowances[sender][ctx.msg_sender()] >= value
│ ^^^^^^^^^^^^^^^^ ^^^^^^ address: Value
│ │
│ Map>: Storage { nonce: Some(1) }
note:
- ┌─ erc20_token.fe:54:16
+ ┌─ erc20_token.fe:65:16
│
-54 │ assert self._allowances[sender][ctx.msg_sender()] >= value
+65 │ assert self._allowances[sender][ctx.msg_sender()] >= value
│ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ Context: Memory
│ │
│ Map: Storage { nonce: None }
note:
- ┌─ erc20_token.fe:54:41
+ ┌─ erc20_token.fe:65:41
│
-54 │ assert self._allowances[sender][ctx.msg_sender()] >= value
+65 │ assert self._allowances[sender][ctx.msg_sender()] >= value
│ ^^^^^^^^^^^^^^^^ address: Value
note:
- ┌─ erc20_token.fe:54:16
+ ┌─ erc20_token.fe:65:16
│
-54 │ assert self._allowances[sender][ctx.msg_sender()] >= value
+65 │ assert self._allowances[sender][ctx.msg_sender()] >= value
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
│ │
│ u256: Storage { nonce: None } => Value
note:
- ┌─ erc20_token.fe:54:16
+ ┌─ erc20_token.fe:65:16
│
-54 │ assert self._allowances[sender][ctx.msg_sender()] >= value
+65 │ assert self._allowances[sender][ctx.msg_sender()] >= value
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bool: Value
-55 │ self._transfer(ctx, sender, recipient, value)
+66 │ self._transfer(ctx, sender, recipient, value)
│ ^^^^ ^^^ ^^^^^^ ^^^^^^^^^ ^^^^^ u256: Value
│ │ │ │ │
│ │ │ │ address: Value
@@ -590,11 +600,11 @@ note:
│ ERC20: Value
note:
- ┌─ erc20_token.fe:55:9
+ ┌─ erc20_token.fe:66:9
│
-55 │ self._transfer(ctx, sender, recipient, value)
+66 │ self._transfer(ctx, sender, recipient, value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
-56 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
+67 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
│ ^^^^ ^^^ ^^^^^^ ^^^ Context: Memory
│ │ │ │
│ │ │ address: Value
@@ -602,64 +612,65 @@ note:
│ ERC20: Value
note:
- ┌─ erc20_token.fe:56:52
+ ┌─ erc20_token.fe:67:52
│
-56 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
+67 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
│ ^^^^^^^^^^^^^^^^ ^^^^ ERC20: Value
│ │
│ address: Value
note:
- ┌─ erc20_token.fe:56:77
+ ┌─ erc20_token.fe:67:77
│
-56 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
+67 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
│ ^^^^^^^^^^^^^^^^ ^^^^^^ address: Value
│ │
│ Map>: Storage { nonce: Some(1) }
note:
- ┌─ erc20_token.fe:56:77
+ ┌─ erc20_token.fe:67:77
│
-56 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
+67 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ Context: Memory
│ │
│ Map: Storage { nonce: None }
note:
- ┌─ erc20_token.fe:56:102
+ ┌─ erc20_token.fe:67:102
│
-56 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
+67 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
│ ^^^^^^^^^^^^^^^^ address: Value
note:
- ┌─ erc20_token.fe:56:77
+ ┌─ erc20_token.fe:67:77
│
-56 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
+67 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
│ │
│ u256: Storage { nonce: None } => Value
note:
- ┌─ erc20_token.fe:56:77
+ ┌─ erc20_token.fe:67:77
│
-56 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
+67 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
note:
- ┌─ erc20_token.fe:56:9
+ ┌─ erc20_token.fe:67:9
│
-56 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
+67 │ self._approve(ctx, owner: sender, spender: ctx.msg_sender(), value: self._allowances[sender][ctx.msg_sender()] - value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
-57 │ return true
+68 │ return true
│ ^^^^ bool: Value
note:
- ┌─ erc20_token.fe:59:5
+ ┌─ erc20_token.fe:71:5
│
-59 │ ╭ pub fn increaseAllowance(self, ctx: Context, spender: address, addedValue: u256) -> bool:
-60 │ │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
-61 │ │ return true
- │ ╰───────────────────^ attributes hash: 14606848714789380929
+71 │ ╭ pub fn increaseAllowance(self, ctx: Context, spender: address, addedValue: u256) -> bool {
+72 │ │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
+73 │ │ return true
+74 │ │ }
+ │ ╰─────^ attributes hash: 14606848714789380929
│
= FunctionSignature {
self_decl: Some(
@@ -710,74 +721,75 @@ note:
}
note:
- ┌─ erc20_token.fe:60:9
+ ┌─ erc20_token.fe:72:9
│
-60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
+72 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
│ ^^^^ ^^^ ^^^ Context: Memory
│ │ │
│ │ Context: Memory
│ ERC20: Value
note:
- ┌─ erc20_token.fe:60:35
+ ┌─ erc20_token.fe:72:35
│
-60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
+72 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
│ ^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^ ERC20: Value
│ │ │
│ │ address: Value
│ address: Value
note:
- ┌─ erc20_token.fe:60:69
+ ┌─ erc20_token.fe:72:69
│
-60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
+72 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
│ ^^^^^^^^^^^^^^^^ ^^^ Context: Memory
│ │
│ Map>: Storage { nonce: Some(1) }
note:
- ┌─ erc20_token.fe:60:86
+ ┌─ erc20_token.fe:72:86
│
-60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
+72 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
│ ^^^^^^^^^^^^^^^^ address: Value
note:
- ┌─ erc20_token.fe:60:69
+ ┌─ erc20_token.fe:72:69
│
-60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
+72 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ address: Value
│ │
│ Map: Storage { nonce: None }
note:
- ┌─ erc20_token.fe:60:69
+ ┌─ erc20_token.fe:72:69
│
-60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
+72 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ u256: Value
│ │
│ u256: Storage { nonce: None } => Value
note:
- ┌─ erc20_token.fe:60:69
+ ┌─ erc20_token.fe:72:69
│
-60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
+72 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
note:
- ┌─ erc20_token.fe:60:9
+ ┌─ erc20_token.fe:72:9
│
-60 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
+72 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] + addedValue)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
-61 │ return true
+73 │ return true
│ ^^^^ bool: Value
note:
- ┌─ erc20_token.fe:63:5
+ ┌─ erc20_token.fe:76:5
│
-63 │ ╭ pub fn decreaseAllowance(self, ctx: Context, spender: address, subtractedValue: u256) -> bool:
-64 │ │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
-65 │ │ return true
- │ ╰───────────────────^ attributes hash: 9154612140799800808
+76 │ ╭ pub fn decreaseAllowance(self, ctx: Context, spender: address, subtractedValue: u256) -> bool {
+77 │ │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
+78 │ │ return true
+79 │ │ }
+ │ ╰─────^ attributes hash: 9154612140799800808
│
= FunctionSignature {
self_decl: Some(
@@ -828,78 +840,78 @@ note:
}
note:
- ┌─ erc20_token.fe:64:9
+ ┌─ erc20_token.fe:77:9
│
-64 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
+77 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
│ ^^^^ ^^^ ^^^ Context: Memory
│ │ │
│ │ Context: Memory
│ ERC20: Value
note:
- ┌─ erc20_token.fe:64:35
+ ┌─ erc20_token.fe:77:35
│
-64 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
+77 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
│ ^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^ ERC20: Value
│ │ │
│ │ address: Value
│ address: Value
note:
- ┌─ erc20_token.fe:64:69
+ ┌─ erc20_token.fe:77:69
│
-64 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
+77 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
│ ^^^^^^^^^^^^^^^^ ^^^ Context: Memory
│ │
│ Map>: Storage { nonce: Some(1) }
note:
- ┌─ erc20_token.fe:64:86
+ ┌─ erc20_token.fe:77:86
│
-64 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
+77 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
│ ^^^^^^^^^^^^^^^^ address: Value
note:
- ┌─ erc20_token.fe:64:69
+ ┌─ erc20_token.fe:77:69
│
-64 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
+77 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ address: Value
│ │
│ Map: Storage { nonce: None }
note:
- ┌─ erc20_token.fe:64:69
+ ┌─ erc20_token.fe:77:69
│
-64 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
+77 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ u256: Value
│ │
│ u256: Storage { nonce: None } => Value
note:
- ┌─ erc20_token.fe:64:69
+ ┌─ erc20_token.fe:77:69
│
-64 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
+77 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
note:
- ┌─ erc20_token.fe:64:9
+ ┌─ erc20_token.fe:77:9
│
-64 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
+77 │ self._approve(ctx, owner: ctx.msg_sender(), spender, value: self._allowances[ctx.msg_sender()][spender] - subtractedValue)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
-65 │ return true
+78 │ return true
│ ^^^^ bool: Value
note:
- ┌─ erc20_token.fe:67:5
+ ┌─ erc20_token.fe:81:5
│
-67 │ ╭ fn _transfer(self, ctx: Context, sender: address, recipient: address, value: u256):
-68 │ │ assert sender != address(0)
-69 │ │ assert recipient != address(0)
-70 │ │ _before_token_transfer(from: sender, to: recipient, value)
-71 │ │ self._balances[sender] = self._balances[sender] - value
-72 │ │ self._balances[recipient] = self._balances[recipient] + value
-73 │ │ emit Transfer(ctx, from: sender, to: recipient, value)
- │ ╰──────────────────────────────────────────────────────────────^ attributes hash: 10648262769466339085
+81 │ ╭ fn _transfer(self, ctx: Context, sender: address, recipient: address, value: u256) {
+82 │ │ assert sender != address(0)
+83 │ │ assert recipient != address(0)
+84 │ │ _before_token_transfer(from: sender, to: recipient, value)
+ · │
+87 │ │ emit Transfer(ctx, from: sender, to: recipient, value)
+88 │ │ }
+ │ ╰─────^ attributes hash: 10648262769466339085
│
= FunctionSignature {
self_decl: Some(
@@ -959,132 +971,132 @@ note:
}
note:
- ┌─ erc20_token.fe:68:16
+ ┌─ erc20_token.fe:82:16
│
-68 │ assert sender != address(0)
+82 │ assert sender != address(0)
│ ^^^^^^ ^ u256: Value
│ │
│ address: Value
note:
- ┌─ erc20_token.fe:68:26
+ ┌─ erc20_token.fe:82:26
│
-68 │ assert sender != address(0)
+82 │ assert sender != address(0)
│ ^^^^^^^^^^ address: Value
note:
- ┌─ erc20_token.fe:68:16
+ ┌─ erc20_token.fe:82:16
│
-68 │ assert sender != address(0)
+82 │ assert sender != address(0)
│ ^^^^^^^^^^^^^^^^^^^^ bool: Value
-69 │ assert recipient != address(0)
+83 │ assert recipient != address(0)
│ ^^^^^^^^^ ^ u256: Value
│ │
│ address: Value
note:
- ┌─ erc20_token.fe:69:29
+ ┌─ erc20_token.fe:83:29
│
-69 │ assert recipient != address(0)
+83 │ assert recipient != address(0)
│ ^^^^^^^^^^ address: Value
note:
- ┌─ erc20_token.fe:69:16
+ ┌─ erc20_token.fe:83:16
│
-69 │ assert recipient != address(0)
+83 │ assert recipient != address(0)
│ ^^^^^^^^^^^^^^^^^^^^^^^ bool: Value
-70 │ _before_token_transfer(from: sender, to: recipient, value)
+84 │ _before_token_transfer(from: sender, to: recipient, value)
│ ^^^^^^ ^^^^^^^^^ ^^^^^ u256: Value
│ │ │
│ │ address: Value
│ address: Value
note:
- ┌─ erc20_token.fe:70:9
+ ┌─ erc20_token.fe:84:9
│
-70 │ _before_token_transfer(from: sender, to: recipient, value)
+84 │ _before_token_transfer(from: sender, to: recipient, value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
-71 │ self._balances[sender] = self._balances[sender] - value
+85 │ self._balances[sender] = self._balances[sender] - value
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:71:9
+ ┌─ erc20_token.fe:85:9
│
-71 │ self._balances[sender] = self._balances[sender] - value
+85 │ self._balances[sender] = self._balances[sender] - value
│ ^^^^^^^^^^^^^^ ^^^^^^ address: Value
│ │
│ Map: Storage { nonce: Some(0) }
note:
- ┌─ erc20_token.fe:71:9
+ ┌─ erc20_token.fe:85:9
│
-71 │ self._balances[sender] = self._balances[sender] - value
+85 │ self._balances[sender] = self._balances[sender] - value
│ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ERC20: Value
│ │
│ u256: Storage { nonce: None }
note:
- ┌─ erc20_token.fe:71:34
+ ┌─ erc20_token.fe:85:34
│
-71 │ self._balances[sender] = self._balances[sender] - value
+85 │ self._balances[sender] = self._balances[sender] - value
│ ^^^^^^^^^^^^^^ ^^^^^^ address: Value
│ │
│ Map: Storage { nonce: Some(0) }
note:
- ┌─ erc20_token.fe:71:34
+ ┌─ erc20_token.fe:85:34
│
-71 │ self._balances[sender] = self._balances[sender] - value
+85 │ self._balances[sender] = self._balances[sender] - value
│ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
│ │
│ u256: Storage { nonce: None } => Value
note:
- ┌─ erc20_token.fe:71:34
+ ┌─ erc20_token.fe:85:34
│
-71 │ self._balances[sender] = self._balances[sender] - value
+85 │ self._balances[sender] = self._balances[sender] - value
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
-72 │ self._balances[recipient] = self._balances[recipient] + value
+86 │ self._balances[recipient] = self._balances[recipient] + value
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:72:9
+ ┌─ erc20_token.fe:86:9
│
-72 │ self._balances[recipient] = self._balances[recipient] + value
+86 │ self._balances[recipient] = self._balances[recipient] + value
│ ^^^^^^^^^^^^^^ ^^^^^^^^^ address: Value
│ │
│ Map: Storage { nonce: Some(0) }
note:
- ┌─ erc20_token.fe:72:9
+ ┌─ erc20_token.fe:86:9
│
-72 │ self._balances[recipient] = self._balances[recipient] + value
+86 │ self._balances[recipient] = self._balances[recipient] + value
│ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ERC20: Value
│ │
│ u256: Storage { nonce: None }
note:
- ┌─ erc20_token.fe:72:37
+ ┌─ erc20_token.fe:86:37
│
-72 │ self._balances[recipient] = self._balances[recipient] + value
+86 │ self._balances[recipient] = self._balances[recipient] + value
│ ^^^^^^^^^^^^^^ ^^^^^^^^^ address: Value
│ │
│ Map: Storage { nonce: Some(0) }
note:
- ┌─ erc20_token.fe:72:37
+ ┌─ erc20_token.fe:86:37
│
-72 │ self._balances[recipient] = self._balances[recipient] + value
+86 │ self._balances[recipient] = self._balances[recipient] + value
│ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
│ │
│ u256: Storage { nonce: None } => Value
note:
- ┌─ erc20_token.fe:72:37
+ ┌─ erc20_token.fe:86:37
│
-72 │ self._balances[recipient] = self._balances[recipient] + value
+86 │ self._balances[recipient] = self._balances[recipient] + value
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
-73 │ emit Transfer(ctx, from: sender, to: recipient, value)
+87 │ emit Transfer(ctx, from: sender, to: recipient, value)
│ ^^^ ^^^^^^ ^^^^^^^^^ ^^^^^ u256: Value
│ │ │ │
│ │ │ address: Value
@@ -1092,9 +1104,9 @@ note:
│ Context: Memory
note:
- ┌─ erc20_token.fe:73:9
+ ┌─ erc20_token.fe:87:9
│
-73 │ emit Transfer(ctx, from: sender, to: recipient, value)
+87 │ emit Transfer(ctx, from: sender, to: recipient, value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 5533489995250141934
│
= Event {
@@ -1133,15 +1145,16 @@ note:
}
note:
- ┌─ erc20_token.fe:75:5
+ ┌─ erc20_token.fe:90:5
│
-75 │ ╭ fn _mint(self, ctx: Context, account: address, value: u256):
-76 │ │ assert account != address(0)
-77 │ │ _before_token_transfer(from: address(0), to: account, value)
-78 │ │ self._total_supply = self._total_supply + value
-79 │ │ self._balances[account] = self._balances[account] + value
-80 │ │ emit Transfer(ctx, from: address(0), to: account, value)
- │ ╰────────────────────────────────────────────────────────────────^ attributes hash: 6502254374233415580
+90 │ ╭ fn _mint(self, ctx: Context, account: address, value: u256) {
+91 │ │ assert account != address(0)
+92 │ │ _before_token_transfer(from: address(0), to: account, value)
+93 │ │ self._total_supply = self._total_supply + value
+94 │ │ self._balances[account] = self._balances[account] + value
+95 │ │ emit Transfer(ctx, from: address(0), to: account, value)
+96 │ │ }
+ │ ╰─────^ attributes hash: 6502254374233415580
│
= FunctionSignature {
self_decl: Some(
@@ -1192,123 +1205,123 @@ note:
}
note:
- ┌─ erc20_token.fe:76:16
+ ┌─ erc20_token.fe:91:16
│
-76 │ assert account != address(0)
+91 │ assert account != address(0)
│ ^^^^^^^ ^ u256: Value
│ │
│ address: Value
note:
- ┌─ erc20_token.fe:76:27
+ ┌─ erc20_token.fe:91:27
│
-76 │ assert account != address(0)
+91 │ assert account != address(0)
│ ^^^^^^^^^^ address: Value
note:
- ┌─ erc20_token.fe:76:16
+ ┌─ erc20_token.fe:91:16
│
-76 │ assert account != address(0)
+91 │ assert account != address(0)
│ ^^^^^^^^^^^^^^^^^^^^^ bool: Value
-77 │ _before_token_transfer(from: address(0), to: account, value)
+92 │ _before_token_transfer(from: address(0), to: account, value)
│ ^ u256: Value
note:
- ┌─ erc20_token.fe:77:38
+ ┌─ erc20_token.fe:92:38
│
-77 │ _before_token_transfer(from: address(0), to: account, value)
+92 │ _before_token_transfer(from: address(0), to: account, value)
│ ^^^^^^^^^^ ^^^^^^^ ^^^^^ u256: Value
│ │ │
│ │ address: Value
│ address: Value
note:
- ┌─ erc20_token.fe:77:9
+ ┌─ erc20_token.fe:92:9
│
-77 │ _before_token_transfer(from: address(0), to: account, value)
+92 │ _before_token_transfer(from: address(0), to: account, value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
-78 │ self._total_supply = self._total_supply + value
+93 │ self._total_supply = self._total_supply + value
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:78:9
+ ┌─ erc20_token.fe:93:9
│
-78 │ self._total_supply = self._total_supply + value
+93 │ self._total_supply = self._total_supply + value
│ ^^^^^^^^^^^^^^^^^^ ^^^^ ERC20: Value
│ │
│ u256: Storage { nonce: Some(2) }
note:
- ┌─ erc20_token.fe:78:30
+ ┌─ erc20_token.fe:93:30
│
-78 │ self._total_supply = self._total_supply + value
+93 │ self._total_supply = self._total_supply + value
│ ^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
│ │
│ u256: Storage { nonce: Some(2) } => Value
note:
- ┌─ erc20_token.fe:78:30
+ ┌─ erc20_token.fe:93:30
│
-78 │ self._total_supply = self._total_supply + value
+93 │ self._total_supply = self._total_supply + value
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
-79 │ self._balances[account] = self._balances[account] + value
+94 │ self._balances[account] = self._balances[account] + value
│ ^^^^ ERC20: Value
note:
- ┌─ erc20_token.fe:79:9
+ ┌─ erc20_token.fe:94:9
│
-79 │ self._balances[account] = self._balances[account] + value
+94 │ self._balances[account] = self._balances[account] + value
│ ^^^^^^^^^^^^^^ ^^^^^^^ address: Value
│ │
│ Map: Storage { nonce: Some(0) }
note:
- ┌─ erc20_token.fe:79:9
+ ┌─ erc20_token.fe:94:9
│
-79 │ self._balances[account] = self._balances[account] + value
+94 │ self._balances[account] = self._balances[account] + value
│ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ERC20: Value
│ │
│ u256: Storage { nonce: None }
note:
- ┌─ erc20_token.fe:79:35
+ ┌─ erc20_token.fe:94:35
│
-79 │ self._balances[account] = self._balances[account] + value
+94 │ self._balances[account] = self._balances[account] + value
│ ^^^^^^^^^^^^^^ ^^^^^^^ address: Value
│ │
│ Map: Storage { nonce: Some(0) }
note:
- ┌─ erc20_token.fe:79:35
+ ┌─ erc20_token.fe:94:35
│
-79 │ self._balances[account] = self._balances[account] + value
+94 │ self._balances[account] = self._balances[account] + value
│ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
│ │
│ u256: Storage { nonce: None } => Value
note:
- ┌─ erc20_token.fe:79:35
+ ┌─ erc20_token.fe:94:35
│
-79 │ self._balances[account] = self._balances[account] + value
+94 │ self._balances[account] = self._balances[account] + value
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
-80 │ emit Transfer(ctx, from: address(0), to: account, value)
+95 │ emit Transfer(ctx, from: address(0), to: account, value)
│ ^^^ ^ u256: Value
│ │
│ Context: Memory
note:
- ┌─ erc20_token.fe:80:34
+ ┌─ erc20_token.fe:95:34
│
-80 │ emit Transfer(ctx, from: address(0), to: account, value)
+95 │ emit Transfer(ctx, from: address(0), to: account, value)
│ ^^^^^^^^^^ ^^^^^^^ ^^^^^ u256: Value
│ │ │
│ │ address: Value
│ address: Value
note:
- ┌─ erc20_token.fe:80:9
+ ┌─ erc20_token.fe:95:9
│
-80 │ emit Transfer(ctx, from: address(0), to: account, value)
+95 │ emit Transfer(ctx, from: address(0), to: account, value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 5533489995250141934
│
= Event {
@@ -1347,492 +1360,494 @@ note:
}
note:
- ┌─ erc20_token.fe:82:5
- │
-82 │ ╭ fn _burn(self, ctx: Context, account: address, value: u256):
-83 │ │ assert account != address(0)
-84 │ │ _before_token_transfer(from: account, to: address(0), value)
-85 │ │ self._balances[account] = self._balances[account] - value
-86 │ │ self._total_supply = self._total_supply - value
-87 │ │ emit Transfer(ctx, from: account, to: address(0), value)
- │ ╰────────────────────────────────────────────────────────────────^ attributes hash: 6502254374233415580
- │
- = FunctionSignature {
- self_decl: Some(
- Mutable,
- ),
- ctx_decl: Some(
- Mutable,
- ),
- params: [
- FunctionParam {
- label: None,
- name: "ctx",
- typ: Ok(
- Struct(
- Struct {
- name: "Context",
- field_count: 0,
- },
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "account",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "value",
- typ: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Unit,
- ),
- ),
- }
-
-note:
- ┌─ erc20_token.fe:83:16
- │
-83 │ assert account != address(0)
+ ┌─ erc20_token.fe:98:5
+ │
+ 98 │ ╭ fn _burn(self, ctx: Context, account: address, value: u256) {
+ 99 │ │ assert account != address(0)
+100 │ │ _before_token_transfer(from: account, to: address(0), value)
+101 │ │ self._balances[account] = self._balances[account] - value
+102 │ │ self._total_supply = self._total_supply - value
+103 │ │ emit Transfer(ctx, from: account, to: address(0), value)
+104 │ │ }
+ │ ╰─────^ attributes hash: 6502254374233415580
+ │
+ = FunctionSignature {
+ self_decl: Some(
+ Mutable,
+ ),
+ ctx_decl: Some(
+ Mutable,
+ ),
+ params: [
+ FunctionParam {
+ label: None,
+ name: "ctx",
+ typ: Ok(
+ Struct(
+ Struct {
+ name: "Context",
+ field_count: 0,
+ },
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "account",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "value",
+ typ: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Unit,
+ ),
+ ),
+ }
+
+note:
+ ┌─ erc20_token.fe:99:16
+ │
+99 │ assert account != address(0)
│ ^^^^^^^ ^ u256: Value
│ │
│ address: Value
note:
- ┌─ erc20_token.fe:83:27
+ ┌─ erc20_token.fe:99:27
│
-83 │ assert account != address(0)
+99 │ assert account != address(0)
│ ^^^^^^^^^^ address: Value
note:
- ┌─ erc20_token.fe:83:16
- │
-83 │ assert account != address(0)
- │ ^^^^^^^^^^^^^^^^^^^^^ bool: Value
-84 │ _before_token_transfer(from: account, to: address(0), value)
- │ ^^^^^^^ ^ u256: Value
- │ │
- │ address: Value
-
-note:
- ┌─ erc20_token.fe:84:51
- │
-84 │ _before_token_transfer(from: account, to: address(0), value)
- │ ^^^^^^^^^^ ^^^^^ u256: Value
- │ │
- │ address: Value
-
-note:
- ┌─ erc20_token.fe:84:9
- │
-84 │ _before_token_transfer(from: account, to: address(0), value)
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
-85 │ self._balances[account] = self._balances[account] - value
- │ ^^^^ ERC20: Value
-
-note:
- ┌─ erc20_token.fe:85:9
- │
-85 │ self._balances[account] = self._balances[account] - value
- │ ^^^^^^^^^^^^^^ ^^^^^^^ address: Value
- │ │
- │ Map: Storage { nonce: Some(0) }
-
-note:
- ┌─ erc20_token.fe:85:9
- │
-85 │ self._balances[account] = self._balances[account] - value
- │ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ERC20: Value
- │ │
- │ u256: Storage { nonce: None }
-
-note:
- ┌─ erc20_token.fe:85:35
- │
-85 │ self._balances[account] = self._balances[account] - value
- │ ^^^^^^^^^^^^^^ ^^^^^^^ address: Value
- │ │
- │ Map: Storage { nonce: Some(0) }
-
-note:
- ┌─ erc20_token.fe:85:35
- │
-85 │ self._balances[account] = self._balances[account] - value
- │ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
- │ │
- │ u256: Storage { nonce: None } => Value
-
-note:
- ┌─ erc20_token.fe:85:35
- │
-85 │ self._balances[account] = self._balances[account] - value
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
-86 │ self._total_supply = self._total_supply - value
- │ ^^^^ ERC20: Value
-
-note:
- ┌─ erc20_token.fe:86:9
- │
-86 │ self._total_supply = self._total_supply - value
- │ ^^^^^^^^^^^^^^^^^^ ^^^^ ERC20: Value
- │ │
- │ u256: Storage { nonce: Some(2) }
-
-note:
- ┌─ erc20_token.fe:86:30
- │
-86 │ self._total_supply = self._total_supply - value
- │ ^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
- │ │
- │ u256: Storage { nonce: Some(2) } => Value
-
-note:
- ┌─ erc20_token.fe:86:30
- │
-86 │ self._total_supply = self._total_supply - value
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
-87 │ emit Transfer(ctx, from: account, to: address(0), value)
- │ ^^^ ^^^^^^^ ^ u256: Value
- │ │ │
- │ │ address: Value
- │ Context: Memory
-
-note:
- ┌─ erc20_token.fe:87:47
- │
-87 │ emit Transfer(ctx, from: account, to: address(0), value)
- │ ^^^^^^^^^^ ^^^^^ u256: Value
- │ │
- │ address: Value
-
-note:
- ┌─ erc20_token.fe:87:9
- │
-87 │ emit Transfer(ctx, from: account, to: address(0), value)
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 5533489995250141934
- │
- = Event {
- name: "Transfer",
- fields: [
- EventField {
- name: "from",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- is_indexed: true,
- },
- EventField {
- name: "to",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- is_indexed: true,
- },
- EventField {
- name: "value",
- typ: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- is_indexed: false,
- },
- ],
- }
-
-note:
- ┌─ erc20_token.fe:89:5
- │
-89 │ ╭ fn _approve(self, ctx: Context, owner: address, spender: address, value: u256):
-90 │ │ assert owner != address(0)
-91 │ │ assert spender != address(0)
-92 │ │ self._allowances[owner][spender] = value
-93 │ │ emit Approval(ctx, owner, spender, value)
- │ ╰─────────────────────────────────────────────────^ attributes hash: 1630416716014819616
- │
- = FunctionSignature {
- self_decl: Some(
- Mutable,
- ),
- ctx_decl: Some(
- Mutable,
- ),
- params: [
- FunctionParam {
- label: None,
- name: "ctx",
- typ: Ok(
- Struct(
- Struct {
- name: "Context",
- field_count: 0,
- },
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "owner",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "spender",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "value",
- typ: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Unit,
- ),
- ),
- }
-
-note:
- ┌─ erc20_token.fe:90:16
- │
-90 │ assert owner != address(0)
- │ ^^^^^ ^ u256: Value
- │ │
- │ address: Value
-
-note:
- ┌─ erc20_token.fe:90:25
- │
-90 │ assert owner != address(0)
- │ ^^^^^^^^^^ address: Value
-
-note:
- ┌─ erc20_token.fe:90:16
- │
-90 │ assert owner != address(0)
- │ ^^^^^^^^^^^^^^^^^^^ bool: Value
-91 │ assert spender != address(0)
- │ ^^^^^^^ ^ u256: Value
- │ │
- │ address: Value
-
-note:
- ┌─ erc20_token.fe:91:27
- │
-91 │ assert spender != address(0)
- │ ^^^^^^^^^^ address: Value
-
-note:
- ┌─ erc20_token.fe:91:16
- │
-91 │ assert spender != address(0)
- │ ^^^^^^^^^^^^^^^^^^^^^ bool: Value
-92 │ self._allowances[owner][spender] = value
- │ ^^^^ ERC20: Value
-
-note:
- ┌─ erc20_token.fe:92:9
- │
-92 │ self._allowances[owner][spender] = value
- │ ^^^^^^^^^^^^^^^^ ^^^^^ address: Value
- │ │
- │ Map>: Storage { nonce: Some(1) }
-
-note:
- ┌─ erc20_token.fe:92:9
- │
-92 │ self._allowances[owner][spender] = value
- │ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ address: Value
- │ │
- │ Map: Storage { nonce: None }
-
-note:
- ┌─ erc20_token.fe:92:9
- │
-92 │ self._allowances[owner][spender] = value
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
- │ │
- │ u256: Storage { nonce: None }
-93 │ emit Approval(ctx, owner, spender, value)
- │ ^^^ ^^^^^ ^^^^^^^ ^^^^^ u256: Value
- │ │ │ │
- │ │ │ address: Value
- │ │ address: Value
- │ Context: Memory
-
-note:
- ┌─ erc20_token.fe:93:9
- │
-93 │ emit Approval(ctx, owner, spender, value)
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 8893313742751514912
- │
- = Event {
- name: "Approval",
- fields: [
- EventField {
- name: "owner",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- is_indexed: true,
- },
- EventField {
- name: "spender",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- is_indexed: true,
- },
- EventField {
- name: "value",
- typ: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- is_indexed: false,
- },
- ],
- }
-
-note:
- ┌─ erc20_token.fe:95:5
- │
-95 │ ╭ fn _setup_decimals(self, _ decimals_: u8):
-96 │ │ self._decimals = decimals_
- │ ╰──────────────────────────────────^ attributes hash: 2241116105643912660
- │
- = FunctionSignature {
- self_decl: Some(
- Mutable,
- ),
- ctx_decl: None,
- params: [
- FunctionParam {
- label: Some(
- "_",
- ),
- name: "decimals_",
- typ: Ok(
- Base(
- Numeric(
- U8,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Unit,
- ),
- ),
- }
-
-note:
- ┌─ erc20_token.fe:96:9
- │
-96 │ self._decimals = decimals_
- │ ^^^^ ERC20: Value
-
-note:
- ┌─ erc20_token.fe:96:9
- │
-96 │ self._decimals = decimals_
- │ ^^^^^^^^^^^^^^ ^^^^^^^^^ u8: Value
- │ │
- │ u8: Storage { nonce: Some(5) }
-
-note:
- ┌─ erc20_token.fe:98:5
- │
-98 │ ╭ fn _before_token_transfer(from: address, to: address, _ value: u256):
-99 │ │ return
- │ ╰──────────────^ attributes hash: 10552855728897650120
- │
- = FunctionSignature {
- self_decl: None,
- ctx_decl: None,
- params: [
- FunctionParam {
- label: None,
- name: "from",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- },
- FunctionParam {
- label: None,
- name: "to",
- typ: Ok(
- Base(
- Address,
- ),
- ),
- },
- FunctionParam {
- label: Some(
- "_",
- ),
- name: "value",
- typ: Ok(
- Base(
- Numeric(
- U256,
- ),
- ),
- ),
- },
- ],
- return_type: Ok(
- Base(
- Unit,
- ),
- ),
- }
+ ┌─ erc20_token.fe:99:16
+ │
+ 99 │ assert account != address(0)
+ │ ^^^^^^^^^^^^^^^^^^^^^ bool: Value
+100 │ _before_token_transfer(from: account, to: address(0), value)
+ │ ^^^^^^^ ^ u256: Value
+ │ │
+ │ address: Value
+
+note:
+ ┌─ erc20_token.fe:100:51
+ │
+100 │ _before_token_transfer(from: account, to: address(0), value)
+ │ ^^^^^^^^^^ ^^^^^ u256: Value
+ │ │
+ │ address: Value
+
+note:
+ ┌─ erc20_token.fe:100:9
+ │
+100 │ _before_token_transfer(from: account, to: address(0), value)
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
+101 │ self._balances[account] = self._balances[account] - value
+ │ ^^^^ ERC20: Value
+
+note:
+ ┌─ erc20_token.fe:101:9
+ │
+101 │ self._balances[account] = self._balances[account] - value
+ │ ^^^^^^^^^^^^^^ ^^^^^^^ address: Value
+ │ │
+ │ Map: Storage { nonce: Some(0) }
+
+note:
+ ┌─ erc20_token.fe:101:9
+ │
+101 │ self._balances[account] = self._balances[account] - value
+ │ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ERC20: Value
+ │ │
+ │ u256: Storage { nonce: None }
+
+note:
+ ┌─ erc20_token.fe:101:35
+ │
+101 │ self._balances[account] = self._balances[account] - value
+ │ ^^^^^^^^^^^^^^ ^^^^^^^ address: Value
+ │ │
+ │ Map: Storage { nonce: Some(0) }
+
+note:
+ ┌─ erc20_token.fe:101:35
+ │
+101 │ self._balances[account] = self._balances[account] - value
+ │ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
+ │ │
+ │ u256: Storage { nonce: None } => Value
+
+note:
+ ┌─ erc20_token.fe:101:35
+ │
+101 │ self._balances[account] = self._balances[account] - value
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
+102 │ self._total_supply = self._total_supply - value
+ │ ^^^^ ERC20: Value
+
+note:
+ ┌─ erc20_token.fe:102:9
+ │
+102 │ self._total_supply = self._total_supply - value
+ │ ^^^^^^^^^^^^^^^^^^ ^^^^ ERC20: Value
+ │ │
+ │ u256: Storage { nonce: Some(2) }
+
+note:
+ ┌─ erc20_token.fe:102:30
+ │
+102 │ self._total_supply = self._total_supply - value
+ │ ^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
+ │ │
+ │ u256: Storage { nonce: Some(2) } => Value
+
+note:
+ ┌─ erc20_token.fe:102:30
+ │
+102 │ self._total_supply = self._total_supply - value
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ u256: Value
+103 │ emit Transfer(ctx, from: account, to: address(0), value)
+ │ ^^^ ^^^^^^^ ^ u256: Value
+ │ │ │
+ │ │ address: Value
+ │ Context: Memory
+
+note:
+ ┌─ erc20_token.fe:103:47
+ │
+103 │ emit Transfer(ctx, from: account, to: address(0), value)
+ │ ^^^^^^^^^^ ^^^^^ u256: Value
+ │ │
+ │ address: Value
+
+note:
+ ┌─ erc20_token.fe:103:9
+ │
+103 │ emit Transfer(ctx, from: account, to: address(0), value)
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 5533489995250141934
+ │
+ = Event {
+ name: "Transfer",
+ fields: [
+ EventField {
+ name: "from",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ is_indexed: true,
+ },
+ EventField {
+ name: "to",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ is_indexed: true,
+ },
+ EventField {
+ name: "value",
+ typ: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ is_indexed: false,
+ },
+ ],
+ }
+
+note:
+ ┌─ erc20_token.fe:106:5
+ │
+106 │ ╭ fn _approve(self, ctx: Context, owner: address, spender: address, value: u256) {
+107 │ │ assert owner != address(0)
+108 │ │ assert spender != address(0)
+109 │ │ self._allowances[owner][spender] = value
+110 │ │ emit Approval(ctx, owner, spender, value)
+111 │ │ }
+ │ ╰─────^ attributes hash: 1630416716014819616
+ │
+ = FunctionSignature {
+ self_decl: Some(
+ Mutable,
+ ),
+ ctx_decl: Some(
+ Mutable,
+ ),
+ params: [
+ FunctionParam {
+ label: None,
+ name: "ctx",
+ typ: Ok(
+ Struct(
+ Struct {
+ name: "Context",
+ field_count: 0,
+ },
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "owner",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "spender",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "value",
+ typ: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Unit,
+ ),
+ ),
+ }
+
+note:
+ ┌─ erc20_token.fe:107:16
+ │
+107 │ assert owner != address(0)
+ │ ^^^^^ ^ u256: Value
+ │ │
+ │ address: Value
+
+note:
+ ┌─ erc20_token.fe:107:25
+ │
+107 │ assert owner != address(0)
+ │ ^^^^^^^^^^ address: Value
+
+note:
+ ┌─ erc20_token.fe:107:16
+ │
+107 │ assert owner != address(0)
+ │ ^^^^^^^^^^^^^^^^^^^ bool: Value
+108 │ assert spender != address(0)
+ │ ^^^^^^^ ^ u256: Value
+ │ │
+ │ address: Value
+
+note:
+ ┌─ erc20_token.fe:108:27
+ │
+108 │ assert spender != address(0)
+ │ ^^^^^^^^^^ address: Value
+
+note:
+ ┌─ erc20_token.fe:108:16
+ │
+108 │ assert spender != address(0)
+ │ ^^^^^^^^^^^^^^^^^^^^^ bool: Value
+109 │ self._allowances[owner][spender] = value
+ │ ^^^^ ERC20: Value
+
+note:
+ ┌─ erc20_token.fe:109:9
+ │
+109 │ self._allowances[owner][spender] = value
+ │ ^^^^^^^^^^^^^^^^ ^^^^^ address: Value
+ │ │
+ │ Map>: Storage { nonce: Some(1) }
+
+note:
+ ┌─ erc20_token.fe:109:9
+ │
+109 │ self._allowances[owner][spender] = value
+ │ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ address: Value
+ │ │
+ │ Map: Storage { nonce: None }
+
+note:
+ ┌─ erc20_token.fe:109:9
+ │
+109 │ self._allowances[owner][spender] = value
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ u256: Value
+ │ │
+ │ u256: Storage { nonce: None }
+110 │ emit Approval(ctx, owner, spender, value)
+ │ ^^^ ^^^^^ ^^^^^^^ ^^^^^ u256: Value
+ │ │ │ │
+ │ │ │ address: Value
+ │ │ address: Value
+ │ Context: Memory
+
+note:
+ ┌─ erc20_token.fe:110:9
+ │
+110 │ emit Approval(ctx, owner, spender, value)
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 8893313742751514912
+ │
+ = Event {
+ name: "Approval",
+ fields: [
+ EventField {
+ name: "owner",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ is_indexed: true,
+ },
+ EventField {
+ name: "spender",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ is_indexed: true,
+ },
+ EventField {
+ name: "value",
+ typ: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ is_indexed: false,
+ },
+ ],
+ }
+
+note:
+ ┌─ erc20_token.fe:113:5
+ │
+113 │ ╭ fn _setup_decimals(self, _ decimals_: u8) {
+114 │ │ self._decimals = decimals_
+115 │ │ }
+ │ ╰─────^ attributes hash: 2241116105643912660
+ │
+ = FunctionSignature {
+ self_decl: Some(
+ Mutable,
+ ),
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: Some(
+ "_",
+ ),
+ name: "decimals_",
+ typ: Ok(
+ Base(
+ Numeric(
+ U8,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Unit,
+ ),
+ ),
+ }
+
+note:
+ ┌─ erc20_token.fe:114:9
+ │
+114 │ self._decimals = decimals_
+ │ ^^^^ ERC20: Value
+
+note:
+ ┌─ erc20_token.fe:114:9
+ │
+114 │ self._decimals = decimals_
+ │ ^^^^^^^^^^^^^^ ^^^^^^^^^ u8: Value
+ │ │
+ │ u8: Storage { nonce: Some(5) }
+
+note:
+ ┌─ erc20_token.fe:117:5
+ │
+117 │ fn _before_token_transfer(from: address, to: address, _ value: u256) {}
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 10552855728897650120
+ │
+ = FunctionSignature {
+ self_decl: None,
+ ctx_decl: None,
+ params: [
+ FunctionParam {
+ label: None,
+ name: "from",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ },
+ FunctionParam {
+ label: None,
+ name: "to",
+ typ: Ok(
+ Base(
+ Address,
+ ),
+ ),
+ },
+ FunctionParam {
+ label: Some(
+ "_",
+ ),
+ name: "value",
+ typ: Ok(
+ Base(
+ Numeric(
+ U256,
+ ),
+ ),
+ ),
+ },
+ ],
+ return_type: Ok(
+ Base(
+ Unit,
+ ),
+ ),
+ }
diff --git a/crates/analyzer/tests/snapshots/analysis__events.snap b/crates/analyzer/tests/snapshots/analysis__events.snap
index fc6dc41b1e..b8b4b0633d 100644
--- a/crates/analyzer/tests/snapshots/analysis__events.snap
+++ b/crates/analyzer/tests/snapshots/analysis__events.snap
@@ -12,37 +12,38 @@ note:
│ ^^^^^^^^^^ u256
note:
- ┌─ events.fe:9:9
+ ┌─ events.fe:10:9
│
- 9 │ num: u256
+10 │ num: u256
│ ^^^^^^^^^ u256
-10 │ addr: address
+11 │ addr: address
│ ^^^^^^^^^^^^^ address
note:
- ┌─ events.fe:13:9
+ ┌─ events.fe:15:9
│
-13 │ num1: u256
+15 │ num1: u256
│ ^^^^^^^^^^ u256
-14 │ idx addr: address
+16 │ idx addr: address
│ ^^^^^^^^^^^^^^^^^ address
-15 │ num2: u256
+17 │ num2: u256
│ ^^^^^^^^^^ u256
-16 │ my_bytes: Array
+18 │ my_bytes: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^ Array
note:
- ┌─ events.fe:19:9
+ ┌─ events.fe:22:9
│
-19 │ addrs: Array
+22 │ addrs: Array
│ ^^^^^^^^^^^^^^^^^^^^^^^^ Array
note:
- ┌─ events.fe:21:5
+ ┌─ events.fe:25:5
│
-21 │ ╭ pub fn emit_nums(ctx: Context):
-22 │ │ emit Nums(ctx, num1: 26, num2: 42)
- │ ╰──────────────────────────────────────────^ attributes hash: 5519676733853656531
+25 │ ╭ pub fn emit_nums(ctx: Context) {
+26 │ │ emit Nums(ctx, num1: 26, num2: 42)
+27 │ │ }
+ │ ╰─────^ attributes hash: 5519676733853656531
│
= FunctionSignature {
self_decl: None,
@@ -71,18 +72,18 @@ note:
}
note:
- ┌─ events.fe:22:19
+ ┌─ events.fe:26:19
│
-22 │ emit Nums(ctx, num1: 26, num2: 42)
+26 │ emit Nums(ctx, num1: 26, num2: 42)
│ ^^^ ^^ ^^ u256: Value
│ │ │
│ │ u256: Value
│ Context: Memory
note:
- ┌─ events.fe:22:9
+ ┌─ events.fe:26:9
│
-22 │ emit Nums(ctx, num1: 26, num2: 42)
+26 │ emit Nums(ctx, num1: 26, num2: 42)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 4681095448721924839
│
= Event {
@@ -114,11 +115,12 @@ note:
}
note:
- ┌─ events.fe:24:5
+ ┌─ events.fe:29:5
│
-24 │ ╭ pub fn emit_bases(ctx: Context, addr: address):
-25 │ │ emit Bases(ctx, num: 26, addr)
- │ ╰──────────────────────────────────────^ attributes hash: 15383426943610850221
+29 │ ╭ pub fn emit_bases(ctx: Context, addr: address) {
+30 │ │ emit Bases(ctx, num: 26, addr)
+31 │ │ }
+ │ ╰─────^ attributes hash: 15383426943610850221
│
= FunctionSignature {
self_decl: None,
@@ -156,18 +158,18 @@ note:
}
note:
- ┌─ events.fe:25:20
+ ┌─ events.fe:30:20
│
-25 │ emit Bases(ctx, num: 26, addr)
+30 │ emit Bases(ctx, num: 26, addr)
│ ^^^ ^^ ^^^^ address: Value
│ │ │
│ │ u256: Value
│ Context: Memory
note:
- ┌─ events.fe:25:9
+ ┌─ events.fe:30:9
│
-25 │ emit Bases(ctx, num: 26, addr)
+30 │ emit Bases(ctx, num: 26, addr)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 4407350417102602838
│
= Event {
@@ -197,11 +199,12 @@ note:
}
note:
- ┌─ events.fe:27:5
+ ┌─ events.fe:33:5
│
-27 │ ╭ pub fn emit_mix(ctx: Context, addr: address, my_bytes: Array):
-28 │ │ emit Mix(ctx, num1: 26, addr, num2: 42, my_bytes)
- │ ╰─────────────────────────────────────────────────────────^ attributes hash: 9652612436637375041
+33 │ ╭ pub fn emit_mix(ctx: Context, addr: address, my_bytes: Array) {
+34 │ │ emit Mix(ctx, num1: 26, addr, num2: 42, my_bytes)
+35 │ │ }
+ │ ╰─────^ attributes hash: 9652612436637375041
│
= FunctionSignature {
self_decl: None,
@@ -253,9 +256,9 @@ note:
}
note:
- ┌─ events.fe:28:18
+ ┌─ events.fe:34:18
│
-28 │ emit Mix(ctx, num1: 26, addr, num2: 42, my_bytes)
+34 │ emit Mix(ctx, num1: 26, addr, num2: 42, my_bytes)
│ ^^^ ^^ ^^^^ ^^ ^^^^^^^^ Array: Memory
│ │ │ │ │
│ │ │ │ u256: Value
@@ -264,9 +267,9 @@ note:
│ Context: Memory
note:
- ┌─ events.fe:28:9
+ ┌─ events.fe:34:9
│
-28 │ emit Mix(ctx, num1: 26, addr, num2: 42, my_bytes)
+34 │ emit Mix(ctx, num1: 26, addr, num2: 42, my_bytes)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 12006518826467385253
│
= Event {
@@ -321,14 +324,15 @@ note:
}
note:
- ┌─ events.fe:30:5
+ ┌─ events.fe:37:5
│
-30 │ ╭ pub fn emit_addresses(ctx: Context, addr1: address, addr2: address):
-31 │ │ let addrs: Array
-32 │ │ addrs[0] = addr1
-33 │ │ addrs[1] = addr2
-34 │ │ emit Addresses(ctx, addrs)
- │ ╰──────────────────────────────────^ attributes hash: 18438233211486921531
+37 │ ╭ pub fn emit_addresses(ctx: Context, addr1: address, addr2: address) {
+38 │ │ let addrs: Array
+39 │ │ addrs[0] = addr1
+40 │ │ addrs[1] = addr2
+41 │ │ emit Addresses(ctx, addrs)
+42 │ │ }
+ │ ╰─────^ attributes hash: 18438233211486921531
│
= FunctionSignature {
self_decl: None,
@@ -375,47 +379,47 @@ note:
}
note:
- ┌─ events.fe:31:20
+ ┌─ events.fe:38:20
│
-31 │ let addrs: Array
+38 │ let addrs: Array
│ ^^^^^^^^^^^^^^^^^ Array
note:
- ┌─ events.fe:32:9
+ ┌─ events.fe:39:9
│
-32 │ addrs[0] = addr1
+39 │ addrs[0] = addr1
│ ^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ events.fe:32:9
+ ┌─ events.fe:39:9
│
-32 │ addrs[0] = addr1
+39 │ addrs[0] = addr1
│ ^^^^^^^^ ^^^^^ address: Value
│ │
│ address: Memory
-33 │ addrs[1] = addr2
+40 │ addrs[1] = addr2
│ ^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ events.fe:33:9
+ ┌─ events.fe:40:9
│
-33 │ addrs[1] = addr2
+40 │ addrs[1] = addr2
│ ^^^^^^^^ ^^^^^ address: Value
│ │
│ address: Memory
-34 │ emit Addresses(ctx, addrs)
+41 │ emit Addresses(ctx, addrs)
│ ^^^ ^^^^^ Array: Memory
│ │
│ Context: Memory
note:
- ┌─ events.fe:34:9
+ ┌─ events.fe:41:9
│
-34 │ emit Addresses(ctx, addrs)
+41 │ emit Addresses(ctx, addrs)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 17766225573703958283
│
= Event {
diff --git a/crates/analyzer/tests/snapshots/analysis__external_contract.snap b/crates/analyzer/tests/snapshots/analysis__external_contract.snap
index 49f62b9758..10037f97cc 100644
--- a/crates/analyzer/tests/snapshots/analysis__external_contract.snap
+++ b/crates/analyzer/tests/snapshots/analysis__external_contract.snap
@@ -14,11 +14,12 @@ note:
│ ^^^^^^^^^^^^^^^^^^^^^ String<11>
note:
- ┌─ external_contract.fe:9:5
+ ┌─ external_contract.fe:10:5
│
- 9 │ ╭ pub fn emit_event(ctx: Context, my_num: u256, my_addrs: Array, my_string: String<11>):
-10 │ │ emit MyEvent(ctx, my_num, my_addrs, my_string)
- │ ╰──────────────────────────────────────────────────────^ attributes hash: 14584319691445179306
+10 │ ╭ pub fn emit_event(ctx: Context, my_num: u256, my_addrs: Array, my_string: String<11>) {
+11 │ │ emit MyEvent(ctx, my_num, my_addrs, my_string)
+12 │ │ }
+ │ ╰─────^ attributes hash: 14584319691445179306
│
= FunctionSignature {
self_decl: None,
@@ -81,9 +82,9 @@ note:
}
note:
- ┌─ external_contract.fe:10:22
+ ┌─ external_contract.fe:11:22
│
-10 │ emit MyEvent(ctx, my_num, my_addrs, my_string)
+11 │ emit MyEvent(ctx, my_num, my_addrs, my_string)
│ ^^^ ^^^^^^ ^^^^^^^^ ^^^^^^^^^ String<11>: Memory
│ │ │ │
│ │ │ Array: Memory
@@ -91,9 +92,9 @@ note:
│ Context: Memory
note:
- ┌─ external_contract.fe:10:9
+ ┌─ external_contract.fe:11:9
│
-10 │ emit MyEvent(ctx, my_num, my_addrs, my_string)
+11 │ emit MyEvent(ctx, my_num, my_addrs, my_string)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attributes hash: 3872046667435269452
│
= Event {
@@ -137,15 +138,16 @@ note:
}
note:
- ┌─ external_contract.fe:12:5
+ ┌─ external_contract.fe:14:5
│
-12 │ ╭ pub fn build_array(a: u256, b: u256) -> Array:
-13 │ │ let my_array: Array
-14 │ │ my_array[0] = a
-15 │ │ my_array[1] = a * b
-16 │ │ my_array[2] = b
-17 │ │ return my_array
- │ ╰───────────────────────^ attributes hash: 14276910879408601208
+14 │ ╭ pub fn build_array(a: u256, b: u256) -> Array {
+15 │ │ let my_array: Array
+16 │ │ my_array[0] = a
+17 │ │ my_array[1] = a * b
+18 │ │ my_array[2] = b
+19 │ │ return my_array
+20 │ │ }
+ │ ╰─────^ attributes hash: 14276910879408601208
│
= FunctionSignature {
self_decl: None,
@@ -187,71 +189,68 @@ note:
}
note:
- ┌─ external_contract.fe:13:23
+ ┌─ external_contract.fe:15:23
│
-13 │ let my_array: Array
+15 │ let my_array: Array
│ ^^^^^^^^^^^^^^ Array
note:
- ┌─ external_contract.fe:14:9
+ ┌─ external_contract.fe:16:9
│
-14 │ my_array[0] = a
+16 │ my_array[0] = a
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ external_contract.fe:14:9
+ ┌─ external_contract.fe:16:9
│
-14 │ my_array[0] = a
+16 │ my_array[0] = a
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory
-15 │ my_array[1] = a * b
+17 │ my_array[1] = a * b
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ external_contract.fe:15:9
+ ┌─ external_contract.fe:17:9
│
-15 │ my_array[1] = a * b
+17 │ my_array[1] = a * b
│ ^^^^^^^^^^^ ^ ^ u256: Value
│ │ │
│ │ u256: Value
│ u256: Memory
note:
- ┌─ external_contract.fe:15:23
+ ┌─ external_contract.fe:17:23
│
-15 │ my_array[1] = a * b
+17 │ my_array[1] = a * b
│ ^^^^^ u256: Value
-16 │ my_array[2] = b
+18 │ my_array[2] = b
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ external_contract.fe:16:9
+ ┌─ external_contract.fe:18:9
│
-16 │ my_array[2] = b
+18 │ my_array[2] = b
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory
-17 │ return my_array
+19 │ return my_array
│ ^^^^^^^^ Array: Memory
note:
- ┌─ external_contract.fe:20:5
+ ┌─ external_contract.fe:24:5
│
-20 │ ╭ pub fn call_emit_event(
-21 │ │ ctx: Context,
-22 │ │ foo_address: address,
-23 │ │ my_num: u256,
- · │
-27 │ │ let foo: Foo = Foo(ctx, foo_address)
-28 │ │ foo.emit_event(my_num, my_addrs, my_string)
- │ ╰───────────────────────────────────────────────────^ attributes hash: 11744736773867210426
+24 │ ╭ pub fn call_emit_event(ctx: Context, foo_address: address, my_num: u256, my_addrs: Array, my_string: String<11>) {
+25 │ │ let foo: Foo = Foo(ctx, foo_address)
+26 │ │ foo.emit_event(my_num, my_addrs, my_string)
+27 │ │ }
+ │ ╰─────^ attributes hash: 11744736773867210426
│
= FunctionSignature {
self_decl: None,
@@ -323,25 +322,25 @@ note:
}
note:
- ┌─ external_contract.fe:27:18
+ ┌─ external_contract.fe:25:18
│
-27 │ let foo: Foo = Foo(ctx, foo_address)
+25 │ let foo: Foo = Foo(ctx, foo_address)
│ ^^^ Foo
note:
- ┌─ external_contract.fe:27:28
+ ┌─ external_contract.fe:25:28
│
-27 │ let foo: Foo = Foo(ctx, foo_address)
+25 │ let foo: Foo = Foo(ctx, foo_address)
│ ^^^ ^^^^^^^^^^^ address: Value
│ │
│ Context: Memory
note:
- ┌─ external_contract.fe:27:24
+ ┌─ external_contract.fe:25:24
│
-27 │ let foo: Foo = Foo(ctx, foo_address)
+25 │ let foo: Foo = Foo(ctx, foo_address)
│ ^^^^^^^^^^^^^^^^^^^^^ Foo: Value
-28 │ foo.emit_event(my_num, my_addrs, my_string)
+26 │ foo.emit_event(my_num, my_addrs, my_string)
│ ^^^ ^^^^^^ ^^^^^^^^ ^^^^^^^^^ String<11>: Memory
│ │ │ │
│ │ │ Array: Memory
@@ -349,22 +348,19 @@ note:
│ Foo: Value
note:
- ┌─ external_contract.fe:28:9
+ ┌─ external_contract.fe:26:9
│
-28 │ foo.emit_event(my_num, my_addrs, my_string)
+26 │ foo.emit_event(my_num, my_addrs, my_string)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (): Value
note:
- ┌─ external_contract.fe:30:5
+ ┌─ external_contract.fe:29:5
│
-30 │ ╭ pub fn call_build_array(
-31 │ │ ctx: Context,
-32 │ │ foo_address: address,
-33 │ │ a: u256,
- · │
-36 │ │ let foo: Foo = Foo(ctx, foo_address)
-37 │ │ return foo.build_array(a, b)
- │ ╰────────────────────────────────────^ attributes hash: 14801245347360386258
+29 │ ╭ pub fn call_build_array(ctx: Context, foo_address: address, a: u256, b: u256) -> Array {
+30 │ │ let foo: Foo = Foo(ctx, foo_address)
+31 │ │ return foo.build_array(a, b)
+32 │ │ }
+ │ ╰─────^ attributes hash: 14801245347360386258
│
= FunctionSignature {
self_decl: None,
@@ -429,34 +425,34 @@ note:
}
note:
- ┌─ external_contract.fe:36:18
+ ┌─ external_contract.fe:30:18
│
-36 │ let foo: Foo = Foo(ctx, foo_address)
+30 │ let foo: Foo = Foo(ctx, foo_address)
│ ^^^ Foo
note:
- ┌─ external_contract.fe:36:28
+ ┌─ external_contract.fe:30:28
│
-36 │ let foo: Foo = Foo(ctx, foo_address)
+30 │ let foo: Foo = Foo(ctx, foo_address)
│ ^^^ ^^^^^^^^^^^ address: Value
│ │
│ Context: Memory
note:
- ┌─ external_contract.fe:36:24
+ ┌─ external_contract.fe:30:24
│
-36 │ let foo: Foo = Foo(ctx, foo_address)
+30 │ let foo: Foo = Foo(ctx, foo_address)
│ ^^^^^^^^^^^^^^^^^^^^^ Foo: Value
-37 │ return foo.build_array(a, b)
+31 │ return foo.build_array(a, b)
│ ^^^ ^ ^ u256: Value
│ │ │
│ │ u256: Value
│ Foo: Value
note:
- ┌─ external_contract.fe:37:16
+ ┌─ external_contract.fe:31:16
│
-37 │ return foo.build_array(a, b)
+31 │ return foo.build_array(a, b)
│ ^^^^^^^^^^^^^^^^^^^^^ Array: Memory
diff --git a/crates/analyzer/tests/snapshots/analysis__for_loop_with_break.snap b/crates/analyzer/tests/snapshots/analysis__for_loop_with_break.snap
index 87eb86c651..56783e6d60 100644
--- a/crates/analyzer/tests/snapshots/analysis__for_loop_with_break.snap
+++ b/crates/analyzer/tests/snapshots/analysis__for_loop_with_break.snap
@@ -4,16 +4,16 @@ expression: "build_snapshot(&db, module)"
---
note:
- ┌─ for_loop_with_break.fe:3:5
+ ┌─ for_loop_with_break.fe:2:5
│
- 3 │ ╭ pub fn bar() -> u256:
- 4 │ │ let my_array: Array
- 5 │ │ my_array[0] = 5
- 6 │ │ my_array[1] = 10
+ 2 │ ╭ pub fn bar() -> u256 {
+ 3 │ │ let my_array: Array
+ 4 │ │ my_array[0] = 5
+ 5 │ │ my_array[1] = 10
· │
-12 │ │ break
-13 │ │ return sum
- │ ╰──────────────────^ attributes hash: 6115314201970082834
+14 │ │ return sum
+15 │ │ }
+ │ ╰─────^ attributes hash: 6115314201970082834
│
= FunctionSignature {
self_decl: None,
@@ -29,80 +29,80 @@ note:
}
note:
- ┌─ for_loop_with_break.fe:4:23
+ ┌─ for_loop_with_break.fe:3:23
│
-4 │ let my_array: Array
+3 │ let my_array: Array
│ ^^^^^^^^^^^^^^ Array
·
-8 │ let sum: u256 = 0
+7 │ let sum: u256 = 0
│ ^^^^ u256
note:
- ┌─ for_loop_with_break.fe:5:9
+ ┌─ for_loop_with_break.fe:4:9
│
-5 │ my_array[0] = 5
+4 │ my_array[0] = 5
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ for_loop_with_break.fe:5:9
+ ┌─ for_loop_with_break.fe:4:9
│
-5 │ my_array[0] = 5
+4 │ my_array[0] = 5
│ ^^^^^^^^^^^ ^ u256: Value
│ │
│ u256: Memory
-6 │ my_array[1] = 10
+5 │ my_array[1] = 10
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ for_loop_with_break.fe:6:9
+ ┌─ for_loop_with_break.fe:5:9
│
-6 │ my_array[1] = 10
+5 │ my_array[1] = 10
│ ^^^^^^^^^^^ ^^ u256: Value
│ │
│ u256: Memory
-7 │ my_array[2] = 15
+6 │ my_array[2] = 15
│ ^^^^^^^^ ^ u256: Value
│ │
│ Array: Memory
note:
- ┌─ for_loop_with_break.fe:7:9
- │
- 7 │ my_array[2] = 15
- │ ^^^^^^^^^^^ ^^ u256: Value
- │ │
- │ u256: Memory
- 8 │ let sum: u256 = 0
- │ ^ u256: Value
- 9 │ for i in my_array:
- │ ^^^^^^^^ Array: Memory
-10 │ sum = sum + i
- │ ^^^ ^^^ ^ u256: Value
- │ │ │
- │ │ u256: Value
- │ u256: Value
+ ┌─ for_loop_with_break.fe:6:9
+ │
+6 │ my_array[2] = 15
+ │ ^^^^^^^^^^^ ^^ u256: Value
+ │ │
+ │ u256: Memory
+7 │ let sum: u256 = 0
+ │ ^ u256: Value
+8 │ for i in my_array {
+ │ ^^^^^^^^ Array: Memory
+9 │ sum = sum + i
+ │ ^^^ ^^^ ^ u256: Value
+ │ │ │
+ │ │ u256: Value
+ │ u256: Value
note:
- ┌─ for_loop_with_break.fe:10:19
+ ┌─ for_loop_with_break.fe:9:19
│
-10 │ sum = sum + i
+ 9 │ sum = sum + i
│ ^^^^^^^ u256: Value
-11 │ if sum == 15:
+10 │ if sum == 15 {
│ ^^^ ^^ u256: Value
│ │
│ u256: Value
note:
- ┌─ for_loop_with_break.fe:11:16
+ ┌─ for_loop_with_break.fe:10:16
│
-11 │ if sum == 15:
+10 │ if sum == 15 {
│ ^^^^^^^^^ bool: Value
-12 │ break
-13 │ return sum
+ ·
+14 │ return sum
│ ^^^ u256: Value
diff --git a/crates/analyzer/tests/snapshots/analysis__for_loop_with_continue.snap b/crates/analyzer/tests/snapshots/analysis__for_loop_with_continue.snap
index 8cda06acd2..35eb020247 100644
--- a/crates/analyzer/tests/snapshots/analysis__for_loop_with_continue.snap
+++ b/crates/analyzer/tests/snapshots/analysis__for_loop_with_continue.snap
@@ -4,16 +4,16 @@ expression: "build_snapshot(&db, module)"
---
note:
- ┌─ for_loop_with_continue.fe:3:5
+ ┌─ for_loop_with_continue.fe:2:5
│
- 3 │ ╭ pub fn bar() -> u256:
- 4 │ │ let my_array: Array