Comment #1 by dlang-bugzilla — 2014-02-26T22:07:44Z
(In reply to comment #0)
> Unfortunately I haven't been able to find a reduced test case.
Um?
struct S {}
int[S] aa;
That's your reduced test case right there. Compiles in 2.064.2 but not 2.065.0.
Anyway, this has already been filed as issue 12255.
*** This issue has been marked as a duplicate of issue 12255 ***
Comment #2 by doob — 2014-02-26T23:16:21Z
I'm pretty sure that the simple case with two uints did compile in 2.065. But not the case in Tango.
Comment #3 by dlang-bugzilla — 2014-02-26T23:18:34Z
That's not what I'm seeing:
C:\Temp\D\issues\12267> "C:\Downloads\!dmd\dmd.2.065.0\dmd2\windows\bin\dmd.exe" -o- test.d
test.d(2): Error: associative array key type S does not have 'const int opCmp(ref const S)' member function
Please check again. If the simple case above compiles for you, please post the exact compiler version, operating system, etc.
Comment #4 by doob — 2014-02-27T12:13:26Z
(In reply to comment #3)
> That's not what I'm seeing:
>
> C:\Temp\D\issues\12267>
> "C:\Downloads\!dmd\dmd.2.065.0\dmd2\windows\bin\dmd.exe" -o- test.d
> test.d(2): Error: associative array key type S does not have 'const int
> opCmp(ref const S)' member function
>
> Please check again. If the simple case above compiles for you, please post the
> exact compiler version, operating system, etc.
If I import std.stdio it compiles.
Comment #5 by dlang-bugzilla — 2014-02-27T12:48:44Z
Well, isn't this interesting.
This compiles:
struct T { int opCmp() { return 2; } }
struct S {}
int[S] aa;
That is, it is enough to add an opCmp to ANY struct to unbreak compilation.
Comment #6 by doob — 2014-02-27T12:49:44Z
(In reply to comment #5)
> Well, isn't this interesting.
>
> This compiles:
>
> struct T { int opCmp() { return 2; } }
>
> struct S {}
> int[S] aa;
>
>
> That is, it is enough to add an opCmp to ANY struct to unbreak compilation.
Haha, that's weird.