Navigation Menu

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

Up-front method return type not recognized in Rakudo #2982

Closed
p6rt opened this issue Nov 22, 2012 · 4 comments
Closed

Up-front method return type not recognized in Rakudo #2982

p6rt opened this issue Nov 22, 2012 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 22, 2012

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

Searchable as RT115868$

@p6rt
Copy link
Author

p6rt commented Nov 22, 2012

From @masak

<diakopter> phenny​: ask masak see VBBHREUVND in the backlog. bug? has
Int method
<masak> r​: class A { has Str method foo(--> Int) { return "hi" } }; say A.foo
<p6eval> rakudo bf472b​: OUTPUT«Type check failed for return value;
expected 'Int' but got 'Str' [...]
<masak> r​: class A { has Int method foo() { return "hi" } }; say A.foo
<p6eval> rakudo bf472b​: OUTPUT«hi␤»
<masak> diakopter​: yes, I think that's a bug.
<masak> let me check with spec.
<masak> looks like.
* masak submits rakudobug
<masak> r​: my Int sub foo { return "hi" }; say foo
<p6eval> rakudo bf472b​: OUTPUT«Type check failed for return value;
expected 'Int' but got 'Str' [...]

@p6rt
Copy link
Author

p6rt commented Jun 29, 2015

From @jnthn

On Thu Nov 22 11​:33​:25 2012, masak wrote​:

<diakopter> phenny​: ask masak see VBBHREUVND in the backlog. bug? has
Int method
<masak> r​: class A { has Str method foo(--> Int) { return "hi" } };
say A.foo
<p6eval> rakudo bf472b​: OUTPUT«Type check failed for return value;
expected 'Int' but got 'Str' [...]
<masak> r​: class A { has Int method foo() { return "hi" } }; say A.foo
<p6eval> rakudo bf472b​: OUTPUT«hi␤»
<masak> diakopter​: yes, I think that's a bug.
<masak> let me check with spec.
<masak> looks like.
* masak submits rakudobug
<masak> r​: my Int sub foo { return "hi" }; say foo
<p6eval> rakudo bf472b​: OUTPUT«Type check failed for return value;
expected 'Int' but got 'Str' [...]

Already fixed; added test coverage in S06-advanced/return.t.

@p6rt
Copy link
Author

p6rt commented Jun 29, 2015

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

@p6rt p6rt closed this as completed Jun 29, 2015
@p6rt
Copy link
Author

p6rt commented Jun 29, 2015

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

@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