- if (/(!)?$outin\_r(\d+)/) {
- if (($1 && defined($different_pos)) || (!$1 && defined($same_pos2))) {
- print STDERR "Multiple in/out references of same type in one requirement not allowed.\n";
- return (undef, undef, undef, undef, undef);
+ if (!$is_in && /(!)?in_r(\d+)/) {
+ my $bit_pos = 1 << ($2 - 1);
+ if ($different_pos & $bit_pos) {
+ if ($1) {
+ print STDERR "duplicate !in constraint\n";
+ } else {
+ print STDERR "conflicting !in and in constraints\n";
+ }
+ return (undef, undef, undef, undef);