Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test for a currently broken MMD case

  • Loading branch information...
commit ed7ed595e3f34ab33fb12f6b1951aceec70c6125 1 parent 4420544
@sorear authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 test3.pl
View
15 test3.pl
@@ -40,3 +40,18 @@
"ab" ~~ / $<a>=[ <alpha>+ ] /;
is $<alpha>[1], "b", "<foo>+ inside string capture works";
}
+
+# the Rakudo-inherited algorithm failed on this one.
+{
+ my class A { }
+ my class B is A { }
+ my class C is B { }
+
+ multi foo(A $, A $) { "AA" }
+ multi foo(A $, B $) { "AB" }
+ multi foo(A $, C $) { "AC" }
+ multi foo(B $, A $) { "BA" }
+ multi foo(C $, A $) { "CA" }
+
+ dies_ok { foo(B, C) }, "hard case of catching ambiguous dispatch";
+}
Please sign in to comment.
Something went wrong with that request. Please try again.