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

inheriting from a non-defined class should give a nice error message #179

Closed
p6rt opened this issue Jul 21, 2008 · 5 comments
Closed

inheriting from a non-defined class should give a nice error message #179

p6rt opened this issue Jul 21, 2008 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jul 21, 2008

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

Searchable as RT57170$

@p6rt
Copy link
Author

p6rt commented Jul 21, 2008

From @masak

While

$ ./perl6 -e 'class B {}; class A is B {}'

works,

$ ./perl6 -e 'class A is B {}; class B {}'
Null PMC access in get_string()
current instr.​: 'trait_auxiliary​:is' pc 14236 (src/gen_builtins.pir​:9180)
called from Sub '_block12' pc 52 (EVAL_13​:35)
called from Sub 'parrot;PCT​::HLLCompiler;evalpmc' pc 744
(src/PCT/HLLCompiler.pir​:448)
called from Sub 'parrot;PCT​::HLLCompiler;compile' pc 438
(src/PCT/HLLCompiler.pir​:303)
called from Sub 'parrot;PCT​::HLLCompiler;eval' pc 776
(src/PCT/HLLCompiler.pir​:473)
called from Sub 'parrot;PCT​::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir​:708)
called from Sub 'parrot;Perl6​::Compiler;main' pc 14518 (perl6.pir​:172)

doesn't.

@p6rt
Copy link
Author

p6rt commented Jul 23, 2008

From @masak

It turns out that 'class A is B {}; class B {}' is not a valid Perl 6 program.

<TimToady> @​messages
<lambdabot> masak asked 7h 17m 55s ago​: is `class A is B {}; class B
{}` allowed in Perl 6?
<TimToady> @​tell masak "is B" is not allowed unless B is already known
to be a trait or type; only subroutines can be post-declared

Still, it should preferably generate some other error than a 'Null PMC
access' parsefail... so the bug still stands.

@p6rt
Copy link
Author

p6rt commented Jul 23, 2008

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

@p6rt
Copy link
Author

p6rt commented Jul 26, 2008

From @jnthn

On Wed Jul 23 00​:50​:02 2008, masak wrote​:

It turns out that 'class A is B {}; class B {}' is not a valid Perl 6
program.

<TimToady> @​messages
<lambdabot> masak asked 7h 17m 55s ago​: is `class A is B {}; class B
{}` allowed in Perl 6?
<TimToady> @​tell masak "is B" is not allowed unless B is already known
to be a trait or type; only subroutines can be post-declared

Still, it should preferably generate some other error than a 'Null PMC
access' parsefail... so the bug still stands.

This now gives the message​:

Attempt to inherit from non-existent parent class

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Jul 26, 2008

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

@p6rt p6rt closed this as completed Jul 26, 2008
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