Embedded Containers

A Guy With a Question aguywithanquestion at gmail.com
Tue Dec 5 19:28:49 UTC 2017


On Tuesday, 5 December 2017 at 19:19:50 UTC, colin wrote:
> On Tuesday, 5 December 2017 at 19:13:10 UTC, A Guy With a 
> Question wrote:
>> On Tuesday, 5 December 2017 at 19:09:50 UTC, Adam D. Ruppe 
>> wrote:
>>> [...]
>>
>> Ok, so that worked. I still have the problem with importing 
>> though:
>>
>> mypackage: Item
>>
>> seems to generate the error:
>>
>> "Error: undefined identifier 'Item'"
>>
>> Which is weird, because I'm able to bring in Array through 
>> std.container.array: Array;
>
> Is Item public in your package?

Yes. I fixed it by not referencing it by the package but by the 
file specific module I created. That worked. All errors are 
resolved now. Thanks!

I think maybe the import issue was because there was a circular 
import happening.

So I have a few sub modules:

    module
       item.d
       other.d
    package.d

where other.d uses Item from item.d. But I was pulling item from 
package. When I pulled it directly from item.d it compiled fine. 
So maybe it can't handle the circular referencing there.


More information about the Digitalmars-d mailing list