summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/comp/form_scope.t6
-rw-r--r--toke.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/t/comp/form_scope.t b/t/comp/form_scope.t
index 809e0d2e72..f10637fd54 100644
--- a/t/comp/form_scope.t
+++ b/t/comp/form_scope.t
@@ -118,6 +118,12 @@ undef &x;
print "ok 9 - closure var not available when outer sub is undefined\n";
}
+format start_subparse::assertion =
+@
+sub { }
+.
+# survived; no "print ok" necessary
+
# This is a variation of bug #22977, which crashes or fails an assertion
# up to 5.16.
# Keep this test last if you want test numbers to be sane.
diff --git a/toke.c b/toke.c
index 9deac94901..9645ac6e8a 100644
--- a/toke.c
+++ b/toke.c
@@ -10742,9 +10742,6 @@ Perl_start_subparse(pTHX_ I32 is_format, U32 flags)
const I32 oldsavestack_ix = PL_savestack_ix;
CV* const outsidecv = PL_compcv;
- if (PL_compcv) {
- assert(SvTYPE(PL_compcv) == SVt_PVCV);
- }
SAVEI32(PL_subline);
save_item(PL_subname);
SAVESPTR(PL_compcv);