From dcad6175e43ae98f540f4b79f131906906897a82 Mon Sep 17 00:00:00 2001 From: liiir1985 Date: Tue, 25 Aug 2020 12:55:39 +0800 Subject: [PATCH] Replaced c# 7 usage to improve compatibility --- ILRuntime/Runtime/Stack/StackObject.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]); }