On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote:
[ ... ]

I just figured out howto fix the defaultArg situation.
We just have to check at or slightly before we emit the Call instruction,
if we have enough arguments for the function.
If we don't we pull the missing ones from the default arguments.
This does have the problem that we can generate the same default once per call. However we would have the same problem if a user typed the default argument manually.

Therefore I argue we should emit the code rather then demanding something clever from the backends.

Clever is usually the opposite of smart :) (In those kinds of things)

Reply via email to