Skip to content

Commit

Permalink
[f] 修复ILRuntimeFieldInfo无法正确读取常量的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
汤非凡 committed Jun 8, 2022
1 parent 33c6c00 commit 98d7db4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ILRuntime/Reflection/ILRuntimeFieldInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ public override object GetValue(object obj)
ILTypeInstance ins;
if (isStatic)
{
if (definition.HasConstant)
return definition.Constant;
ins = ilType.StaticInstance;
}
else
Expand Down

0 comments on commit 98d7db4

Please sign in to comment.