소스 검색

Bump corefx

Marek Safar 8 년 전
부모
커밋
28d577d63f

+ 1 - 1
external/corefx

@@ -1 +1 @@
-Subproject commit a91f66cda2e4b2beec97a8a6515898bdeac2aeb7
+Subproject commit 335d3b14bbed096b974235418127055583d9acac

+ 2 - 26
mcs/class/Microsoft.CSharp/corefx/SR.cs

@@ -5,15 +5,9 @@
 partial class SR
 {
 	public const string InternalCompilerError = "An unexpected exception occurred while binding a dynamic operation";
-	public const string BindRequireArguments = "Cannot bind call with no calling object";
-	public const string BindCallFailedOverloadResolution = "Overload resolution failed";
-	public const string BindBinaryOperatorRequireTwoArguments = "Binary operators must be invoked with two arguments";
-	public const string BindUnaryOperatorRequireOneArgument = "Unary operators must be invoked with one argument";
 	public const string BindPropertyFailedMethodGroup = "The name '{0}' is bound to a method and cannot be used like a property";
 	public const string BindPropertyFailedEvent = "The event '{0}' can only appear on the left hand side of +";
 	public const string BindInvokeFailedNonDelegate = "Cannot invoke a non-delegate type";
-	public const string BindBinaryAssignmentRequireTwoArguments = "Binary operators cannot be invoked with one argument";
-	public const string BindBinaryAssignmentFailedNullReference = "Cannot perform member assignment on a null reference";
 	public const string NullReferenceOnMemberException = "Cannot perform runtime binding on a null reference";
 	public const string BindCallToConditionalMethod = "Cannot dynamically invoke method '{0}' because it has a Conditional attribute";
 	public const string BindToVoidMethodButExpectResult = "Cannot implicitly convert type 'void' to 'object'";
@@ -32,18 +26,13 @@ partial class SR
 	public const string ObjectRequired = "An object reference is required for the non-static field, method, or property '{0}'";
 	public const string AmbigCall = "The call is ambiguous between the following methods or properties: '{0}' and '{1}'";
 	public const string BadAccess = "'{0}' is inaccessible due to its protection level";
-	public const string MethDelegateMismatch = "No overload for '{0}' matches delegate '{1}'";
 	public const string AssgLvalueExpected = "The left-hand side of an assignment must be a variable, property or indexer";
 	public const string NoConstructors = "The type '{0}' has no constructors defined";
-	public const string BadDelegateConstructor = "The delegate '{0}' does not have a valid constructor";
 	public const string PropertyLacksGet = "The property or indexer '{0}' cannot be used in this context because it lacks the get accessor";
 	public const string ObjectProhibited = "Member '{0}' cannot be accessed with an instance reference; qualify it with a type name instead";
 	public const string AssgReadonly = "A readonly field cannot be assigned to (except in a constructor or a variable initializer)";
-	public const string RefReadonly = "A readonly field cannot be passed ref or out (except in a constructor)";
 	public const string AssgReadonlyStatic = "A static readonly field cannot be assigned to (except in a static constructor or a variable initializer)";
-	public const string RefReadonlyStatic = "A static readonly field cannot be passed ref or out (except in a static constructor)";
 	public const string AssgReadonlyProp = "Property or indexer '{0}' cannot be assigned to -- it is read only";
-	public const string RefProperty = "A property or indexer may not be passed as an out or ref parameter";
 	public const string UnsafeNeeded = "Dynamic calls cannot be used in conjunction with pointers";
 	public const string BadBoolOp = "In order to be applicable as a short circuit operator a user-defined logical operator ('{0}') must have the same return type as the type of its 2 parameters";
 	public const string MustHaveOpTF = "The type ('{0}') must contain declarations of operator true and operator false";
@@ -53,7 +42,6 @@ partial class SR
 	public const string InaccessibleGetter = "The property or indexer '{0}' cannot be used in this context because the get accessor is inaccessible";
 	public const string InaccessibleSetter = "The property or indexer '{0}' cannot be used in this context because the set accessor is inaccessible";
 	public const string BadArity = "Using the generic {1} '{0}' requires '{2}' type arguments";
-	public const string BadTypeArgument = "The type '{0}' may not be used as a type argument";
 	public const string TypeArgsNotAllowed = "The {1} '{0}' cannot be used with type arguments";
 	public const string HasNoTypeVars = "The non-generic {1} '{0}' cannot be used with type arguments";
 	public const string NewConstraintNotSatisfied = "'{2}' must be a non-abstract type with a public parameterless constructor in order to use it as parameter '{1}' in the generic type or method '{0}'";
@@ -61,39 +49,26 @@ partial class SR
 	public const string GenericConstraintNotSatisfiedNullableEnum = "The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. The nullable type '{3}' does not satisfy the constraint of '{1}'.";
 	public const string GenericConstraintNotSatisfiedNullableInterface = "The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. The nullable type '{3}' does not satisfy the constraint of '{1}'. Nullable types can not satisfy any interface constraints.";
 	public const string GenericConstraintNotSatisfiedValType = "The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. There is no boxing conversion from '{3}' to '{1}'.";
-	public const string TypeVarCantBeNull = "Cannot convert null to type parameter '{0}' because it could be a non-nullable value type. Consider using 'default({0})' instead.";
-	public const string BadRetType = "'{1} {0}' has the wrong return type";
 	public const string CantInferMethTypeArgs = "The type arguments for method '{0}' cannot be inferred from the usage. Try specifying the type arguments explicitly.";
-	public const string MethGrpToNonDel = "Cannot convert method group '{0}' to non-delegate type '{1}'. Did you intend to invoke the method?";
 	public const string RefConstraintNotSatisfied = "The type '{2}' must be a reference type in order to use it as parameter '{1}' in the generic type or method '{0}'";
 	public const string ValConstraintNotSatisfied = "The type '{2}' must be a non-nullable value type in order to use it as parameter '{1}' in the generic type or method '{0}'";
 	public const string AmbigUDConv = "Ambiguous user defined conversions '{0}' and '{1}' when converting from '{2}' to '{3}'";
 	public const string BindToBogus = "'{0}' is not supported by the language";
 	public const string CantCallSpecialMethod = "'{0}': cannot explicitly call operator or accessor";
 	public const string ConvertToStaticClass = "Cannot convert to static type '{0}'";
-	public const string GenericArgIsStaticClass = "'{0}': static types cannot be used as type arguments";
 	public const string IncrementLvalueExpected = "The operand of an increment or decrement operator must be a variable, property or indexer";
-	public const string BadArgCount = "No overload for method '{0}' takes '{1}' arguments";
+	public const string BadArgCount = "No overload for method '{0}' takes {1} arguments";
 	public const string BadArgTypes = "The best overloaded method match for '{0}' has some invalid arguments";
-	public const string RefLvalueExpected = "A ref or out argument must be an assignable variable";
 	public const string BadProtectedAccess = "Cannot access protected member '{0}' via a qualifier of type '{1}'; the qualifier must be of type '{2}' (or derived from it)";
 	public const string BindToBogusProp2 = "Property, indexer, or event '{0}' is not supported by the language; try directly calling accessor methods '{1}' or '{2}'";
 	public const string BindToBogusProp1 = "Property, indexer, or event '{0}' is not supported by the language; try directly calling accessor method '{1}'";
 	public const string BadDelArgCount = "Delegate '{0}' does not take '{1}' arguments";
 	public const string BadDelArgTypes = "Delegate '{0}' has some invalid arguments";
-	public const string AssgReadonlyLocal = "Cannot assign to '{0}' because it is read-only";
-	public const string RefReadonlyLocal = "Cannot pass '{0}' as a ref or out argument because it is read-only";
 	public const string ReturnNotLValue = "Cannot modify the return value of '{0}' because it is not a variable";
 	public const string AssgReadonly2 = "Members of readonly field '{0}' cannot be modified (except in a constructor or a variable initializer)";
-	public const string RefReadonly2 = "Members of readonly field '{0}' cannot be passed ref or out (except in a constructor)";
 	public const string AssgReadonlyStatic2 = "Fields of static readonly field '{0}' cannot be assigned to (except in a static constructor or a variable initializer)";
-	public const string RefReadonlyStatic2 = "Fields of static readonly field '{0}' cannot be passed ref or out (except in a static constructor)";
-	public const string AssgReadonlyLocalCause = "Cannot assign to '{0}' because it is a '{1}'";
-	public const string RefReadonlyLocalCause = "Cannot pass '{0}' as a ref or out argument because it is a '{1}'";
-	public const string DelegateOnNullable = "Cannot bind delegate to '{0}' because it is a member of 'System.Nullable<T>'";
 	public const string BadCtorArgCount = "'{0}' does not contain a constructor that takes '{1}' arguments";
 	public const string NonInvocableMemberCalled = "Non-invocable member '{0}' cannot be used like a method.";
-	public const string NamedArgumentSpecificationBeforeFixedArgument = "Named argument specifications must appear after all fixed arguments have been specified";
 	public const string BadNamedArgument = "The best overload for '{0}' does not have a parameter named '{1}'";
 	public const string BadNamedArgumentForDelegateInvoke = "The delegate '{0}' does not have a parameter named '{1}'";
 	public const string DuplicateNamedArgument = "Named argument '{0}' cannot be specified multiple times";
@@ -101,4 +76,5 @@ partial class SR
 	public const string TypeArgumentRequiredForStaticCall = "The first argument to dynamically-bound static or constructor call must be a Type";
 	public const string DynamicArgumentNeedsValue = "The runtime binder cannot bind a metaobject without a value";
 	public const string BindingNameCollision = "More than one type in the binding has the same full name.";
+	public const string BadNonTrailingNamedArgument = "Named argument '{0}' is used out-of-position but is followed by an unnamed argument";
 }

