Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
add comment about why enum comparers are more complicated
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyAyersMS committed Sep 26, 2017
1 parent 73e95bb commit 0152adf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8745,6 +8745,9 @@ CORINFO_CLASS_HANDLE CEEInfo::getDefaultEqualityComparerClassHelper(CORINFO_CLAS
}

// Enum
//
// We need to special case the Enum comparers based on their underlying type,
// to avoid boxing and call the correct versions of GetHashCode.
if (elemTypeHnd.IsEnum())
{
MethodTable* targetClass = NULL;
Expand Down

0 comments on commit 0152adf

Please sign in to comment.