File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
sway-core/src/abi_generation Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -427,11 +427,27 @@ fn generate_concrete_type_declaration(
427427
428428 let ( type_field, concrete_type_id) =
429429 type_id. get_abi_type_field_and_concrete_id ( handler, ctx, engines, resolved_type_id) ?;
430+
431+ let type_engine = engines. te ( ) ;
432+ let alias_of = match & * type_engine. get ( resolved_type_id) {
433+ TypeInfo :: Alias { ty, .. } => {
434+ // Ensure the underlying representation has a declaration first
435+ let target_ctid = generate_concrete_type_declaration (
436+ handler,
437+ ctx,
438+ engines,
439+ metadata_types,
440+ concrete_types,
441+ ty. initial_type_id ( ) ,
442+ ty. type_id ( ) ,
443+ ) ?;
444+ Some ( target_ctid)
430445 let concrete_type_decl = TypeConcreteDeclaration {
431446 type_field,
432447 concrete_type_id : concrete_type_id. clone ( ) ,
433448 metadata_type_id,
434449 type_arguments,
450+ alias_of,
435451 } ;
436452
437453 concrete_types. push ( concrete_type_decl) ;
You can’t perform that action at this time.
0 commit comments