starkware-libs / cairo

Cairo is the first Turing-complete language for creating provable programs for general computation.
Apache License 2.0
1.56k stars 479 forks source link

feat: prevent usage of enums without a default variant in storage #6422

Open enitrat opened 5 days ago

enitrat commented 5 days ago

I think enums without a default variant should throw an error at compile time if they try to derive starknet::Store - otherwise, attempting a storage read on an uninitialized slot will cause a runtime panic.

See description in https://github.com/cairo-book/cairo-book/issues/990