This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
warn on $a.$b.$c in void context
authorZefram <zefram@fysh.org>
Thu, 14 Dec 2017 04:23:58 +0000 (04:23 +0000)
committerZefram <zefram@fysh.org>
Thu, 14 Dec 2017 04:23:58 +0000 (04:23 +0000)
commit3d033384b2016a58c3eed89524dc658660c759ce
treed24894c25e1d1f5a61afd1e146b6bf43a9ff331a
parent9b568b537ddf7c0495ef59f31183cfb270c398bc
warn on $a.$b.$c in void context

$a.$b.$c gets transformed early on to execute as ($a.$b).=$c, which didn't
warn about void context becuase .= looks like a useful side effect.
Happily, the recently-added OPpCONCAT_NESTED flag identifies that this
has happened.  Make scalarvoid() pay attention to this flag when a concat
op is put into void context.  Fixes [perl #6997]
op.c
t/lib/warnings/op