www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 732] New: Boxer unit test fails

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=732

           Summary: Boxer unit test fails
           Product: D
           Version: 0.177
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: dvdfrdmn users.sf.net


Running the Phobos unittest program yields:

  Error: Unboxed bool as int; however, unboxable says it should fail.

Fix: Replace line 709:

             return *cast(void**) value.data;
         if (isArrayTypeInfo(value.type))
             return *cast(void[]*) value.data;
-        if (typeid(Object) == value.type)
             return *cast(Object*) value.data;

         throw new UnboxException(value, typeid(T));

with:

+        if (cast(TypeInfo_Class) value.type)

Note: Typeinfo_Interface probably also needs to be handled here and in
unboxable().


-- 
Dec 23 2006
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=732


braddr puremagic.com changed:

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




------- Comment #1 from braddr puremagic.com  2007-10-28 03:25 -------
Fixed in dmd release 1.022 and 2.006


-- 
Oct 28 2007