-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[mono] Fix c&p error in MarshalingPInvokeScanner. #112983
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR fixes a copy-and-paste error in the Enum type check within the marshaling type compatibility provider.
- Changed the namespace check from typeDef.Namespace to baseType.Namespace to correctly validate the base type.
Reviewed Changes
File | Description |
---|---|
src/tasks/MonoTargetsTasks/MarshalingPInvokeScanner/MinimalMarshalingTypeCompatibilityProvider.cs | Fixed the comparison to properly use baseType for checking if the type is System.Enum |
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/tasks/MonoTargetsTasks/MarshalingPInvokeScanner/MinimalMarshalingTypeCompatibilityProvider.cs:111
- The check now correctly uses baseType.Namespace instead of typeDef.Namespace. Please ensure that this fix aligns with similar type checks throughout the code for consistency.
if (reader.GetString(baseType.Namespace) == "System" &&
This fixes a problem where numerous BCL assemblies are flagged as requiring the marshal-ilgen component:
|
No description provided.