import std.stdio; struct get{} struct set{} mixin template attrAna(){ private void Ana() { foreach(m; __traits(allMembers, typeof(this))) foreach(o; __traits(getOverloads, typeof(this), m)) foreach(attr; __traits(getAttributes, o)) static if (is(attr == get)){ o; auto ICE = &o; //comment = no crash } } } class Foo{ mixin attrAna; this(A...)(A a){Ana;} private uint _prop; public @get uint propA(){writeln("o");return _prop;} public @set void propA(uint aValue){_prop = aValue;} } void main(string args[]){ auto foo = new Foo; } Maybe related to 9552
My pull request will handle every overloads correctly, then automatically fix the ICE issue. https://github.com/D-Programming-Language/dmd/pull/2130
*** Issue 14448 has been marked as a duplicate of this issue. ***
https://github.com/D-Programming-Language/dmd/pull/4589
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c8173f3a87a14312f734f584af80fa686b4333f3 fix Issue 13920 - DMD crash when trying to set a delegate from __traits(getOverloads) https://github.com/D-Programming-Language/dmd/commit/bb7947b2d64286118e79197a06cc78441bb302b2 Merge pull request #4589 from 9rnsr/fix13920 Issue 13920 - DMD crash when trying to set a delegate from __traits(getOverloads)
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c8173f3a87a14312f734f584af80fa686b4333f3 fix Issue 13920 - DMD crash when trying to set a delegate from __traits(getOverloads) https://github.com/D-Programming-Language/dmd/commit/bb7947b2d64286118e79197a06cc78441bb302b2 Merge pull request #4589 from 9rnsr/fix13920