diff --git a/ICSharpCode.Decompiler.Tests/TypeSystem/TypeSystemTestCase.cs b/ICSharpCode.Decompiler.Tests/TypeSystem/TypeSystemTestCase.cs index cfdc650a3..4a0c50fe5 100644 --- a/ICSharpCode.Decompiler.Tests/TypeSystem/TypeSystemTestCase.cs +++ b/ICSharpCode.Decompiler.Tests/TypeSystem/TypeSystemTestCase.cs @@ -272,7 +272,7 @@ namespace ICSharpCode.Decompiler.Tests.TypeSystem public interface IDerived : IBase1, IBase2 { - int Prop { get; set; } + new int Prop { get; set; } } public class ClassWithVirtualProperty diff --git a/ICSharpCode.Decompiler/CSharp/Resolver/CSharpOperators.cs b/ICSharpCode.Decompiler/CSharp/Resolver/CSharpOperators.cs index 0b630ff33..eba09ec69 100644 --- a/ICSharpCode.Decompiler/CSharp/Resolver/CSharpOperators.cs +++ b/ICSharpCode.Decompiler/CSharp/Resolver/CSharpOperators.cs @@ -170,10 +170,6 @@ namespace ICSharpCode.Decompiler.CSharp.Resolver get { return false; } } - bool IEntity.IsShadowing { - get { return false; } - } - bool IMember.IsExplicitInterfaceImplementation { get { return false; } } diff --git a/ICSharpCode.Decompiler/CSharp/Resolver/ReducedExtensionMethod.cs b/ICSharpCode.Decompiler/CSharp/Resolver/ReducedExtensionMethod.cs index 37a997261..f0a37e07a 100644 --- a/ICSharpCode.Decompiler/CSharp/Resolver/ReducedExtensionMethod.cs +++ b/ICSharpCode.Decompiler/CSharp/Resolver/ReducedExtensionMethod.cs @@ -266,13 +266,7 @@ namespace ICSharpCode.Decompiler.CSharp.Resolver return baseMethod.IsSealed; } } - - public bool IsShadowing { - get { - return baseMethod.IsShadowing; - } - } - + #endregion #region IHasAccessibility implementation diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs index 90e73ccf1..772c5b4f8 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs @@ -873,9 +873,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax } else if (typeDefinition.IsSealed) { modifiers |= Modifiers.Sealed; } - if (typeDefinition.IsShadowing) { - modifiers |= Modifiers.New; - } } ClassType classType; @@ -1268,8 +1265,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax if (member.IsSealed) m |= Modifiers.Sealed; } - if (member.IsShadowing) - m |= Modifiers.New; } return m; } diff --git a/ICSharpCode.Decompiler/Semantics/MemberResolveResult.cs b/ICSharpCode.Decompiler/Semantics/MemberResolveResult.cs index 7abf53057..772bb7e90 100644 --- a/ICSharpCode.Decompiler/Semantics/MemberResolveResult.cs +++ b/ICSharpCode.Decompiler/Semantics/MemberResolveResult.cs @@ -72,8 +72,8 @@ namespace ICSharpCode.Decompiler.Semantics case SymbolKind.Constructor: return member.DeclaringType ?? SpecialType.UnknownType; case SymbolKind.Field: - if (((IField)member).IsFixed) - return new PointerType(member.ReturnType); + //if (((IField)member).IsFixed) + // return new PointerType(member.ReturnType); break; } if (member.ReturnType.Kind == TypeKind.ByReference) diff --git a/ICSharpCode.Decompiler/TypeSystem/IEntity.cs b/ICSharpCode.Decompiler/TypeSystem/IEntity.cs index 8c7eaafe1..1d6b9db92 100644 --- a/ICSharpCode.Decompiler/TypeSystem/IEntity.cs +++ b/ICSharpCode.Decompiler/TypeSystem/IEntity.cs @@ -148,11 +148,5 @@ namespace ICSharpCode.Decompiler.TypeSystem /// /// Static classes also count as sealed classes. bool IsSealed { get; } - - /// - /// Gets whether this member is declared to be shadowing another member with the same name. - /// (C# 'new' keyword) - /// - bool IsShadowing { get; } } } diff --git a/ICSharpCode.Decompiler/TypeSystem/IField.cs b/ICSharpCode.Decompiler/TypeSystem/IField.cs index f54219a3a..23ca693ac 100644 --- a/ICSharpCode.Decompiler/TypeSystem/IField.cs +++ b/ICSharpCode.Decompiler/TypeSystem/IField.cs @@ -79,11 +79,5 @@ namespace ICSharpCode.Decompiler.TypeSystem /// Gets whether this field is volatile. /// bool IsVolatile { get; } - - /// - /// Gets whether this field is a fixed size buffer (C#-like fixed). - /// If this is true, then ConstantValue contains the size of the buffer. - /// - bool IsFixed { get; } } } diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/FakeMember.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/FakeMember.cs index d2d67c897..d433148ab 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/FakeMember.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/FakeMember.cs @@ -65,7 +65,6 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation public bool IsStatic { get; set; } bool IEntity.IsAbstract => false; bool IEntity.IsSealed => false; - bool IEntity.IsShadowing => false; public abstract SymbolKind SymbolKind { get; } @@ -107,7 +106,6 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation bool IField.IsReadOnly => false; bool IField.IsVolatile => false; - bool IField.IsFixed => false; bool IVariable.IsConst => false; object IVariable.ConstantValue => null; diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataEvent.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataEvent.cs index 17590b622..def1c93ad 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataEvent.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataEvent.cs @@ -130,8 +130,6 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation public bool IsOverride => AnyAccessor?.IsOverride ?? false; public bool IsOverridable => AnyAccessor?.IsOverridable ?? false; - bool IEntity.IsShadowing => AnyAccessor?.IsShadowing ?? false; - public IAssembly ParentAssembly => assembly; public ICompilation Compilation => assembly.Compilation; diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataField.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataField.cs index d0a7f7811..b605933ad 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataField.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataField.cs @@ -79,14 +79,7 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation public Accessibility Accessibility => MetadataLoader.GetAccessibility(attributes); public bool IsReadOnly => (attributes & FieldAttributes.InitOnly) != 0; public bool IsStatic => (attributes & FieldAttributes.Static) != 0; - - // not sure if we need IsFixed anywhere... - bool IField.IsFixed => false; - - // Do we still want IsShadowing in the TS? - // We never set it for assemblies loaded from disk; only for those parsed from C#... - bool IEntity.IsShadowing => false; - + SymbolKind ISymbol.SymbolKind => SymbolKind.Field; IMember IMember.MemberDefinition => this; TypeParameterSubstitution IMember.Substitution => TypeParameterSubstitution.Identity; diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs index a414f4a8c..c5a006633 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs @@ -422,8 +422,6 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation => (attributes & (MethodAttributes.Abstract | MethodAttributes.Virtual)) != 0 && (attributes & MethodAttributes.Final) == 0; - bool IEntity.IsShadowing => false; - public string FullName => $"{DeclaringType?.FullName}.{Name}"; public string ReflectionName => $"{DeclaringType?.ReflectionName}.{Name}"; public string Namespace => DeclaringType?.Namespace ?? string.Empty; diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataProperty.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataProperty.cs index a3540908f..2758bf6b2 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataProperty.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataProperty.cs @@ -222,8 +222,6 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation public bool IsOverride => AnyAccessor?.IsOverride ?? false; public bool IsOverridable => AnyAccessor?.IsOverridable ?? false; - bool IEntity.IsShadowing => AnyAccessor?.IsShadowing ?? false; - public IAssembly ParentAssembly => assembly; public ICompilation Compilation => assembly.Compilation; diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs index 5e2c4771f..548efd109 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs @@ -405,8 +405,6 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation public bool IsAbstract => (attributes & TypeAttributes.Abstract) != 0; public bool IsSealed => (attributes & TypeAttributes.Sealed) != 0; - bool IEntity.IsShadowing => false; - public SymbolKind SymbolKind => SymbolKind.TypeDefinition; public ICompilation Compilation => assembly.Compilation; diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedField.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedField.cs index 986757f92..9d7d2c751 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedField.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedField.cs @@ -60,10 +60,6 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation get { return fieldDefinition.IsConst; } } - public bool IsFixed { - get { return fieldDefinition.IsFixed; } - } - public object ConstantValue { get { return fieldDefinition.ConstantValue; } } diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMember.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMember.cs index 951e525b7..f80927c44 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMember.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMember.cs @@ -183,10 +183,6 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation get { return baseMember.IsSealed; } } - public bool IsShadowing { - get { return baseMember.IsShadowing; } - } - public string FullName { get { return baseMember.FullName; } } diff --git a/ICSharpCode.Decompiler/TypeSystem/VarArgInstanceMethod.cs b/ICSharpCode.Decompiler/TypeSystem/VarArgInstanceMethod.cs index a17d3e798..38180810b 100644 --- a/ICSharpCode.Decompiler/TypeSystem/VarArgInstanceMethod.cs +++ b/ICSharpCode.Decompiler/TypeSystem/VarArgInstanceMethod.cs @@ -241,10 +241,6 @@ namespace ICSharpCode.Decompiler.TypeSystem get { return baseMethod.IsSealed; } } - public bool IsShadowing { - get { return baseMethod.IsShadowing; } - } - #endregion #region IHasAccessibility implementation