Bug 12307 – Contextfull error diagnostic about AA key type

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-06T17:54:00Z
Last change time
2014-05-28T16:46:35Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2014-03-06T17:54:33Z
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.
Comment #1 by k.hara.pg — 2014-05-28T08:30:51Z
Comment #2 by github-bugzilla — 2014-05-28T16:46:34Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b46d119c8f7a2d872ad46f666626fec8e85b7c08 fix Issue 12307 - Contextfull error diagnostic about AA key type https://github.com/D-Programming-Language/dmd/commit/dd4a4828aa391a22348527ad5fcc5106be461501 Merge pull request #3601 from 9rnsr/fix12307 Issue 12307 - Contextfull error diagnostic about AA key type