Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Bogatov <egorbo@gmail.com>2019-08-03 21:49:38 +0300
committerMarek Safar <marek.safar@gmail.com>2019-08-03 21:49:38 +0300
commite08bddaa63bd117fad4fe6b99d41e272689adf97 (patch)
tree53e3c4ec23c9ea8ac2c882178909726957ed0831 /netcore
parent848811e4b26519ce62672886813f6eb73d572be5 (diff)
[netcore] Minor fixes around System.Reflection (#15905)
* Minor fixes * Update HelloWorld.csproj
Diffstat (limited to 'netcore')
-rw-r--r--netcore/CoreFX.issues.rsp12
-rw-r--r--netcore/System.Private.CoreLib/resources/SR.cs1
-rw-r--r--netcore/System.Private.CoreLib/src/System.Reflection/RuntimePropertyInfo.cs2
3 files changed, 3 insertions, 12 deletions
diff --git a/netcore/CoreFX.issues.rsp b/netcore/CoreFX.issues.rsp
index 9d2ce86b7df..78760f6726c 100644
--- a/netcore/CoreFX.issues.rsp
+++ b/netcore/CoreFX.issues.rsp
@@ -54,11 +54,6 @@
# https://github.com/mono/mono/issues/14907
-nomethod BasicEventSourceTests.TestsManifestNegative.Test_GenerateManifest_InvalidEventSources
-# Both tests below have a delegate binding error - signature is not compatible with that of the delegate type.
-# https://github.com/mono/mono/issues/14909
--nomethod BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener
--nomethod BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener_UseEvents
-
####################################################################
## System.Dynamic.Runtime.Tests
####################################################################
@@ -124,7 +119,6 @@
-nomethod System.Linq.Expressions.Tests.IndexExpressionTests.IndexedPropertyGetReturnsWrongType
# Expected ArgumentException got IndexOutOfRangeException https://github.com/mono/mono/issues/14930
--nomethod System.Linq.Expressions.Tests.IndexExpressionTests.IndexedPropertySetterNoParams
-nomethod System.Linq.Expressions.Tests.ArrayIndexTests.NonZeroBasedOneDimensionalArrayIndex
-nomethod System.Linq.Expressions.Tests.ArrayIndexTests.NonZeroBasedOneDimensionalArrayIndexMethod
@@ -136,12 +130,6 @@
# https://github.com/mono/mono/issues/14934
-nomethod System.Linq.Expressions.Tests.ArrayBoundsTests.MultipleNegativeBoundErrorMessage
-# Delegate creation w/ reflection https://github.com/mono/mono/issues/14950
--nomethod System.Linq.Expressions.Tests.CallTests.EnumArgAndReturn
-
-# Expected test Assertion fails https://github.com/mono/mono/issues/14951
--nomethod System.Linq.Expressions.Tests.CallTests.MethodName_TypeArgsDontMatchConstraints_ThrowsArgumentException
-
####################################################################
## System.Linq.Parallel.Tests
####################################################################
diff --git a/netcore/System.Private.CoreLib/resources/SR.cs b/netcore/System.Private.CoreLib/resources/SR.cs
index 2afa4dc5946..8c7afd9b207 100644
--- a/netcore/System.Private.CoreLib/resources/SR.cs
+++ b/netcore/System.Private.CoreLib/resources/SR.cs
@@ -1219,4 +1219,5 @@ partial class SR
public const string Serialization_DangerousDeserialization_Switch = "An action was attempted during deserialization that could lead to a security vulnerability. The action has been aborted. To allow the action, set the '{0}' AppContext switch to true.";
public const string Arg_MustBeRuntimeAssembly = "Object must be of type RuntimeAssembly.";
public const string InvalidOperation_SpanOverlappedOperation = "This operation is invalid on overlapping buffers.";
+ public const string SetterHasNoParams = "Setter must have parameters.";
}
diff --git a/netcore/System.Private.CoreLib/src/System.Reflection/RuntimePropertyInfo.cs b/netcore/System.Private.CoreLib/src/System.Reflection/RuntimePropertyInfo.cs
index b52b6f6a875..bf5f76f2faf 100644
--- a/netcore/System.Private.CoreLib/src/System.Reflection/RuntimePropertyInfo.cs
+++ b/netcore/System.Private.CoreLib/src/System.Reflection/RuntimePropertyInfo.cs
@@ -192,6 +192,8 @@ namespace System.Reflection
return info.get_method.ReturnType;
} else {
ParameterInfo[] parameters = info.set_method.GetParametersInternal ();
+ if (parameters.Length == 0)
+ throw new ArgumentException (SR.SetterHasNoParams, "indexer");
return parameters [parameters.Length - 1].ParameterType;
}