Thread overview
[Issue 20417] __traits(compiles) returns false result if expression is not wrapped inside a lambda while typeof works correctly
Nov 28
RazvanN
Nov 28
Dlang Bot
Nov 29
Dlang Bot
November 28
https://issues.dlang.org/show_bug.cgi?id=20417

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> ---
It seems that for some reason, when S has a destructor it tries to interpret the calls to a and i and it cannot do that because the functions have no bodies (compiles trait failes). However, I have no idea why it is trying to interpret those calls.

--
November 28
https://issues.dlang.org/show_bug.cgi?id=20417

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@SSoulaimane created dlang/dmd pull request #10626 "Fix issue 20417 - Do not run ctfe for temporaries inside __traits(compiles)" fixing this issue:

- Fix issue 20417 - Do not run ctfe for temporaries inside __traits(compiles)

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

--
November 29
https://issues.dlang.org/show_bug.cgi?id=20417

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #10626 "Fix issue 20417 - Do not run ctfe for temporaries inside __traits(compiles)" was merged into master:

- 4ec3e6b8b1f3792b7036dde008539e8904d80ad6 by سليمان السهمي  (Suleyman Sahmi):
  Fix issue 20417 - Do not run ctfe for temporaries inside __traits(compiles)

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

--