@@ -184,6 +184,7 @@ impl ObjectData {
184184 // continue; // Skip parameters that have the Copy ability
185185 // }
186186 let instantiated_param = param. subst ( ty_args_map) . unwrap ( ) ;
187+ let partial_instantiation = param. partial_subst ( ty_args_map) ;
187188 existing_objects
188189 . get_mut ( & instantiated_param)
189190 . unwrap_or_else ( || {
@@ -203,25 +204,26 @@ impl ObjectData {
203204 if matches ! ( arg, SequenceArgument :: Input ( _) ) {
204205 continue ; // Skip input arguments for key store and hot potatoes
205206 }
206- if param . is_balance ( ) {
207+ if partial_instantiation . is_balance ( ) {
207208 balances. retain ( |a| * a != * arg) ; // Remove from balances if it is a balance object
208209 }
209- if param . is_key_store ( ) {
210+ if partial_instantiation . is_key_store ( ) {
210211 key_store_objects. retain ( |a| * a != * arg) ; // Remove from key_store_objects if it is a key store object
211212 }
212- if param . is_hot_potato ( ) {
213+ if partial_instantiation . is_hot_potato ( ) {
213214 hot_potatoes. remove (
214215 hot_potatoes
215216 . iter ( )
216217 . position ( |x| x == & instantiated_param)
217218 . unwrap_or_else ( || {
218219 panic ! (
219- "Expected hot potato object for type {:? }, input {}" ,
220+ "Expected hot potato object for type {}, input {}, hot potatoes {:? }" ,
220221 instantiated_param,
221222 MoveFuzzInput {
222223 sequence: ptb. clone( ) ,
223224 ..Default :: default ( )
224- }
225+ } ,
226+ hot_potatoes
225227 )
226228 } ) ,
227229 ) ;
@@ -265,6 +267,7 @@ impl ObjectData {
265267 continue ;
266268 }
267269 let instantiated_ret_ty = ret_ty. subst ( ty_args_map) . unwrap ( ) ;
270+ let partial_instantiation = ret_ty. partial_subst ( ty_args_map) ;
268271 if !matches ! ( instantiated_ret_ty, MoveTypeTag :: Struct ( _) ) {
269272 continue ; // Only process struct return types
270273 }
@@ -277,13 +280,13 @@ impl ObjectData {
277280 . entry ( instantiated_ret_ty. clone ( ) )
278281 . or_default ( )
279282 . push ( ( res_arg, Gate :: Owned ) ) ;
280- if ret_ty . is_balance ( ) {
283+ if partial_instantiation . is_balance ( ) {
281284 balances. push ( res_arg) ;
282285 }
283- if ret_ty . is_key_store ( ) {
286+ if partial_instantiation . is_key_store ( ) {
284287 key_store_objects. push ( res_arg) ;
285288 }
286- if ret_ty . is_hot_potato ( ) {
289+ if partial_instantiation . is_hot_potato ( ) {
287290 hot_potatoes. push ( instantiated_ret_ty) ;
288291 }
289292 }
@@ -899,7 +902,7 @@ where
899902 . flat_map ( |type_tag| {
900903 meta_state
901904 . type_graph
902- . find_consumers ( & MoveAbiSignatureToken :: from_type_tag_lossy ( type_tag) )
905+ . find_consumers ( & MoveAbiSignatureToken :: from_type_tag_lossy ( type_tag) , true )
903906 . iter ( )
904907 . map ( |( module_id, consumer_function) | {
905908 FunctionIdent :: new (
0 commit comments