> On 13 Dec 2015, at 05:15, Zefram (via RT) <perl6-bugs-follo...@perl.org> 
> wrote:
> 
> # New Ticket Created by  Zefram 
> # Please include the string:  [perl #126889]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=126889 >
> 
> 
> $ perl6 -e 'say $init-time-num; say CORE::<$init-time-num>'
> 1449983501.60682
> Lexical with name '$init-time-num' has a different type in this frame
>  in block <unit> at -e:1
> 
> It's the retrieval of the value from the symbol table that triggers
> the error.  This is a hazard for introspective code.

This actually applies to any native on any PseudoStash:

$ 6 'my int $a = 42; say MY::<$a>'
Lexical with name '$a' has a different type in this frame
  in block <unit> at -e:1

Also: $init-time-num is an unintended leak of a variable to allow for lazy 
population of $*INITTIME.  I’ve now removed that leak by not populating 
$*INITTIME lazily anymore.  This adds 2 milliseconds to bare startup.


FWIW, the bug seems to be in the underlying nqp::atkey:

$ 6 'use nqp; my int $a = 42; my $m := nqp::getattr(MY::,Map,q/$!storage/); say 
nqp::atkey($m,q/$a/)'
Lexical with name '$a' has a different type in this frame
  in block <unit> at -e:1

$ 6 'use nqp; my Int $a = 42; my $m := nqp::getattr(MY::,Map,q/$!storage/); say 
nqp::atkey($m,q/$a/)’
42


Liz

Reply via email to