D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7344 - Function-as-array-method doesn't work with local imports
Summary: Function-as-array-method doesn't work with local imports
Status: RESOLVED DUPLICATE of issue 6185
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2012-01-21 19:04 UTC by bearophile_hugs
Modified: 2012-01-21 19:41 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-01-21 19:04:59 UTC
This is a spinoff of bug 6272, that was not fully fixed.


void main() {
    import std.algorithm;
    auto data = new int[10];
    sort(data); // OK
    data.sort(); // line 5, Error
}



The latest DMD 2.058head gives:

test.d(5): Error: undefined identifier module test.sort


This version gives the same error:

void main() {
    import std.algorithm: sort;
    auto data = new int[10];
    sort(data); // OK
    data.sort(); // line 5, Error
}
Comment 1 Andrej Mitrovic 2012-01-21 19:30:25 UTC
Dup of Issue 6185?
Comment 2 bearophile_hugs 2012-01-21 19:41:29 UTC

*** This issue has been marked as a duplicate of issue 6185 ***