Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

meta-forms of andthen, notandthen, and orelse leak thunks when Slips given as args #6318

Open p6rt opened 7 years ago

p6rt commented 7 years ago

Migrated from rt.perl.org#131501 (status was 'new')

Searchable as RT131501$

p6rt commented 7 years ago

From @zoffixznet

There were some fixes[^1] to prevent these ops from leaking thunks, and it looks like the routines that handle meta forms need similar treatment, perhaps adding their own meta routines for these ops​:

  \<Zoffix__> m​: sub { [andthen] |(), 42 }().perl.say   \ rakudo-moar 64e898​: OUTPUT​: «-> ;; $_ is raw { #`(Block|44721392) ... }␤»   \<Zoffix__> m​: sub { [andthen] 42 }().perl.say   \ rakudo-moar 64e898​: OUTPUT​: «42␤»   \<Zoffix__> m​: sub { [andthen] |() }().perl.say   \ rakudo-moar 64e898​: OUTPUT​: «Bool​::True␤»   \<Zoffix__> m​: sub { [notandthen] |(), 42 }().perl.say   \ rakudo-moar 64e898​: OUTPUT​: «-> ;; $_ is raw { #`(Block|44971280) ... }␤»   \<Zoffix__> m​: sub { [orelsee] |(), 42 }().perl.say   \ rakudo-moar 64e898​: OUTPUT​: «===SORRY!=== Error while compiling \␤Undeclared routine​:␤ orelsee used at line 1␤␤»   \<Zoffix__> m​: sub { [orelse] |(), 42 }().perl.say   \ rakudo-moar 64e898​: OUTPUT​: «-> ;; $_ is raw { #`(Block|37405936) ... }␤»   \<Zoffix__> m​: sub { [\orelse] |(), 42 }().perl.say   \ rakudo-moar 64e898​: OUTPUT​: «(-> ;; $_ is raw { #`(Block|51258872) ... },).Seq␤»   \<Zoffix__> m​: sub { [\andthen] |(), 42 }().perl.say   \ rakudo-moar 64e898​: OUTPUT​: «(-> ;; $_ is raw { #`(Block|57165304) ... },).Seq␤»   \<Zoffix__> m​: sub { [\notandthen] |(), 42 }().perl.say   \ rakudo-moar 64e898​: OUTPUT​: «(-> ;; $_ is raw { #`(Block|35411480) ... },).Seq␤»

[1] https://github.com/rakudo/rakudo/commit/3c8822e80d39c6c37d1059517e444e4295f24a30