druntime giving wrong line for copy assert?

Rudy Raab TransientResponse at outlook.com
Thu May 2 13:29:21 UTC 2019


On Wednesday, 1 May 2019 at 12:29:18 UTC, Rudy Raab wrote:
> On Tuesday, 30 April 2019 at 20:35:11 UTC, Bastiaan Veelo wrote:
>> On Tuesday, 30 April 2019 at 13:59:52 UTC, Rudy Raab wrote:
>>> The error was on line 36, which is the format, not my bad 
>>> slice. Is there a reason for this, or is it a bug
>>
>> The message is correct when not using dub:
>> https://run.dlang.io/is/chFTOY
>>
>> I suspect that if you remove the dub related lines and put it 
>> in an empty dub project, it will produce a correct message. So 
>> it looks like a bug in dub from where I am sitting. Maybe dub 
>> adds lines behind the scene?
>>
>> Bastiaan.
>
> I had it as a single file dub project because it was a 
> distilled version of an example from a larger dub project I was 
> working on, and I wanted to keep everything as similar as 
> possible. But you are correct, the incorrect error line only 
> appears when it's built with dub.
>
> I'll go looking at dub bugs and see if it hasn't been reported 
> yet.

As it turns out a simple test case compiled with DMD with the -g 
flag has the issue, regardless of dub. It also doesn't appear on 
Linux or with LDC on either platform, so it looks like a 
Windows-specific DMD issue.


More information about the Digitalmars-d-learn mailing list