In dotnet/dotnet#7160 we're seeing the method GetOrCreateReferenceTrackingMemory got duplicated (with a different implementation) in src/runtime/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs
this is because, when we're rebasing the working branch back to the head branch, git thinks these are two different implementations and keeps both of them.
I think this only happens in scenarios where the merge base doesn't have the code chunk in question, in this case the GetOrCreateReferenceTrackingMemory method.
In dotnet/dotnet#7160 we're seeing the method
GetOrCreateReferenceTrackingMemorygot duplicated (with a different implementation) insrc/runtime/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.csthis is because, when we're rebasing the working branch back to the head branch, git thinks these are two different implementations and keeps both of them.
I think this only happens in scenarios where the merge base doesn't have the code chunk in question, in this case the
GetOrCreateReferenceTrackingMemorymethod.