Skip to content

Commit 74bedac

Browse files
committed
Tests for RT #77350.
1 parent ffe2c59 commit 74bedac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

S05-grammar/inheritance.t

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 31;
4+
plan 32;
55

66
# L<S05/Grammars/"Like classes, grammars can inherit">
77

@@ -10,8 +10,13 @@ plan 31;
1010
grammar Grammar::Foo {
1111
token TOP { <foo> };
1212
token foo { 'foo' };
13+
token so { 'so' };
1314
};
1415

16+
#?rakudo todo 'RT #77350'
17+
is( try { Grammar::Foo.parse( 'so', :rule<so> ) }, 'so',
18+
"don't let a Mu based action method fail the parse" );
19+
1520
#?niecza skip 'Cannot dispatch to a method on Foo because it is not inherited or done by Cursor'
1621
is(~('foo' ~~ /^<Grammar::Foo::foo>$/), 'foo', 'got right match (foo)');
1722
ok Grammar::Foo.parse('foo'), 'got the right match through .parse TOP';

0 commit comments

Comments
 (0)