Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kianenigma committed Jan 29, 2023
1 parent 4fcd208 commit 53ee3bd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
3 changes: 1 addition & 2 deletions frame/support/test/tests/pallet_ui/duplicate_store_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ mod pallet {
type Foo<T> = StorageValue<_, u8>;
}

fn main() {
}
fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#[frame_support::pallet]
mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config where <Self as frame_system::Config>::Index: From<u128> {}

#[pallet::pallet]
pub struct Pallet<T>(core::marker::PhantomData<T>);

#[pallet::call]
impl<T: Config> Pallet<T> where <T as frame_system::Config>::Index: From<u128> {}

impl<T: Config> Pallet<T> where <T as frame_system::Config>::Index: From<u128> {
fn foo(x: u128) {
let _index = <T as frame_system::Config>::Index::from(x);
}
}
}

fn main() {
}

0 comments on commit 53ee3bd

Please sign in to comment.