[netcore] Update the checks for ByRef return type in reflection invocation (#14967)
commitc1068f9db5d9d5891e906447d4ed3b262182a388
authorFilip Navara <navara@emclient.com>
Wed, 19 Jun 2019 06:51:44 +0000 (19 08:51 +0200)
committerMarek Safar <marek.safar@gmail.com>
Wed, 19 Jun 2019 06:51:43 +0000 (19 08:51 +0200)
treeec07a6c53c00c8b4c0a048cc409edf2ddab51aad
parent611ba9a0180ed40c161245c7e82e00063ef58d08
[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
mcs/tests/test-ref-07.cs
mcs/tests/ver-il-net_4_x.xml
mono/metadata/icall.c
netcore/CoreFX.issues.rsp