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
classMyStructextendsStruct({a: Field}){}classMyStructBextendsStruct({a: Circuit.array(Field,5),}){}exportclassTestZkappextendsSmartContract{
@state(MyStruct)myStruct=State<MyStruct>();// work
@state(MyStructB)myStructB=State<MyStructB>();// type mismatch error}
The text was updated successfully, but these errors were encountered:
Thanks! The issue makes sense to me - the type error occurs when the state is not guaranteed to consist only of field elements, and Circuit.array doesn't currently return a type which distinguishes this case (in contrast to Struct itself)
This is a test after applying the #567 update:
The text was updated successfully, but these errors were encountered: