__FILE__ and __LINE__ in case of import expression

Adam D. Ruppe destructionator at gmail.com
Fri Aug 21 21:08:16 UTC 2020


On Friday, 21 August 2020 at 21:06:11 UTC, Steven Schveighoffer 
wrote:
> The hybrid line number (original source line number + mixin 
> line number) seems like a bug to me.

I'm not so sure without seeing all the code. Remember to the 
compiler, the mixin thing is just a big string literal at the 
location of the import statement.

So it adds the number of \n's in the string literal to the 
original line number to get the mixin line number.


More information about the Digitalmars-d-learn mailing list