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

=:= doesn't seem to work as spec'd in Rakudo #1939

Closed
p6rt opened this issue Jul 14, 2010 · 8 comments
Closed

=:= doesn't seem to work as spec'd in Rakudo #1939

p6rt opened this issue Jul 14, 2010 · 8 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 14, 2010

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

Searchable as RT76510$

@p6rt
Copy link
Author

p6rt commented Jul 14, 2010

From @masak

<lue> rakudo​: my $a = 3; my $b := $a; my $c = 3; say $a =​:= $b; say $a =​:= $c
<p6eval> rakudo c8b6cf​: OUTPUT«0␤0␤»
<lue> O.o
<masak> lue​: same value, different containers.
<masak> lue​: $a and $b should be the same, though
<lue> that's where the O.o comes in. Apparently, =​:= is in cheats/
<masak> lue​: you can fix it; I know you can!
* masak submits rakudobug

S03​: 'There is also an identity test, C<=​:=>, which tests whether two
names are bound to the same underlying variable. C<$x =​:= $y> would
return true in the above example.'

And the 'above example' is very similar to the line in the bug report​:

  my $x = 'Just Another';
  my $y := $x;
  $y = 'Perl Hacker';

@p6rt
Copy link
Author

p6rt commented Jul 14, 2010

From @masak

<moritz_> rakudo​: my ($a, $b); say $a =​:= $a, $a =​:= $b
<p6eval> rakudo c8b6cf​: OUTPUT«10␤»
<moritz_> rakudo​: sub f($x, $y) { $x =​:= $y }; my ($a, $b); say f($a, $a), f($a, $b)
<p6eval> rakudo c8b6cf​: OUTPUT«00␤»
<moritz_> bug?
* masak adds that one to the ticket

@p6rt
Copy link
Author

p6rt commented Jul 14, 2010

From [Unknown Contact. See original ticket]

<moritz_> rakudo​: my ($a, $b); say $a =​:= $a, $a =​:= $b
<p6eval> rakudo c8b6cf​: OUTPUT«10␤»
<moritz_> rakudo​: sub f($x, $y) { $x =​:= $y }; my ($a, $b); say f($a, $a), f($a, $b)
<p6eval> rakudo c8b6cf​: OUTPUT«00␤»
<moritz_> bug?
* masak adds that one to the ticket

@p6rt
Copy link
Author

p6rt commented Jul 14, 2010

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

@p6rt
Copy link
Author

p6rt commented Jul 14, 2010

From @masak

<jnthn> What is pir​::issame being used for?
<masak> checking for =​:= equivalence, I'd guess.
<jnthn> That sounds wrong.
<jnthn> =​:= means "references the same thingy" right?
<masak> aye.
<jnthn> pretty sure the issame op is not what is wanted then
* masak adds that to the ticket

@p6rt
Copy link
Author

p6rt commented Jul 14, 2010

From [Unknown Contact. See original ticket]

<jnthn> What is pir​::issame being used for?
<masak> checking for =​:= equivalence, I'd guess.
<jnthn> That sounds wrong.
<jnthn> =​:= means "references the same thingy" right?
<masak> aye.
<jnthn> pretty sure the issame op is not what is wanted then
* masak adds that to the ticket

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @moritz

works now, and is tested in S03-operators/identity.t

@p6rt
Copy link
Author

p6rt commented May 29, 2012

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

@p6rt p6rt closed this as completed May 29, 2012
@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