From 09aaf935db4d6c0d0343ae40e316b73d766855fe Mon Sep 17 00:00:00 2001 From: TimToady Date: Sat, 19 Dec 2015 11:47:25 -0800 Subject: [PATCH] assume final bind statement in sink is True This is so that we don't accidentally throw a failure in sink context after binding a failure. Part of the fix for RT #125769. --- src/Perl6/Actions.nqp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp index b4e491bb6b6..b88e0db20eb 100644 --- a/src/Perl6/Actions.nqp +++ b/src/Perl6/Actions.nqp @@ -162,6 +162,8 @@ sub unwanted($ast, $by) { ++$i; } $ast.annotate('context','sink'); + $ast.push(QAST::WVal.new( :value($*W.find_symbol(['True'])) )) + if $e >= 0 && nqp::istype($ast[$e],QAST::Op) && $ast[$e].op eq 'bind'; } elsif nqp::istype($ast,QAST::Block) { my int $i := 1;