On 06.02.21 16:05, kdevel wrote:
On Saturday, 6 February 2021 at 14:52:57 UTC, Adam D. Ruppe wrote:
[...]
That one `import p;` is kinda weird, it should probably complain then
you imported one thing and got another, but generally the name not
matching is no problem at all.
```main.d
On Saturday, 6 February 2021 at 14:52:57 UTC, Adam D. Ruppe wrote:
[...]
That one `import p;` is kinda weird, it should probably
complain then you imported one thing and got another, but
generally the name not matching is no problem at all.
```main.d (version 2)
// import x;
unittest {
//
Module names and file names are completely independent on the
language level. You can have a file `whatever.d` with `module
foo.bar.totally.different;` and `import
foo.bar.totally.different` and it all works as long as you add
the whatever.d to the build.
The only reason people recommend