-
Notifications
You must be signed in to change notification settings - Fork 547
[Rgen] Be consistent in the use of global when we encounter a nint/nuint. #22931
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
Conversation
nint and nuint are meta types that point to IntPtr and UIntPtr. Due to that fact, we are not using the global::System.IntPtr string in the cases we find a nint. The way to fix this is to look at the special type, and if it matches IntPtr/UIntPtr, use the fully qualified name. With this change we are consistent in all the generated code and we will always find global::System.IntPtr no matter if the user used nint or IntPtr.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #30758e4] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #30758e4] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commit.NET ( No breaking changes )✅ API diff vs stable.NET ( No breaking changes )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #30758e4] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #30758e4] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #30758e4] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #30758e4] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #30758e4] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
🚀 [CI Build #30758e4] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 120 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
nint and nuint are meta types that point to IntPtr and UIntPtr. Due to that fact, we are not using the global::System.IntPtr string in the cases we find a nint. The way to fix this is to look at the special type, and if it matches IntPtr/UIntPtr, use the fully qualified name.
With this change we are consistent in all the generated code and we will always find global::System.IntPtr no matter if the user used nint or IntPtr.