mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Allow multiple bounds to be specified at decl_error! (#7448)
* Allow multiple bounds to be specified at decl_error! Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Test if decl_error! accepts multiple bounds Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
9687759774
commit
9bfaf451a7
@@ -39,6 +39,7 @@ pub trait Currency {}
|
||||
// * Origin, Inherent, Event
|
||||
mod module1 {
|
||||
use super::*;
|
||||
use sp_std::ops::Add;
|
||||
|
||||
pub trait Trait<I>: system::Trait where <Self as system::Trait>::BlockNumber: From<u32> {
|
||||
type Event: From<Event<Self, I>> + Into<<Self as system::Trait>::Event>;
|
||||
@@ -82,7 +83,11 @@ mod module1 {
|
||||
}
|
||||
|
||||
frame_support::decl_error! {
|
||||
pub enum Error for Module<T: Trait<I>, I: Instance> where T::BlockNumber: From<u32> {
|
||||
pub enum Error for Module<T: Trait<I>, I: Instance> where
|
||||
T::BlockNumber: From<u32>,
|
||||
T::BlockNumber: Add,
|
||||
T::AccountId: AsRef<[u8]>,
|
||||
{
|
||||
/// Test
|
||||
Test,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user