[Mono-bugs] [Bug 553650] New: TypeManager.IsValueTyep broken during bootstrap build

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Nov 8 14:18:16 EST 2009


           Summary: TypeManager.IsValueTyep broken during bootstrap build
    Classification: Mono
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: miguel at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

While implementing some .NET 4.0 I had to write this in mscorlib in

    return buffer.Read<byte> ((ulong) position);

This produces the following compiler error:

System.IO/UnmanagedMemoryAccessor.cs(300,32): error CS0453: The type `byte'
must be a non-nullable value type in order to use it as type parameter `T' in
the generic type or method
`System.Runtime.InteropServices.SafeBuffer.Write<T>(ulong, T)'.

This is because ConstraintChecker.CheckConstraints gets a false from calling
TypeManager.IsValueType () on the byte.

Notice that:
TypeManager.IsValueType (this_byte) returns false, but this_byte.BaseType ==
typeof (System.ValueType)

Which indicates that the the TypeManager.value_type is pointing to the newly
defined value_type, but somehow the type for the type parameter (byte) is set
to the host corlib "byte" type as opposed to the bootstrapping corlib "byte"

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list