Typeof woes

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Aug 20 17:24:18 PDT 2013


On 8/21/13, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> and typeof(this.Smth) is invalid because this.Smth is already a
> type, so you can't apply typeof to it.

I am beginning to wonder if typeof(typeof(expr)) is worthy of an
error. Would we end up having any bugs if we were to allow typeof() to
work on types (IOW it would just alias itself to the type)?

I guess the only way to find out is to try it out in a compiler
branch, but I'm genuinely curious.


More information about the Digitalmars-d-learn mailing list