From a109df04bbf13fe61f2a4fb169766dcf9ff6f185 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Sun, 16 Oct 2011 11:02:07 -0700 Subject: [PATCH] Proper expression type for vhdl relation expressions. --- vhdlpp/expression_elaborate.cc | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/vhdlpp/expression_elaborate.cc b/vhdlpp/expression_elaborate.cc index 5e3a88fbc..04c4200ca 100644 --- a/vhdlpp/expression_elaborate.cc +++ b/vhdlpp/expression_elaborate.cc @@ -419,24 +419,7 @@ const VType* ExpRelation::probe_type(Entity*ent, Architecture*arc) const const VType*type1 = peek_operand1()->probe_type(ent, arc); const VType*type2 = peek_operand2()->probe_type(ent, arc); - if (type1 == type2) - return type1; - - if (type1 && !type2) - return type1; - - if (type2 && !type1) - return type2; - - const VTypeArray*type1a = dynamic_cast(type1); - const VTypeArray*type2a = dynamic_cast(type2); - - if (type1a && type2a && type1a->element_type()==type2a->element_type()) { - return type1a->element_type(); - } - - cerr << get_fileline() << ": error: Type mismatch in relation expression." << endl; - return type1; + return primitive_BOOLEAN; } int ExpRelation::elaborate_expr(Entity*ent, Architecture*arc, const VType*ltype)