New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPL loses custom operators #6446
Comments
From tonnerre.p@gmail.comHi, context is : When executing the following commands under REPL, i got that issue :
Running the same statements into a script is working fine : sub postfix:<€> (Int $n) {2*$n} say 21€; ./operators.pl6 Regards |
From @lizmatThis appears to be forgetfulness of the REPL from one input to the next. If you put it on the same line, it *does* work:
So this boils down to a much more generic issue, for which we already have tickets I believe.
|
The RT System itself - Status changed from 'new' to 'open' |
From tonnerre.p@gmail.comIt works, thank you
|
From @lizmatFurther datapoints: $ perl6
So, the sub *does* survive from one call to the next. It only loses the grammar adaptations that defining a sub postfix:<> do.
|
From @lefthThe following code works fine if run in a script or with `perl6 -e '...'`, class KG { has $.amount; } # Output from perl6 -e: # Output from the REPL is: Interestingly, if a postfix operator like this is exported by a module I'm using Rakudo version 2017.08-96-ge5a600997 built on MoarVM version |
Migrated from rt.perl.org#131900 (status was 'open')
Searchable as RT131900$
The text was updated successfully, but these errors were encountered: