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

Rakudo makes assignment out of >= even though it's a diffy chaining operator #1517

Closed
p6rt opened this issue Feb 16, 2010 · 5 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 16, 2010

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

Searchable as RT72874$

@p6rt
Copy link
Author

p6rt commented Feb 16, 2010

From @masak

<diakopter> rakudo​: say 6 >== 2
<p6eval> rakudo c3aaa2​: OUTPUT«Cannot assign to readonly value␤current
instr.​: '&infix​:<=>' [...]
<diakopter> weird.. it's using *any* operator as an assignment
operator, not just infix
<diakopter> I mean, not just non-boolean-returning :)
<diakopter> alpha​: say $_ >== 2
<p6eval> alpha 30e0ed​: OUTPUT«No applicable candidates found to
dispatch to for 'prefix​:=' [...]
<diakopter> std​: say $_ >== 2
<p6eval> std 29742​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Can't make
assignment out of >= because chaining operators are diffy [...] FAILED
00​:01 106m␤»
<diakopter> ah, a non-LTA error
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Aug 12, 2010

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

@p6rt
Copy link
Author

p6rt commented Feb 24, 2014

From @coke

On Tue Feb 16 02​:04​:32 2010, masak wrote​:

<diakopter> rakudo​: say 6 >== 2
<p6eval> rakudo c3aaa2​: OUTPUT«Cannot assign to readonly value␤current
instr.​: '&infix​:<=>' [...]
<diakopter> weird.. it's using *any* operator as an assignment
operator, not just infix
<diakopter> I mean, not just non-boolean-returning :)
<diakopter> alpha​: say $_ >== 2
<p6eval> alpha 30e0ed​: OUTPUT«No applicable candidates found to
dispatch to for 'prefix​:=' [...]
<diakopter> std​: say $_ >== 2
<p6eval> std 29742​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Can't make
assignment out of >= because chaining operators are diffy [...] FAILED
00​:01 106m␤»
<diakopter> ah, a non-LTA error
* masak submits rakudobug

Slight change in behavior (note that Moar behaves differently than parrot here)

02​:42 <[Coke]> rakudo​: say 6 >== 2
02​:43 <camelia> rakudo-jvm e8cea1​: OUTPUT«(timeout)»
02​:43 <camelia> ..rakudo-moar e8cea1​: OUTPUT«No such method 'STORE' for
  invocant of type 'Int'␤ in block at
  src/gen/m-CORE.setting​:16488␤ in block at /tmp/tmpfile​:1␤␤»
02​:43 <camelia> ..rakudo-parrot e8cea1​: OUTPUT«Cannot modify an immutable
  value␤ in block at gen/parrot/CORE.setting​:16739␤ in block
  at /tmp/tmpfile​:1␤␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Feb 8, 2015

From @Mouq

Fixed in Rakudo commits​:

commit d262118eccf5517412c05318ddb50e9a8fefe9e8
Author​: Mouq <alexmoquin@​gmail.com>
Date​: Sat Feb 7 21​:32​:14 2015 -0500

  Add a very general X​::Syntax​::Can'tMeta and use it

commit 34669da476fb9cce4e55ffdc72e89d3dded83cf0
Author​: Mouq <alexmoquin@​gmail.com>
Date​: Sat Feb 7 20​:30​:40 2015 -0500

  Improve metaop​:<=>

  Dies in the case of fiddly/diffy operators, and now adjusts to the
  proper precedence depending on the operator

Behavior now​:

$ perl6 -e'say 6 >== 2'
===SORRY!=== Error while compiling -e
Cannot make assignment out of >= because chaining operators are too diffy
at -e​:1
------> say 6 >==⏏ 2

Tests added in Roast commit​:

commit 54b136e898549abb2d081927cf785ded577d33b0
Author​: Mouq <alexmoquin@​gmail.com>
Date​: Sat Feb 7 21​:48​:01 2015 -0500

  Add test for #​72874

Marking as resolved :)

On Sun Feb 23 23​:44​:08 2014, coke wrote​:

On Tue Feb 16 02​:04​:32 2010, masak wrote​:

<diakopter> rakudo​: say 6 >== 2
<p6eval> rakudo c3aaa2​: OUTPUT«Cannot assign to readonly
value␤current
instr.​: '&infix​:<=>' [...]
<diakopter> weird.. it's using *any* operator as an assignment
operator, not just infix
<diakopter> I mean, not just non-boolean-returning :)
<diakopter> alpha​: say $_ >== 2
<p6eval> alpha 30e0ed​: OUTPUT«No applicable candidates found to
dispatch to for 'prefix​:=' [...]
<diakopter> std​: say $_ >== 2
<p6eval> std 29742​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Can't make
assignment out of >= because chaining operators are diffy [...]
FAILED
00​:01 106m␤»
<diakopter> ah, a non-LTA error
* masak submits rakudobug

Slight change in behavior (note that Moar behaves differently than
parrot here)

02​:42 <[Coke]> rakudo​: say 6 >== 2
02​:43 <camelia> rakudo-jvm e8cea1​: OUTPUT«(timeout)»
02​:43 <camelia> ..rakudo-moar e8cea1​: OUTPUT«No such method 'STORE'
for
invocant of type 'Int'␤ in block at
src/gen/m-CORE.setting​:16488␤ in block at
/tmp/tmpfile​:1␤␤»
02​:43 <camelia> ..rakudo-parrot e8cea1​: OUTPUT«Cannot modify an
immutable
value␤ in block at gen/parrot/CORE.setting​:16739␤
in block
at /tmp/tmpfile​:1␤␤»

@p6rt
Copy link
Author

p6rt commented Feb 8, 2015

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

@p6rt p6rt closed this as completed Feb 8, 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