[Issue 12255] Regression: opCmp requirement for AAs breaks code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 27 12:51:41 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12255


Vladimir Panteleev <thecybershadow at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow at gmail.com


--- Comment #3 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-02-27 22:51:39 EET ---
>From issue 12267:

This program no longer compiles:

struct S {}
int[S] aa;

However, it will compile if you add this to the top of the file:

struct T { int opCmp() { return 2; } }

It looks like an opCmp in ANY struct will unbreak compilation (as long as it
comes before the AA).

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list