## 2019 12 03.01
+ - Fixed issue RT#131288: parse error for un-prototyped constant function
+ followed by ternary.
## 2019 12 03
{
$is_pattern = 0;
}
+
+ # patch for RT#131288, user constant function without prototype
+ # last type is 'U' followed by ?.
+ elsif ( $last_nonblank_type =~ /^[FUY]$/ ) {
+ $is_pattern = 0;
+ }
elsif ( $expecting == UNKNOWN ) {
+ # FIXME: Can a bare ? still be a pattern delimiter in modern
+ # versions of Perl? Need to research this and decide what
+ # to do.
my $msg;
( $is_pattern, $msg ) =
guess_if_pattern_or_conditional( $i, $rtokens, $rtoken_map,
--- /dev/null
+sub OptArgs2::STYLE_FULL { 3 }
+$style == OptArgs2::STYLE_FULL ? 'FullUsage' : 'NormalUsage',
+ 'usage: ' . $usage . "\n";
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
+../snippets16.t rt131288.def
--- /dev/null
+sub OptArgs2::STYLE_FULL { 3 }
+$style == OptArgs2::STYLE_FULL ? 'FullUsage' : 'NormalUsage', 'usage: ' . $usage . "\n";
#13 rt131115.rt131115
#14 ndsm1.def
#15 ndsm1.ndsm
+#16 rt131288.def
# To locate test #13 you can search for its name or the string '#13'
$uniq{$par} = 1;
}
}
+----------
+
+ 'rt131288' => <<'----------',
+sub OptArgs2::STYLE_FULL { 3 }
+$style == OptArgs2::STYLE_FULL ? 'FullUsage' : 'NormalUsage', 'usage: ' . $usage . "\n";
----------
'spp' => <<'----------',
__;
#15...........
},
+
+ 'rt131288.def' => {
+ source => "rt131288",
+ params => "def",
+ expect => <<'#16...........',
+sub OptArgs2::STYLE_FULL { 3 }
+$style == OptArgs2::STYLE_FULL ? 'FullUsage' : 'NormalUsage',
+ 'usage: ' . $usage . "\n";
+#16...........
+ },
};
my $ntests = 0 + keys %{$rtests};