Skip to content

Commit

Permalink
Fix test, because in RakuAST this is a compile time error
Browse files Browse the repository at this point in the history
And in legacy grammar, this is a runtime error when it *could* (and
probably *should*) have been a compile time error.  Marked as todo
for now.
  • Loading branch information
lizmat committed May 19, 2023
1 parent 32eb636 commit e232b04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion S12-subset/type-subset.t
Expand Up @@ -129,8 +129,9 @@ subtest "When a subset has no where block", {
:exitcode(0),
"subset with of but no where succeeds when type constraint met";

#?rakudo todo 'in RakuAST this is a compile time error, not runtime'
is-run 'subset MyInt of Int; my MyInt $f = 5.0',
:exitcode(1), :err({ .contains: 'expected MyInt but got Rat' }),
:exitcode(1), :err({ .contains: 'Cannot assign a literal of type Rat' }),
"subset with of but no where fails when type constraint not met";

is-run 'my Str subset MyStr; die unless Str ~~ MyStr',
Expand Down

0 comments on commit e232b04

Please sign in to comment.