You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<masak> rakudo: sub self() { say "OH HAI" }; self
<p6eval> rakudo 7ef386: Lexical 'self' not found [...]
* masak submits rakudobug
<moritz_> nope, that's fine
<moritz_> rakudo: sub self() { say "OH HAI" }; self()
<p6eval> rakudo 7ef386: Lexical 'self' not found [...]
<moritz_> *that's* a bug
<masak> ah. :)
<masak> rakudo: sub self() { say "OH HAI" }; &self()
<p6eval> rakudo 7ef386: OH HAI
<moritz_> but without the parenthesis the built-in takes precedence,
if it's parsed as term (and not as function)
<moritz_> std: self ~~ 1
<p6eval> std : ok 00:01 106m
<moritz_> std: sub a { }; a ~~ 1
<p6eval> std : �[31m===�[0mSORRY!�[31m===�[0mPreceding context
expects a term, but found infix ~~ instead [...]
<moritz_> and you see that STD.pm doesn't parse self as a function
<masak> right. it's a term.
Migrated from rt.perl.org#71194 (status was 'resolved')
Searchable as RT71194$
The text was updated successfully, but these errors were encountered: