Detect conflicting module names in construct_runtime! (#7968)

This commit is contained in:
Bastian Köcher authored and GitHub committed 2021-01-25 10:37:20 +01:00
1 parent 2fcff6a129
commit 97bb9ab35a
3 files changed
+35

No files matched your search

@@ -0,0 +1,15 @@
use frame_support::construct_runtime;
construct_runtime! {
pub enum Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
System: system::{Module},
Balance: balances::{Module},
Balance: balances::{Module},
}
}
fn main() {}
@@ -0,0 +1,11 @@
error: Two modules with the same name!
--> $DIR/conflicting_module_name.rs:10:3
|
10 | Balance: balances::{Module},
| ^^^^^^^
error: Two modules with the same name!
--> $DIR/conflicting_module_name.rs:11:3
|
11 | Balance: balances::{Module},
| ^^^^^^^