[Issue 24607] New: __traits(isDeprecated, ...)  not working on a member
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Fri Jun 14 20:49:45 UTC 2024
    
    
  
https://issues.dlang.org/show_bug.cgi?id=24607
          Issue ID: 24607
           Summary: __traits(isDeprecated, ...)  not working on a member
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: apz28 at hotmail.com
module test;
struct A
{
  int foo() { return 1; }
  alias bar1 = foo; 
  deprecated("please use foo")
  alias bar3 = foo; 
}
deprecated("No longer support")
struct B
{
}
pragma(msg, __traits(allMembers, A));
pragma(msg, __traits(isDeprecated, A, "foo")));
pragma(msg, __traits(isDeprecated, __traits(getMember, A, "bar3")));
pragma(msg, __traits(isDeprecated, B));
Output
AliasSeq!("foo", "bar1", "bar3")
false
false -> should be true
true
Should support checking on member
pragma(msg, __traits(isDeprecated, A.bar3));
--
    
    
More information about the Digitalmars-d-bugs
mailing list