Skip to content

Commit 9e7f24e

Browse files
committed
Explain more why using a multi avoids LEAVE call
1 parent 67cadad commit 9e7f24e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/Language/traps.pod6

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,9 @@ sub foo(Int) {
14031403
say foo rand; # OUTPUT: «No such method 'Int' for invocant of type 'Any'␤»
14041404
=end code
14051405
1406-
A simple way to avoid this issue is to declare your sub or method a multi:
1406+
A simple way to avoid this issue is to declare your sub or method a multi,
1407+
so the candidate is elimited during dispatch and the code never gets to
1408+
binding anything inside the sub, thus never entering the routine's body:
14071409
14081410
=begin code
14091411
multi foo(Int) {

0 commit comments

Comments
 (0)