[dmd-internals] Three patches for recent regressions

Don Clugston dclugston at googlemail.com
Fri Sep 3 12:24:11 PDT 2010


On 3 September 2010 21:04, Jason House <jason.james.house at gmail.com> wrote:
> Is this functionality safe? It looks like there's some kind of type variance going on. I'm not sure when covariance and contravariance should be allowed with D templates.

Where do you see covariance?

This is a change ONLY to type deduction. If you explicitly specify the
types, it already works in D1, and in D2 before the regression in
2.037.
I'm not sure what you mean by safe, but in cases where there is
ambiguity, it won't compile (that was most of the difficulty,
actually). And it can only match classes/interfaces from the
inheritance hierarchy. Can you come up with a scenario where it would
be a problem?


More information about the dmd-internals mailing list