Skip to content

Commit

Permalink
fix enum property getter and setter
Browse files Browse the repository at this point in the history
  • Loading branch information
oyji1992 authored and liiir1985 committed Jan 8, 2019
1 parent 38fe15f commit 082b46e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ILRuntime/Reflection/ILRuntimePropertyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public override object GetValue(object obj, BindingFlags invokeAttr, Binder bind
ctx.PushObject(obj);
for (int i = 0; i < getter.ParameterCount; i++)
{
ctx.PushObject(index[i], !getter.Parameters[i].IsPrimitive);
ctx.PushObject(index[i], !getter.Parameters[i].IsValueType);
}
ctx.Invoke();
return ctx.ReadObject(getter.ReturnType.TypeForCLR);
Expand All @@ -244,9 +244,9 @@ public override void SetValue(object obj, object value, BindingFlags invokeAttr,
ctx.PushObject(obj);
for (int i = 0; i < setter.ParameterCount - 1; i++)
{
ctx.PushObject(index[i], !setter.Parameters[i].IsPrimitive);
ctx.PushObject(index[i], !setter.Parameters[i].IsValueType);
}
ctx.PushObject(value, !setter.Parameters[setter.ParameterCount - 1].IsPrimitive);
ctx.PushObject(value, !setter.Parameters[setter.ParameterCount - 1].IsValueType);
ctx.Invoke();
}
}
Expand Down

0 comments on commit 082b46e

Please sign in to comment.