Keyword "package" prevents from importing a package module "package.d"

BoQsc vaidas.boqsc at gmail.com
Thu Nov 2 11:57:57 UTC 2023


On Thursday, 2 November 2023 at 11:32:40 UTC, Imperatorn wrote:
> On Thursday, 2 November 2023 at 11:12:58 UTC, BoQsc wrote:
>> On Thursday, 2 November 2023 at 10:53:12 UTC, Arafel wrote:
>>> On 02.11.23 11:45, BoQsc wrote:
>>>> Edit incorrect link to example:
>>>>> #### [Extensive run.dlang.io 
>>>>> example](https://run.dlang.io/is/f3jURn)
>>>> 
>>>> Correct link:
>>>> https://run.dlang.io/is/Zbrn75
>
>
> ```d
> --- waffles/program.d
> import waffles;
>
> void main()
> {
>     import std;
>
>     writeln(num);
> }
>
> --- waffles/package.d
> module waffles;
>
> public import waffles.testing1;
> public import waffles.testing2;
>
> --- waffles/testing1.d
> int num = 5;
>
> --- waffles/testing2.d
> int num2 = 9;
> ```

`num` and `num2` was never a problem.

The current major problem is that it does not work on Windows 
operating system with either `rdmd` or `dmd`. While it does work 
on run.dlang.io.


More information about the Digitalmars-d-learn mailing list