Skip to content

Commit

Permalink
fix #5279
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed May 19, 2021
1 parent ec03467 commit e0860ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/ast/datatype_decl_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ namespace datatype {
return false;
func_decl* c = get_accessor_constructor(f);
SASSERT(n == 1);
std::cout << f->get_name() << " " << mk_pp(args[0], m) << "\n";
if (is_constructor(args[0]))
return to_app(args[0])->get_decl() != c;
return false;
Expand Down
8 changes: 4 additions & 4 deletions src/ast/datatype_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ namespace datatype {

namespace param_size {
class size {
unsigned m_ref;
unsigned m_ref{ 0 };
public:
size(): m_ref(0) {}
virtual ~size() {}
size() {}
virtual ~size() { }
void inc_ref() { ++m_ref; }
void dec_ref();
static size* mk_offset(sort_size const& s);
Expand Down Expand Up @@ -197,7 +197,7 @@ namespace datatype {
sort_ref_vector const& params() const { return m_params; }
util& u() const { return m_util; }
param_size::size* sort_size() { return m_sort_size; }
void set_sort_size(param_size::size* p) { m_sort_size = p; if (p) p->inc_ref(); m_sort = nullptr; }
void set_sort_size(param_size::size* p) { auto* q = m_sort_size; m_sort_size = p; if (p) p->inc_ref(); if (q) q->dec_ref(); m_sort = nullptr; }
def* translate(ast_translation& tr, util& u);
};

Expand Down

0 comments on commit e0860ea

Please sign in to comment.