-
Notifications
You must be signed in to change notification settings - Fork 167
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
Disallow counter collections #2350
Conversation
All seems to work, I just need to understand why I get an error during testing with |
Realm/Realm.Weaver/RealmWeaver.cs
Outdated
{ | ||
return WeavePropertyResult.Error($"{type.Name}.{prop.Name} is an {collectionType} but its generic type is {elementType.Name} which is not supported by Realm."); | ||
if (_counterTypes.Contains(elementType.FullName)) |
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.
Rather than having a new list of counters, you can check if the type is realm integer by calling elementType.Resolve().IsRealmInteger(out _, out _)
.
If you get the peverify error on master, it's probably not due to your changes :D |
I missed it, has peverify always been there? Or has it been added recently? |
It has been there for long time, and I think I already disabled it somewhere else in the past. |
Yes, I've branched from master :) |
This PR adds an error in the weaver when declaring collections of
RealmInteger
.Fixes #2308