diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-07 07:53:01 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-07 07:53:01 +0200 |
commit | 025ffd8038acb7aa8a1348799ff7d90cfeb579b9 (patch) | |
tree | a82292a7b23561485ccf1db27e26c41d0ff75934 /src | |
parent | 9ebdd46defd0c2ce54d0e04c293e9d5a5b111026 (diff) | |
download | ghdl-025ffd8038acb7aa8a1348799ff7d90cfeb579b9.tar.gz ghdl-025ffd8038acb7aa8a1348799ff7d90cfeb579b9.tar.bz2 ghdl-025ffd8038acb7aa8a1348799ff7d90cfeb579b9.zip |
synth: handle Pos attribute for booleans.
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-expr.adb | 2 | ||||
-rw-r--r-- | src/synth/synth-objtypes.ads | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index bbaf4d6a4..f17682d75 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -738,7 +738,7 @@ package body Synth.Expr is pragma Assert (Vtype.Kind = Type_Logic); return Vt; when Type_Discrete => - pragma Assert (Vtype.Kind = Type_Discrete); + pragma Assert (Vtype.Kind in Type_All_Discrete); declare N : Net; begin diff --git a/src/synth/synth-objtypes.ads b/src/synth/synth-objtypes.ads index c90937b64..8824eea18 100644 --- a/src/synth/synth-objtypes.ads +++ b/src/synth/synth-objtypes.ads @@ -86,6 +86,7 @@ package Synth.Objtypes is ); subtype Type_Nets is Type_Kind range Type_Bit .. Type_Logic; + subtype Type_All_Discrete is Type_Kind range Type_Bit .. Type_Discrete; type Type_Type (Kind : Type_Kind); type Type_Acc is access Type_Type; |