Skip to content

Commit d886c58

Browse files
committed
bring test more in line with my understanding of Perl 6; fudge it for rakudo
1 parent fca20a4 commit d886c58

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

S06-signature/types.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ use Test;
33

44
plan 6;
55

6-
sub f returns Int ($x) { return $x };
6+
sub f($x) returns Int { return $x };
77

88
ok &f.returns === Int, 'sub f returns Int can be queried for its return value';
99
ok &f.of === Int, 'sub f returns Int can be queried for its return value (.of)';
1010

1111
lives_ok { f(3) }, 'type check allows good return';
1212
dies_ok { f('m') }, 'type check forbids bad return';
1313

14-
sub g returns Int ($x) { $x };
14+
sub g($x) returns Int { $x };
1515

1616
lives_ok { g(3) }, 'type check allows good implicit return';
17+
#?rakudo todo 'type check on return value'
1718
dies_ok { g('m') }, 'type check forbids bad implicitreturn';
1819

1920
# vim: ft=perl6

0 commit comments

Comments
 (0)