+ 1 - 2
mcs/class/System.Core/System.Core_xtest.dll.sources

@@ -50,8 +50,7 @@
 ../../../external/corefx/src/System.Linq.Expressions/tests/BinaryOperators/Logical/*.cs
 ../../../external/corefx/src/System.Linq.Expressions/tests/BinaryOperators/ReferenceComparison/*.cs
 ../../../external/corefx/src/System.Linq.Expressions/tests/Unary/IncDecAssign/*.cs
-../../../external/corefx/src/System.Linq.Expressions/tests/*.cs:CompilerTests.cs,StackSpillerTests.cs,ReadOnlyCollectionBuilderTests.cs
-Test/System.Linq.Expressions/TestExtensions.cs
+../../../external/corefx/src/System.Linq.Expressions/tests/*.cs:StackSpillerTests.cs,ReadOnlyCollectionBuilderTests.cs
 
 # System.Linq.Expressions
 ../../../external/corefx/src/System.Linq.Parallel/tests/Combinatorial/*.cs

+ 0 - 35
mcs/class/System.Core/Test/System.Linq.Expressions/TestExtensions.cs

@@ -1,35 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Runtime.CompilerServices;
-using System.Threading;
-using Xunit;
-
-namespace System.Linq.Expressions.Tests
-{
-    public static class CompilerTests
-    {
-        public static void VerifyIL(this LambdaExpression expression, string expected, bool appendInnerLambdas = false)
-        {
-            string actual = expression.GetIL(appendInnerLambdas);
-
-            string nExpected = Normalize(expected);
-            string nActual = Normalize(actual);
-
-            Assert.Equal(nExpected, nActual);
-        }
-
-        private static string Normalize(string s)
-        {
-            Collections.Generic.IEnumerable<string> lines =
-                s
-                .Replace("\r\n", "\n")
-                .Split(new[] { '\n' })
-                .Select(line => line.Trim())
-                .Where(line => line != "" && !line.StartsWith("//"));
-
-            return string.Join("\n", lines);
-        }
-    }
-}

+ 2 - 0
mcs/class/System.Data/Makefile

@@ -41,6 +41,8 @@ TEST_LIB_REFS = System.Core Mono.Data.Sqlite
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:618,169,612,219,168
 
 TEST_NUNITLITE_APP_CONFIG_GLOBAL=Test/test-config-file
+
+USE_XTEST_REMOTE_EXECUTOR = YES
 XTEST_LIB_REFS = System System.Core System.Xml Facades/System.Text.Encoding.CodePages Facades/System.Threading.Tasks Facades/System.Runtime.InteropServices.RuntimeInformation 
 
 TEST_MONO_PATH = .

+ 5 - 0
mcs/class/System.Data/corefx/SR.cs

@@ -458,6 +458,11 @@ partial class SR
 	public const string DataColumns_RemoveExpression = "Cannot remove this column, because it is part of an expression: {0} = {1}.";
 	public const string DataRow_RowInsertTwice = "The rowOrder value={0} has been found twice for table named '{1}'.";
 	public const string Xml_ElementTypeNotFound = "Cannot find ElementType name='{0}'.";
+	public const string ADP_DbProviderFactories_InvariantNameNotFound = "The specified invariant name '{0}' wasn't found in the list of registered .NET Data Providers.";
+	public const string ADP_DbProviderFactories_NoInstance = "The requested .NET Data Provider's implementation does not have an Instance field of a System.Data.Common.DbProviderFactory derived type.";
+	public const string ADP_DbProviderFactories_FactoryNotLoadable = "The registered .NET Data Provider's DbProviderFactory implementation type '{0}' couldn't be loaded.";
+	public const string ADP_DbProviderFactories_NoAssemblyQualifiedName = "The missing .NET Data Provider's assembly qualified name is required.";
+	public const string ADP_DbProviderFactories_NotAFactoryType = "The type '{0}' doesn't inherit from DbProviderFactory.";
 	public const string ADP_ConnectionAlreadyOpen = "The connection was not closed. {0}";
 	public const string ADP_InternalConnectionError = "Internal DbConnection Error: {0}";
 	public const string ADP_InvalidOffsetValue = "Invalid parameter Offset value '{0}'. The value must be greater than or equal to 0.";

+ 0 - 3
mcs/class/System.Data/corefx/SqlCommand.cs

@@ -18,9 +18,6 @@ namespace System.Data.SqlClient
 			set => throw new NotImplementedException();
 		}
 
-		[System.Security.Permissions.HostProtectionAttribute(ExternalThreading=true)]
-		public IAsyncResult BeginExecuteNonQuery() => BeginExecuteNonQuery(null, null);
-
 		[System.Security.Permissions.HostProtectionAttribute(ExternalThreading=true)]
 		public IAsyncResult BeginExecuteXmlReader() => BeginExecuteXmlReader(null, null);
 

+ 4 - 1
mcs/class/System/common.sources

@@ -868,6 +868,8 @@ corefx/SR.cs
 ../../../external/corefx/src/Common/src/System/Net/SecurityProtocol.cs
 ../../../external/corefx/src/Common/src/System/Net/UriScheme.cs
 
+../../../external/corefx/src/Common/src/System/Net/WebSockets/ManagedWebSocket.cs
+
 ../../../external/corefx/src/Common/src/System/Net/Logging/NetEventSource.Common.cs
 
 ../../../external/corefx/src/Common/src/System/Net/WebSockets/WebSocketValidate.cs
@@ -904,7 +906,6 @@ corefx/SR.cs
 
 ../../../external/corefx/src/System.Net.ServicePoint/src/System/Net/SecurityProtocolType.cs
 
-../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs
 ../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/ValueWebSocketReceiveResult.cs
 ../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocket.cs
 ../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketCloseStatus.cs
@@ -919,6 +920,8 @@ corefx/SR.cs
 ../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocketOptions.cs
 ../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs
 
+../../../external/corefx/src/System.Net.WebSockets.WebSocketProtocol/src/System/Net/WebSockets/ManagedWebSocket.netstandard.cs
+
 ../../../external/corefx/src/System.Private.Uri/src/System/UriBuilder.cs
 
 ../../../external/corefx/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs

+ 3 - 1
mcs/class/corlib/Makefile

@@ -93,8 +93,10 @@ ifdef MONO_FEATURE_APPLE_X509
 LIB_MCS_FLAGS += -d:MONO_FEATURE_APPLE_X509
 endif
 
+COREFX_FLAGS := -d:FEATURE_PORTABLE_SPAN
+
 WARNING_ABOUT_DISABLED_WARNING=1635
-LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,3001,3002,3003,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS)
+LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,3001,3002,3003,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) $(COREFX_FLAGS)
 DEFAULT_REFERENCES =
 
 TEST_LIB_REFS = System.Core System

+ 25 - 22
mcs/class/corlib/corlib.dll.sources

@@ -1636,28 +1636,10 @@ corert/ThreadPoolBoundHandle.cs
 
 ../../../external/corert/src/Runtime.Base/src/System/Runtime/InteropServices/NativeCallableAttribute.cs
 
-../../../external/corert/src/System.Private.CoreLib/shared/System/Tuple.cs
-../../../external/corert/src/System.Private.CoreLib/shared/System/TupleExtensions.cs
-../../../external/corert/src/System.Private.CoreLib/shared/System/ValueTuple.cs
-
-../../../external/corert/src/System.Private.CoreLib/shared/System/Collections/DictionaryEntry.cs
-
-../../../external/corert/src/System.Private.CoreLib/shared/System/Collections/Generic/Dictionary.cs
-../../../external/corert/src/System.Private.CoreLib/shared/System/Collections/Generic/IDictionaryDebugView.cs
-../../../external/corert/src/System.Private.CoreLib/shared/System/Collections/Generic/KeyValuePair.cs
-
 ../../../external/corert/src/System.Private.CoreLib/shared/System/Diagnostics/Debug.cs
 
-../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IntrinsicAttribute.cs
-../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs
-../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs
-../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ITuple.cs
-../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs
-../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs
-
 ../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/DeferredDisposableLifetime.cs
 
-
 ../../../external/corert/src/System.Private.CoreLib/src/System/Array.cs
 
 ../../../external/corert/src/System.Private.CoreLib/src/System/Collections/LowLevelComparer.cs
@@ -1668,6 +1650,31 @@ corert/ThreadPoolBoundHandle.cs
 
 corefx/SR.cs
 
+../../../external/corefx/src/Common/src/CoreLib/System/Memory.cs
+../../../external/corefx/src/Common/src/CoreLib/System/MemoryDebugView.cs
+../../../external/corefx/src/Common/src/CoreLib/System/ReadOnlyMemory.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Tuple.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TupleExtensions.cs
+../../../external/corefx/src/Common/src/CoreLib/System/ValueTuple.cs
+
+../../../external/corefx/src/Common/src/CoreLib/System/Buffers/IRetainable.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Buffers/OwnedMemory.cs
+
+../../../external/corefx/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs
+
+../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/IntrinsicAttribute.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/ITuple.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeFeature.cs
+../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs
+
+../../../external/corefx/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs
+
 ../../../external/corefx/src/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs
 
 ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs
@@ -1681,10 +1688,7 @@ corefx/SR.cs
 ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/Partitioner.cs
 ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs
 
-../../../external/corefx/src/System.Memory/src/System/Memory.cs
-../../../external/corefx/src/System.Memory/src/System/MemoryDebugView.cs
 ../../../external/corefx/src/System.Memory/src/System/Pinnable.cs
-../../../external/corefx/src/System.Memory/src/System/ReadOnlyMemory.cs
 ../../../external/corefx/src/System.Memory/src/System/ReadOnlySpan.cs
 ../../../external/corefx/src/System.Memory/src/System/Span.cs
 ../../../external/corefx/src/System.Memory/src/System/SpanDebugView.cs
@@ -1698,7 +1702,6 @@ corefx/SR.cs
 ../../../external/corefx/src/System.Memory/src/System/ThrowHelper.cs
 ../../../external/corefx/src/System.Memory/src/System/Buffers/*.cs
 ../../../external/corefx/src/System.Memory/src/System/Buffers/Binary/*.cs
-../../../external/corefx/src/System.Memory/src/System/Runtime/InteropServices/*.cs
 
 ../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/OSPlatform.cs
 ../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/Architecture.cs

+ 3 - 3
mcs/class/referencesource/mscorlib/system/collections/generic/list.cs

@@ -178,7 +178,7 @@ namespace System.Collections.Generic {
             get {
                 // Following trick can reduce the range check by one
                 if ((uint) index >= (uint)_size) {
-                    ThrowHelper.ThrowArgumentOutOfRangeException();
+                    ThrowHelper.ThrowArgumentOutOfRange_IndexException();
                 }
                 Contract.EndContractBlock();
 #if MONO
@@ -190,7 +190,7 @@ namespace System.Collections.Generic {
 
             set {
                 if ((uint) index >= (uint)_size) {
-                    ThrowHelper.ThrowArgumentOutOfRangeException();
+                    ThrowHelper.ThrowArgumentOutOfRange_IndexException();
                 }
                 Contract.EndContractBlock();
                 _items[index] = value;
@@ -883,7 +883,7 @@ namespace System.Collections.Generic {
         // 
         public void RemoveAt(int index) {
             if ((uint)index >= (uint)_size) {
-                ThrowHelper.ThrowArgumentOutOfRangeException();
+                ThrowHelper.ThrowArgumentOutOfRange_IndexException();
             }
             Contract.EndContractBlock();
             _size--;

+ 9 - 0
mcs/class/referencesource/mscorlib/system/throwhelper.cs

@@ -53,9 +53,11 @@ namespace System {
 
     [Pure]
     internal static partial class ThrowHelper {
+#if !MONO
         internal static void ThrowArgumentOutOfRangeException() {        
             ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_Index);            
         }
+#endif
 
         internal static void ThrowWrongKeyTypeArgumentException(object key, Type targetType) {
             throw new ArgumentException(Environment.GetResourceString("Arg_WrongType", key, targetType), "key");
@@ -147,6 +149,13 @@ namespace System {
         {
             return new ArgumentOutOfRangeException(GetArgumentName(argument), resource);
         }
+
+        internal static void ThrowArgumentOutOfRange_IndexException()
+        {
+            throw GetArgumentOutOfRangeException(ExceptionArgument.index,
+                                                    SR.ArgumentOutOfRange_Index);
+        }
+
         internal static void ThrowIndexArgumentOutOfRange_NeedNonNegNumException()
         {
             throw GetArgumentOutOfRangeException(ExceptionArgument.index,

+ 1 - 0
mcs/tests/known-issues-interp-net_4_x

@@ -15,6 +15,7 @@ gtest-etree-09.cs
 test-269.cs
 test-270.cs
 test-399.cs
+test-404.cs
 test-704.cs
 test-811.cs
 test-async-17.cs

+ 4 - 4
mcs/tools/mono-symbolicate/Test/symbolicate.expected

@@ -142,13 +142,13 @@ Stacktrace:
 System.ArgumentNullException: Value cannot be null.
 Parameter name: key
   at System.ThrowHelper.ThrowArgumentNullException (System.ExceptionArgument argument) in external/corefx/src/System.Memory/src/System/ThrowHelper.cs:27 
-  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in external/corert/src/System.Private.CoreLib/shared/System/Collections/Generic/Dictionary.cs:369 
-  at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in external/corert/src/System.Private.CoreLib/shared/System/Collections/Generic/Dictionary.cs:285 
+  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in external/corefx/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs:369 
+  at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in external/corefx/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs:285 
   at StackTraceDumper+<>c.<Main>b__0_15 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:54 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:72 
 Stacktrace:
   at System.ThrowHelper.ThrowArgumentNullException (System.ExceptionArgument argument) in external/corefx/src/System.Memory/src/System/ThrowHelper.cs:27 
-  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in external/corert/src/System.Private.CoreLib/shared/System/Collections/Generic/Dictionary.cs:369 
-  at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in external/corert/src/System.Private.CoreLib/shared/System/Collections/Generic/Dictionary.cs:285 
+  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in external/corefx/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs:369 
+  at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in external/corefx/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs:285 
   at StackTraceDumper+<>c.<Main>b__0_15 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:54 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:72