Scope of import
Mike Parker
aldacron at gmail.com
Sat May 15 07:27:57 UTC 2021
On Saturday, 15 May 2021 at 07:15:51 UTC, DLearner wrote:
> On Saturday, 15 May 2021 at 07:05:00 UTC, Mike Parker wrote:
>>
>> That's odd. What's your command line?
>>
> rdmd main.d
Okay, so it's definitely a bug in rdmd. Change module A to look
like this and it works properly:
```d
module A;
import B;
void fnA1() {
import std.stdio;
writeln("Entered fnA1");
fnB1();
writeln("Leaving fnA1");
}
```
More information about the Digitalmars-d-learn
mailing list