Skip to content

Commit

Permalink
Add trait attributes to TyProgram (FuelLabs#3036)
Browse files Browse the repository at this point in the history
  • Loading branch information
eureka-cpu authored Oct 14, 2022
1 parent d8485d6 commit ce32f69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sway-core/src/language/ty/declaration/trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sway_types::Ident;
use crate::{
language::{parsed, ty::*, Visibility},
type_system::*,
AttributesMap,
};

#[derive(Clone, Debug, Derivative)]
Expand All @@ -19,6 +20,7 @@ pub struct TyTraitDeclaration {
pub(crate) methods: Vec<parsed::FunctionDeclaration>,
pub(crate) supertraits: Vec<parsed::Supertrait>,
pub visibility: Visibility,
pub attributes: AttributesMap,
}

impl CopyTypes for TyTraitDeclaration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ impl ty::TyTraitDeclaration {
methods: trait_decl.methods.to_vec(),
supertraits: trait_decl.supertraits.to_vec(),
visibility: trait_decl.visibility,
attributes: trait_decl.attributes,
};
ok(typed_trait_decl, warnings, errors)
}
Expand Down

0 comments on commit ce32f69

Please sign in to comment.