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

Parrot resets lexicals initialized in INIT blocks #3517

Closed
p6rt opened this issue Sep 11, 2014 · 8 comments
Closed

Parrot resets lexicals initialized in INIT blocks #3517

p6rt opened this issue Sep 11, 2014 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Sep 11, 2014

Migrated from rt.perl.org#122765 (status was 'rejected')

Searchable as RT122765$

@p6rt
Copy link
Author

p6rt commented Sep 11, 2014

From @hoelzro

If I have the following code in a module​:

my $foo;

INIT $foo = 7;

MoarVM and the JVM properly initialize $foo to 7, but Parrot clobbers that 7 after the INIT block, it seems.

A test is attached.

@p6rt
Copy link
Author

p6rt commented Sep 11, 2014

From @hoelzro

test.p6

@p6rt
Copy link
Author

p6rt commented Sep 11, 2014

From @lizmat

On 12 Sep 2014, at 00​:05, Rob Hoelz (via RT) <perl6-bugs-followup@​perl.org> wrote​:

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

If I have the following code in a module​:

my $foo;

INIT $foo = 7;

MoarVM and the JVM properly initialize $foo to 7, but Parrot clobbers that 7 after the INIT block, it seems.

A test is attached.<test.p6>

If you remove the Test, and just have something like;

my $foo;
INIT $foo = 42;
say $foo

it *does* seem to work on my parakudo… So Test seems to be interfering somehow?

Liz

@p6rt
Copy link
Author

p6rt commented Sep 11, 2014

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

@p6rt
Copy link
Author

p6rt commented Sep 11, 2014

From @hoelzro

On Thu Sep 11 15​:32​:28 2014, elizabeth wrote​:

On 12 Sep 2014, at 00​:05, Rob Hoelz (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

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

If I have the following code in a module​:

my $foo;

INIT $foo = 7;

MoarVM and the JVM properly initialize $foo to 7, but Parrot clobbers
that 7 after the INIT block, it seems.

A test is attached.<test.p6>

If you remove the Test, and just have something like;

my $foo;
INIT $foo = 42;
say $foo

it *does* seem to work on my parakudo… So Test seems to be
interfering somehow?

Liz

Yes, this only happens within a module. I haven't tried on classes/roles/etc yet.

@p6rt
Copy link
Author

p6rt commented Oct 21, 2014

From @usev6

I can leave of Test and reproduce the problem within a class or a module.

$ perl6-p -e 'module Foo; my $foo; INIT $foo = 42; say $foo'
(Any)
$ perl6-m -e 'module Foo; my $foo; INIT $foo = 42; say $foo'
42

$ perl6-p -e 'class Foo { my $foo; INIT $foo = 42; say $foo }'
(Any)
$ perl6-m -e 'class Foo { my $foo; INIT $foo = 42; say $foo }'
42

@p6rt
Copy link
Author

p6rt commented Mar 1, 2015

From @usev6

I added two tests to S04-phasers/init.t with commit Raku/roast@8d25686f90. Those tests pass on MoarVM and JVM

Since support for Parrot was suspended with Rakudo Star Release 2015.02, I'm closing this "parrot only" ticket.

I'll add the ticket to a list of closed ticket living in the mu repository​: https://github.com/perl6/mu/blob/master/misc/rt.perl.org/tickets_closed_parrot_only.txt.

In case support for Parrot will be restored in some future release the listed tickets can be checked and re-opened as appropriate.

@p6rt
Copy link
Author

p6rt commented Mar 1, 2015

@usev6 - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Mar 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant