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
Dispatch weirdness in REPL #3323
Comments
From mark@kli.org
multi sub f1(Any $x) { "Any $x" } multi sub f2(Any $x) { f1($x) } multi sub f1(Rat $x) { "Rat $x" }
say f2("a"); say f2(1.9); say f1(1.9);
This should produce
Any a Rat 1.9 Rat 1.9
And so it does, when run from a file. But when typed in the REPL,
Any a Any 1.9 Rat 1.9
i.e. the f2 call doesn't pick up the more specific f1. If you
|
From @pmichaudOn Wed, Jan 29, 2014 at 06:14:38PM -0800, Mark E. Shoulson wrote:
The way the REPL works is that each line of entered input Thus when the lines above are entered one at a time, { { { { { { So, when f2() is executed, the f1(Rat) multi isn't in scope and To think of it another way -- each line of input to the REPL At the moment I'm inclined to reject this ticket as "not a bug", Pm |
The RT System itself - Status changed from 'new' to 'open' |
From @cokeOn Thu Jan 30 07:15:52 2014, pmichaud wrote:
Rejecting ticket. -- |
@coke - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#121117 (status was 'rejected')
Searchable as RT121117$
The text was updated successfully, but these errors were encountered: