Decl_storage macro : force traits. (#1317)

* Missing trait def on two calls.

Slight mcla refact on transfo.

* Allways provide GenesisConfig even when useless (for runtime module
export).

* Revert "Allways provide GenesisConfig even when useless (for runtime module"

This reverts commit 84a29bc592023d1ee107519c58693ec19dbde2d2.

* Fix Vec usage (from rstd).
This commit is contained in:
cheme
2019-01-07 16:05:47 +01:00
committed by Bastian Köcher
parent f5c4abd0f3
commit d271a4647c
2 changed files with 92 additions and 46 deletions
@@ -946,3 +946,29 @@ mod test2 {
type BlockNumber = u32;
}
}
#[cfg(test)]
#[allow(dead_code)]
mod test3 {
pub trait Trait {
type Origin;
type BlockNumber;
}
decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin {}
}
decl_storage! {
trait Store for Module<T: Trait> as Test {
Foo get(foo) config(initial_foo): u32;
}
}
type PairOf<T> = (T, T);
struct TraitImpl {}
impl Trait for TraitImpl {
type Origin = u32;
type BlockNumber = u32;
}
}