June 08, 2010
On Tue, 08 Jun 2010 19:39:43 +0900, Simen kjaeraas <simen.kjaras@gmail.com> wrote:

> Simen kjaeraas <simen.kjaras@gmail.com> wrote:
>
>> Lars T. Kyllingstad <public@kyllingen.nospamnet> wrote:
>>
>>> FWIW, I've run across the same error, while writing code that had nothing
>>> to do with tuples.  And I've seen others complaining about it too.  It
>>> seems to be a rather elusive bug in Phobos.
>>
>> This has now been tracked down to the importing of std.typecons in two
>> included files.
>>
>> Test case:
>>
>> //////////////////////
>> module a;
>> import std.typecons;
>> alias Tuple!( float ) foo;
>>
>> //////////////////////
>> module b;
>> import std.typecons;
>
> Forgot to mention, this only happens with -unittest.
> http://d.puremagic.com/issues/show_bug.cgi?id=4294
>

Same issue?
http://d.puremagic.com/issues/show_bug.cgi?id=4003
June 08, 2010
On Tue, 08 Jun 2010 21:10:54 +0900, Masahiro Nakagawa wrote:

> On Tue, 08 Jun 2010 19:39:43 +0900, Simen kjaeraas <simen.kjaras@gmail.com> wrote:
> 
>> Simen kjaeraas <simen.kjaras@gmail.com> wrote:
>>
>>> Lars T. Kyllingstad <public@kyllingen.nospamnet> wrote:
>>>
>>>> FWIW, I've run across the same error, while writing code that had
>>>> nothing
>>>> to do with tuples.  And I've seen others complaining about it too.
>>>> It seems to be a rather elusive bug in Phobos.
>>>
>>> This has now been tracked down to the importing of std.typecons in two included files.
>>>
>>> Test case:
>>>
>>> //////////////////////
>>> module a;
>>> import std.typecons;
>>> alias Tuple!( float ) foo;
>>>
>>> //////////////////////
>>> module b;
>>> import std.typecons;
>>
>> Forgot to mention, this only happens with -unittest. http://d.puremagic.com/issues/show_bug.cgi?id=4294
>>
>>
> Same issue? http://d.puremagic.com/issues/show_bug.cgi?id=4003

Definitely.  Simen's test case is slightly better, though, since it doesn't bring std.stdio into the mix.

-Lars
June 23, 2010
Simen kjaeraas wrote:

> "dmd a b -unittest" works. "dmd b a -unittest" does not.

This may explain a problem that I hit recently.

I had had all of a program's code in a single file. Then I started pulling classes to their respective source files one by one. As I did that, of course I compiled and run the application to see that everything still worked.

At some point, even though all the unittest blocks were commented out, compiling with -unittest would cause a segmentation fault in the built application.

The problem went away as I pulled more classes out of the main source file.

Ali
1 2
Next ›   Last »