-
-
Notifications
You must be signed in to change notification settings - Fork 194
Small fix for new FindPickerEntity implementation #1009
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
base: main
Are you sure you want to change the base?
Conversation
Do you have any stack where this happened? even though, I would agree to the changes but we should also consider my comment here: 245f55d#r164365459 I'm not sure if we have to do that runtime platform check before each call as based on people's response its enough to pass 3 params to the function and it works as intended, so we might be able to just remove the 2 doubles from the linux version and use the same prototype for both |
As I understand we have a map between csharp types and DataType in DataTypeExtensions so it cannot find an appropriate DataType for nullable args because typeof(IntPtr) != typeof(IntPtr?) |
ah yeah thats right because |
|
we could get the underlying type for nullable types before doing the data type checks to support nullable value types which might be a better idea in the long term run |
I don't have sufficient knowledge about the C++ side, so I'm not sure that it can accept such changes from CSharp side without modifications. It seems that nullable types from csharp needs to be converted to some kind of default values at C++ side but this conversion can lead to undefined behavior |
nullable types works as intended if the underlying type is a reference type, but value types are not the same CLR types in this case, and thats why you got the exception. to make nullable value types work we could just get the underlying type and assign a data type to it |
As I can see there is no support for nullable args in VirtualFunction.Create
So it throws "Invalid argument type(s) supplied to Virtual Function" for nullable args.