You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On commit 8d6b690cb1401e682a0aba7bcda3b40f00482572.
Current behavior:
The inference of very simple types seems to not be supported anymore, at least on LegacyMap that we had into the storage. It this expected as LegacyMap should be replaced by Map?
We had some cases also where it wasn't storage functions, and we had to insert multiple statements to guide the compiler with types.
In the present case, it was on a tuple.
Expected behavior:
Better inference, as it seemed to be? Because we observed that on long existing code.
Steps to reproduce:
#[starknet::contract]mod c1 {#[starknet::interface]traitIMy<T>{fna(self: @T);}#[storage]structStorage{v1:LegacyMap::<felt252,(u32,u32)>,}#[abi(embed_v0)]implMy of IMy<ContractState>{fna(self: @ContractState){// This does not work.let(one, two) = self.v1.read(0);// This works.let a:(u32,u32) = self.v1.read(0);let(one, two) = a;}}}
Other information:
The error printed:
error: Unexpected type for tuple pattern. "?3" is not a tuple.
--> /private/tmp/test.cairo:16:17
let (one, two) = self.v1.read(0);
^********^
We used to be on a different commit before seing this error: 25bef0b1d7d74e6eed560d46894b5d8fb9136dac.
On this commit, we don't have inference issues, everything compiles.
The text was updated successfully, but these errors were encountered:
Bug Report
Cairo version:
On commit
8d6b690cb1401e682a0aba7bcda3b40f00482572
.Current behavior:
The inference of very simple types seems to not be supported anymore, at least on
LegacyMap
that we had into the storage. It this expected asLegacyMap
should be replaced byMap
?We had some cases also where it wasn't storage functions, and we had to insert multiple statements to guide the compiler with types.
In the present case, it was on a tuple.
Expected behavior:
Better inference, as it seemed to be? Because we observed that on long existing code.
Steps to reproduce:
Other information:
The error printed:
We used to be on a different commit before seing this error:
25bef0b1d7d74e6eed560d46894b5d8fb9136dac
.On this commit, we don't have inference issues, everything compiles.
The text was updated successfully, but these errors were encountered: