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

can`t set attribute-array for object in .new #410

Closed
p6rt opened this issue Nov 16, 2008 · 5 comments
Closed

can`t set attribute-array for object in .new #410

p6rt opened this issue Nov 16, 2008 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Nov 16, 2008

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

Searchable as RT60572$

@p6rt
Copy link
Author

p6rt commented Nov 16, 2008

From @ilyabelikin

Hi!
example​:

class Foo {
  has @​.a;
}
my @​b = 1,2,3;

my $f = Foo.new(a => @​b);
$f.a.perl.say; # []

$f = Foo.new( :a(1,2,3) );
$f.a.perl.say; # []

$f = Foo.new( :a([1,2,3]) );
$f.a.perl.say; # []

Thank you!
Ilya

@p6rt
Copy link
Author

p6rt commented Nov 16, 2008

From @jnthn

On Sun Nov 16 01​:25​:10 2008, ihrd wrote​:

example​:

class Foo {
has @​.a;
}
my @​b = 1,2,3;

my $f = Foo.new(a => @​b);
$f.a.perl.say; # []

Fixed in r32733.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Nov 16, 2008

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

@p6rt
Copy link
Author

p6rt commented Nov 16, 2008

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

@p6rt p6rt closed this as completed Nov 16, 2008
@p6rt
Copy link
Author

p6rt commented Nov 18, 2008

From @ilyabelikin

Hi!
Jonathan, thank you!
But look like a little bug still here​:

$f = Foo.new( :a([1,2,3]) );
$f.a.perl.say; # [[1, 2, 3]] hm... expected [1, 2, 3]

S02.pod, line 2329​:
Fat arrow Adverbial pair Paren form
...
a => [...] :a[...] :a([...])

Rakudo​:

(a => [1,2,3]).perl.say;
("a" => [1, 2, 3])

(​:a[1,2,3]).perl.say;
("a" => [1, 2, 3])

(​:a([1,2,3])).perl.say;
("a" => [1, 2, 3])

Ilya

2008/11/17 jnthn@​jnthn.net via RT <perl6-bugs-followup@​perl.org>​:

On Sun Nov 16 01​:25​:10 2008, ihrd wrote​:

example​:

class Foo {
has @​.a;
}
my @​b = 1,2,3;

my $f = Foo.new(a => @​b);
$f.a.perl.say; # []

Fixed in r32733.

Thanks,

Jonathan

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