[perl #131339] Pair.new uses positional parameters despite error message

2017-05-21 Thread Zoffix Znet via RT
On Sun, 21 May 2017 14:02:04 -0700, comdog wrote:
> I was playing with Pair and found this odd error message that says
> the default constructor only takes named arguments. While .new can
> take named arguments, it doesn't do anything iwth them. It does
> construct a Pair from positional parameters though.
> 
> > my @array = 
> [a b c]
> > :@array
> array => [a b c]
> > my $pair = Pair.new: @array
> Default constructor for 'Pair' only takes named arguments
>   in block  at  line 1
> 
> > my $pair = Pair.new: :a('b')
> (Mu) => (Mu)

Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/1c16bf2e08
Test: https://github.com/perl6/roast/commit/a523aef60a


[perl #131339] Pair.new uses positional parameters despite error message

2017-05-21 Thread Zoffix Znet via RT
On Sun, 21 May 2017 14:02:04 -0700, comdog wrote:
> I was playing with Pair and found this odd error message that says
> the default constructor only takes named arguments. While .new can
> take named arguments, it doesn't do anything iwth them. It does
> construct a Pair from positional parameters though.
> 
> > my @array = 
> [a b c]
> > :@array
> array => [a b c]
> > my $pair = Pair.new: @array
> Default constructor for 'Pair' only takes named arguments
>   in block  at  line 1
> 
> > my $pair = Pair.new: :a('b')
> (Mu) => (Mu)

Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/1c16bf2e08
Test: https://github.com/perl6/roast/commit/a523aef60a


[perl #131339] Pair.new uses positional parameters despite error message

2017-05-21 Thread brian d foy
# New Ticket Created by  "brian d foy" 
# Please include the string:  [perl #131339]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=131339 >


I was playing with Pair and found this odd error message that says
the default constructor only takes named arguments. While .new can
take named arguments, it doesn't do anything iwth them. It does
construct a Pair from positional parameters though.

> my @array = 
[a b c]
> :@array
array => [a b c]
> my $pair = Pair.new: @array
Default constructor for 'Pair' only takes named arguments
  in block  at  line 1

> my $pair = Pair.new: :a('b')
(Mu) => (Mu)