Skip to content

Commit

Permalink
Fix issue with local getting out of scope (dotnet#25708)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fadi Hanna authored and jkotas committed Aug 22, 2019
1 parent 4aa65f0 commit 47a1558
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vm/interoputil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5811,6 +5811,7 @@ MethodDesc *WinRTInterfaceRedirector::GetStubMethodForRedirectedInterface(WinMDA
// Verify that the signature of the stub method matches the corresponding interface method.
MethodTable *pItfMT = NULL;
Instantiation inst = pMD->GetMethodInstantiation();
TypeHandle thKvPair;

if (interopKind == TypeHandle::Interop_NativeToManaged)
{
Expand All @@ -5832,8 +5833,8 @@ MethodDesc *WinRTInterfaceRedirector::GetStubMethodForRedirectedInterface(WinMDA

if (interfaceIndex == WinMDAdapter::RedirectedTypeIndex_System_Collections_Generic_IDictionary ||
interfaceIndex == WinMDAdapter::RedirectedTypeIndex_System_Collections_Generic_IReadOnlyDictionary)
{
TypeHandle thKvPair = TypeHandle(MscorlibBinder::GetClass(CLASS__KEYVALUEPAIRGENERIC)).Instantiate(inst);
{
thKvPair = TypeHandle(MscorlibBinder::GetClass(CLASS__KEYVALUEPAIRGENERIC)).Instantiate(inst);
inst = Instantiation(&thKvPair, 1);
}
}
Expand Down

0 comments on commit 47a1558

Please sign in to comment.