summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/op/sub.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/op/sub.t b/t/op/sub.t
index b2839c6a40..0eae1d50de 100644
--- a/t/op/sub.t
+++ b/t/op/sub.t
@@ -6,7 +6,7 @@ BEGIN {
set_up_inc('../lib');
}
-plan(tests => 64);
+plan(tests => 65);
sub empty_sub {}
@@ -443,3 +443,10 @@ fresh_perl_like(
{},
"#6998 freeing array used as args to sub",
);
+
+# github #21044
+{
+ local $TODO = "sub return values not modifiable";
+ok( eval { $_->{x} = 1 for sub { undef }->(); 1 }, "check sub return values are modifiable")
+ or diag $@;
+}