Commit 31e94586 authored by Robin Freyler's avatar Robin Freyler

[lang2/macro] implement check that ink! impls are on #[ink(storage)] structs

parent 71f62058
......@@ -665,6 +665,15 @@ fn split_items(
}
}
});
let storage_ident = &storage.ident;
for item_impl in &impl_blocks {
if item_impl.self_ty != storage_ident.to_string() {
bail!(
item_impl.self_ty,
"ink! impl blocks need to be implemented for the #[ink(storage)] struct"
)
}
}
let functions = impl_blocks
.into_iter()
.map(|impl_block| impl_block.functions)
......
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