diff --git a/src/codegen/compile_enhanced.ml b/src/codegen/compile_enhanced.ml index e28634924dd..1ac0c47e77a 100644 --- a/src/codegen/compile_enhanced.ml +++ b/src/codegen/compile_enhanced.ml @@ -8848,6 +8848,7 @@ module EnhancedOrthogonalPersistence = struct | Prim _ | Any | Non-> false | Obj ((Object | Memory), field_list) | Variant field_list -> List.exists (fun field -> go visited field.typ) field_list + | Obj (Actor, _) -> false | Tup type_list -> List.exists (go visited) type_list | Array nested | Mut nested | Opt nested -> diff --git a/test/run-drun/nested-stable-functions.mo b/test/run-drun/nested-stable-functions.mo index c58bae2f65d..dcd85fe958b 100644 --- a/test/run-drun/nested-stable-functions.mo +++ b/test/run-drun/nested-stable-functions.mo @@ -1,3 +1,4 @@ +//ENHANCED-ORTHOGONAL-PERSISTENCE-ONLY import Prim "mo:prim"; actor {