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

use A B; gives "Cannot invoke null object" #3649

Closed
p6rt opened this issue Jan 19, 2015 · 4 comments
Closed

use A B; gives "Cannot invoke null object" #3649

p6rt opened this issue Jan 19, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 19, 2015

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

Searchable as RT123627$

@p6rt
Copy link
Author

p6rt commented Jan 19, 2015

From @bbkr

22​:57 bbkr​: r-m​: use A B; # LTA error
22​:57 camelia​: rakudo-moar d78c67​: OUTPUT«===SORRY!===␤Cannot invoke null object␤»

STD behavior​:
22​:54 bbkr​: std​: use A B;
22​:54 camelia​: std f9b7f55​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Cannot locate module A at /tmp/y5X2aKRpWl line 1​:␤------> �[32muse A B�[33m⏏�[31m;�[0m␤Undeclared name​:␤ 'B' used at line 1␤Check failed␤FAILED 00​:00 134m␤»

STD response also seems weird to me - why it did not stop after "Cannot locate module A" fatal error but reached "Undeclared name​: B" check?

@p6rt
Copy link
Author

p6rt commented Apr 12, 2015

From @jnthn

On Mon Jan 19 14​:09​:01 2015, bbkr@​post.pl wrote​:

22​:57 bbkr​: r-m​: use A B; # LTA error
22​:57 camelia​: rakudo-moar d78c67​: OUTPUT«===SORRY!===␤Cannot invoke
null object␤»

STD behavior​:
22​:54 bbkr​: std​: use A B;
22​:54 camelia​: std f9b7f55​:
OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Cannot locate module A at
/tmp/y5X2aKRpWl line 1​:␤------> �[32muse A
B�[33m⏏�[31m;�[0m␤Undeclared name​:␤ 'B' used at line 1␤Check
failed␤FAILED 00​:00 134m␤»

STD response also seems weird to me - why it did not stop after
"Cannot locate module A" fatal error but reached "Undeclared name​: B"
check?

STD *is* wrong to report both, but the correct thing to complain about is the undeclared name B. That is the argument to the use operation, and so is evaluated before the module search. Rakudo now does this​:

$ perl6-m -e "use A B;"
===SORRY!=== Error while compiling -e
Undeclared name​:
  B used at line 1

Test added in S32-exceptions/misc.t; resolving.

@p6rt
Copy link
Author

p6rt commented Apr 12, 2015

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

@p6rt
Copy link
Author

p6rt commented Apr 12, 2015

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

@p6rt p6rt closed this as completed Apr 12, 2015
@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