This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #127993) test reporting of multiple conflict markers
[perl5.git] / t / lib / croak / pp_hot
index 1e12fbb..bc00a48 100644 (file)
@@ -1,4 +1,38 @@
 __END__
+# NAME local %$ref on last line of lvalue sub in lv cx
+   sub foo :lvalue { local %{\%foo} }
+   (foo) = 3;
+EXPECT
+Can't localize through a reference at - line 1.
+########
+# NAME local @$ref on last line of lvalue sub in lv cx
+   sub foo :lvalue { local @{\@foo} }
+   (foo) = 3;
+EXPECT
+Can't localize through a reference at - line 1.
+########
+# NAME local %$ref on last line of lvalue sub in non-lv cx
+   sub foo :lvalue { local %{\%foo} }
+   foo;
+EXPECT
+Can't localize through a reference at - line 1.
+########
+# NAME local @$ref on last line of lvalue sub in non-lv cx
+   sub foo :lvalue { local @{\@foo} }
+   foo;
+EXPECT
+Can't localize through a reference at - line 1.
+########
+# NAME \local %$ref
+   \local %{\%hash}
+EXPECT
+Can't localize through a reference at - line 1.
+########
+# NAME \local @$ref
+   \local @{\@hash}
+EXPECT
+Can't localize through a reference at - line 1.
+########
 # NAME calling undef sub belonging to undef GV
    my $foosub = \&foo;
    undef *foo;
@@ -11,3 +45,16 @@ Undefined subroutine &main::foo called at - line 3.
    &$foosub;
 EXPECT
 Undefined subroutine &main::foo called at - line 2.
+########
+# NAME calling undef scalar
+   &{+undef};
+EXPECT
+Can't use an undefined value as a subroutine reference at - line 1.
+########
+# NAME calling undef magical scalar
+   sub TIESCALAR {bless[]}
+   sub FETCH {}
+   tie $tied, "";
+   &$tied;
+EXPECT
+Can't use an undefined value as a subroutine reference at - line 4.