Allow identical imports

Dicebot public at dicebot.lv
Tue Jul 30 04:47:01 PDT 2013


On Tuesday, 30 July 2013 at 11:39:59 UTC, JS wrote:
> class A
> {
>     mixin(Property("name", string));
>     mixin(Property("x", iObject));
> }
>
> iObject potentially requires an import, so I import it... now if
> I add
>
>
>     mixin(Property("y", iObject));
>
> then I'll have two iObjects imported... which will error and
> fail, even though there is no big deal about it.

class A
{
     alias fields = TypeTuple!("name", string, "x", iObject);
     mixin(generateImports!fields);
     mixin(generateProperties!fields);!
}


More information about the Digitalmars-d mailing list