Skip to content

Commit 090d88a

Browse files
authored
Issue#1485: Modified variable_assignment_004 to no longer affect conditional variable assignments. (#1486)
1 parent 313d9c7 commit 090d88a

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

tests/variable_assignment/rule_004_test_input.fixed.vhd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,11 @@ begin
8282
);
8383
end process PROC_2;
8484

85+
-- Check that conditional assignments are ignored.
86+
PROC_3 : process is
87+
begin
88+
a := 0 when b = '0' or
89+
a = '1' else 10;
90+
end process PROC_3;
91+
8592
end architecture ARCH;

tests/variable_assignment/rule_004_test_input.vhd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,11 @@ begin
8282
);
8383
end process PROC_2;
8484

85+
-- Check that conditional assignments are ignored.
86+
PROC_3 : process is
87+
begin
88+
a := 0 when b = '0' or
89+
a = '1' else 10;
90+
end process PROC_3;
91+
8592
end architecture ARCH;

vsg/rules/variable_assignment/rule_004.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
lTokenPairs = []
77
lTokenPairs.append([token.simple_variable_assignment.assignment, token.simple_variable_assignment.semicolon])
8-
lTokenPairs.append([token.conditional_variable_assignment.assignment, token.conditional_variable_assignment.semicolon])
98

109

1110
class rule_004(multiline_alignment_between_tokens):

0 commit comments

Comments
 (0)