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

LTA error messages when a class inherits from a stubbed class in Rakudo #2302

Closed
p6rt opened this issue Dec 21, 2010 · 8 comments
Closed

LTA error messages when a class inherits from a stubbed class in Rakudo #2302

p6rt opened this issue Dec 21, 2010 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Dec 21, 2010

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

Searchable as RT81060$

@p6rt
Copy link
Author

p6rt commented Dec 21, 2010

From @masak

<masak> rakudo​: class A { ... }; class B is A {}; class A {}
<p6eval> rakudo cae7f9​: OUTPUT«===SORRY!===␤Parent isn't a Class.␤»
* masak submits LTA rakudobug
* masak wonders idly what the parent is
<masak> rakudo​: class A { ... }; say A.WHAT
<p6eval> rakudo cae7f9​: OUTPUT«Failure()␤»
<masak> ah.
<masak> rakudo​: class A { ... }; class B is A {}
<p6eval> rakudo cae7f9​: OUTPUT«===SORRY!===␤Null PMC access in can()␤»
<masak> huh.
<masak> that's the first causality-defying Null PMC access. :)

@p6rt
Copy link
Author

p6rt commented Feb 1, 2012

From @coke

On Tue Dec 21 01​:10​:35 2010, masak wrote​:

<masak> rakudo​: class A { ... }; class B is A {}; class A {}
<p6eval> rakudo cae7f9​: OUTPUT«===SORRY!===␤Parent isn't a Class.␤»
* masak submits LTA rakudobug
* masak wonders idly what the parent is
<masak> rakudo​: class A { ... }; say A.WHAT
<p6eval> rakudo cae7f9​: OUTPUT«Failure()␤»
<masak> ah.
<masak> rakudo​: class A { ... }; class B is A {}
<p6eval> rakudo cae7f9​: OUTPUT«===SORRY!===␤Null PMC access in
can()␤»
<masak> huh.
<masak> that's the first causality-defying Null PMC access. :)

This seems fine now​:

09​:18 < [Coke]> rakudo​: class A { ... }; class B is A {}; class A {} #RT
#​81060
09​:18 <+p6eval> rakudo ce5cca​: ( no output )
09​:18 < [Coke]> rakudo​: class A { ... }; say A.WHAT #RT 81060
09​:18 <+p6eval> rakudo ce5cca​: OUTPUT«===SORRY!===␤The following
packages were
  stubbed but not defined​:␤ A␤␤»

Closable with tests.
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Feb 1, 2012

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

@p6rt
Copy link
Author

p6rt commented Oct 18, 2012

From @bbkr

It breaks when parent class body is provided later.

<moritz> r​: class A { ... }; class B is A { }; class A { }; say B.new
<p6eval> rakudo 42a280​: OUTPUT«No such method 'new' for invocant of type 'B'␤ in block at
/tmp/MEw1Loww7z​:1␤␤»

@p6rt
Copy link
Author

p6rt commented May 14, 2014

From @coke

On Thu Oct 18 04​:10​:24 2012, bbkr wrote​:

It breaks when parent class body is provided later.

<moritz> r​: class A { ... }; class B is A { }; class A { }; say B.new
<p6eval> rakudo 42a280​: OUTPUT«No such method 'new' for invocant of
type 'B'␤ in block at
/tmp/MEw1Loww7z​:1␤␤»

Fails differently on today's moar​:

class A { ... }; class B is A { }; class A { }; say B.new
Cannot invoke this object (REPR​: Null, cs = 0)

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Feb 10, 2015

From @usev6

This looks right now​:

$ perl6 -e 'class A { ... }; say A.WHAT' # X​::Package​::Stubbed
===SORRY!=== Error while compiling -e
The following packages were stubbed but not defined​:
  A
at -e​:1
------> class A { ... }; say A.WHAT⏏<EOL>
  expecting any of​:
  postfix
  statement end
  statement modifier
  statement modifier loop

$ perl6 -e 'class A { ... }; class B is A {}' # X​::Inheritance​::NotComposed
===SORRY!=== Error while compiling -e
'B' cannot inherit from 'A' because 'A' isn't compose yet (maybe it is stubbed)
at -e​:1
------>

$ perl6 -e 'class A { ... }; class B is A {}; class A {}' # also X​::Inheritance​::NotComposed
===SORRY!=== Error while compiling -e
'B' cannot inherit from 'A' because 'A' isn't compose yet (maybe it is stubbed)
at -e​:1
------>

I added two tests to S12-class/stubs.t with commit Raku/roast@7e89188444

I'm resolving this ticket now.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Feb 10, 2015

From @usev6

This looks right now​:

$ perl6 -e 'class A { ... }; say A.WHAT' # X​::Package​::Stubbed
===SORRY!=== Error while compiling -e
The following packages were stubbed but not defined​:
  A
at -e​:1
------> class A { ... }; say A.WHAT⏏<EOL>
  expecting any of​:
  postfix
  statement end
  statement modifier
  statement modifier loop

$ perl6 -e 'class A { ... }; class B is A {}' # X​::Inheritance​::NotComposed
===SORRY!=== Error while compiling -e
'B' cannot inherit from 'A' because 'A' isn't compose yet (maybe it is stubbed)
at -e​:1
------>

$ perl6 -e 'class A { ... }; class B is A {}; class A {}' # also X​::Inheritance​::NotComposed
===SORRY!=== Error while compiling -e
'B' cannot inherit from 'A' because 'A' isn't compose yet (maybe it is stubbed)
at -e​:1
------>

I added two tests to S12-class/stubs.t with commit Raku/roast@7e89188444

I'm resolving this ticket now.

@p6rt p6rt closed this as completed Feb 10, 2015
@p6rt
Copy link
Author

p6rt commented Feb 10, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant