This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test for lack of uninit warnings in sub redef
[perl5.git] / t / lib / warnings / 9uninit
index 7d73f01..9f42689 100644 (file)
@@ -2018,3 +2018,9 @@ my $moo = $Foo::BAR + 42;
 __END__
 EXPECT
 Use of uninitialized value in addition (+) at - line 3.
 __END__
 EXPECT
 Use of uninitialized value in addition (+) at - line 3.
+########
+use warnings 'uninitialized';
+use constant {u=>undef, v=>undef};
+sub foo () {u}
+sub foo () {v}
+EXPECT