diff --git a/ILRuntime/Runtime/Stack/StackObject.cs b/ILRuntime/Runtime/Stack/StackObject.cs index 579616be..7438ca9c 100644 --- a/ILRuntime/Runtime/Stack/StackObject.cs +++ b/ILRuntime/Runtime/Stack/StackObject.cs @@ -223,7 +223,8 @@ public unsafe static void Initialized(StackObject* esp, IType type) } else if (type.IsEnum) { - if(type is ILType ilType) + ILType ilType = type as ILType; + if (ilType != null) { Initialized(esp, ilType.FieldTypes[0]); }