We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cairo version:
Happens on 2.2.0
Current behavior:
Compiling the following to CASM fails with the error:
Error: Compilation failed. Caused by: #114->#115: Got 'Unknown ap change' error while moving [4].
Minimal repro:
use starknet::ContractAddress; #[starknet::interface] trait FirstInterface<T> { fn toto(self: @T, t: Array<ContractAddress>); fn balance_of(self: @T); } #[starknet::contract] mod toto { #[storage] struct Storage {} use super:: { FirstInterfaceDispatcher, FirstInterfaceDispatcherTrait, }; #[external(v0)] fn test_mint_and_unbox(self: @ContractState) { let contract = FirstInterfaceDispatcher { contract_address: starknet::contract_address_const::<5>() }; contract.balance_of(); contract.toto(array![contract.contract_address]); contract.balance_of(); } }
I believe every line here is necessary to make it fail, but I'm not sure why. The array! call could probably be reduced a bit but I didn't try.
Expected behavior:
This should compile.
Steps to reproduce:
starknet-compile the above, then starknet-sierra-compile it.
starknet-compile
starknet-sierra-compile
Interestingly, changing to
let t = array![contract.contract_address]; contract.toto(t);
Fixes it
The text was updated successfully, but these errors were encountered:
Fix tracking of variable state.
9401128
Fixes: #4036.
1c1921e
ilyalesokhin-starkware
Successfully merging a pull request may close this issue.
Bug Report
Cairo version:
Happens on 2.2.0
Current behavior:
Compiling the following to CASM fails with the error:
Minimal repro:
I believe every line here is necessary to make it fail, but I'm not sure why. The array! call could probably be reduced a bit but I didn't try.
Expected behavior:
This should compile.
Steps to reproduce:
starknet-compile
the above, thenstarknet-sierra-compile
it.Interestingly, changing to
Fixes it
The text was updated successfully, but these errors were encountered: