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

There might be something wrong with the way Rakudo handles 'my $::x' #1539

Open
p6rt opened this issue Feb 26, 2010 · 6 comments
Open

There might be something wrong with the way Rakudo handles 'my $::x' #1539

p6rt opened this issue Feb 26, 2010 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 26, 2010

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

Searchable as RT73104$

@p6rt
Copy link
Author

p6rt commented Feb 26, 2010

From @masak

<diakopter> rakudo​: my $​::x # who knows on this one
<p6eval> rakudo a215ee​: OUTPUT«Symbol '$x' not predeclared [...]
<masak> std​: my $​::x
<p6eval> std 29857​: OUTPUT«ok 00​:01 107m␤»
* masak submits rakudobug

As diakopter says above, who knows on this one? Just in case this is
an error, here's the ticket. :)

@p6rt
Copy link
Author

p6rt commented Sep 13, 2011

From @bbkr

NOM​: This one now segfaults!

bbkr​:nom bbkr$ ./perl6 -e 'my $​::x = 3'
Segmentation fault​: 11

My system info​:

bbkr​:nom bbkr$ uname -a
Darwin bbkr.org 11.1.0 Darwin Kernel Version 11.1.0​: Tue Jul 26 16​:09​:02
PDT 2011; root​:xnu-1699.22.81~1/RELEASE_I386 i386 i386

bbkr​:nom bbkr$ gcc -v
Using built-in specs.
Target​: i686-apple-darwin11
Configured with​:
/private/var/tmp/llvmgcc42/llvmgcc42-2335.1525/src/configure
--disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin11
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15
25/dst-llvmCore/Developer/usr/local
--program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
--target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model​: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

bbkr​:nom bbkr$ ./perl6 --version
This is perl6 version 2011.04-1869-gce13be6 built on parrot 3.7.0
revision RELEASE_3_7_0-188-g6f57d17

The same happens on IRC nom​: bot.

@p6rt
Copy link
Author

p6rt commented Sep 13, 2011

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

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @diakopter

On Tue Sep 13 14​:51​:23 2011, bbkr wrote​:

NOM​: This one now segfaults!

bbkr​:nom bbkr$ ./perl6 -e 'my $​::x = 3'
Segmentation fault​: 11

My system info​:

bbkr​:nom bbkr$ uname -a
Darwin bbkr.org 11.1.0 Darwin Kernel Version 11.1.0​: Tue Jul 26
16​:09​:02
PDT 2011; root​:xnu-1699.22.81~1/RELEASE_I386 i386 i386

bbkr​:nom bbkr$ gcc -v
Using built-in specs.
Target​: i686-apple-darwin11
Configured with​:
/private/var/tmp/llvmgcc42/llvmgcc42-2335.1525/src/configure
--disable-checking --enable-werror
--prefix=/Developer/usr/llvm-gcc-4.2
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-prefix=llvm-
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin11
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15
25/dst-
llvmCore/Developer/usr/local
--program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
--target=i686-apple-darwin11
--with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model​: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build
2335.15.00)

bbkr​:nom bbkr$ ./perl6 --version
This is perl6 version 2011.04-1869-gce13be6 built on parrot 3.7.0
revision RELEASE_3_7_0-188-g6f57d17

The same happens on IRC nom​: bot.

This seems fine now. marking testneeded.

15​:05 <diakopter> rakudo​: my $​::x # who knows on this one
15​:05 <p6eval> rakudo 223419​: ( no output )
15​:06 <diakopter> r​: my $​::x = 3
15​:06 <p6eval> rakudo 223419​: ( no output )

@p6rt
Copy link
Author

p6rt commented Jul 15, 2012

From @bbkr

Assignment works but it fails to recognize declared variable.

$ perl6 -e 'my $​::x = 3; say $​::x;'
===SORRY!===
Variable $x is not declared
at -e​:1

And at the same time it is... considered declared.

$ perl6 -e 'my $​::x = 3; my $​::x = 4;'
===SORRY!===
Redeclaration of symbol $​::x
at -e​:1

@p6rt
Copy link
Author

p6rt commented Sep 3, 2017

From @skids

On Sun, 15 Jul 2012 09​:00​:01 -0700, bbkr wrote​:

Assignment works but it fails to recognize declared variable.

$ perl6 -e 'my $​::x = 3; say $​::x;'
===SORRY!===
Variable $x is not declared
at -e​:1

And at the same time it is... considered declared.

$ perl6 -e 'my $​::x = 3; my $​::x = 4;'
===SORRY!===
Redeclaration of symbol $​::x
at -e​:1

This came up as a side-issue in RT#​113042

In order to close that ticket I'm putting a reminder here
to also consider anonymous state variables e.g. "$​::".

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant