From 0984b848d16a9445b019363cfe4be82d123e4e20 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 10 Nov 2019 07:29:29 +0100 Subject: synth: simplify equality tests. --- src/synth/synth-oper.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/synth') diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index 80504713e..6a31efdc5 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -431,8 +431,9 @@ package body Synth.Oper is return Create_Value_Discrete (Boolean'Pos (Left.Scal = Right.Scal), Boolean_Type); end if; - if Left_Typ.Kind = Type_Bit then - pragma Assert (Right.Typ.Kind = Type_Bit); + if Left_Typ = Bit_Type + or else Left_Typ = Logic_Type + then if Is_Const (Left) then return Synth_Bit_Eq_Const (Left, Right, Expr); elsif Is_Const (Right) then -- cgit v1.2.3