Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
orelse isn't supposed to "try" its LHS
  • Loading branch information
timo committed Apr 7, 2014
1 parent 825948d commit 5a1a50a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions S03-operators/orelse.t
Expand Up @@ -14,24 +14,24 @@ nok $tracker, 'orelse thunks';
#?rakudo todo "orelse exception semantics"
{
try {
die "oh noes!" orelse pass("orelse continues after an exception");
try { die "oh noes!" } orelse pass("orelse continues after an exception");
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

#?rakudo todo "orelse exception semantics"
{
try {
die "oh noes!" orelse ok(~$! eq "oh noes!", "orelse sets $! after an exception");
try { die "oh noes!" } orelse ok(~$! eq "oh noes!", 'orelse sets $! after an exception');
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

#?rakudo todo "orelse exception semantics"
{
try {
die "oh noes!" orelse -> $foo {
ok ~$foo eq "oh noes!", "orelse passes $! to one argument after an exception";
try { die "oh noes!" } orelse -> $foo {
ok ~$foo eq "oh noes!", 'orelse passes $! to one argument after an exception';
};
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
Expand All @@ -40,8 +40,8 @@ nok $tracker, 'orelse thunks';
#?rakudo todo "orelse exception semantics"
{
try {
die "oh noes!" orelse -> $foo, $bar {
ok ~$foo eq "oh noes!" && ~$bar eq "oh noes!", "orelse passes $! to two arguments after an exception";
try { die "oh noes!" } orelse -> $foo, $bar {
ok ~$foo eq "oh noes!" && ~$bar eq "oh noes!", 'orelse passes $! to two arguments after an exception';
};
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
Expand Down

0 comments on commit 5a1a50a

Please sign in to comment.