File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
sway-core/src/abi_generation Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -649,11 +649,31 @@ fn generate_concrete_type_declaration(
649649
650650 let ( type_field, concrete_type_id) =
651651 type_id. get_abi_type_field_and_concrete_id ( handler, ctx, engines, resolved_type_id) ?;
652+
653+ let type_engine = engines. te ( ) ;
654+ let alias_of = match & * type_engine. get ( resolved_type_id) {
655+ TypeInfo :: Alias { ty, .. } => {
656+ // Ensure the underlying representation has a declaration first
657+ let target_ctid = generate_concrete_type_declaration (
658+ handler,
659+ ctx,
660+ engines,
661+ metadata_types,
662+ concrete_types,
663+ ty. initial_type_id ( ) ,
664+ ty. type_id ( ) ,
665+ ) ?;
666+ Some ( target_ctid)
667+ }
668+ _ => None ,
669+ } ;
670+
652671 let concrete_type_decl = TypeConcreteDeclaration {
653672 type_field,
654673 concrete_type_id : concrete_type_id. clone ( ) ,
655674 metadata_type_id,
656675 type_arguments,
676+ alias_of,
657677 } ;
658678
659679 concrete_types. push ( concrete_type_decl) ;
You can’t perform that action at this time.
0 commit comments