Skip to content

Commit edf27d4

Browse files
committed
Added test for #114134
1 parent 0b90fb4 commit edf27d4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

S32-exceptions/misc.t

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,4 +277,11 @@ throws_like 'Set(Any.new)', X::Set::Coerce;
277277
throws_like 'use fatal; (1+2i).Num', X::Numeric::Real, target => Num;
278278
throws_like 'use fatal; (1+2i).Real', X::Numeric::Real, target => Real;
279279

280+
#RT #114134
281+
{
282+
throws_like 'class A{}; (-> &c, $m { A.new()(); CATCH { default { $m } } } )(A, "")', X::TypeCheck::Binding;
283+
284+
dies_ok {eval(class A{}; (-> &c, $m { A.new()(); CATCH { default { $m } } } )(A, "")) }, "Should fail type check with unbound variable";
285+
}
286+
280287
done;

0 commit comments

Comments
 (0)