Conversation
|
Tagging subscribers to this area: @agocke |
There was a problem hiding this comment.
Pull request overview
This PR adds a regression test for a debug assertion issue in the CoreCLR's generic method lookup code. The test exercises virtual method calls on generic value types to trigger the FindTightlyBoundWrappedMethodDesc code path, which previously had a mismatch between production and debug verification implementations.
Changes:
- Adds new regression test
Struct_UnboxingStubLookupthat exercises virtual methods on generic structs to trigger the assertion path - Test includes both direct method calls and reflection-based interface mapping to cover multiple code paths
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/tests/Loader/classloader/generics/VSD/Struct_UnboxingStubLookup.csproj | Test project configuration with CLRTestPriority=0 for regression test |
| src/tests/Loader/classloader/generics/VSD/Struct_UnboxingStubLookup.cs | Regression test implementation with generic value type interface tests |
| // | ||
|
|
||
| using System; | ||
| using System.Threading.Tasks; |
There was a problem hiding this comment.
Remove the unused import using System.Threading.Tasks. The Task type is only referenced in the commented-out Main method which should also be removed.
| using System.Threading.Tasks; |
| /*public static Task<int> Main() | ||
| { | ||
| return Task.FromResult(TestEntryPoint()); | ||
| }*/ | ||
|
|
There was a problem hiding this comment.
Remove this commented-out Main method. The test is properly configured to run with Xunit using the [Fact] attribute on TestEntryPoint, so this legacy code should be deleted rather than left commented out.
| /*public static Task<int> Main() | |
| { | |
| return Task.FromResult(TestEntryPoint()); | |
| }*/ |
testing