From 5217cef2ba9d06169829b855c0f70df8abe110ce Mon Sep 17 00:00:00 2001 From: Tomas Date: Fri, 7 May 2021 20:28:07 +0200 Subject: [PATCH] Fix default interface method tests I have tracked down the failure in three default interface constrained call tests to this added static-ness condition. I have verified that all tests that have been passing previously continue passing after removal of the check. I'm not sure what its original purpose was but it looks quite weird as the code comment alludes to instance boxing and that doesn't seem applicable to static methods. Thanks Tomas --- src/coreclr/vm/genericdict.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/vm/genericdict.cpp b/src/coreclr/vm/genericdict.cpp index f04ff2bc061798..fd6ef6d57c288d 100644 --- a/src/coreclr/vm/genericdict.cpp +++ b/src/coreclr/vm/genericdict.cpp @@ -1396,7 +1396,7 @@ Dictionary::PopulateEntry( // In such case we would need to box the value type before we can dispatch to the implementation. // This would require us to make a "boxing stub". For now we leave the boxing stubs unimplemented. // It's not clear if anyone would need them and the implementation complexity is not worth it at this time. - if (pResolvedMD->IsStatic() && !pResolvedMD->GetMethodTable()->IsValueType() && constraintType.GetMethodTable()->IsValueType()) + if (!pResolvedMD->GetMethodTable()->IsValueType() && constraintType.GetMethodTable()->IsValueType()) { SString assemblyName;