Perl5-IDEA icon indicating copy to clipboard operation
Perl5-IDEA copied to clipboard

Add support for values grouping

Open hurricup opened this issue 2 years ago • 1 comments

Discovered while fixing #2568

if( $a ){
  @arrayA = qw/A1 A2/;
  @arrayB = qw/B1 B2 B3/;
}
else{
  @arrayA = qw/C1 C2 C3/;
  @arrayB = qw/D1 D2/;
}

@array = (@arrayA, @arrayB);

Currently our DFA don't understand that values for arrayA and arrayB are related. And basically it sees them as all possible combinations: A-C A-D B-C and B-D and this is bad for performance and may produce incorrect results.

hurricup avatar Feb 16 '23 13:02 hurricup

Seems that we need to move from up to down, not vice versa. Otherwise it is too complicated.

hurricup avatar Feb 16 '23 14:02 hurricup