summaryrefslogtreecommitdiff
path: root/fakesdio.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-06-26 18:03:04 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-06-26 18:05:02 -0700
commit9700e2d38d91e6678fcdf9d5c39ddd5ec7ad6867 (patch)
tree3d608816dd8dfd8152040a6a061ed6446d54b04c /fakesdio.h
parent43fdf692884d7d7101eac00b3deb3bf5766fe378 (diff)
downloadperl-9700e2d38d91e6678fcdf9d5c39ddd5ec7ad6867.tar.gz
[perl #117535, #76910] Fix bogus ambiguity warnings
‘Ambiguous use of * resolved as operator *’: This message can occur in cases where there is no multiplication operator, so what it is saying is completely wrong. When the lexer parses a bareword, it looks at the previous character and warns if it happens to match /[*%&]/, so foo**bar and foo&&bar result in this warning, as does print $%foo. The purpose of the code is to catch *bar *bar or &black &sheep. To avoid false positives, when emitting one of the three operators * % & the lexer can record that fact, so when it sees a bareword pre- ceded by one of those three characters, instead of guessing that the infix operator was used, it will *know*. The test cases added also trigger ‘Bareword found where operator expected’. I don’t know whether that should change, but at least the current behaviour is tested, so we will know when it does change.
Diffstat (limited to 'fakesdio.h')
0 files changed, 0 insertions, 0 deletions