On 1/3/23 20:11, thebluepandabear wrote:

> if I replace the `isDrawable` template with the
> following (using `typeof`), the code does not compile:

It must be because T is already a type. It's the same reason why the following code fails to compile:

void main() {
    alias T = int;
    alias TT = typeof(T);
}

Error: type `int` is not an expression

And the error message tells us typeof requires an expression. What you can do is to use T.init and the code should now work like the following does:

    alias TT = typeof(T.init);

Ali

Reply via email to