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

No type checking on optional defaults and provided defaults in Rakudo #1732

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

No type checking on optional defaults and provided defaults in Rakudo #1732

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

Comments

@p6rt
Copy link

p6rt commented Apr 28, 2010

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

Searchable as RT74758$

@p6rt
Copy link
Author

p6rt commented Apr 28, 2010

From @masak

<masak> rakudo​: class A { method foo(A :$a) { say $a.WHAT } }; A.new.foo
<p6eval> rakudo 72f914​: OUTPUT«Any()␤»
<masak> jnthn​: has this been reported? the fact that $a is of a type
that wouldn't bind?
<jnthn> masak​: Looks odd.
* masak submits rakudobug
<jnthn> Is it peculiar to nameds?
<ash__> rakudo​: class A {}; sub foo(A :$a) { say $a.WHAT }; foo;
<p6eval> rakudo 72f914​: OUTPUT«Any()␤»
<masak> so, not specific to nameds.
<jnthn> oh good
<jnthn> It's an easy fix then, I expect.
* jnthn is a little surprised we musta gone many months with this bug.
<masak> jnthn​: we have too few spectests :)
<masak> rakudo​: sub foo(Int $a = "OH HAI") { say $a }; foo
<p6eval> rakudo 72f914​: OUTPUT«OH HAI␤»
<masak> that was fun, too :)

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

From @moritz

This first issue is now gone, $a is initialized to the A type object.
The second issue still remains.

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

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

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

From @moritz

Fixed now, and tested in S06-signature/optional.t

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

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

@p6rt p6rt closed this as completed Oct 1, 2011
@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