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

proto routines do not limit the signature in Rakudo #3001

Closed
p6rt opened this issue Dec 21, 2012 · 5 comments
Closed

proto routines do not limit the signature in Rakudo #3001

p6rt opened this issue Dec 21, 2012 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 21, 2012

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

Searchable as RT116164$

@p6rt
Copy link
Author

p6rt commented Dec 21, 2012

From @masak

<moritz> r​: proto f(Int $x) {*}; multi f($) { say 'default' }; f 'foo'
<p6eval> rakudo 55dbc0​: OUTPUT«default␤»
<moritz> bug!
* masak submits rakudobug
<moritz> it should check the proto signature, but doesn't

@p6rt
Copy link
Author

p6rt commented Jan 2, 2013

From @jnthn

On Fri Dec 21 04​:47​:23 2012, masak wrote​:

<moritz> r​: proto f(Int $x) {*}; multi f($) { say 'default' }; f 'foo'
<p6eval> rakudo 55dbc0​: OUTPUT«default␤»
<moritz> bug!
* masak submits rakudobug
<moritz> it should check the proto signature, but doesn't

It's now detected correctly, at compile time even.

proto f(Int $x) {*}; multi f($) { say 'default' }; f 'foo'
CHECK FAILED​:
Calling proto of 'f' will never work with argument types (str) (line 1)
  Expected​: :(Int $x)

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 2, 2013

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

@p6rt
Copy link
Author

p6rt commented Jan 8, 2013

From @moritz

tested in S06-multi/proto.t

@p6rt
Copy link
Author

p6rt commented Jan 8, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant