[Issue 12307] New: Contextfull error diagnostic about AA key type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 6 17:54:35 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12307
Summary: Contextfull error diagnostic about AA key type
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2014-03-06 17:54:33 PST ---
Test case:
struct S1 { int opCmp(T : typeof(this))(T) { return 0; } }
void main()
{
int[S1] aa1; // a
int[S2] aa2; // b
}
struct S2 { int opCmp(T : typeof(this))(T) { return 0; } }
The case 'a' will print the error:
Error: associative array key type S1 does not have 'const int opCmp(ref const
S1)' member function
But the case 'b' doesn't. It's order dependent bug.
--
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