Skip to content
Permalink
Browse files

Die when constant folding

- so that things work out wrt to v6.c / v6.d and deprecation
- also make sure we get a single deprecation messay for Any (<+) Any
  • Loading branch information...
lizmat committed Nov 1, 2018
1 parent cec1f51 commit 7a1a18688446f43865435ab96add36c4361c6158
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/set_precedes.pm6
@@ -5,13 +5,14 @@
# ≽ succeeds

proto sub infix:<<(<+)>>($, $, *% --> Bool:D) is pure {
die if $*FOLDING; # not going to constant fold something that's deprecated
Rakudo::Deprecations.DEPRECATED(
"set operator {$*INSTEAD // "(<=)"}",
"",
"6.d",
:what("Set operator {$*WHAT // "(<+)"}"),
:up( 1 + ?$*WHAT )
);
) unless $*INTERNAL;
{*}
}
multi sub infix:<<(<+)>>(Setty:D \a, QuantHash:D \b --> Bool:D) {
@@ -102,6 +103,7 @@ multi sub infix:<<(<+)>>(QuantHash:D $a, QuantHash:D $b --> Bool:D ) {
multi sub infix:<<(<+)>>(Any $, Failure:D $b) { $b.throw }
multi sub infix:<<(<+)>>(Failure:D $a, Any $) { $a.throw }
multi sub infix:<<(<+)>>(Any $a, Any $b --> Bool:D) {
my $*INTERNAL = 1;
nqp::if(
nqp::istype($a,Mixy) || nqp::istype($b,Mixy),
infix:<<(<+)>>($a.Mix, $b.Mix),

0 comments on commit 7a1a186

Please sign in to comment.
You can’t perform that action at this time.