[Issue 22868] New: __traits(parameters) returns parameters of delegate instead of function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 10 23:50:48 UTC 2022


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

          Issue ID: 22868
           Summary: __traits(parameters) returns parameters of delegate
                    instead of function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: moonlightsentinel at disroot.org

__traits(parameters) currently yields the parameters of the delegate when the
foreach iterates over an aggregate using opApply. This is wrong and leaks an
implementation detail into user code.

See the discussion thread here:
https://forum.dlang.org/thread/vdqehddiompdoehhwewf@forum.dlang.org

--


More information about the Digitalmars-d-bugs mailing list