Closed kneth closed 2 weeks ago
We didn't test the performance of this, right? I mean - its a pretty critical code path.
I have changed it so we don't downcast but I hope that a C++ compiler will generate very little code for
Foo *foo = new Foo();
auto bar = std::dynamic_pointer_cast<Foo>(foo);
What, How & Why?
Next core release will come with a number of breaking changes. This PR is a preparation for the release, and it requires https://github.com/realm/realm-core/pull/7623 to be merged and release.
The Binding Generator has some limitations, and in conjunction with https://github.com/realm/realm-core/pull/7623 this PR works around them.
In https://github.com/realm/realm-core/pull/7300, a new user is introduced (
app::User
) which inherit fromSyncUser
. As both classes are used withstd::shared_ptr
(annotatedSharedPtrWrapper
inspec.xml
), it is not possible to generate code. The ~solution~ hack is to downcast all objects. In most cases the downcasting has no effect but for the user classes. For user classes we will use only one -app::User
- and downcastSyncUser
toapp::User
.āļø ToDos
Compatibility
label is updated or copied from previous entryCOMPATIBILITY.md
package.json
s (if updating internal packages)Breaking
label has been applied or is not necessary