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

Error with typed Array as attribute when trying to display the type. #4936

Closed
p6rt opened this issue Dec 28, 2015 · 4 comments
Closed

Error with typed Array as attribute when trying to display the type. #4936

p6rt opened this issue Dec 28, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Dec 28, 2015

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

Searchable as RT127059$

@p6rt
Copy link
Author

p6rt commented Dec 28, 2015

From @Skarsnik

root@​testperl6​:~/piko/qdorm# perl6 -e 'class A {has Str $.n; has Str @​.m};
for A.^attributes -> $attr {say $attr.name, $attr.type};'
$!n(Str)
Method 'shortname' not found for invocant of class
'Perl6​::Metamodel​::CurriedRoleHOW'
  in block <unit> at -e line 1

--
Sylvain "Skarsnik" Colinet

Victory was near but the power of the ring couldn't be undone

@p6rt
Copy link
Author

p6rt commented Oct 30, 2016

From @usev6

This works now​:

$ $ perl6 -e 'class A {has Str $.n; has Str @​.m}; for A.^attributes -> $attr {say $attr.name, $attr.type};'
$!n(Str)
@​!m(Positional[Str])

It looks like the problem back then was related to using gist. I tried with an older rakudo​:

$ $ ./perl6-m --version
This is Rakudo version 2015.12-60-g37e998d built on MoarVM version 2015.12
implementing Perl 6.c.

$ ./perl6-m -e 'class A {has Str @​.array}; say A.^attributes[0].type.gist'
Method 'shortname' not found for invocant of class 'Perl6​::Metamodel​::CurriedRoleHOW'
  in block <unit> at -e line 1

$ ./perl6-m -e 'class A {has Str @​.array}; say A.^attributes[0].type.perl'
Positional[Str]

I added a test to S12-introspection/attributes.t with commit Raku/roast@b06e156032

I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 30, 2016

From @usev6

This works now​:

$ $ perl6 -e 'class A {has Str $.n; has Str @​.m}; for A.^attributes -> $attr {say $attr.name, $attr.type};'
$!n(Str)
@​!m(Positional[Str])

It looks like the problem back then was related to using gist. I tried with an older rakudo​:

$ $ ./perl6-m --version
This is Rakudo version 2015.12-60-g37e998d built on MoarVM version 2015.12
implementing Perl 6.c.

$ ./perl6-m -e 'class A {has Str @​.array}; say A.^attributes[0].type.gist'
Method 'shortname' not found for invocant of class 'Perl6​::Metamodel​::CurriedRoleHOW'
  in block <unit> at -e line 1

$ ./perl6-m -e 'class A {has Str @​.array}; say A.^attributes[0].type.perl'
Positional[Str]

I added a test to S12-introspection/attributes.t with commit Raku/roast@b06e156032

I'm closing this ticket as 'resolved'.

@p6rt
Copy link
Author

p6rt commented Oct 30, 2016

@usev6 - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant