-
-
Save jnthn/67a5c42a0ce9a1ba2424 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test; | |
plan 3; | |
multi foo(Int() $) { 1 } | |
multi foo(Cool $) { 2 } | |
is foo(42), 1, 'Int hits Int() candidate as if it were an Int candidate'; | |
is foo("omg"), 2, 'Str hits Cool candidate'; | |
is foo(set()), 1, 'Set hits Int() candidate due to it accepting Any and coercing'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment