[Issue 23966] [REG2.102] Cannot use traits(getAttributes) with overloaded template

2023-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23966

--- Comment #6 from Dlang Bot  ---
dlang/dmd pull request #15417 "merge stable" was merged into master:

- bb88be3bb1cb3c483bb35113c353b7c087ca6e97 by Razvan Nitu:
  Fix Issue 23966 - [REG2.102] Cannot use traits(getAttributes) with overloaded
template (#15353)

https://github.com/dlang/dmd/pull/15417

--


[Issue 23966] [REG2.102] Cannot use traits(getAttributes) with overloaded template

2023-07-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23966

Dlang Bot  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Dlang Bot  ---
dlang/dmd pull request #15353 "Fix Issue 23966 - [REG2.102] Cannot use
traits(getAttributes) with overloaded template" was merged into stable:

- bf2c04df822eee078ec0debb151c09d794f709c9 by RazvanN7:
  Fix Issue 23966 - [REG2.102] Cannot use traits(getAttributes) with overloaded
template

https://github.com/dlang/dmd/pull/15353

--


[Issue 23966] [REG2.102] Cannot use traits(getAttributes) with overloaded template

2023-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23966

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #4 from Dlang Bot  ---
@RazvanN7 created dlang/dmd pull request #15353 "Fix Issue 23966 - [REG2.102]
Cannot use traits(getAttributes) with overloaded template" fixing this issue:

- Fix Issue 23966 - [REG2.102] Cannot use traits(getAttributes) with overloaded
template

https://github.com/dlang/dmd/pull/15353

--


[Issue 23966] [REG2.102] Cannot use traits(getAttributes) with overloaded template

2023-06-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23966

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com

--- Comment #2 from RazvanN  ---
This is not a problem with the deprecation of __traits(getAttributes), but
rather a problem of traits(getOverloads). This was simply exposed by the
deprecation. If you use __traits(getLocation) instead of getAttributes, you
will get the same behavior (except that an error is issued, not a deprecation):

  module test;

  @("gigi")
  void fun() {}
  @("mimi")
  void fun(int) {}
  @("didi")
  void fun()(int, ulong) {}

  void main()
  {
  //pragma(msg, __traits(getAttributes, fun));
  pragma(msg, __traits(getOverloads, test, "fun"));
  static foreach (t; __traits(getOverloads, test, "fun"))
  pragma(msg, __traits(getLocation, t));
  }

--


[Issue 23966] [REG2.102] Cannot use traits(getAttributes) with overloaded template

2023-06-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23966

--- Comment #3 from RazvanN  ---
(In reply to RazvanN from comment #2)
> This is not a problem with the deprecation of __traits(getAttributes), but
> rather a problem of traits(getOverloads). This was simply exposed by the
> deprecation. If you use __traits(getLocation) instead of getAttributes, you
> will get the same behavior (except that an error is issued, not a
> deprecation):
> 
>   module test;
>   
>   @("gigi")
>   void fun() {}
>   @("mimi")
>   void fun(int) {}
>   @("didi")
>   void fun()(int, ulong) {}
>   
>   void main()
>   {
>   //pragma(msg, __traits(getAttributes, fun));
>   pragma(msg, __traits(getOverloads, test, "fun"));
>   static foreach (t; __traits(getOverloads, test, "fun"))
>   pragma(msg, __traits(getLocation, t));
> 
>   }

Updated snippet, without comments and extra things:

  module test;

  @("gigi")
  void fun() {}
  @("mimi")
  void fun(int) {}
  @("didi")
  void fun()(int, ulong) {}

  void main()
  { 
  static foreach (t; __traits(getOverloads, test, "fun"))
pragma(msg, __traits(getLocation, t));
  }

--


[Issue 23966] [REG2.102] Cannot use traits(getAttributes) with overloaded template

2023-06-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23966

Adam D. Ruppe  changed:

   What|Removed |Added

 CC||destructiona...@gmail.com

--- Comment #1 from Adam D. Ruppe  ---
this also affected me in the jsvar.d internals. i worked around by calling
getOverloads again inside the getOverloads loop.

foreach(idx, _ignored; __traits(getOverloads))
  __traits(getAttributes, __traits(getOverloads)[idx])

that kind of thing.

--


[Issue 23966] [REG2.102] Cannot use traits(getAttributes) with overloaded template

2023-06-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23966

johanenge...@weka.io changed:

   What|Removed |Added

   Keywords||industry, rejects-valid

--