@@ -24,7 +24,7 @@ use move_core_types::{
24
24
account_address:: AccountAddress ,
25
25
function:: { ClosureMask , MoveClosure } ,
26
26
identifier:: { IdentStr , Identifier } ,
27
- language_storage:: { ModuleId , StructTag , TypeTag } ,
27
+ language_storage:: { FunctionParamOrReturnTag , ModuleId , StructTag , TypeTag } ,
28
28
transaction_argument:: { convert_txn_args, TransactionArgument } ,
29
29
u256,
30
30
value:: { MoveStruct , MoveTypeLayout , MoveValue } ,
@@ -456,9 +456,34 @@ impl<V: CompiledModuleView> MoveValueAnnotator<V> {
456
456
TypeTag :: U256 => FatType :: U256 ,
457
457
TypeTag :: U128 => FatType :: U128 ,
458
458
TypeTag :: Vector ( ty) => FatType :: Vector ( Box :: new ( self . resolve_type_impl ( ty, limit) ?) ) ,
459
+ <<<<<<< HEAD
459
460
TypeTag :: Function ( ..) => {
460
461
// TODO(#15664) implement functions for fat types"
461
462
todo ! ( "functions for fat types" )
463
+ =======
464
+ TypeTag :: Function ( function_tag ) => {
465
+ let mut convert_tags = |tags: & [ FunctionParamOrReturnTag ] | {
466
+ tags. iter( )
467
+ . map( |t| {
468
+ use FunctionParamOrReturnTag :: * ;
469
+ Ok ( match t {
470
+ Reference ( t) => {
471
+ FatType :: Reference ( Box :: new ( self . resolve_type_impl ( t, limit) ?) )
472
+ } ,
473
+ MutableReference ( t) => FatType :: MutableReference ( Box :: new (
474
+ self . resolve_type_impl ( t, limit) ?,
475
+ ) ) ,
476
+ Value ( t) => self . resolve_type_impl ( t, limit) ?,
477
+ } )
478
+ } )
479
+ . collect :: < anyhow:: Result < Vec < _ > > > ( )
480
+ } ;
481
+ FatType :: Function ( Box :: new( FatFunctionType {
482
+ args : convert_tags( & function_tag. args) ?,
483
+ results : convert_tags( & function_tag. results) ?,
484
+ abilities : function_tag. abilities,
485
+ } ) )
486
+ >>>>>>> dee41276c9 ( [ api] Addressing function value todos ( #17047 ) )
462
487
} ,
463
488
} )
464
489
}
0 commit comments