- Notifications
You must be signed in to change notification settings - Fork602
Labels
Description
Description
&CORE::__CLASS__ should either fail cleanly (Undefined subroutine &CORE::__CLASS__ called or similar) or work and return a class name. Instead it returns the caller's filename.
Steps to Reproduce
use v5.36;use experimentalqw(class);class Foo { method f1() { __CLASS__} method f2() { &CORE::__CLASS__() } method f3() { \&CORE::__CLASS__ }}my$o = Foo->new;say$o->f1;say$o->f2;say$o->f3->();
Output:
Foobug.plbug.plExpected behavior
FooFooFoo... actually I'm not sure about the third one. I think that ought to be a runtime error, maybe?