Should #line create a new namespace ?
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 24 02:23:38 PDT 2016
On 09/24/2016 10:14 AM, Basile B. wrote:
> When the file is specified, Shouldn't #line create a new module ?
>
> ===========
> module m;
>
> int a;
>
> #line 0 "other.d"
>
> int a;
> ===========
>
> Currently this is not allowed, but what's the value added by the
> filename then ?
It was used to easier debug string mixins by changing their filename in
reported errors. Now it is done by compiler by default and I don't know
if any other use case remains.
But is definitely is not intended to create a new module, D relies on
strict 1-to-1 matching between files and modules.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20160924/a29a3671/attachment.sig>
More information about the Digitalmars-d
mailing list