You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[NativeAOT] Support invoking abstract constructors on existing instances through MethodInvoker #134903
The reflection invocation tests for abstract constructors invoked on an existing instance are currently limited to CoreCLR because NativeAOT does not support the behavior exercised by MethodInvokerTests.Constructor_AbstractDeclaringTypeWithExistingInstance, Constructor_AbstractDeclaringTypeWithExistingInstance_RegularArguments, and Constructor_AbstractDeclaringTypeWithExistingInstance_ManyRegularArguments.
NativeAOT should support invoking an instance constructor declared on an abstract base type against an existing compatible derived object, including regular and by-ref argument paths.
Reproduction Steps
Run the System.Reflection.Tests tests listed above on NativeAOT. The tests are currently marked ConditionalFact(IsCoreCLR) and should become active on NativeAOT once the behavior is implemented.
The constructor runs against the existing derived instance and updates its state, as it does on CoreCLR. Allocating an instance for an abstract declaring type and invoking with a null target should remain rejected.
Actual behavior
The behavior is not currently supported on NativeAOT, so these tests cannot run there and are guarded to CoreCLR.
Activity
dotnet-policy-service commentedon Sep 29, 2026
Tagging subscribers to this area: @steveisok, @dotnet/area-system-reflection
See info in area-owners.md if you want to be subscribed.