On 09/10/14 00:20, Timo Paulssen wrote:
On 08/10/14 15:05, Francis (Grizzly) Smit wrote:
I have found this bug in the current git version of rakudo:


23:16:34 grizzlysmit@rakbat:~/Projects/perl/perl6/testing0$ perl6
--version
This is perl6 version 2014.09-165-g19d2de5 built on MoarVM version
2014.09-14-g0df2d6f
00:01:10 grizzlysmit@rakbat:~/Projects/perl/perl6/testing0$ cat ./bug.p6
#!/usr/bin/env perl6
use v6;
say Str.^attributes;
00:01:16 grizzlysmit@rakbat:~/Projects/perl/perl6/testing0$ ./bug.p6
No such method 'gist' for invocant of type 'BOOTSTRAPATTR'
   in method gist at src/gen/m-CORE.setting:7733
   in sub say at src/gen/m-CORE.setting:15838
   in block <unit> at ./bug.p6:3


the result is the same if Str is replaced with a literal string or Int

Hi,

I can tell you why this doesn't work and why it maybe shouldn't:

Str is a class that's needed extremely early in the build process, so we
create it in the "bootstrap" phase. The regular Attribute class isn't
available there, yet. That's why we use BOOTSTRAPATTR instead. That one
doesn't have a gist method to pretty-print itself.

However, what it does have (and has to have) is a "name" method. So this
code works fine:

#!/usr/bin/env perl6
use v6;
.name.say for Str.^attributes;


HTH
    - timotimo

ah ok, thx now I understand at least
perl6 is fascinating, I'm kind of comping at the bit for it to be fully complete, already it is getting usable


--


  .~.     In my life God comes first....
  /V\         but Linux is pretty high after that :-D
 /( )\    Francis (Grizzly) Smit
 ^^-^^    http://www.smit.id.au/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
G e++ h+ y?
------END GEEK CODE BLOCK------
http://www.geekcode.com/

Reply via email to