From 437783b74b89bed8afe4142f690c400289253859 Mon Sep 17 00:00:00 2001 From: Moritz Lenz Date: Wed, 21 Oct 2009 22:49:10 +0200 Subject: [PATCH] [MMD] further clarifications requested by colomon++ --- src/multi-dispatch.pod | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/multi-dispatch.pod b/src/multi-dispatch.pod index 66ea881..777bfd7 100644 --- a/src/multi-dispatch.pod +++ b/src/multi-dispatch.pod @@ -165,6 +165,11 @@ which are very cheap to check. Only then will it run the constraint checks (which tend to be far more expensive), and if they fail it considers candidates that are less narrow by nominal types. +With some trickery it is possible to get an object which both conforms to a +built-in type (let's say C) but which is also an undefined value. In this +case the candidate that is specific to C wins, since the nominal type +check is narrower than the C constraint. + =head1 Multiple arguments Multi dispatch is not limited to one parameter and argument. Candidate