[RGen] Add factory method needed to create a aux variable for a BindFrom(typeof(NSNumber)).#22111
Conversation
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [PR Build] Build passed (Build macOS tests) ✅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.
💻 [PR Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
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 (Breaking changes).NET ( ❗ Breaking changes ❗ )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
| { | ||
| yield return [ | ||
| new Parameter (0, ReturnTypeForInt (), "myParam"), | ||
| "var nsb_myParam = NSNumber.FromInt32 (myParam);" |
There was a problem hiding this comment.
you never ever feed the generated files in customers partial classes, right ? and you 100% control the typename and the namespace ? otherwise, it's safer to fullyqualify type names in sourcegen'd code
There was a problem hiding this comment.
You have a point. I'll do a second pass to do a fully qualified version of all the different types, I'll create a bug for it so that we use global:: etc
Better safe than sorry.
This change allows to be able to generate an aux variable that will be needed if a customer defined a export method in the following way:
The above binding API indicates that the native method in objc will take a NSNumber but we want to expose our users a double. In order to send a NSNumber to objc, we need to declare an aux variable that will be used for the native method invocation.