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

Capture.WHICH confused by mutable argument #5587

Closed
p6rt opened this issue Aug 17, 2016 · 4 comments
Closed

Capture.WHICH confused by mutable argument #5587

p6rt opened this issue Aug 17, 2016 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 17, 2016

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

Searchable as RT128977$

@p6rt
Copy link
Author

p6rt commented Aug 17, 2016

From zefram@fysh.org

my $a = 3; my $c = \($a); say $c.WHICH; $a = 555; say $c.WHICH
Capture|(Int|3)
Capture|(Int|555)

The Capture's identity, as judged by .WHICH, is apparently changing.
That should never happen. To accurately reflect the object identity
that's in play here, the Capture's .WHICH ought to be something like
"Capture|(Scalar|47816222142984)". (Apropos recent discussion of Scalar,
this isn't to say that the Scalar should be available as an actual object;
it's just that the Scalar is the seat of the identity that needs to be
incorporated into the Capture's identity.)

-zefram

@p6rt
Copy link
Author

p6rt commented Mar 18, 2017

From @zoffixznet

On Wed, 17 Aug 2016 15​:42​:04 -0700, zefram@​fysh.org wrote​:

my $a = 3; my $c = \($a); say $c.WHICH; $a = 555; say $c.WHICH
Capture|(Int|3)
Capture|(Int|555)

The Capture's identity, as judged by .WHICH, is apparently changing.
That should never happen. To accurately reflect the object identity
that's in play here, the Capture's .WHICH ought to be something like
"Capture|(Scalar|47816222142984)". (Apropos recent discussion of Scalar,
this isn't to say that the Scalar should be available as an actual object;
it's just that the Scalar is the seat of the identity that needs to be
incorporated into the Capture's identity.)

-zefram

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@4605d5219e
Tests​: Raku/roast@7cf30b225a

@p6rt
Copy link
Author

p6rt commented Mar 18, 2017

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

@p6rt p6rt closed this as completed Mar 18, 2017
@p6rt
Copy link
Author

p6rt commented Mar 18, 2017

@zoffixznet - Status changed from 'open' 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