http://bugzilla.novell.com/show_bug.cgi?id=553650
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: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Found By: ---
While implementing some .NET 4.0 I had to write this in mscorlib in
UnmanagedMemoryAccessor.cs:
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"
type.
--
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs