static opDispatch

David d at dav1d.de
Sun Jun 30 03:36:15 PDT 2013


struct Bla {
    static @property
	Bla opDispatch(string s)() const {
		pragma(msg, s);
		return Bla();
	}
}
		
void main() {
	Bla.abc;
}

---

abc
/d675/f256.d(10): Error: no property 'abc' for type 'Bla'
/d675/f256.d(10): Error: Bla is not an expression

---

I guess static opDispatch does not exist? Any reasons why it doesn't
exist or is it just a bug? It looks like a bug, since the pragma prints.
Returning nothing, doesn't change anything btw.


More information about the Digitalmars-d-learn mailing list