diff --git a/src/FactUnion.cpp b/src/FactUnion.cpp index f83d1a20b..77a37fbad 100644 --- a/src/FactUnion.cpp +++ b/src/FactUnion.cpp @@ -245,6 +245,8 @@ FactUnion::join_var_facts(const vector& facts, const vector(exist_fact->clone()); } else { + // hack: both facts have to be the property of the same variable to be able to merge + fu->set_var(exist_fact->get_var()); fu->join(*exist_fact); } } diff --git a/src/FactUnion.h b/src/FactUnion.h index 387563bb3..1ff378403 100644 --- a/src/FactUnion.h +++ b/src/FactUnion.h @@ -57,6 +57,7 @@ class FactUnion : public Fact virtual ~FactUnion(void) {}; virtual const Variable* get_var(void) const { return var;}; + void set_var(const Variable* v) { var = v;} const Type* get_last_written_type(void) const; int get_last_written_fid(void) const { return last_written_fid; }; static bool is_field_readable(const Variable* v, int fid, const vector& facts);