diff options
author | David Mitchell <davem@iabyn.com> | 2017-11-22 13:32:03 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-11-23 08:52:16 +0000 |
commit | c4874d8a25094b3c3426b7831ebba86fc934a652 (patch) | |
tree | 2ff7791b11918c3e44c6295924e5b658c476d8d5 /lib/B/Deparse.t | |
parent | dcf4c706f6c508e0b024598eb0abee4a6c2677cc (diff) | |
download | perl-c4874d8a25094b3c3426b7831ebba86fc934a652.tar.gz |
Deparse: don't parenthesise state @a = ...
It was deparsing
state @a = ...
as
(state(@a)) = ...
(and similarly for CORE::state(...))
However, a list assign of a state array/hash is currently only legal
in the absence of parens.
Diffstat (limited to 'lib/B/Deparse.t')
-rw-r--r-- | lib/B/Deparse.t | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t index 83e46e8513..7d5f3ca513 100644 --- a/lib/B/Deparse.t +++ b/lib/B/Deparse.t @@ -2988,3 +2988,8 @@ $b = $a . $a . $a; my($a, $x); $x = "${$}abc"; $x = "\$$a"; +#### +# single state aggregate assignment +# CONTEXT use feature "state"; +state @a = (1, 2, 3); +state %h = ('a', 1, 'b', 2); |