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

Our scoping in roles: either enable or error #1230

Closed
p6rt opened this issue Aug 16, 2009 · 8 comments
Closed

Our scoping in roles: either enable or error #1230

p6rt opened this issue Aug 16, 2009 · 8 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 16, 2009

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

Searchable as RT68572$

@p6rt
Copy link
Author

p6rt commented Aug 16, 2009

From @masak

<masak> rakudo​: role Maybe[​::T] { role Just[T] {} }; say Maybe[Int].new()
<p6eval> rakudo 0d4fe0​: OUTPUT«Potential internal error​: bindability
check may have done more than just binding. [...]
<masak> what does that error mean?
<jnthn> First off, nesting roles inside roles is probably wrong unless
they're lexically scoped...
<jnthn> Well, the inner one is...
<jnthn> The error is an internals check that I put in to detect
certain things going awry.
<jnthn> Because it's a lot better than something silently going wrong,
and just causing oddness later on that would take ages to unpick and
debug.
<jnthn> Feel free to file a rakudobug anyway.
<jnthn> Since it's in theory something that should never occur.
<jnthn> rakudo​: role Maybe[​::T] { }; say Maybe[Int].new()
<p6eval> rakudo 0d4fe0​: OUTPUT«()<0xb69cc438>␤»
<jnthn> rakudo​: role Maybe[​::T] { role Foo { } }; say Maybe[Int].new()
<p6eval> rakudo 0d4fe0​: OUTPUT«()<0xb69a62f8>␤»
<jnthn> rakudo​: role Maybe[​::T] { role Foo[T $] { } }; say Maybe[Int].new()
<p6eval> rakudo 0d4fe0​: OUTPUT«Potential internal error​: bindability
check may have done more than just binding. [...]
<jnthn> heh
<jnthn> Anyway, I suspect Rakudo * may well just forbid nesting other
packages inside roles.
<masak> fair enough.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Mar 7, 2010

From @masak

<masak> rakudo​: role A { class B {} }
* masak submits rakudobug

jnthn++ expected the above to produce an error.

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

From @coke

On Sun Aug 16 05​:49​:20 2009, masak wrote​:

<masak> rakudo​: role Maybe[​::T] { role Just[T] {} }; say
Maybe[Int].new()
<p6eval> rakudo 0d4fe0​: OUTPUT«Potential internal error​: bindability
check may have done more than just binding. [...]

This no longer generates an error, but the followup that the OP says
should generate an error does not, yet.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

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

@p6rt
Copy link
Author

p6rt commented Oct 11, 2011

From @coke

On Wed Jul 28 08​:08​:04 2010, coke wrote​:

On Sun Aug 16 05​:49​:20 2009, masak wrote​:

<masak> rakudo​: role Maybe[​::T] { role Just[T] {} }; say
Maybe[Int].new()
<p6eval> rakudo 0d4fe0​: OUTPUT�Potential internal error​: bindability
check may have done more than just binding. [...]

This no longer generates an error, but the followup that the OP says
should generate an error does not, yet.

It's been a year again, so​:

ENOCHANGE.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 28, 2015

From @Mouq

It seems to me that the tickets #​100468 and #​88750 are both consequences of this behavior, viz., role not working with our-scoped things inside of it.

If, as suggested in this ticket, our-scoping is disallowed for roles, the examples from these tickets should both die with something like "Can't our-scope packages/routines inside roles."

On the other hand, if our-scoping works in roles, both of the tickets would be fixed.

There doesn't seem to be anything in the specifications that say which way this should go, but TimToady's response in #​88750 seems to point to the latter.

Perhaps #​100468 and #​88750 should be merged into this ticket, and the ticket renamed?

@p6rt
Copy link
Author

p6rt commented Jul 30, 2015

From @jnthn

On Sun Mar 07 05​:39​:47 2010, masak wrote​:

<masak> rakudo​: role A { class B {} }
* masak submits rakudobug

jnthn++ expected the above to produce an error.

It does now; tested in S14-roles/namespaced.t.

@p6rt
Copy link
Author

p6rt commented Jul 30, 2015

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

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