Should these aliases kind be illegal ?

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 12 15:17:37 PDT 2015


The following alias declaration is totally legal but actually 
it's not usable

---
class Foo
{
     void something(size_t param){}
}

class Bar
{
     private Foo foo;
     this(){foo = new Foo;}
     alias somethingelse = foo.something;
}

void main(string[] args)
{
     auto bar = new Bar;
     //bar.somethingelse(0u);
}
---

The call doesn't work but the declaration is fine. What is 
possible to make with this declaration ?


More information about the Digitalmars-d-learn mailing list