Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

Plug `System.Type.IsByRefLike` property

Open Guillermo-Santos opened this issue 1 year ago • 0 comments

What is the usecase for this plug

With the PR #2997 the System.Activator.CreateInstance are plugged to Cosmos, the thing is that ref struct should not be supported by these methods and a NotSupportedException should be throw, but since this property is missing, we do not have any way to check if the type we are working with is a ref struct at runtime.

** Complexity of plug **

Adding a new property to the Vtable and modifying IL2CPU so that said value is set.

Describe alternatives you've considered

Are there workarounds for this plug? As of my knowledge, there is no workaround.

Additional context

Add any other context about the plug request here. May be useful for other operations too.

Guillermo-Santos avatar Apr 10 '24 12:04 Guillermo-Santos