Skip to content

Commit

Permalink
Guard against non-sensical ReadyToRunGenericHelperNode (#99513)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky authored Mar 11, 2024
1 parent bbecf54 commit 5161ccd
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public bool HandlesInvalidEntries(NodeFactory factory)

public ReadyToRunGenericHelperNode(NodeFactory factory, ReadyToRunHelperId helperId, object target, TypeSystemEntity dictionaryOwner)
{
Debug.Assert(
(dictionaryOwner is TypeDesc type && type.HasInstantiation)
|| (dictionaryOwner is MethodDesc method && method.HasInstantiation));
_id = helperId;
_dictionaryOwner = dictionaryOwner;
_target = target;
Expand Down

0 comments on commit 5161ccd

Please sign in to comment.