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

empty signatures #850

Closed
p6rt opened this issue Apr 1, 2009 · 5 comments
Closed

empty signatures #850

p6rt opened this issue Apr 1, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Apr 1, 2009

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

Searchable as RT64344$

@p6rt
Copy link
Author

p6rt commented Apr 1, 2009

From daniel@ruoso.com

<sbp> not entirely sure what's going on there. what is the use case in
general for declaring that you *don't* want parameters?
<ruoso> sbp, to fail if anyone tries to send one?
<ruoso> rakudo​: -> { say 'live' }.(123);
<p6eval> rakudo 78cb4c​: OUTPUT«live␤»
<ruoso> oops
<ruoso> hmm
<ruoso> rakudo​: -> { say $_ }.(123);
<p6eval> rakudo 78cb4c​: OUTPUT«Use of uninitialized value␤␤»
<ruoso> hmm... for sure a rakudobug

I think -> { ... } implies an empty signature, so it would fail if you
call it with a parameter...

but then in a following test, I realized the problem is not related to
pointy blocks at all...

<ruoso> rakudo​: sub foo() {}; foo(123);
<p6eval> rakudo 78cb4c​: ( no output )

That was supposed to break...

With a further investigation, I found out that...

<ruoso> rakudo​: sub foo() { say @​_[0] }; foo(123)
<p6eval> rakudo 78cb4c​: OUTPUT«123␤»
<ruoso> rakudo​: -> { say @​_[0] }.(123);
<p6eval> rakudo 78cb4c​: OUTPUT«123␤»

Which means that it is actually assuming the default rountine signature,
when both cases imply an empty signature instead...

daniel

@p6rt
Copy link
Author

p6rt commented Jul 17, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in b/t/spec/S06-signature/errors.t

@p6rt
Copy link
Author

p6rt commented Jul 17, 2009

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

@p6rt
Copy link
Author

p6rt commented Oct 20, 2009

From @moritz

Works now, jnthn++, unfudged test, resolving ticket.

@p6rt
Copy link
Author

p6rt commented Oct 20, 2009

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

@p6rt p6rt closed this as completed Oct 20, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant