This commit is contained in:
jfrijters 2006-09-20 11:29:46 +00:00
Родитель 0d9a2b80b4
Коммит aff911672e
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -136,6 +136,8 @@ final class VMSystem
private static void setSystemField(String field, Object value)
{
// MONOBUG due to a bug in mcs we currently prefix the backing fields with __<>
field = "__<>" + field;
cli.System.Type.GetType("java.lang.System")
.GetField(field, BindingFlags.wrap(BindingFlags.NonPublic | BindingFlags.Static))
.SetValue(null, value);

Просмотреть файл

@ -4157,7 +4157,10 @@ namespace IKVM.Internal
setModifiers = true;
}
}
field = typeBuilder.DefineField(fieldName, type, attribs);
// MONOBUG the __<> prefix for wrapped final fields is to work around a bug in mcs 1.1.17
// it crashes when it tries to lookup the property with the same name as the privatescope field
// http://bugzilla.ximian.com/show_bug.cgi?id=79451
field = typeBuilder.DefineField(isWrappedFinal ? "__<>" + fieldName : fieldName, type, attribs);
if(fld.IsTransient)
{
CustomAttributeBuilder transientAttrib = new CustomAttributeBuilder(typeof(NonSerializedAttribute).GetConstructor(Type.EmptyTypes), new object[0]);