Skip to content

Commit

Permalink
Add test for RT#126754
Browse files Browse the repository at this point in the history
  • Loading branch information
skids committed Dec 10, 2015
1 parent 6c2c99c commit 2113310
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S12-class/magical-vars.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 17;
plan 18;

# L<S02/Names/"Which class am I in?">

Expand Down Expand Up @@ -123,4 +123,15 @@ class SimpleClass does Bar {}
"there is no self outside of a method";
}

# RT #126754
{
class ev {
method foo {
EVAL 'class GLOBAL::evo { method bar { self.WHAT.^name } }'
}
};
ev.foo;
is EVAL('evo.new.bar'), "evo", 'self is not overridden inside an EVAL' ;
}

# vim: ft=perl6

0 comments on commit 2113310

Please sign in to comment.