-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Fix issue with dynamic runtime binding in Microsoft.CSharp test #117705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue with dynamic runtime binding in Microsoft.CSharp test #117705
Conversation
…xunit descriptor Co-authored-by: akoeplinger <[email protected]>
Why do we need this? The failure was:
This is because the code here: runtime/src/libraries/Microsoft.CSharp/tests/AssignmentTests.cs Lines 82 to 87 in 39fc72d
is not a simple call to This is not xUnit reflecting on |
…c parameter to object Co-authored-by: MichalStrehovsky <[email protected]>
... You're absolutely right. The issue was not about ILLink descriptors but about the dynamic runtime binding. The test was using |
Why restore the src/libraries/Microsoft.CSharp/tests/ILLink.Descriptors.xml file if it's presumably not needed anymore thanks to the cast? |
…fixed with cast Co-authored-by: MichalStrehovsky <[email protected]>
You're right! Since the cast fix makes the call statically bound rather than dynamically resolved, the ILLink descriptor is no longer needed. Removed the descriptor file and TrimmerRootDescriptor reference. All 4,802 tests still pass. (ef68bc19) |
Ah yeah I was just cleaning up #117657, I didn't actually look at the details. Looks like you and Copilot figured out a much better fix 😄 |
/ba-g unrelated timeout in android job |
Fixed by casting the dynamic parameter to object: Assert.IsType(expected.GetType(), (object)lhs)
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.