CS: Don't output redundant interfaces in type declarations
This commit is contained in:
@@ -578,7 +578,7 @@ namespace Il2CppInspector.Outputs
|
||||
|
||||
sb.Append(prefix + type.GetModifierString());
|
||||
|
||||
var @base = type.ImplementedInterfaces.Select(x => x.GetScopedCSharpName(scope, isPartOfTypeDeclaration: true)).ToList();
|
||||
var @base = type.NonInheritedInterfaces.Select(x => x.GetScopedCSharpName(scope, isPartOfTypeDeclaration: true)).ToList();
|
||||
if (type.BaseType != null && type.BaseType.FullName != "System.Object" && type.BaseType.FullName != "System.ValueType" && !type.IsEnum)
|
||||
@base.Insert(0, type.BaseType.GetScopedCSharpName(scope, isPartOfTypeDeclaration: true));
|
||||
if (type.IsEnum && type.GetEnumUnderlyingType().FullName != "System.Int32") // enums derive from int by default
|
||||
|
||||
Reference in New Issue
Block a user