sunshine-protocol / sunshine

Governance + Bounty Platform
Other
43 stars 16 forks source link

Open Question About Module Trait Inheritance #94

Closed 4meta5 closed 4 years ago

4meta5 commented 4 years ago
mod example1 {
    pub trait Trait: system::Trait {
         ...
    }
}

pub trait Example2: system::Trait + example1::Trait {
    ....
}

Does Example2 need to inherit system::Trait separately if example1::Trait already inherits it? I don't want to restrict Example2's access to system::Trait to only accessing it through example1::Trait.

4meta5 commented 4 years ago

The answer is yes when we want access to system::Trait without accessing it through example1::Trait