Immutability, problems with debugging

Nathan M. Swan nathanmswan at gmail.com
Fri Feb 17 02:53:13 PST 2012


On Friday, 17 February 2012 at 10:49:19 UTC, Nathan M. Swan wrote:
> I'm working on a novice solver of the travelling salesman 
> problem, and when I decided to go concurrent I had to make 
> everything immutable. Now this happens:
>
>      /usr/share/dmd/src/phobos/std/format.d(1782): Error: 
> function object.Object.toString () is not callable using 
> argument types () immutable
>
> Unfortunately, I don't know how format is called, so I can't 
> investigate closer. Does anyone notice anything glaringly 
> obvious?
>
> https://github.com/carlor/tsp.d/blob/master/tsp.d
>
> This brings up an issue that's happened before; there's an 
> error in the semantics of a (usually generic) function call, 
> and I don't know where the function is called. It would be nice 
> if the compiler could do something like "mentioned on 
> file1.d(33), mentioned on file2.d(107)".
>
> Thanks, NMS

Sorry about the duplicate post, something weird went on with the 
forum interface.


More information about the Digitalmars-d mailing list