File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -278,10 +278,11 @@ objects and discovering them with the C<.DEFINITE> method.
278
278
279
279
Keep in mind all parameters have values; even optional ones have
280
280
default defaults that are the type object of the constrained type
281
- for explicit type constraints or an L < Any > type object if no
282
- explicit type constraint exists. This means that if you use the
283
- C < :D > type smiley, you'd need to provide a default value or make
284
- the parameter required. Otherwise, the default default would be
281
+ for explicit type constraints. If no explicit type constraint exists,
282
+ the default default is an L < Any > type object for methods, submethods,
283
+ and subroutines, and a L < Mu > type object for blocks. This means that
284
+ if you use the C < :D > type smiley, you'd need to provide a default
285
+ value or make the parameter required. Otherwise, the default default would be
285
286
a type object, which would fail the definiteness constraint.
286
287
287
288
sub divide (Int:D :$a = 2, Int:D :$b!) { say $a/$b }
You can’t perform that action at this time.
0 commit comments