Navigation Menu

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

Promise::Vow can be constructed from the outside to change the status of a Promise in Rakudo #3758

Closed
p6rt opened this issue Mar 27, 2015 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Mar 27, 2015

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

Searchable as RT124190$

@p6rt
Copy link
Author

p6rt commented Mar 27, 2015

From @masak

<masak> m​: my $promise = Promise.new; say $promise.status;
Promise​::Vow.new(​:$promise).keep(42); say $promise.status
<camelia> rakudo-moar fafc5b​: OUTPUT«Planned␤Kept␤»
* masak submits rakudobug
<masak> I should read source more often :>
<masak> seems you can create a new Promise​::Vow just by referring to
it, because it's an `our` class.
<jnthn> umm...wtf
<jnthn> I thought that was a lexical class
<masak> all accesses *should* go through the .vow method in Promise,
but they don't have to
<jnthn> masak​: Please try making it a lexical class and seeing if that
helps things.
<masak> will do, just let me finish submitting the rakudobug first.
<masak> jnthn​: I dug down in git blame. you created it (as "Keeper")
in 0358bae2394e14c7b4f42cd4e7f069a19c1bf060 -- it was 'our'-scoped
already then.
<jnthn> masak​: OK...I suspect it's an oversight. I can't think of any
reason I'd have wanted it to be non-lexical...
<masak> me either.
<masak> it feels like the pattern completes perfectly if it is a lexical.
<jnthn> Right.
<jnthn> (previous jnthn)-- # not thinking about scope

@p6rt
Copy link
Author

p6rt commented Mar 27, 2015

From @masak

Fixed in fb991b and spectested in 4f7877.

Resolving ticket.

@p6rt p6rt closed this as completed Mar 27, 2015
@p6rt
Copy link
Author

p6rt commented Mar 27, 2015

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

@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