-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#[derive(Drop)] | ||
struct ZeroSized {} | ||
|
||
#[inline(never)] | ||
fn use_zero_sized(ref value: ZeroSized) -> felt252 { | ||
0 | ||
} | ||
|
||
fn foo(ref value: ZeroSized, array_with_data: Array<felt252>) { | ||
if 1 == 0 { | ||
use_zero_sized(ref value); | ||
} | ||
// Unkown ap change tracking, while not using `value`. | ||
let mut data_span = array_with_data.span(); | ||
let a: Option<Array<Array<felt252>>> = Serde::deserialize(ref data_span); | ||
} | ||
|
||
#[test] | ||
fn call_foo() { | ||
let mut value = ZeroSized {}; | ||
foo(ref value, array![0]); | ||
} |