Thread overview
[Issue 4294] New: Importing std.typecons in two modules while unittesting breaks program
Jun 08, 2010
Simen Kjaeraas
Jun 08, 2010
Simen Kjaeraas
Jun 08, 2010
Simen Kjaeraas
June 08, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4294

           Summary: Importing std.typecons in two modules while
                    unittesting breaks program
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: simen.kjaras@gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras@gmail.com> 2010-06-08 03:39:07 PDT ---
//////////////////////
module a;
import std.typecons;
alias Tuple!( float ) foo;

//////////////////////
module b;
import std.typecons;

//////////////////////

Compiling with "dmd a b -unittest" gives the following output:

E:\DMD\DMD2\windows\bin\..\..\src\phobos\std\typecons.d(424): Error: static
assert  (is(Tuple!(string,float) == Tuple!(string,float))) is false
E:\DMD\DMD2\windows\bin\..\..\src\phobos\std\typecons.d(413):
instantiated from here: Tuple!(string,float)
E:\DMD\DMD2\windows\bin\..\..\src\phobos\std\typecons.d(423):
instantiated from here: slice!(1,3)
E:\DMD\DMD2\windows\bin\..\..\src\phobos\std\typecons.d(420):
instantiated from here: Tuple!(int,string,float,double)
a.d(3):        instantiated from here: Tuple!(float)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 08, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4294



--- Comment #1 from Simen Kjaeraas <simen.kjaras@gmail.com> 2010-06-08 03:57:39 PDT ---
Allow me to rectify a mistake in the original post. "dmd a b -unittest" compiles with no problems. "dmd b a -unittest" is what causes the posted bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 08, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4294


Simen Kjaeraas <simen.kjaras@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #2 from Simen Kjaeraas <simen.kjaras@gmail.com> 2010-06-08 06:41:43 PDT ---
*** This issue has been marked as a duplicate of issue 4003 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------