Skip to content

Commit

Permalink
Update spec/statement.dd
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Treleaven <[email protected]>
  • Loading branch information
Bolpat and ntrel authored Jun 27, 2024
1 parent 8917fe7 commit fdc0b46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/statement.dd
Original file line number Diff line number Diff line change
Expand Up @@ -770,10 +770,10 @@ $(GNAME OpApplyParameter):

$(P The $(D opApply) and $(D opApplyReverse) member functions can be overloaded.
Selection works similar to overload resolution by
comparing the number of `foreach` variables and number of parameters of `body` and,
if more than one overload remains unique overload,
matching the parameter types of `body` and each $(I ForeachType)
declared in the $(I ForeachStatement) when given.)
comparing the number of `foreach` variables with the number of parameters of `body` and,
if more than one overload remains,
matching each parameter of `body` against each $(I ForeachType)
declared in the $(I ForeachStatement).)

$(BEST_PRACTICE Overload apply functions only with delegates differing in number of parameters
to enable type inference for `foreach` variables.
Expand Down

0 comments on commit fdc0b46

Please sign in to comment.