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

Type coercion in signature gives warning on optional named arguments #5964

Closed
p6rt opened this issue Jan 1, 2017 · 5 comments
Closed

Type coercion in signature gives warning on optional named arguments #5964

p6rt opened this issue Jan 1, 2017 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 1, 2017

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

Searchable as RT130479$

@p6rt
Copy link
Author

p6rt commented Jan 1, 2017

From dougljenkins@gmail.com

I would expect this code to ignore the conversion of $foo if no value is
passed for it.

$ perl6 -e 'sub (Int(Cool) :$foo){}()'

Use of uninitialized value of type Cool in numeric context
  in sub at -e line 1

IRC discussion​: https://irclog.perlgeek.de/perl6/2017-01-01#i_13832608

@p6rt
Copy link
Author

p6rt commented Jan 17, 2018

From @zoffixznet

On Sun, 01 Jan 2017 09​:06​:32 -0800, dougljenkins@​gmail.com wrote​:

I would expect this code to ignore the conversion of $foo if no value is
passed for it.

$ perl6 -e 'sub (Int(Cool) :$foo){}()'

Use of uninitialized value of type Cool in numeric context
in sub at -e line 1

IRC discussion​: https://irclog.perlgeek.de/perl6/2017-01-01#i_13832608

Thank you for the report. This is now fixed in branch `post-release`.

Fix​: rakudo/rakudo@ae697080d2d5225
Test​: Raku/roast@6457b4fab81809c5a

@p6rt
Copy link
Author

p6rt commented Jan 17, 2018

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

@p6rt
Copy link
Author

p6rt commented Jan 17, 2018

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

@p6rt p6rt closed this as completed Jan 17, 2018
@p6rt
Copy link
Author

p6rt commented Feb 12, 2018

From @zoffixznet

On Wed, 17 Jan 2018 15​:48​:31 -0800, cpan@​zoffix.com wrote​:

On Sun, 01 Jan 2017 09​:06​:32 -0800, dougljenkins@​gmail.com wrote​:

I would expect this code to ignore the conversion of $foo if no value is
passed for it.

$ perl6 -e 'sub (Int(Cool) :$foo){}()'

Use of uninitialized value of type Cool in numeric context
in sub at -e line 1

IRC discussion​: https://irclog.perlgeek.de/perl6/2017-01-01#i_13832608

Thank you for the report. This is now fixed in branch `post-release`.

Fix​: rakudo/rakudo@ae697080d2d5225
Test​: Raku/roast@6457b4fab81809c5a

This has been reverted for now, in light of rakudo/rakudo#1517
(and somewhat rakudo/rakudo#1519 too)

We need to figure out how/whether handle the cases whether the two types of
the coercer aren't subclasses and I rather we don't push the original fix into
a release before we do that.

Keeping this Issue as resolved, with the problem being continued on rakudo/rakudo#1517

@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