[Issue 24717] alias edge cases with tupleof

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 1 13:57:30 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24717

--- Comment #12 from Max Samukha <maxsamukha at gmail.com> ---
(In reply to Manu from comment #11)
> Yeah it's fine, just alias a member of the type rather than the instance. 
> You can typeof(instance) of you want to use instance as the point of
> reference.

There are also cases where the explicitly specified static context is ignored,
as in:

struct S
{
    void foo()
    {
        pragma(msg, typeof(&S.foo)); // void delegate();

        auto f = &S.foo;
        pragma(msg, typeof(f)); // void delegate();
    }

    pragma(msg, typeof(&S.foo)); // void function();
}

It'd be nice to see them fixed too.

--


More information about the Digitalmars-d-bugs mailing list