D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7573 - No line number with associative array creation error
Summary: No line number with associative array creation error
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 major
Assignee: No Owner
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2012-02-24 11:08 UTC by bearophile_hugs
Modified: 2012-04-20 04:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2012-02-24 11:08:41 UTC
D2 code:


struct Foo {
    Spam x;
    alias int[Foo*] Spam;
    Spam bar() {
        return x;
    }
}
void main() {
    foreach (y; Foo().bar()) {}
}



DMD 2.059head gives an error with no line number:

Error: cannot create associative array int[Foo*]
Comment 1 SomeDude 2012-04-20 01:48:07 UTC
Compiles and runs(!) successfully on 2.059 Win32