[Issue 23264] Allow __traits(parameters) in the return type or contract of a function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 26 11:22:01 UTC 2022


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

wolframw <wolframw at protonmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wolframw at protonmail.com

--- Comment #1 from wolframw <wolframw at protonmail.com> ---
There would be an ambiguity for nested functions:

void foo(T1...)(T1 args1)
{
    typeof(__traits(parameters))[0] bar(T2...)(T2 args2)
    {
        // ...
    }
}

Would the return value of bar depend on foo's or bar's parameters? Currently,
it would refer to foo's parameters.

--


More information about the Digitalmars-d-bugs mailing list