D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4641 - Associative arrays of structs with alias this broken.
Summary: Associative arrays of structs with alias this broken.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Linux
: P2 critical
Assignee: No Owner
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2010-08-13 13:43 UTC by Pelle Månsson
Modified: 2010-10-08 13:40 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Pelle Månsson 2010-08-13 13:43:42 UTC
Code:
==========================================8<------------------------------------

struct S {
    int i;
    alias i this;
}

void main() {
    S[int] ss;
    ss[0] = S.init; // This line causes Range Violation.
}

------------------------------------>8==========================================

I am using DMD v2.048.
Comment 1 Don 2010-09-20 08:37:54 UTC
Related to bug 2451 and possibly also 2943.
Comment 2 Walter Bright 2010-10-08 13:40:56 UTC
http://www.dsource.org/projects/dmd/changeset/709