properly fix scoped name for generic arrays
This commit is contained in:
@@ -10,11 +10,11 @@
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||
<Version>2023.1</Version>
|
||||
<Company>Noisy Cow Studios</Company>
|
||||
<Product>Il2CppInspector Command-Line Edition</Product>
|
||||
<Copyright>(c) 2017-2021 Katy Coe - www.djkaty.com - www.github.com/djkaty</Copyright>
|
||||
<PackageId>Il2CppInspector.CLI</PackageId>
|
||||
<Authors>Katy Coe</Authors>
|
||||
<Company>LukeFZ, Noisy Cow Studios</Company>
|
||||
<Product>Il2CppInspectorRedux Command-Line Edition</Product>
|
||||
<Copyright>(c) 2023-2024 LukeFZ - https://github.com/LukeFZ, original (c) 2017-2021 Katy Coe - www.djkaty.com - www.github.com/djkaty</Copyright>
|
||||
<PackageId>Il2CppInspectorRedux.CLI</PackageId>
|
||||
<Authors>LukeFZ, Katy Coe</Authors>
|
||||
<AssemblyName>Il2CppInspector</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -414,10 +414,6 @@ namespace Il2CppInspector.Reflection
|
||||
// Returns the minimally qualified type name required to refer to this type within the specified scope
|
||||
private string getScopedFullName(Scope scope)
|
||||
{
|
||||
// Generic type parameters take precedence over all other names, so if FullName is null (== generic) we can just return the name itself
|
||||
if (FullName == null)
|
||||
return this.Name;
|
||||
|
||||
// This is the type to be used (generic type parameters have a null FullName)
|
||||
var usedType = FullName.Replace('+', '.');
|
||||
|
||||
@@ -581,8 +577,8 @@ namespace Il2CppInspector.Reflection
|
||||
if (usingScope == null)
|
||||
return CSharpName;
|
||||
|
||||
// Generic parameters don't have a scope
|
||||
if (IsGenericParameter)
|
||||
// Generic parameters (or generic arrays) don't have a scope
|
||||
if (HasNoScope)
|
||||
return CSharpName;
|
||||
|
||||
var s = Namespace + "." + base.Name;
|
||||
@@ -716,6 +712,8 @@ namespace Il2CppInspector.Reflection
|
||||
// Helper function for determining if using this type as a field, parameter etc. requires that field or method to be declared as unsafe
|
||||
public bool RequiresUnsafeContext => IsPointer || (HasElementType && ElementType.RequiresUnsafeContext);
|
||||
|
||||
public bool HasNoScope => IsGenericParameter || (HasElementType && ElementType.HasNoScope);
|
||||
|
||||
// May get overridden by Il2CppType-based constructor below
|
||||
public override MemberTypes MemberType { get; } = MemberTypes.TypeInfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user