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

Parameter coercion with type smiley doesn't work #4673

Closed
p6rt opened this issue Oct 23, 2015 · 5 comments
Closed

Parameter coercion with type smiley doesn't work #4673

p6rt opened this issue Oct 23, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Oct 23, 2015

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

Searchable as RT126433$

@p6rt
Copy link
Author

p6rt commented Oct 23, 2015

From @lizmat

[12​:14​:56] <lizmat> m​: sub a(Int​:D() $a) { dd $a }; a "42" # type smileys not complete first citizen yet :-(
[12​:14​:57] <+camelia> rakudo-moar 3df263​: OUTPUT«Type check failed in binding $a; expected Int but got Str␤ in sub a at /tmp/bIORsmiOVK​:1␤ in block <unit> at /tmp/bIORsmiOVK​:1␤␤»
[12​:15​:11] <lizmat> m​: sub a(Int() $a) { dd $a }; a "42" # works ok without the smiley
[12​:15​:11] <+camelia> rakudo-moar 3df263​: OUTPUT«Int $var = 42␤»
[12​:19​:53] <FROGGS> lizmat​: handling in params is not done yet, because the param-handling used to cheat in the past
[12​:20​:06] <FROGGS> lizmat​: otherwise we would not have had smileys there at all
[12​:20​:25] <lizmat> aha, I guess that's also the reason it's so hard to get "use parameters" and "use invocant" to work
[12​:20​:41] <lizmat> should I rakudobug it ?
[12​:21​:12] <FROGGS> yeah :/
[12​:21​:29] <FROGGS> (I was hoping to get the ticket count down to 2**10)

@p6rt
Copy link
Author

p6rt commented Sep 23, 2017

From @skids

On Fri, 23 Oct 2015 03​:29​:12 -0700, elizabeth wrote​:

[12​:14​:56] <lizmat> m​: sub a(Int​:D() $a) { dd $a }; a "42" #
type smileys not complete first citizen yet :-(
[12​:14​:57] <+camelia> rakudo-moar 3df263​: OUTPUT«Type check failed
in binding $a; expected Int but got Str␤ in sub a at
/tmp/bIORsmiOVK​:1␤ in block <unit> at /tmp/bIORsmiOVK​:1␤␤»
[12​:15​:11] <lizmat> m​: sub a(Int() $a) { dd $a }; a "42" # works
ok without the smiley
[12​:15​:11] <+camelia> rakudo-moar 3df263​: OUTPUT«Int $var = 42␤»
[12​:19​:53] <FROGGS> lizmat​: handling in params is not done yet,
because the param-handling used to cheat in the past
[12​:20​:06] <FROGGS> lizmat​: otherwise we would not have had
smileys there at all
[12​:20​:25] <lizmat> aha, I guess that's also the reason it's so
hard to get "use parameters" and "use invocant" to work
[12​:20​:41] <lizmat> should I rakudobug it ?
[12​:21​:12] <FROGGS> yeah :/
[12​:21​:29] <FROGGS> (I was hoping to get the ticket count down to
2**10)

Fuded tests for this were apparently added already. They were enhanced to
inspect the exception in roast commit 574035ff4

@p6rt
Copy link
Author

p6rt commented Sep 23, 2017

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

@p6rt
Copy link
Author

p6rt commented Jan 3, 2018

From @zoffixznet

On Fri, 23 Oct 2015 03​:29​:12 -0700, elizabeth wrote​:

[12​:14​:56] <lizmat> m​: sub a(Int​:D() $a) { dd $a }; a "42" #
type smileys not complete first citizen yet :-(
[12​:14​:57] <+camelia> rakudo-moar 3df263​: OUTPUT«Type check failed
in binding $a; expected Int but got Str␤ in sub a at
/tmp/bIORsmiOVK​:1␤ in block <unit> at /tmp/bIORsmiOVK​:1␤␤»
[12​:15​:11] <lizmat> m​: sub a(Int() $a) { dd $a }; a "42" # works
ok without the smiley
[12​:15​:11] <+camelia> rakudo-moar 3df263​: OUTPUT«Int $var = 42␤»
[12​:19​:53] <FROGGS> lizmat​: handling in params is not done yet,
because the param-handling used to cheat in the past
[12​:20​:06] <FROGGS> lizmat​: otherwise we would not have had
smileys there at all
[12​:20​:25] <lizmat> aha, I guess that's also the reason it's so
hard to get "use parameters" and "use invocant" to work
[12​:20​:41] <lizmat> should I rakudobug it ?
[12​:21​:12] <FROGGS> yeah :/
[12​:21​:29] <FROGGS> (I was hoping to get the ticket count down to
2**10)

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@fc99d5e1cd4ae27
Unfudge​: Raku/roast@7327b52b82214d440

@p6rt
Copy link
Author

p6rt commented Jan 3, 2018

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

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