+# related to perl #112966
+# Magic should not cause elements not to be deleted after scope unwinding
+# when they did not exist before local()
+() = \$#squinch; # $#foo in lvalue context makes array magical
+{
+ local $squinch[0];
+ local @squinch[1..2];
+ package Flibbert;
+ m??; # makes stash magical
+ local $Flibbert::{foo};
+ local @Flibbert::{<bar baz>};
+}
+ok !exists $Flibbert::{foo},
+ 'local helem on magic hash does not leave elems on scope exit';
+ok !exists $Flibbert::{bar},
+ 'local hslice on magic hash does not leave elems on scope exit';
+ok !exists $squinch[0],
+ 'local aelem on magic hash does not leave elems on scope exit';
+ok !exists $squinch[1],
+ 'local aslice on magic hash does not leave elems on scope exit';
+