D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6465 - Selective imports don't work from inside a function
Summary: Selective imports don't work from inside a function
Status: RESOLVED DUPLICATE of issue 6272
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2011-08-10 11:32 UTC by David Simcha
Modified: 2011-08-10 20:44 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 David Simcha 2011-08-10 11:32:16 UTC
/////////////////////////////////////////////////

module a;

void main() {
    import b : foo;

    foo();
}

/////////////////////////////////////////////////

module b;

void foo() {
    import std.stdio;

    writeln("FOO");
}

////////////////////////////////////////////////

$ dmd a.d b.d
a.d(6): Error: undefined identifier foo
Comment 1 bearophile_hugs 2011-08-10 11:49:10 UTC
Like bug 6272 ?
Comment 2 David Simcha 2011-08-10 20:44:07 UTC
(In reply to comment #1)
> Like bug 6272 ?

Yes, thanks.  Closing as a duplicate.

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