Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

on "is cached" subs: getlex: outer index out of range #4822

Open p6rt opened 8 years ago

p6rt commented 8 years ago

Migrated from rt.perl.org#126818 (status was 'open')

Searchable as RT126818$

p6rt commented 8 years ago

From @zoffixznet

Steps to reproduce​: ############################################# $ cat > Foo.pm; unit module Foo; our sub foo () is cached { 42 } $ perl6 -I. -MFoo -e 'say Foo​::foo' getlex​: outer index out of range   in any enter at gen/moar/m-Metamodel.nqp​:3763   in block \ at -e​:1 #############################################

The problem goes away if "is cached" trait is removed.

p6rt commented 8 years ago

From @LLFourn

This bug just hit me :\. It should go away with 'no precompilation'.

I believe it's closely related to​:

https://rt.perl.org/Public/Bug/Display.html?id=125634

On Tue, Dec 8, 2015 at 2​:43 AM Zoffix Znet \perl6\-bugs\-followup@​perl\.org wrote​:

# New Ticket Created by Zoffix Znet # Please include the string​: [perl #​126818] # in the subject line of all future correspondence about this issue. # \<URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126818 >

Steps to reproduce​: ############################################# $ cat > Foo.pm; unit module Foo; our sub foo () is cached { 42 } $ perl6 -I. -MFoo -e 'say Foo​::foo' getlex​: outer index out of range in any enter at gen/moar/m-Metamodel.nqp​:3763 in block \ at -e​:1 #############################################

The problem goes away if "is cached" trait is removed.

p6rt commented 8 years ago

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

p6rt commented 8 years ago

From @coke

On Mon Jan 18 21​:22​:44 2016, lloyd.fourn@​gmail.com wrote​:

This bug just hit me :\. It should go away with 'no precompilation'.

I believe it's closely related to​:

https://rt.perl.org/Public/Bug/Display.html?id=125634

On Tue, Dec 8, 2015 at 2​:43 AM Zoffix Znet \perl6\-bugs\-followup@&#8203;perl\.org wrote​:

# New Ticket Created by Zoffix Znet # Please include the string​: [perl #​126818] # in the subject line of all future correspondence about this issue. # \<URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126818 >

Steps to reproduce​: ############################################# $ cat > Foo.pm; unit module Foo; our sub foo () is cached { 42 } $ perl6 -I. -MFoo -e 'say Foo​::foo' getlex​: outer index out of range in any enter at gen/moar/m-Metamodel.nqp​:3763 in block \ at -e​:1 #############################################

The problem goes away if "is cached" trait is removed.

Have to add "use experimental :cached" to Foo.pm to get it to compile these days. Then the example dies with​:

$ perl6 -I. -MFoo -e 'no precompilation; say Foo​::foo' Cannot invoke this object (REPR​: Null; VMNull)   in block at /Users/coke/.rakudobrew/moar-2016.07.1/install/share/perl6/sources/AAC61C0EC6F88780427830443A057030CAA33846 (experimental) line 10   in any enter at gen/moar/m-Metamodel.nqp line 3963   in block \ at -e line 1

The bug goes away when adding "no precompilation;" to Foo.pm

-- Will "Coke" Coleda