Skip to content

Commit

Permalink
Test nested enum coercion
Browse files Browse the repository at this point in the history
Adds tests for RT#129142
  • Loading branch information
dogbert17 authored and AlexDaniel committed Apr 7, 2018
1 parent e784cd0 commit 3b1e5fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion S12-enums/basic.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 53;
plan 54;

# Very basic enum tests

Expand Down Expand Up @@ -252,4 +252,9 @@ is-deeply do { my enum Foos (a => <42>); a.Str }, 'a',
'Pair elements in the list given to enum declaration work';
}

{ # RT #129142
eval-lives-ok 'my enum FF <zero one two three>; my enum GG <fee fie foo fum>; { FF(GG(2)).perl }',
'Coercing an enum from a coercion of an enum from an int works';
}

# vim: ft=perl6

0 comments on commit 3b1e5fb

Please sign in to comment.