diff --git a/src/ast/datatype_decl_plugin.cpp b/src/ast/datatype_decl_plugin.cpp index bb5e0781e..48dfc1fbe 100644 --- a/src/ast/datatype_decl_plugin.cpp +++ b/src/ast/datatype_decl_plugin.cpp @@ -1296,7 +1296,7 @@ namespace datatype { unsigned start = rand(); for (unsigned cj = 0; cj < constructors.size(); ++cj) { func_decl* c = constructors[(start + cj) % constructors.size()]; - if (all_of(*c, [&](sort* s) { return !is_datatype(s); })) { + if (all_of(*c, [&](sort* s) { return !is_datatype(s) && !is_recursive_nested(s); })) { TRACE(util_bug, tout << "non_rec_constructor c: " << func_decl_ref(c, m) << "\n";); result.first = c; result.second = 1;