http://d.puremagic.com/issues/show_bug.cgi?id=9934


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Severity|normal                      |enhancement


--- Comment #4 from [email protected] 2013-04-16 03:18:04 PDT ---
(In reply to comment #0)
> cat > bug.d << CODE
> template foo(T = NonExistent)
> {
> }
> CODE
> 
> dmd -c bug
> 
> ----
> 
> This currently compiles even though the default parameter can never be valid.
> When the default parameter is a template instance it is missing from the 
> object
> file. I think we should run full semantics on the default arguments when
> compiling a module.

This is not really clear. Default parameters can depend on other template
arguments. Therefore, running full semantics is not possible.

You'd have to specify clearly in what cases there is an error. However, I think
it is not necessarily a good idea to add non-obvious rules about validity of a
template declaration.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to