Output: Fix failure to render indexer argument in some cases
This commit is contained in:
@@ -222,7 +222,7 @@ namespace Il2CppInspector
|
||||
writer.Write($"{prop.Name} {{ ");
|
||||
// Indexer
|
||||
else
|
||||
writer.Write("this[" + string.Join(", ", primary.DeclaredParameters.SkipLast(getAccess > setAccess? 0 : 1).Select(p => p.GetParameterString())) + "] { ");
|
||||
writer.Write("this[" + string.Join(", ", primary.DeclaredParameters.SkipLast(getAccess >= setAccess? 0 : 1).Select(p => p.GetParameterString())) + "] { ");
|
||||
|
||||
writer.Write((prop.CanRead? prop.GetMethod.CustomAttributes.Where(a => !SuppressGenerated || a.AttributeType.FullName != CGAttribute).ToString(inline: true)
|
||||
+ (getAccess < setAccess? prop.GetMethod.GetAccessModifierString() : "") + "get; " : "")
|
||||
|
||||
@@ -14,7 +14,7 @@ internal class Test // TypeDefIndex: 1811
|
||||
public string this[int i] { get; } // 0x00561328
|
||||
public string this[double d] { get; } // 0x00561384
|
||||
public string this[long l] { set; } // 0x005613DC
|
||||
public string this[] { get; set; } // 0x005613E0 0x0056143C
|
||||
public string this[float f] { get; set; } // 0x005613E0 0x0056143C
|
||||
public bool this[int i, int j] { get; } // 0x00561440
|
||||
|
||||
// Constructors
|
||||
|
||||
Reference in New Issue
Block a user