From 57894d06e7ef61ca09bd386627ad618baa25e14e Mon Sep 17 00:00:00 2001
From: fengjiayi <12821976+ning_xi@user.noreply.gitee.com>
Date: Tue, 27 Jan 2026 18:00:16 +0800
Subject: [PATCH] =?UTF-8?q?fix(helper)=20:=20=E4=BF=AE=E5=A4=8D=20EmitHelp?=
=?UTF-8?q?er=20=E6=9C=AA=E6=AD=A3=E7=A1=AE=E5=A4=84=E7=90=86=E5=80=BC?=
=?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=BF=94=E5=9B=9E=E5=80=BC=E7=9A=84Task?=
=?UTF-8?q?=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Library/Serein.Library.csproj | 4 ++--
Library/Utils/EmitHelper.cs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Library/Serein.Library.csproj b/Library/Serein.Library.csproj
index 3c06abf..3e4a1f0 100644
--- a/Library/Serein.Library.csproj
+++ b/Library/Serein.Library.csproj
@@ -16,7 +16,7 @@
no
- true
+ False
true
true
@@ -90,7 +90,7 @@
-
+
diff --git a/Library/Utils/EmitHelper.cs b/Library/Utils/EmitHelper.cs
index 6510ede..0177062 100644
--- a/Library/Utils/EmitHelper.cs
+++ b/Library/Utils/EmitHelper.cs
@@ -206,7 +206,7 @@ namespace Serein.Library.Utils
il.Emit(isStatic ? OpCodes.Call : OpCodes.Callvirt, methodInfo);
// 如果是泛型Task
- if (isTaskGeneric && taskResultType is not null)
+ if (isTaskGeneric && methodInfo.ReturnType.IsValueType && taskResultType is not null)
{
var convertMethod = typeof(EmitHelper)
.GetMethod(nameof(ConvertTaskResult),