Skip to content

Commit e3494e2

Browse files
committed
Replace another eval-dies-ok with throws-like
1 parent 10a849d commit e3494e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

S13-overloading/typecasting-long.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ plan 32;
104104
class B { method postcircumfix:<( )>(B:U: $x) { 3 } };
105105
is B(0), 3, 'RT #112642 ($: $) -> (:U, $) case';
106106
is B.(0), 3, 'RT #112642 .($: $) -> (:U, $) case, dotted form';
107+
## TODO test for specific exception once the code dies
107108
#?rakudo todo 'RT #112642 A() unwanted magic for :(A:U) with an overloaded .()'
108-
eval-dies-ok 'class XXX { method postcircumfix:<( )>(XXX:U: $x) { } }; XXX();', 'RT #112642 ($:) -> (:U, $) arity check';
109+
throws-like 'class XXX { method postcircumfix:<( )>(XXX:U: $x) { } }; XXX();', Exception, 'RT #112642 ($:) -> (:U, $) arity check';
109110
throws-like 'class XYX { method postcircumfix:<( )>(XYX:U: $x) { } }; XYX(:a);', X::AdHoc, 'RT #112642 ($:, :$) -> (:U, $) arity check';
110111
throws-like 'class XYY { method postcircumfix:<( )>(XYY:U: $x) { } }; XYY.();', X::AdHoc, 'RT #112642 .($:) -> (:U, $) arity check';
111112
throws-like 'class YYY { method postcircumfix:<( )>(YYY:U: $x) { } }; YYY.(:a);', X::AdHoc, 'RT #112642 .($:, :$) -> (:U, $) arity check';

0 commit comments

Comments
 (0)