Skip to content
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

Can't call the sub 'say' from a method called 'say' in Rakudo #1653

Closed
p6rt opened this issue Apr 2, 2010 · 5 comments
Closed

Can't call the sub 'say' from a method called 'say' in Rakudo #1653

p6rt opened this issue Apr 2, 2010 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 2, 2010

Migrated from rt.perl.org#74014 (status was 'resolved')

Searchable as RT74014$

@p6rt
Copy link
Author

p6rt commented Apr 2, 2010

From @masak

<masak> the question has to do with the TODO comment; why couldn't you
just use 'say' rather than 'print ... "\n"'?
<snarkyboojum> masak​: didn't know how to ;) it thinks I'm referring to
the current say sub if I do that I think (expected 2 args, got 1 type
error message)
<masak> sounds like a bug.
<snarkyboojum> ah
<snarkyboojum> well how would it work out which say I want to use?
<masak> snarkyboojum​: subs are orthogonal to methods.
<masak> rakudo​: class A { method say($x) { say $x } }; A.new.say("OH HAI")
<p6eval> rakudo 50fa7b​: OUTPUT«Not enough positional parameters
passed; got 1 but expected 2 [...]
<snarkyboojum> yeah that sort of thing :)
<jnthn> That's...wrong. :|
<jnthn> wtf.
* masak submits a rakudobug
<masak> :)

@p6rt
Copy link
Author

p6rt commented Apr 4, 2010

From @jnthn

On Fri Apr 02 15​:46​:29 2010, masak wrote​:

<masak> the question has to do with the TODO comment; why couldn't you
just use 'say' rather than 'print ... "\n"'?
<snarkyboojum> masak​: didn't know how to ;) it thinks I'm referring to
the current say sub if I do that I think (expected 2 args, got 1 type
error message)
<masak> sounds like a bug.
<snarkyboojum> ah
<snarkyboojum> well how would it work out which say I want to use?
<masak> snarkyboojum​: subs are orthogonal to methods.
<masak> rakudo​: class A { method say($x) { say $x } }; A.new.say("OH HAI")
<p6eval> rakudo 50fa7b​: OUTPUT«Not enough positional parameters
passed; got 1 but expected 2 [...]
<snarkyboojum> yeah that sort of thing :)
<jnthn> That's...wrong. :|
<jnthn> wtf.

Turns out $*SCOPE was leaking into places it shouldn't be. Fixed now...

class A { method say($x) { say $x } }; A.new.say("OH HAI")
OH HAI

Given to moritz++ for spectests.

Jonathan

@p6rt
Copy link
Author

p6rt commented Apr 4, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Apr 5, 2010

From @moritz

Tested in t/spec/S12-methods/instance.t.

@p6rt
Copy link
Author

p6rt commented Apr 5, 2010

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Apr 5, 2010
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant