EditButtonTip 2019-08-04

class X::Syntax::Self::WithoutObject

<p id="6f6738b">Compilation error due to invoking <span class="code">self</span> in an ineligible scope </p>

class X::Syntax::Self::WithoutObject does X::Syntax { }

Syntax error thrown when self is referenced in a place where no invocant is available.

For example

self;

outside a class or role declaration dies with

===SORRY!===
'self' used where no object is available