Commit 45db92e6 authored by Robin Freyler's avatar Robin Freyler

[lang2/macro] add conflicting ink! marker test

The conflict here is the additional #[ink(event)] marker
parent a778b9f3
......@@ -40,4 +40,5 @@ fn compile_tests() {
t.compile_fail("tests/ui/fail/14-missing-storage-struct.rs");
t.compile_fail("tests/ui/fail/15-multiple-storage-structs.rs");
t.compile_fail("tests/ui/fail/16-storage-impl-ident-conflict.rs");
t.compile_fail("tests/ui/fail/17-conflicting-ink-markers.rs");
}
#![feature(proc_macro_hygiene)]
use ink_lang2 as ink;
#[ink::contract(version = "0.1.0")]
mod noop {
#[ink(storage)]
#[ink(event)] // We cannot have #[ink(event)] if we already have #[ink(storage)]
struct Noop {}
impl Noop {
#[ink(constructor)]
fn new(&mut self) {}
#[ink(message)]
fn noop(&self) {}
}
}
fn main() {}
error: invalid ink! attribute found for `#[ink(storage)]` struct
--> $DIR/17-conflicting-ink-markers.rs:8:10
|
8 | #[ink(event)] // We cannot have #[ink(event)] if we already have #[ink(storage)]
| ^^^^^^^
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment