BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2019-08-04

class X::Syntax::NoSelf

<p>Compilation error due to implicitly using a <span class="code">self</span> that is not there </p>

class X::Syntax::NoSelf does X::Syntax { }
Code

Compile time error thrown when $.foo style calls are used where no invocant is available.

For example the code

$.meth;
Code

in the program body throws the error

===SORRY!===
Variable $.meth used where no 'self' is available
Code

because $.meth is short for $(self.meth), and there is no self available in mainline.

Methods§

method variable§

Returns the variable/method call that caused the error.