diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-09-12 04:36:58 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-09-12 04:36:58 +0200 |
commit | 24d630de3beef7707102f0811572f263bbe40ea1 (patch) | |
tree | 989e1038eae090d01c41106ad86e46fb4d17f9a8 /src/vhdl/sem_expr.adb | |
parent | a30b961a929e03b7b607f4a2f950f12a5a2920e5 (diff) | |
download | ghdl-24d630de3beef7707102f0811572f263bbe40ea1.tar.gz ghdl-24d630de3beef7707102f0811572f263bbe40ea1.tar.bz2 ghdl-24d630de3beef7707102f0811572f263bbe40ea1.zip |
sem_expr: refactoring for aggregates.
Diffstat (limited to 'src/vhdl/sem_expr.adb')
-rw-r--r-- | src/vhdl/sem_expr.adb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb index be236cc05..9aca42f4b 100644 --- a/src/vhdl/sem_expr.adb +++ b/src/vhdl/sem_expr.adb @@ -3028,7 +3028,6 @@ package body Sem_Expr is -- True if one sub-aggregate is by named/by position. Has_Named : Boolean := False; - Has_Positional : Boolean := False; -- True if one sub-aggregate is dynamic. Has_Dynamic : Boolean := False; @@ -3338,9 +3337,6 @@ package body Sem_Expr is Error_Kind ("sem_array_aggregate_type_1", Aggr); end case; - if Is_Positional = True then - Info.Has_Positional := True; - end if; if Is_Positional = False then Info.Has_Named := True; end if; @@ -3521,11 +3517,11 @@ package body Sem_Expr is if Dim = Get_Nbr_Elements (Index_List) then -- A type has been found for AGGR, analyze AGGR as if it was -- an aggregate with a subtype (and not a string). - if Get_Kind (Aggr) /= Iir_Kind_Aggregate then - -- Nothing to do for a string. - return; - else + if Get_Kind (Aggr) = Iir_Kind_Aggregate then Sem_Array_Aggregate_Elements (Aggr, A_Type, Expr_Staticness, Info); + else + -- Nothing to do for a string. + null; end if; else -- A sub-aggregate: recurse. |