#!./perl -Ilib
use v5.36;
use Devel::Peek;
use Data::Dumper;
use feature 'class', 'defer';
no warnings 'experimental::class';
use experimental qw(refaliasing);
class what {
method foo {
class hah {
field $x;
sub oh { $x }
}
}
}
Output:
Variable "$x" will not stay shared at ./bad.pl line 17
I expect to see something like:
Field $x is not accessible outside a method at ./hmit line 17.
Output:
I expect to see something like: