[BUG, with testcase] problem with type system, __traits accross static libraries

Lloyd Dupont ld-REMOVE at galador.net
Fri Jun 24 19:07:05 PDT 2011


In plain English what I am trying to do:

I'm testing that the property can be set.
I.e.
class Foo
{
@property public Foo Subfoo() {}

@property public Foo Subfoo2() {}
@property public void Subfoo2(Foo f) {}
}

in the above class Subfoo can't be set, Subfoo2 can.
I'm testing it with
Foo f,
__traits(compile, f.Suboo = Foo.init)
__traits(compile, f.Suboo2 = Foo.init)


because the field name are going to be a parameter there is a bit of 
convolution and mixin and template.
anyway...

Apparently I just recieved a response "it's not a bug" (it's a feature) 
because
-------
> TemplateInstantances are always performed in the scope of where the 
> TemplateDeclaration is declared, with the addition of the template 
> parameters being declared as aliases for their deduced types.
-------

I don't even understand how the answer relate to my problem, nor how to 
solve it!
Can any one explain to  (in plain understandable English) why is it a 
feature, and, most importantly, how to work around it!?!?



More information about the Digitalmars-d mailing list