Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
September 15, 2007 import bug | ||||
---|---|---|---|---|
| ||||
--module 1--- private import std.cstream; void main(){} -- module 2 -- import std.stdio; void B() { std.file.read(__FILE__); } --- if the import in module 1 is removed std.file.read in module 2 quits working |
September 15, 2007 Re: import bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | BCS wrote:
> --module 1---
> private import std.cstream;
> void main(){}
> -- module 2 --
> import std.stdio;
> void B()
> {
> std.file.read(__FILE__); }
> ---
>
> if the import in module 1 is removed std.file.read in module 2 quits working
What do you mean quits working? Fails to compile, or link, or execute properly?
--bb
|
September 15, 2007 Re: import bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | BCS wrote: > --module 1--- > private import std.cstream; > void main(){} > -- module 2 -- > import std.stdio; > void B() > { > std.file.read(__FILE__); } > --- > > if the import in module 1 is removed std.file.read in module 2 quits working > Your examples are somewhat incomplete, but I strongly suspect they're the same as one of these old bugs: http://d.puremagic.com/issues/show_bug.cgi?id=313 http://d.puremagic.com/issues/show_bug.cgi?id=314 Later, Brad |
September 15, 2007 Re: import bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Reply to Bill,
> BCS wrote:
>
>> --module 1---
>> private import std.cstream;
>> void main(){}
>> -- module 2 --
>> import std.stdio;
>> void B()
>> {
>> std.file.read(__FILE__); }
>> ---
>> if the import in module 1 is removed std.file.read in module 2 quits
>> working
>>
> What do you mean quits working? Fails to compile, or link, or execute
> properly?
>
> --bb
>
Fails to compile:
b.d(4): Error: undefined identifier package std.file
|
September 15, 2007 Re: import bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | Reply to Brad,
> BCS wrote:
>
>> --module 1---
>> private import std.cstream;
>> void main(){}
>> -- module 2 --
>> import std.stdio;
>> void B()
>> {
>> std.file.read(__FILE__); }
>> ---
>> if the import in module 1 is removed std.file.read in module 2 quits
>> working
>>
> Your examples are somewhat incomplete, but I strongly suspect they're
> the same as one of these old bugs:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=313
> http://d.puremagic.com/issues/show_bug.cgi?id=314
> Later,
> Brad
It is slightly different in that module 2 doesn't import module 1.
If you compile them together (dmd mod1.d mod2.d) it works. By it's self though (dmd mod2.d -c), module 2 doesn't work.
|
September 15, 2007 Re: import bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | BCS wrote:
> Reply to Brad,
>
>> BCS wrote:
>>
>>> --module 1---
>>> private import std.cstream;
>>> void main(){}
>>> -- module 2 --
>>> import std.stdio;
>>> void B()
>>> {
>>> std.file.read(__FILE__); }
>>> ---
>>> if the import in module 1 is removed std.file.read in module 2 quits
>>> working
>>>
>> Your examples are somewhat incomplete, but I strongly suspect they're
>> the same as one of these old bugs:
>>
>> http://d.puremagic.com/issues/show_bug.cgi?id=313
>> http://d.puremagic.com/issues/show_bug.cgi?id=314
>> Later,
>> Brad
>
> It is slightly different in that module 2 doesn't import module 1.
> If you compile them together (dmd mod1.d mod2.d) it works. By it's self though (dmd mod2.d -c), module 2 doesn't work.
Sounds like a new one, though potentially related. Would you put together a bug report with the repro steps.
|
September 15, 2007 Re: import bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | Reply to Brad,
> BCS wrote:
>
>> Reply to Brad,
>>
>>> BCS wrote:
>>>
>>>> --module 1---
>>>> private import std.cstream;
>>>> void main(){}
>>>> -- module 2 --
>>>> import std.stdio;
>>>> void B()
>>>> {
>>>> std.file.read(__FILE__); }
>>>> ---
>>>> if the import in module 1 is removed std.file.read in module 2
>>>> quits
>>>> working
>>> Your examples are somewhat incomplete, but I strongly suspect
>>> they're the same as one of these old bugs:
>>>
>>> http://d.puremagic.com/issues/show_bug.cgi?id=313
>>> http://d.puremagic.com/issues/show_bug.cgi?id=314
>>> Later,
>>> Brad
>> It is slightly different in that module 2 doesn't import module 1.
>> If you compile them together (dmd mod1.d mod2.d) it works. By it's
>> self
>> though (dmd mod2.d -c), module 2 doesn't work.
> Sounds like a new one, though potentially related. Would you put
> together a bug report with the repro steps.
>
OK
|
Copyright © 1999-2021 by the D Language Foundation