- if (/(!)?$outin\_r(\d+)/) {
- if (($1 && defined($different_pos)) || (!$1 && defined($same_pos))) {
- print STDERR "Multiple in/out references of same type in one requirement not allowed.\n";
+ 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);
+ }
+
+ if ($same_pos & $bit_pos) {
+ if ($1) {
+ print STDERR "conflicting !in and in constraints\n";
+ } else {
+ print STDERR "duplicate in constraint\n";
+ }