[perl #127059] Error with typed Array as attribute when trying to display the type.

2016-10-30 Thread Christian Bartolomaeus via RT
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  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 
https://github.com/perl6/roast/commit/b06e156032

I'm closing this ticket as 'resolved'.


[perl #127059] Error with typed Array as attribute when trying to display the type.

2015-12-28 Thread via RT
# New Ticket Created by  Sylvain Colinet 
# Please include the string:  [perl #127059]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=127059 >


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  at -e line 1


-- 
Sylvain "Skarsnik" Colinet

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