By error, if you don't know well the spec, this scenario is quite possible: class B{final void foo(){} enum a =__traits(isFinalFunction, B, "foo"); // compiles but wrong result instead of __traits(isFinalFunction, B.foo); // ok
Covered by DMD's PR https://github.com/dlang/dmd/pull/6456
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/30e01ba7969ede07e0428132dfbdda9d3ddbe80e Fix issue 17096 - Check the number of arguments given to __trait https://github.com/dlang/dmd/commit/ad70d70153978bd4da878d73b7eca6d713643c60 Merge pull request #7330 from JinShil/fix_17096 Fix issue 17096 - Check the number of arguments given to __trait merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/30e01ba7969ede07e0428132dfbdda9d3ddbe80e Fix issue 17096 - Check the number of arguments given to __trait https://github.com/dlang/dmd/commit/ad70d70153978bd4da878d73b7eca6d713643c60 Merge pull request #7330 from JinShil/fix_17096
dlang/dmd pull request #12093 "[dmd-cxx] Backport more recent traits to the C++ port" was merged into dmd-cxx: - 1602539c49d80c768d4ba68b7b2300ee3573ac0d by JinShil: [dmd-cxx] Fix issue 17096 - Check the number of arguments given to __trait https://github.com/dlang/dmd/pull/12093