Error系列全局可用

This commit is contained in:
2026-04-26 04:09:35 +08:00
parent 162b92a415
commit ebceb0a260
10 changed files with 84 additions and 86 deletions
+2 -3
View File
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
@@ -136,14 +135,14 @@ public static class SimApiExtensions
if (t.IsArray)
{
var elementType = t.GetElementType();
return $"{GetSimpleTypeName(elementType, depth + 1)}[]";
return $"{GetSimpleTypeName(elementType!, depth + 1)}[]";
}
// 处理可空类型
if (Nullable.GetUnderlyingType(t) != null)
{
var underlyingType = Nullable.GetUnderlyingType(t);
return GetSimpleTypeName(underlyingType, depth + 1);
return GetSimpleTypeName(underlyingType!, depth + 1);
}
// 处理泛型类型(递归解析嵌套泛型)