diff options
author | Simon Cozens <simon@netthink.co.uk> | 2000-12-10 19:06:19 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-11 15:35:07 +0000 |
commit | 1e1dbab6eed49955498a66ce3beedbd7ea33dc21 (patch) | |
tree | e28c26af071f6ca2caa7951953b0623527d8a0b2 /t/lib/b.t | |
parent | 7d3a9d88333294f7510d5755825d4f26422ffba1 (diff) | |
download | perl-1e1dbab6eed49955498a66ce3beedbd7ea33dc21.tar.gz |
Re: [ID 20001204.007] -MO=Deparse -we '{234;}' failing
Message-ID: <20001210190619.B21402@deep-dark-truthful-mirror.perlhacker.org>
p4raw-id: //depot/perl@8079
Diffstat (limited to 't/lib/b.t')
-rwxr-xr-x | t/lib/b.t | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -10,7 +10,7 @@ use warnings; use strict; use Config; -print "1..15\n"; +print "1..17\n"; my $test = 1; @@ -78,9 +78,6 @@ LINE: while (defined($_ = <ARGV>)) { @F = split(/\s+/, $_, 0); '???' } -continue { - '???' -} EOF print "# [$a]\n\# vs\n# [$b]\nnot " if $a ne $b; @@ -146,3 +143,14 @@ if ($is_thread) { print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%one.*sv_undef.*HV/s; } ok; + +# Bug 20001204.07 +{ +my $foo = $deparse->coderef2text(sub { { 234; }}); +# Constants don't get optimised here. +print "not " unless $foo =~ /{.*{.*234;.*}.*}/sm; +ok; +$foo = $deparse->coderef2text(sub { { 234; } continue { 123; } }); +print "not " unless $foo =~ /{.*{.*234;.*}.*continue.*{.*123.*}/sm; +ok; +} |