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

Arafel er.krali at gmail.com
Thu Nov 2 13:37:01 UTC 2023


On 02.11.23 14:15, Arafel wrote:
> 
> You simply can't expect to do `import waffle.foo` from within `waffle/` 
> itself (unless you have another `waffle` folder in it, which is often 
> the case).


Sorry, this is wrong. It should read:

You simply can't expect to do `import waffle.foo` **when invoking the 
compiler** within `waffle/` itself (unless you have another `waffle` 
folder in it, which is often the case).

You are actually perfectly fine to import other parts of the same 
package, as long as you run the compiler from right outside the package, 
or adjust the import paths accordingly.


More information about the Digitalmars-d-learn mailing list