diff options
author | Samuel Arzt <arzt.samuel@live.de> | 2017-09-21 11:23:13 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-09-21 11:23:13 +0300 |
commit | 413c026f2295ab3ef93f16df298b24143caec39d (patch) | |
tree | 78da02eeb3a5e189363fde9d477c49ad81942166 /src/ILVerify | |
parent | baf89c7a05415a111c7c163c46a3556f0be90fe6 (diff) |
[ILVerify] Fix assigning interface with variance to object generating error (#4576)
* Fixed assigning interface with variance to object generating verification error.
* Added test cases for casting variant interface to object.
* Removed interface check in non variant path of CanCastToClass.
Diffstat (limited to 'src/ILVerify')
-rw-r--r-- | src/ILVerify/tests/ILTests/CastingTests.il | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ILVerify/tests/ILTests/CastingTests.il b/src/ILVerify/tests/ILTests/CastingTests.il index daedc1ee7..769022b73 100644 --- a/src/ILVerify/tests/ILTests/CastingTests.il +++ b/src/ILVerify/tests/ILTests/CastingTests.il @@ -200,6 +200,17 @@ ret } + .method public hidebysig instance void Casting.AssignVariantInterfaceToObject_Valid(class [System.Runtime]System.Collections.Generic.IEnumerable`1<string> e) cil managed + { + .locals init ( + object o + ) + + ldarg.1 + stloc.0 + ret + } + .method public hidebysig instance void Casting.AssignThisToSameTypeWithOtherGenericArgs_Invalid_StackUnexpected() cil managed { .locals init ( |