www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22868] New: __traits(parameters) returns parameters of


          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 puremagic.com
          Reporter: moonlightsentinel 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

Mar 10 2022