https://issues.dlang.org/show_bug.cgi?id=4423
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED CC| |[email protected] Resolution|--- |WORKSFORME --- Comment #6 from [email protected] --- Works in git HEAD. Full test code: ------ struct S { this(string phrase, int num) { this.phrase = phrase; this.num = num; } int opCmp(const ref S rhs) { if(phrase < rhs.phrase) return -1; else if(phrase > rhs.phrase) return 1; if(num < rhs.num) return -1; else if(num > rhs.num) return 1; return 0; } string phrase; int num; } enum E : S {a = S("hello", 1), b = S("goodbye", 45), c = S("world", 22)}; void main() { import std.stdio; E e; writeln(e.phrase); e = E.b; writeln(e.phrase); } ------ Program output: ------ hello goodbye ------ --
