File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -509,10 +509,10 @@ namespace smt {
509
509
// Assuming `app` is equal to a constructor term, return the constructor enode
510
510
inline enode * theory_datatype::oc_get_cstor (enode * app) {
511
511
theory_var v = app->get_root ()->get_th_var (get_id ());
512
- SASSERT (v != null_theory_var);
512
+ if (v == null_theory_var)
513
+ return nullptr ;
513
514
v = m_find.find (v);
514
515
var_data * d = m_var_data[v];
515
- SASSERT (d->m_constructor );
516
516
return d->m_constructor ;
517
517
}
518
518
@@ -802,8 +802,9 @@ namespace smt {
802
802
return false ;
803
803
func_decl* con = m_util.get_accessor_constructor (f);
804
804
for (enode* app : ctx.enodes_of (f)) {
805
- enode* arg = app->get_arg (0 )->get_root ();
806
- if (is_constructor (arg) && arg->get_decl () != con)
805
+ enode* arg = app->get_arg (0 );
806
+ enode* arg_con = oc_get_cstor (arg);
807
+ if (arg_con && is_constructor (arg_con) && arg_con->get_decl () != con)
807
808
return true ;
808
809
}
809
810
return false ;
You can’t perform that action at this time.
0 commit comments