From b2a8a733dec757808294c02b0bbd481baeafd63e Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 28 Feb 2019 17:13:39 -0800 Subject: [PATCH] Remove unused cached types (#9015) These types are not used in PowerShell code base and should be removed. ## PR Context The dotnet 3.0.100-preview3-010406 version added overloads to `string.get_Chars` and hence we cannot resolved which overload to load. Thus, we get an type load exception. Since we are no using this type, it is better to remove it. --- src/System.Management.Automation/engine/parser/Compiler.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/System.Management.Automation/engine/parser/Compiler.cs b/src/System.Management.Automation/engine/parser/Compiler.cs index 2b641bf9b5..18f4051c37 100644 --- a/src/System.Management.Automation/engine/parser/Compiler.cs +++ b/src/System.Management.Automation/engine/parser/Compiler.cs @@ -222,9 +222,6 @@ namespace System.Management.Automation.Language internal static readonly MethodInfo IComparable_CompareTo = typeof(IComparable).GetMethod(nameof(IComparable.CompareTo)); - internal static readonly MethodInfo IDictionary_set_Item = - typeof(IDictionary).GetMethod("set_Item"); - internal static readonly MethodInfo IDisposable_Dispose = typeof(IDisposable).GetMethod(nameof(IDisposable.Dispose)); @@ -452,8 +449,6 @@ namespace System.Management.Automation.Language typeof(string).GetMethod(nameof(string.Equals), staticPublicFlags, null, CallingConventions.Standard, new Type[] { typeof(string), typeof(string), typeof(StringComparison) }, null); - internal static readonly MethodInfo String_get_Chars = - typeof(string).GetMethod("get_Chars"); internal static readonly PropertyInfo String_Length = typeof(string).GetProperty(nameof(string.Length));