aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-30 23:38:41 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-07-01 06:39:47 +0200
commit8b3112098ea7f81baedea06bc5060be8db0bc13d (patch)
treee6500365eb7ff89cccaef0bc7d1589c446f7384c
parenta36a747bcfab29f8dd3f910effa044c2e52c8239 (diff)
downloadghdl-8b3112098ea7f81baedea06bc5060be8db0bc13d.tar.gz
ghdl-8b3112098ea7f81baedea06bc5060be8db0bc13d.tar.bz2
ghdl-8b3112098ea7f81baedea06bc5060be8db0bc13d.zip
Fixed bug in OthersAggregateElement.
-rw-r--r--pyGHDL/dom/Aggregates.py4
-rw-r--r--testsuite/pyunit/Current.vhdl4
2 files changed, 3 insertions, 5 deletions
diff --git a/pyGHDL/dom/Aggregates.py b/pyGHDL/dom/Aggregates.py
index 8edd037a1..87bc44360 100644
--- a/pyGHDL/dom/Aggregates.py
+++ b/pyGHDL/dom/Aggregates.py
@@ -88,7 +88,5 @@ class NamedAggregateElement(VHDLModel_NamedAggregateElement, DOMMixin):
@export
class OthersAggregateElement(VHDLModel_OthersAggregateElement, DOMMixin):
def __init__(self, node: Iir, expression: Expression):
- super().__init__()
+ super().__init__(expression)
DOMMixin.__init__(self, node)
-
- self._expression = expression
diff --git a/testsuite/pyunit/Current.vhdl b/testsuite/pyunit/Current.vhdl
index 93474000b..eae346375 100644
--- a/testsuite/pyunit/Current.vhdl
+++ b/testsuite/pyunit/Current.vhdl
@@ -106,7 +106,7 @@ package package_1 is
type cell;
- constant ghdl : float := (3, 5, 0 to 2 => 5, 3 => 4, name => 10); -- 2.3;
+ constant ghdl : float := (3, 5, 0 to 2 => 5, 3 => 4, name => 10, others => 10, 2.3);
attribute fixed of ghdl, gtkwave [x, y] : constant is true;
component comp is
@@ -125,7 +125,7 @@ package package_1 is
end package;
package body package_1 is
- constant ghdl : float := (1); -- => 2, 4 => 5, others => 10); -- .5;
+ constant ghdl : float := 1.5;
type CAPACITY is range 0 to 1E5 units
pF;