D-Programming-Language/dmd — pull request #1102 by 9rnsr (2012-09-06 00:30:24+00:00)
Title: Improve default argument processing

Discussion in forum:
http://forum.dlang.org/thread/mailman.1421.1346020012.31962.digitalmars-d@puremagic.com

Status improved:
Issue 3866 - anonymous delegate with default parameters cross-talks to another anonymous delegate
Fixed:
Issue 3646 - Default values of function arguments are ignored when instantiating a template.
Issue 8579 - Default parameter appears a part of typeof().stringof of a function variable

----
From commit log f5dc2257fd8c17a8c90b0906b174f25df494dc8b:

Default args and arg identifiers are now volatile information in TypeFunction.

1. The extra informations would be kept after semantic analysis for function pointer and delegate types. But merging type would strip all the extras from the type structure, then cache the stripped copy into.

2. The types has extra informations cannot be named. In other words, `AliasDeclaration` would always strip the aliased type. This rule also works for *TemplateTypeParameter*, and fixes issue 3646 well.

3. `CondExp` would strip them from the type of its result.