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

Rakudo fails to catch undeclared variables at compile-time #385

Closed
p6rt opened this issue Nov 2, 2008 · 8 comments
Closed

Rakudo fails to catch undeclared variables at compile-time #385

p6rt opened this issue Nov 2, 2008 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Nov 2, 2008

Migrated from rt.perl.org#60304 (status was 'resolved')

Searchable as RT60304$

@p6rt
Copy link
Author

p6rt commented Nov 2, 2008

From @masak

Rakudo r32280 compiles programs with undeclared variables without
complaining, and then dies with a strange error message when running
the programs.

$ perl6 -c -e 'say $x'
syntax OK

$ perl6 -e 'say $x'
No handler to delete.
[...]

@p6rt
Copy link
Author

p6rt commented Nov 8, 2008

From @ilyabelikin

Hi there,

Rakudo> $b
No handler to delete.

I think should be something about undeclared variable.

Ilya

@p6rt
Copy link
Author

p6rt commented Nov 8, 2008

@masak - Status changed from 'new' to 'resolved'

@p6rt
Copy link
Author

p6rt commented Sep 1, 2010

From @bbkr

$ perl6 -e '*%X; say "alive"'
alive
$ perl6 -e '*%x; say "alive"'
alive

[18​:10] <bbkr> std​: *%x
[18​:10] <p6eval> std 32123​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0mâ�¤Undeclared
routine​:â�¤ 'x' used at line 1â�¤Check failedâ�¤FAILED 00​:01 116mâ�¤Â»

[18​:10] <bbkr> std​: *%X
[18​:10] <p6eval> std 32123​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0mâ�¤Undeclared
name​:â�¤ 'X' used at line 1â�¤Check failedâ�¤FAILED 00​:01 116mâ�¤Â»

@p6rt
Copy link
Author

p6rt commented Sep 1, 2010

From @bbkr

and nice explanation here (it may be one of test cases)

[18​:18] <bbkr> rakudo​: */x # another Rakudo vs STD compatibility bug
[18​:18] <p6eval> rakudo dc9900​: ( no output )
[18​:19] <moritz_> bbkr​: it's the old "doesn't check for subs at compile
time" bug
[18​:20] <bbkr> moritz_​: I'm not sure. in this case * Whatever messes it
[18​:20] <bbkr> rakudo​: 1/x
[18​:20] <p6eval> rakudo dc9900​: OUTPUT«Could not find sub &xâ�¤ in main
program body at line 22​:/tmp/nHp6_cau91â�¤Â»
[18​:20] <moritz_> bbkr​: it's like { $_ / x }
[18​:21] <moritz_> bbkr​: and because nothing calls it, the existance
check for &x is never done
[18​:21] <ash_> rakudo​: my $a = * / x; say $a(1);
[18​:21] <p6eval> rakudo dc9900​: OUTPUT«Could not find sub &xâ�¤ in <anon>
at line 22​:/tmp/0Ker9myfF2â�¤ in main program body at line
22​:/tmp/0Ker9myfF2â�¤Â»
[18​:21] <ash_> that error message doesn't come up until you call $a
[18​:21] <ash_> since whatever's are lazy

@p6rt
Copy link
Author

p6rt commented Sep 1, 2010

@bbkr - Status changed from 'resolved' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 8, 2011

From @moritz

Undeclared variables have long been detected at compile time, undeclared
routines are now tracked in [perl #​77112], so I'm closing this ticket.

@p6rt
Copy link
Author

p6rt commented Oct 8, 2011

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Oct 8, 2011
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