yebblies <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #3 from yebblies <> 2011-08-27 21:06:24 EST ---
(In reply to comment #2)
> The test case was accidentally fixed by commit:
> but I don't really understand why. It seems to be just luck.

dc83c prevents dmd from re-evaluating the template constraint when the args
match an instance that already exists.  Previously the constraint would be run
unless all template args had a spec.  You can see this by changing 'void
bug6385(A)(A a) if (template6385!A)' to 'void bug6385(A : ubyte[2])(A a) if

Slightly smaller test case:
void templ6385(A)(A a) if ( { return false; }() )

const bool bool6385 =

    void main() {}

Using an older commit, it seems that the cause is re-running semantic on
templ6385, as it's been added to the list of module members.  This seems to be
similar to issue 4302 (caused by the fix to bug 4042) but missed by the patch
in 4302.

- if (!(sc->flags & SCOPEstaticif))
+ if (!(sc->flags & SCOPEstaticif) && !sc->intypeof)
from that patch seems to fix it, but I have no idea if there are any other
missing cases.

My guess at a correct solution is that is incorrect, and should
instead remove the TemplateInstance from the module's list of members.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to