Add tests for the C<my $x if foo> deprecation, and change the
[p5sagit/p5-mst-13.2.git] / t / op / ref.t
index d4c290e..3bb280c 100755 (executable)
@@ -5,7 +5,7 @@ BEGIN {
     @INC = qw(. ../lib);
 }
 
-print "1..67\n";
+print "1..68\n";
 
 require 'test.pl';
 
@@ -350,6 +350,14 @@ runperl(prog => 'sub UNIVERSAL::DESTROY { warn } bless \$a, A', stderr => 1);
 if ($? != 0) { print "not " };
 print "ok ",++$test," - warn called inside UNIVERSAL::DESTROY\n";
 
+
+# bug #22719
+
+runperl(prog => 'sub f { my $x = shift; *z = $x; } f({}); f();');
+if ($? != 0) { print "not " };
+print "ok ",++$test," - coredump on typeglob = (SvRV && !SvROK)\n";
+
+
 # test global destruction
 
 ++$test;