@@ -6,7 +6,7 @@ use crate::avm2::optimizer::blocks::assemble_blocks;
6
6
use crate :: avm2:: optimizer:: peephole;
7
7
use crate :: avm2:: property:: Property ;
8
8
use crate :: avm2:: verify:: Exception ;
9
- use crate :: avm2:: vtable:: VTable ;
9
+ use crate :: avm2:: vtable:: { ClassBoundMethod , VTable } ;
10
10
use crate :: avm2:: { Activation , Class , Error } ;
11
11
12
12
use gc_arena:: Gc ;
@@ -1413,6 +1413,23 @@ fn abstract_interpret_ops<'gc>(
1413
1413
index: disp_id,
1414
1414
push_return_value: true ,
1415
1415
} ) ;
1416
+
1417
+ stack_push_done = true ;
1418
+
1419
+ let full_method = vtable
1420
+ . get_full_method ( disp_id)
1421
+ . expect ( "Method should exist" ) ;
1422
+ let ClassBoundMethod { method, .. } = full_method;
1423
+ if !method. is_info_resolved ( ) {
1424
+ method. resolve_info ( activation) ?;
1425
+ }
1426
+
1427
+ let return_type = method. resolved_return_type ( ) ;
1428
+ if let Some ( return_type) = return_type {
1429
+ stack. push_class ( activation, return_type) ?;
1430
+ } else {
1431
+ stack. push_any ( activation) ?;
1432
+ }
1416
1433
}
1417
1434
_ => { }
1418
1435
}
@@ -1640,6 +1657,23 @@ fn abstract_interpret_ops<'gc>(
1640
1657
index: disp_id,
1641
1658
push_return_value: true ,
1642
1659
} ) ;
1660
+
1661
+ stack_push_done = true ;
1662
+
1663
+ let full_method = vtable
1664
+ . get_full_method ( disp_id)
1665
+ . expect ( "Method should exist" ) ;
1666
+ let ClassBoundMethod { method, .. } = full_method;
1667
+ if !method. is_info_resolved ( ) {
1668
+ method. resolve_info ( activation) ?;
1669
+ }
1670
+
1671
+ let return_type = method. resolved_return_type ( ) ;
1672
+ if let Some ( return_type) = return_type {
1673
+ stack. push_class ( activation, return_type) ?;
1674
+ } else {
1675
+ stack. push_any ( activation) ?;
1676
+ }
1643
1677
}
1644
1678
Some ( Property :: Slot { slot_id } )
1645
1679
| Some ( Property :: ConstSlot { slot_id } ) => {
0 commit comments