Skip to content

Commit

Permalink
Allow Str.match to autothread
Browse files Browse the repository at this point in the history
It doesn't have a candidate for non-`Any` children, thus declaring the
proto with `Any` as the first positional makes full sense.
  • Loading branch information
vrurg committed Dec 27, 2021
1 parent a1bb638 commit 966e77f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c/Str.pm6
Expand Up @@ -1551,10 +1551,10 @@ my class Str does Stringy { # declared in BOOTSTRAP
}

#?if moar
proto method match(|) {*}
proto method match(Any, |) {*}
#?endif
#?if !moar
proto method match(|) { $/ := nqp::getlexcaller('$/'); {*} }
proto method match(Any, |) { $/ := nqp::getlexcaller('$/'); {*} }
#?endif
multi method match(Cool:D $pattern, |c) {
$/ := nqp::getlexcaller('$/');
Expand Down

0 comments on commit 966e77f

Please sign in to comment.