Skip to content

Commit

Permalink
Fix Array_CreateInstance case
Browse files Browse the repository at this point in the history
The PInvoke logic and the CheckAndReportRequires logic
should not be needed for this intrinsic, and the old shared
HandleCallAction would go to the default case that sets the
return value to Top and returns false.

Now this instead returns true and lets the shared return
value logic kick in.
  • Loading branch information
sbomer committed Apr 24, 2024
1 parent 69017ea commit b898b27
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ private partial bool TryHandleIntrinsic (
// We could try to analyze if the type is known, but for now making sure this works for canonical arrays is enough.
TypeDesc canonArrayType = _reflectionMarker.Factory.TypeSystemContext.CanonType.MakeArrayType();
_reflectionMarker.MarkType(_diagnosticContext.Origin, canonArrayType, "Array.CreateInstance was called");
goto case IntrinsicId.None;
}
break;

//
// System.Enum
Expand Down

0 comments on commit b898b27

Please sign in to comment.