unittest compiles w/o error though module file is not named after the module
ag0aep6g
anonymous at example.com
Sat Feb 6 15:40:15 UTC 2021
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 (version 2)
> // import x;
> unittest {
> // import pp: foo; // wrong name is accepted if x is imported
> import p: foo;
> foo;
> }
> ```
Looks like <https://issues.dlang.org/show_bug.cgi?id=15086>.
More information about the Digitalmars-d-learn
mailing list