https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/
Hi, I'm working on the above tutorial and after running the cargo +nightly test
command, I see the following error.
error[E0158]: associated consts cannot be referenced in patterns
--> flipper/lib.rs:9:5
|
9 | / pub struct Flipper {
10 | | value: bool,
11 | | }
| |_____^
Nothing has been changed from the source code here. What is a workaround for this please?
https://github.com/paritytech/ink/blob/master/examples/flipper/lib.rs
cargo +nightly test
work just fine. What is your contract version? trycargo contract -h
. mine is 1.3.0cargo test
instead, it will work.