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
path: root/mcs/tests
diff options
context:
space:
mode:
authorFilip Navara <navara@emclient.com>2019-06-19 09:51:44 +0300
committerMarek Safar <marek.safar@gmail.com>2019-06-19 09:51:43 +0300
commitc1068f9db5d9d5891e906447d4ed3b262182a388 (patch)
treeec07a6c53c00c8b4c0a048cc409edf2ddab51aad /mcs/tests
parent611ba9a0180ed40c161245c7e82e00063ef58d08 (diff)
[netcore] Update the checks for ByRef return type in reflection invocation (#14967)
* Update the checks for ByRef return type in reflection invocation to also check for IsByRefLike types. This was missed as part of #13901 and noted in the description. Fixes #14959, #14960, #14961, #14963 * Modify the reflection checks for IsByRef/IsByRefLike to check for same conditions as CoreCLR * Handle reflection invocation with ref void return type * Update test-ref-07 to have Main method that is valid to invoke through reflection (as the test runner does) * Update expected IL
Diffstat (limited to 'mcs/tests')
-rw-r--r--mcs/tests/test-ref-07.cs7
-rw-r--r--mcs/tests/ver-il-net_4_x.xml7
2 files changed, 12 insertions, 2 deletions
diff --git a/mcs/tests/test-ref-07.cs b/mcs/tests/test-ref-07.cs
index f17cfb443b5..9ee9cf36911 100644
--- a/mcs/tests/test-ref-07.cs
+++ b/mcs/tests/test-ref-07.cs
@@ -1,8 +1,13 @@
// Compiler options: -langversion:latest
+public struct TestMain
+{
+ public static void Main () => Test.MainMethod();
+}
+
public readonly ref partial struct Test
{
- public static void Main ()
+ public static void MainMethod ()
{
var m = new Test ();
m.Method ();
diff --git a/mcs/tests/ver-il-net_4_x.xml b/mcs/tests/ver-il-net_4_x.xml
index 4ad26da95f7..60cfdfef724 100644
--- a/mcs/tests/ver-il-net_4_x.xml
+++ b/mcs/tests/ver-il-net_4_x.xml
@@ -73853,8 +73853,13 @@
</type>
</test>
<test name="test-ref-07.cs">
- <type name="Test">
+ <type name="TestMain">
<method name="Void Main()" attrs="150">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Test">
+ <method name="Void MainMethod()" attrs="150">
<size>18</size>
</method>
<method name="Test Method()" attrs="129">