Detect conflicting module names in construct_runtime! (#7968)

This commit is contained in:
Bastian Köcher
2021-01-25 10:37:20 +01:00
committed by GitHub
parent 2fcff6a129
commit 97bb9ab35a
3 changed files with 35 additions and 0 deletions
@@ -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},
| ^^^^^^^