mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-30 19:22:28 +00:00 
			
		
		
		
	fix #7037
This commit is contained in:
		
							parent
							
								
									f98b42ae42
								
							
						
					
					
						commit
						84a7a79e90
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		|  | @ -509,10 +509,10 @@ namespace smt { | |||
|     // Assuming `app` is equal to a constructor term, return the constructor enode
 | ||||
|     inline enode * theory_datatype::oc_get_cstor(enode * app) { | ||||
|         theory_var v = app->get_root()->get_th_var(get_id()); | ||||
|         SASSERT(v != null_theory_var); | ||||
|         if (v == null_theory_var) | ||||
|             return nullptr; | ||||
|         v = m_find.find(v); | ||||
|         var_data * d = m_var_data[v]; | ||||
|         SASSERT(d->m_constructor); | ||||
|         return d->m_constructor; | ||||
|     } | ||||
| 
 | ||||
|  | @ -802,8 +802,9 @@ namespace smt { | |||
|             return false; | ||||
|         func_decl* con = m_util.get_accessor_constructor(f); | ||||
|         for (enode* app : ctx.enodes_of(f)) { | ||||
|             enode* arg = app->get_arg(0)->get_root(); | ||||
|             if (is_constructor(arg) && arg->get_decl() != con)  | ||||
|             enode* arg = app->get_arg(0); | ||||
|             enode* arg_con = oc_get_cstor(arg); | ||||
|             if (arg_con && is_constructor(arg_con) && arg_con->get_decl() != con)  | ||||
|                 return true; | ||||
|         } | ||||
|         return false;  | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue