From 10aaf6aba36d4792f4c3f1320fd811f88988d1ee Mon Sep 17 00:00:00 2001 From: Ferdinando Papale <4850119+papafe@users.noreply.github.com> Date: Tue, 31 Oct 2023 09:42:30 +0100 Subject: [PATCH] Small fixes to source generator (#3466) --- CHANGELOG.md | 2 +- .../Realm.SourceGenerator/ClassCodeBuilder.cs | 2 +- Realm/Realm.SourceGenerator/Diagnostics.cs | 12 +++++++++++- .../DiagnosticsEmitter.cs | 2 ++ Realm/Realm.SourceGenerator/Parser.cs | 10 ++++++++++ .../A_generated.cs | 2 +- .../AgedObject_generated.cs | 2 +- .../AllTypesObject_generated.cs | 2 +- .../AsymmetricObjectWithAllTypes_generated.cs | 2 +- ...ctWithEmbeddedDictionaryObject_generated.cs | 2 +- ...icObjectWithEmbeddedListObject_generated.cs | 2 +- ...ectWithEmbeddedRecursiveObject_generated.cs | 2 +- .../B_generated.cs | 2 +- .../BacklinkObject_generated.cs | 2 +- .../Bar_DuplicateClass_generated.cs | 2 +- .../BasicAsymmetricObject_generated.cs | 2 +- .../Child_generated.cs | 2 +- .../Cities_generated.cs | 2 +- .../ClassWithUnqueryableMembers_generated.cs | 2 +- .../CollectionsObject_generated.cs | 2 +- .../Company_generated.cs | 2 +- .../CompletionReport_generated.cs | 2 +- .../ContainerObject_generated.cs | 2 +- .../CoordinatesEmbeddedObject_generated.cs | 2 +- .../CounterObject_generated.cs | 2 +- .../CustomGeoPoint_generated.cs | 2 +- .../DecimalsObject_generated.cs | 2 +- .../DictionariesObject_generated.cs | 2 +- .../Dog_generated.cs | 2 +- .../DynamicDog_generated.cs | 2 +- .../DynamicOwner_generated.cs | 2 +- .../DynamicSubSubTask_generated.cs | 2 +- .../DynamicSubTask_generated.cs | 2 +- .../DynamicTask_generated.cs | 2 +- .../EmbeddedAllTypesObject_generated.cs | 2 +- .../EmbeddedGuidType_generated.cs | 2 +- .../EmbeddedIntPropertyObject_generated.cs | 2 +- .../EmbeddedLevel1_generated.cs | 2 +- .../EmbeddedLevel2_generated.cs | 2 +- .../EmbeddedLevel3_generated.cs | 2 +- .../ExplicitClass_generated.cs | 2 +- .../Foo_DuplicateClass_generated.cs | 2 +- .../GuidType_generated.cs | 2 +- .../HugeSyncObject_generated.cs | 2 +- .../IndexedDateTimeOffsetObject_generated.cs | 2 +- .../IndexesClass_generated.cs | 2 +- .../InitializedFieldObject_generated.cs | 2 +- .../IntPrimaryKeyWithValueObject_generated.cs | 2 +- .../IntPropertyObject_generated.cs | 2 +- .../Level1_generated.cs | 2 +- .../Level2_generated.cs | 2 +- .../Level3_generated.cs | 2 +- .../ListsObject_generated.cs | 2 +- .../LoneClass_generated.cs | 2 +- .../MixedProperties1_generated.cs | 2 +- .../MixedProperties2_generated.cs | 2 +- .../NoListProperties_generated.cs | 2 +- .../NonPrimaryKeyObject_generated.cs | 2 +- ...NonPrimaryKeyWithNonPKRelation_generated.cs | 2 +- .../NonPrimaryKeyWithPKRelation_generated.cs | 2 +- .../NullablePrimaryKeyObject_generated.cs | 2 +- .../ObjectContainerEmbedded_generated.cs | 2 +- .../ObjectContainerV1_generated.cs | 2 +- .../ObjectEmbedded_generated.cs | 2 +- ...ectIdPrimaryKeyWithValueObject_generated.cs | 2 +- .../ObjectV1_generated.cs | 2 +- .../ObjectV2_generated.cs | 2 +- .../ObjectWithEmbeddedProperties_generated.cs | 2 +- .../ObjectWithFtsIndex_generated.cs | 2 +- .../ObjectWithInvalidGeoPoints_generated.cs | 2 +- .../ObjectWithObjectProperties_generated.cs | 2 +- .../ObjectWithPartitionValue_generated.cs | 2 +- .../ObjectWithRequiredStringList_generated.cs | 2 +- .../OnManagedTestClass_generated.cs | 2 +- .../OneListProperty_generated.cs | 2 +- .../OneNonListProperty_generated.cs | 2 +- .../OnlyListProperties_generated.cs | 2 +- .../OrderedContainer_generated.cs | 2 +- .../OrderedObject_generated.cs | 2 +- .../Owner_generated.cs | 2 +- .../Parent_generated.cs | 2 +- .../Person_generated.cs | 2 +- .../PrimaryKeyByteObject_generated.cs | 2 +- .../PrimaryKeyCharObject_generated.cs | 2 +- .../PrimaryKeyGuidObject_generated.cs | 2 +- .../PrimaryKeyInt16Object_generated.cs | 2 +- .../PrimaryKeyInt32Object_generated.cs | 2 +- .../PrimaryKeyInt64Object_generated.cs | 2 +- .../PrimaryKeyNullableByteObject_generated.cs | 2 +- .../PrimaryKeyNullableCharObject_generated.cs | 2 +- .../PrimaryKeyNullableGuidObject_generated.cs | 2 +- .../PrimaryKeyNullableInt16Object_generated.cs | 2 +- .../PrimaryKeyNullableInt32Object_generated.cs | 2 +- .../PrimaryKeyNullableInt64Object_generated.cs | 2 +- ...imaryKeyNullableObjectIdObject_generated.cs | 2 +- .../PrimaryKeyObjectIdObject_generated.cs | 2 +- .../PrimaryKeyObject_generated.cs | 2 +- .../PrimaryKeyStringObject_generated.cs | 2 +- .../PrimaryKeyWithNoPKList_generated.cs | 2 +- ...WithNonPKChildWithPKGrandChild_generated.cs | 2 +- .../PrimaryKeyWithNonPKRelation_generated.cs | 2 +- .../PrimaryKeyWithPKList_generated.cs | 2 +- .../PrimaryKeyWithPKRelation_generated.cs | 2 +- .../PrivatePrimaryKeyObject_generated.cs | 2 +- .../Product_generated.cs | 2 +- .../RealmValueObject_generated.cs | 2 +- .../RecursiveBacklinksObject_generated.cs | 2 +- .../RemappedPropertiesObject_generated.cs | 2 +- .../RemappedTypeObject_generated.cs | 2 +- .../Report_generated.cs | 2 +- ...RequiredPrimaryKeyStringObject_generated.cs | 2 +- .../RequiredPropertyClass_generated.cs | 2 +- .../RequiredStringObject_generated.cs | 2 +- .../SerializedObject_generated.cs | 2 +- .../SomeClass_generated.cs | 2 +- .../SyncAllTypesObject_generated.cs | 2 +- .../SyncCollectionsObject_generated.cs | 2 +- ...ncObjectWithRequiredStringList_generated.cs | 2 +- .../TestNotificationObject_generated.cs | 2 +- .../ThrowsBeforeInitializer_generated.cs | 2 +- .../TopLevelGeoPoint_generated.cs | 2 +- .../TypeEmbeddedObject_generated.cs | 2 +- .../UnqueryableBacklinks_generated.cs | 2 +- .../Walker_generated.cs | 2 +- .../ComparisonTests.cs | 18 ++++++++++++++++++ .../AllTypesClass_generated.cs | 2 +- .../AutomaticPropertiesClass_generated.cs | 2 +- ...ithoutParameterlessConstructor_generated.cs | 2 +- .../ConfusingNamespaceClass_generated.cs | 2 +- .../Dog_generated.cs | 2 +- .../EmbeddedObj_generated.cs | 2 +- .../IgnoreObjectNullabilityClass_generated.cs | 2 +- .../IndexedClass_generated.cs | 2 +- .../InitializerNamespaceClass_generated.cs | 2 +- .../NamespaceObj_generated.cs | 2 +- .../NestedClass_generated.cs | 2 +- .../NoNamespaceClass_generated.cs | 2 +- .../NullableClass_generated.cs | 2 +- .../OtherNamespaceObj_generated.cs | 2 +- .../PartialClass_generated.cs | 2 +- .../Person_generated.cs | 2 +- .../RealmObj_generated.cs | 2 +- ...ObjectAndEmbeddedObjectClass.diagnostics.cs | 2 +- .../SourceGeneratorAssemblyToProcess.csproj | 1 - 144 files changed, 180 insertions(+), 141 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f23f1f5fa4..fbe52a8e2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ * Made WebSocket error logging more verbose when using `AppConfiguration.UseManagedWebSockets = true`. [#3459](https://github.com/realm/realm-dotnet/pull/3459) ### Fixed -* None +* Added an error that is raised when interface based Realm classes are used with a language version lower than 8.0. At the same time, removed the use of `not` in the generated code, so that it's compatible with a minumum C# version of 8.0. (Issue [#3265](https://github.com/realm/realm-dotnet/issues/3265)) ### Compatibility * Realm Studio: 13.0.0 or later. diff --git a/Realm/Realm.SourceGenerator/ClassCodeBuilder.cs b/Realm/Realm.SourceGenerator/ClassCodeBuilder.cs index cf61598d09..56ea2158ba 100644 --- a/Realm/Realm.SourceGenerator/ClassCodeBuilder.cs +++ b/Realm/Realm.SourceGenerator/ClassCodeBuilder.cs @@ -476,7 +476,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Realm/Realm.SourceGenerator/Diagnostics.cs b/Realm/Realm.SourceGenerator/Diagnostics.cs index b321d5b754..a3440068d0 100644 --- a/Realm/Realm.SourceGenerator/Diagnostics.cs +++ b/Realm/Realm.SourceGenerator/Diagnostics.cs @@ -53,6 +53,7 @@ private enum Id IndexedPrimaryKey = 28, InvalidCollectionInitializer = 29, InvalidCollectionInitializerInCtor = 30, + OldCSharpVersion = 100, InvalidGeneratorConfiguration = 1000, } @@ -67,6 +68,15 @@ public static Diagnostic InvalidConfiguration(string field, string description) Location.None); } + public static Diagnostic OldCSharpVersion() + { + return CreateDiagnosticError( + Id.OldCSharpVersion, + "Unsupported version of C#", + $"It is not possible to use the Realm source generator with C# versions older than 8.0.", + Location.None); + } + public static Diagnostic UnexpectedError(string className, string message, string stackTrace) { return CreateDiagnosticError( @@ -82,7 +92,7 @@ public static Diagnostic ClassUnclearDefinition(string className, Location locat return CreateDiagnosticError( Id.ClassUnclearDefinition, "Realm classes cannot implement multiple class interfaces", - $"Class {className} is declared as implementing multiple class interfaces.A class can implement only one interface between IRealmObject, IEmbeddedObject, IAsymmetricObject.", + $"Class {className} is declared as implementing multiple class interfaces. A class can implement only one interface between IRealmObject, IEmbeddedObject, IAsymmetricObject.", location); } diff --git a/Realm/Realm.SourceGenerator/DiagnosticsEmitter.cs b/Realm/Realm.SourceGenerator/DiagnosticsEmitter.cs index 4b73f92e4a..04379950d0 100644 --- a/Realm/Realm.SourceGenerator/DiagnosticsEmitter.cs +++ b/Realm/Realm.SourceGenerator/DiagnosticsEmitter.cs @@ -59,6 +59,8 @@ public void Emit(ParsingResults parsingResults) throw; } } + + parsingResults.GeneralDiagnostics.ForEach(_context.ReportDiagnostic); } private static void SerializeDiagnostics(GeneratorExecutionContext context, ClassInfo classInfo) diff --git a/Realm/Realm.SourceGenerator/Parser.cs b/Realm/Realm.SourceGenerator/Parser.cs index 8def84a5b4..e612ee109e 100644 --- a/Realm/Realm.SourceGenerator/Parser.cs +++ b/Realm/Realm.SourceGenerator/Parser.cs @@ -46,6 +46,14 @@ public ParsingResults Parse(IEnumerable realmClasses) var classNames = new HashSet(); var duplicateClassNames = new HashSet(); + if (realmClasses.Any() && + _context.Compilation is CSharpCompilation comp && + comp.LanguageVersion < LanguageVersion.CSharp8) + { + result.GeneralDiagnostics.Add(Diagnostics.OldCSharpVersion()); + return result; + } + foreach (var rc in realmClasses) { var classSymbol = rc.ClassSymbol; @@ -556,5 +564,7 @@ private static string RemoveUsingKeyword(UsingDirectiveSyntax syntax) internal record ParsingResults { public List ClassInfo { get; } = new(); + + public List GeneralDiagnostics { get; } = new(); } } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/A_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/A_generated.cs index 8a7d13dad1..6eabace574 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/A_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/A_generated.cs @@ -223,7 +223,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AgedObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AgedObject_generated.cs index 91d1950d8b..59974270d4 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AgedObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AgedObject_generated.cs @@ -212,7 +212,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AllTypesObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AllTypesObject_generated.cs index d2f91e35f1..3182017ee4 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AllTypesObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AllTypesObject_generated.cs @@ -370,7 +370,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithAllTypes_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithAllTypes_generated.cs index ab75a5e887..692194a3d1 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithAllTypes_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithAllTypes_generated.cs @@ -354,7 +354,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedDictionaryObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedDictionaryObject_generated.cs index faf7bd333a..b8532dfaa5 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedDictionaryObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedDictionaryObject_generated.cs @@ -227,7 +227,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedListObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedListObject_generated.cs index eeefe82425..add3059941 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedListObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedListObject_generated.cs @@ -227,7 +227,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedRecursiveObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedRecursiveObject_generated.cs index f69a94c3db..5c9d0df82f 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedRecursiveObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedRecursiveObject_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/B_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/B_generated.cs index 63b07c3acf..84c2e6edf0 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/B_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/B_generated.cs @@ -218,7 +218,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BacklinkObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BacklinkObject_generated.cs index cafe4fc349..1d20b345c0 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BacklinkObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BacklinkObject_generated.cs @@ -221,7 +221,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Bar_DuplicateClass_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Bar_DuplicateClass_generated.cs index bea886a673..6e37360b79 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Bar_DuplicateClass_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Bar_DuplicateClass_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BasicAsymmetricObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BasicAsymmetricObject_generated.cs index 555ec6298a..0e8ebd506d 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BasicAsymmetricObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BasicAsymmetricObject_generated.cs @@ -225,7 +225,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Child_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Child_generated.cs index ec51e1dd3a..7547620cce 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Child_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Child_generated.cs @@ -228,7 +228,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Cities_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Cities_generated.cs index 416cf5f79b..675a20b9e7 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Cities_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Cities_generated.cs @@ -215,7 +215,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ClassWithUnqueryableMembers_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ClassWithUnqueryableMembers_generated.cs index 3344f77bc3..1dd62a38db 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ClassWithUnqueryableMembers_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ClassWithUnqueryableMembers_generated.cs @@ -236,7 +236,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CollectionsObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CollectionsObject_generated.cs index 1d29c28c7d..a6e5252691 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CollectionsObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CollectionsObject_generated.cs @@ -489,7 +489,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Company_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Company_generated.cs index e05f02c423..d681634228 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Company_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Company_generated.cs @@ -230,7 +230,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CompletionReport_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CompletionReport_generated.cs index 172e87060e..9328c2e3d9 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CompletionReport_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CompletionReport_generated.cs @@ -221,7 +221,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ContainerObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ContainerObject_generated.cs index 0020f94c64..03e280ea94 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ContainerObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ContainerObject_generated.cs @@ -219,7 +219,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CoordinatesEmbeddedObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CoordinatesEmbeddedObject_generated.cs index 75de3f5639..f37e03f2d6 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CoordinatesEmbeddedObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CoordinatesEmbeddedObject_generated.cs @@ -225,7 +225,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CounterObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CounterObject_generated.cs index f31b7fa4d9..f71de80055 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CounterObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CounterObject_generated.cs @@ -257,7 +257,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CustomGeoPoint_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CustomGeoPoint_generated.cs index fcb7e0f432..2ec2d50b39 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CustomGeoPoint_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/CustomGeoPoint_generated.cs @@ -231,7 +231,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DecimalsObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DecimalsObject_generated.cs index 33334da38b..f5348fad8f 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DecimalsObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DecimalsObject_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DictionariesObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DictionariesObject_generated.cs index ab02f926eb..7485f7fa65 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DictionariesObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DictionariesObject_generated.cs @@ -312,7 +312,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dog_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dog_generated.cs index 91e022f63e..757618fccd 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dog_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dog_generated.cs @@ -233,7 +233,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicDog_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicDog_generated.cs index 9a90488422..338022bc86 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicDog_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicDog_generated.cs @@ -225,7 +225,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicOwner_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicOwner_generated.cs index 582d3ed680..8724e3a9ef 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicOwner_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicOwner_generated.cs @@ -242,7 +242,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicSubSubTask_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicSubSubTask_generated.cs index 760c6cc2bd..72be9454f4 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicSubSubTask_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicSubSubTask_generated.cs @@ -221,7 +221,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicSubTask_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicSubTask_generated.cs index 4c0313f3e0..83119953ca 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicSubTask_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicSubTask_generated.cs @@ -228,7 +228,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicTask_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicTask_generated.cs index 58099a956a..7536a39c74 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicTask_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/DynamicTask_generated.cs @@ -235,7 +235,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedAllTypesObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedAllTypesObject_generated.cs index af12bd4465..0ce4a29a38 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedAllTypesObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedAllTypesObject_generated.cs @@ -381,7 +381,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedGuidType_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedGuidType_generated.cs index 3429969fa1..ae089bd052 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedGuidType_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedGuidType_generated.cs @@ -266,7 +266,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedIntPropertyObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedIntPropertyObject_generated.cs index 791f2f7700..36594cb2b8 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedIntPropertyObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedIntPropertyObject_generated.cs @@ -221,7 +221,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel1_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel1_generated.cs index 744967608d..26e994ed31 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel1_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel1_generated.cs @@ -230,7 +230,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel2_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel2_generated.cs index 28edaacb93..7306e0f974 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel2_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel2_generated.cs @@ -230,7 +230,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel3_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel3_generated.cs index ce2cc51cfc..bc293d8a0c 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel3_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedLevel3_generated.cs @@ -221,7 +221,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ExplicitClass_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ExplicitClass_generated.cs index 9c65b63058..b7b99b3ddb 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ExplicitClass_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ExplicitClass_generated.cs @@ -215,7 +215,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Foo_DuplicateClass_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Foo_DuplicateClass_generated.cs index 1693329902..6574d7f322 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Foo_DuplicateClass_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Foo_DuplicateClass_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/GuidType_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/GuidType_generated.cs index a0858f8353..cab1e93067 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/GuidType_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/GuidType_generated.cs @@ -269,7 +269,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/HugeSyncObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/HugeSyncObject_generated.cs index 290ba2b174..88e884025d 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/HugeSyncObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/HugeSyncObject_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexedDateTimeOffsetObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexedDateTimeOffsetObject_generated.cs index 578551618d..22857dcf81 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexedDateTimeOffsetObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexedDateTimeOffsetObject_generated.cs @@ -213,7 +213,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexesClass_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexesClass_generated.cs index 8c01b43352..f658572a67 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexesClass_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexesClass_generated.cs @@ -250,7 +250,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/InitializedFieldObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/InitializedFieldObject_generated.cs index 88999b42a7..47804adf98 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/InitializedFieldObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/InitializedFieldObject_generated.cs @@ -212,7 +212,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IntPrimaryKeyWithValueObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IntPrimaryKeyWithValueObject_generated.cs index 9f607e5b1f..0deca73a3a 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IntPrimaryKeyWithValueObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IntPrimaryKeyWithValueObject_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IntPropertyObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IntPropertyObject_generated.cs index d52e69f02a..93c96f6ad2 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IntPropertyObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IntPropertyObject_generated.cs @@ -228,7 +228,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level1_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level1_generated.cs index fb3c5608d3..42538ffe4f 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level1_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level1_generated.cs @@ -221,7 +221,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level2_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level2_generated.cs index d5eae17ac8..aed67ea4f9 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level2_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level2_generated.cs @@ -221,7 +221,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level3_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level3_generated.cs index f37a722977..6f2fc97c3d 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level3_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Level3_generated.cs @@ -212,7 +212,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ListsObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ListsObject_generated.cs index 1417aa8c55..922e1af826 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ListsObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ListsObject_generated.cs @@ -309,7 +309,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/LoneClass_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/LoneClass_generated.cs index d6473f2fd0..eac1f89ac7 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/LoneClass_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/LoneClass_generated.cs @@ -221,7 +221,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/MixedProperties1_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/MixedProperties1_generated.cs index f23fcdab57..7e768e51c3 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/MixedProperties1_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/MixedProperties1_generated.cs @@ -229,7 +229,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/MixedProperties2_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/MixedProperties2_generated.cs index c24d414f65..80670319dc 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/MixedProperties2_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/MixedProperties2_generated.cs @@ -229,7 +229,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NoListProperties_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NoListProperties_generated.cs index aa9639f5c5..409d5f73cc 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NoListProperties_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NoListProperties_generated.cs @@ -219,7 +219,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyObject_generated.cs index d32e750fcc..64060f9dea 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyObject_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyWithNonPKRelation_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyWithNonPKRelation_generated.cs index e061ecd958..6ac4c28a83 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyWithNonPKRelation_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyWithNonPKRelation_generated.cs @@ -223,7 +223,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyWithPKRelation_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyWithPKRelation_generated.cs index f22994b393..9d7d3fabd1 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyWithPKRelation_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NonPrimaryKeyWithPKRelation_generated.cs @@ -223,7 +223,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NullablePrimaryKeyObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NullablePrimaryKeyObject_generated.cs index 6bfee19d5e..7767a7282a 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NullablePrimaryKeyObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NullablePrimaryKeyObject_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectContainerEmbedded_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectContainerEmbedded_generated.cs index 33edc18338..205752b1fa 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectContainerEmbedded_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectContainerEmbedded_generated.cs @@ -226,7 +226,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectContainerV1_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectContainerV1_generated.cs index 1fb1d71dc8..c2080fce6e 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectContainerV1_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectContainerV1_generated.cs @@ -230,7 +230,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectEmbedded_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectEmbedded_generated.cs index 4647c47e42..ac6ca16d62 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectEmbedded_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectEmbedded_generated.cs @@ -221,7 +221,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectIdPrimaryKeyWithValueObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectIdPrimaryKeyWithValueObject_generated.cs index 47e370b3c4..501c7b9203 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectIdPrimaryKeyWithValueObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectIdPrimaryKeyWithValueObject_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectV1_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectV1_generated.cs index cb9ff18113..37ec464c40 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectV1_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectV1_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectV2_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectV2_generated.cs index db7a99f950..d971278232 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectV2_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectV2_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithEmbeddedProperties_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithEmbeddedProperties_generated.cs index 0293319d73..c24a0bad90 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithEmbeddedProperties_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithEmbeddedProperties_generated.cs @@ -231,7 +231,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithFtsIndex_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithFtsIndex_generated.cs index 5ab142157e..8b3de4dc32 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithFtsIndex_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithFtsIndex_generated.cs @@ -225,7 +225,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithInvalidGeoPoints_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithInvalidGeoPoints_generated.cs index d4bd4ab153..7fdecd0695 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithInvalidGeoPoints_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithInvalidGeoPoints_generated.cs @@ -224,7 +224,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithObjectProperties_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithObjectProperties_generated.cs index 87802ee1b2..30a4a5a65d 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithObjectProperties_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithObjectProperties_generated.cs @@ -220,7 +220,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithPartitionValue_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithPartitionValue_generated.cs index bd18e77eca..c1566a0285 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithPartitionValue_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithPartitionValue_generated.cs @@ -246,7 +246,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithRequiredStringList_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithRequiredStringList_generated.cs index 7f3c7c48e6..fae2775aa9 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithRequiredStringList_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ObjectWithRequiredStringList_generated.cs @@ -219,7 +219,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OnManagedTestClass_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OnManagedTestClass_generated.cs index a09da6fcbd..32d181449d 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OnManagedTestClass_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OnManagedTestClass_generated.cs @@ -231,7 +231,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OneListProperty_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OneListProperty_generated.cs index bac826b9b7..e1274540fb 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OneListProperty_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OneListProperty_generated.cs @@ -216,7 +216,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OneNonListProperty_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OneNonListProperty_generated.cs index a849c5c163..53f9720289 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OneNonListProperty_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OneNonListProperty_generated.cs @@ -214,7 +214,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OnlyListProperties_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OnlyListProperties_generated.cs index 21641d8d84..6f83455abd 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OnlyListProperties_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OnlyListProperties_generated.cs @@ -219,7 +219,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OrderedContainer_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OrderedContainer_generated.cs index 9db1f056c4..c09a275a0e 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OrderedContainer_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OrderedContainer_generated.cs @@ -223,7 +223,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OrderedObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OrderedObject_generated.cs index 7156723f59..613fcbbcb0 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OrderedObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OrderedObject_generated.cs @@ -223,7 +223,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Owner_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Owner_generated.cs index d1df34c073..39aaa535bd 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Owner_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Owner_generated.cs @@ -236,7 +236,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Parent_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Parent_generated.cs index cd4dc35577..5f7adb3584 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Parent_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Parent_generated.cs @@ -228,7 +228,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Person_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Person_generated.cs index f25a06f095..cfd948fd6c 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Person_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Person_generated.cs @@ -272,7 +272,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyByteObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyByteObject_generated.cs index ce08f7cc4d..0d2d61e301 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyByteObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyByteObject_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyCharObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyCharObject_generated.cs index 2e94e06cbc..c012d0b1dd 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyCharObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyCharObject_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyGuidObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyGuidObject_generated.cs index 9caf93bd6d..128a1aa32b 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyGuidObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyGuidObject_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt16Object_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt16Object_generated.cs index d0ce43e575..51f1986424 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt16Object_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt16Object_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt32Object_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt32Object_generated.cs index c4ad8a2e82..26adb13c9b 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt32Object_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt32Object_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt64Object_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt64Object_generated.cs index 0a2ca34ca7..5c0a027e37 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt64Object_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyInt64Object_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableByteObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableByteObject_generated.cs index 061aa22287..622c36a06d 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableByteObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableByteObject_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableCharObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableCharObject_generated.cs index 96de9f1548..db430fee47 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableCharObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableCharObject_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableGuidObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableGuidObject_generated.cs index f4ef65a931..00779119fa 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableGuidObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableGuidObject_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt16Object_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt16Object_generated.cs index fdad6aa47d..13d9a73380 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt16Object_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt16Object_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt32Object_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt32Object_generated.cs index 8f728e5e85..2932e30449 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt32Object_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt32Object_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt64Object_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt64Object_generated.cs index f2c1d034ca..88998d36ec 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt64Object_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableInt64Object_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableObjectIdObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableObjectIdObject_generated.cs index 4064267466..d8d6cda04e 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableObjectIdObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyNullableObjectIdObject_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyObjectIdObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyObjectIdObject_generated.cs index 621ecf0500..00bbdfd476 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyObjectIdObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyObjectIdObject_generated.cs @@ -217,7 +217,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyObject_generated.cs index 6b7f6c4f37..cff4eccecf 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyObject_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyStringObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyStringObject_generated.cs index 311dd9e613..e890c78b21 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyStringObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyStringObject_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNoPKList_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNoPKList_generated.cs index 7817343102..91a488e078 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNoPKList_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNoPKList_generated.cs @@ -229,7 +229,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNonPKChildWithPKGrandChild_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNonPKChildWithPKGrandChild_generated.cs index 94511d6b3e..4f4f3d3da2 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNonPKChildWithPKGrandChild_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNonPKChildWithPKGrandChild_generated.cs @@ -228,7 +228,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNonPKRelation_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNonPKRelation_generated.cs index da2cc56204..2852f1b04d 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNonPKRelation_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithNonPKRelation_generated.cs @@ -228,7 +228,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithPKList_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithPKList_generated.cs index 6e30bf7475..a3fec2412e 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithPKList_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithPKList_generated.cs @@ -229,7 +229,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithPKRelation_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithPKRelation_generated.cs index 966b607fbe..61e08aeac2 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithPKRelation_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrimaryKeyWithPKRelation_generated.cs @@ -228,7 +228,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrivatePrimaryKeyObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrivatePrimaryKeyObject_generated.cs index 3e8191bf10..288b1e5a21 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrivatePrimaryKeyObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PrivatePrimaryKeyObject_generated.cs @@ -219,7 +219,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Product_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Product_generated.cs index 13f615d0c0..3ec59871c0 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Product_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Product_generated.cs @@ -231,7 +231,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmValueObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmValueObject_generated.cs index 1e0d25706f..dfde8a3acc 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmValueObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmValueObject_generated.cs @@ -235,7 +235,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RecursiveBacklinksObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RecursiveBacklinksObject_generated.cs index 556ea41346..138c28424c 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RecursiveBacklinksObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RecursiveBacklinksObject_generated.cs @@ -224,7 +224,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RemappedPropertiesObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RemappedPropertiesObject_generated.cs index 650a7769be..231de77521 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RemappedPropertiesObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RemappedPropertiesObject_generated.cs @@ -222,7 +222,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RemappedTypeObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RemappedTypeObject_generated.cs index 7ee4ef711b..b34f0329c1 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RemappedTypeObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RemappedTypeObject_generated.cs @@ -246,7 +246,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Report_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Report_generated.cs index fe4854dcf3..a134b71a46 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Report_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Report_generated.cs @@ -230,7 +230,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredPrimaryKeyStringObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredPrimaryKeyStringObject_generated.cs index afd45579e1..8f2cc938b3 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredPrimaryKeyStringObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredPrimaryKeyStringObject_generated.cs @@ -219,7 +219,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredPropertyClass_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredPropertyClass_generated.cs index a94a0e7795..1ebb60e13f 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredPropertyClass_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredPropertyClass_generated.cs @@ -212,7 +212,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredStringObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredStringObject_generated.cs index f6ff00f2a9..5c86a7bf89 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredStringObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RequiredStringObject_generated.cs @@ -214,7 +214,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SerializedObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SerializedObject_generated.cs index 5144d7c1b4..98f67ed2bd 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SerializedObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SerializedObject_generated.cs @@ -236,7 +236,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SomeClass_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SomeClass_generated.cs index 0c90513182..cfda7c6804 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SomeClass_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SomeClass_generated.cs @@ -216,7 +216,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncAllTypesObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncAllTypesObject_generated.cs index 41618866b3..7d26b3b84f 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncAllTypesObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncAllTypesObject_generated.cs @@ -299,7 +299,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncCollectionsObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncCollectionsObject_generated.cs index d0a3f17e64..9f5de14637 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncCollectionsObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncCollectionsObject_generated.cs @@ -376,7 +376,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncObjectWithRequiredStringList_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncObjectWithRequiredStringList_generated.cs index 5d6013b912..6cd1bdfefe 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncObjectWithRequiredStringList_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/SyncObjectWithRequiredStringList_generated.cs @@ -234,7 +234,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TestNotificationObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TestNotificationObject_generated.cs index 5d4e13b530..a0da17a2d4 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TestNotificationObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TestNotificationObject_generated.cs @@ -248,7 +248,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ThrowsBeforeInitializer_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ThrowsBeforeInitializer_generated.cs index 580106e435..978ff93888 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ThrowsBeforeInitializer_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ThrowsBeforeInitializer_generated.cs @@ -218,7 +218,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TopLevelGeoPoint_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TopLevelGeoPoint_generated.cs index 7dc0fe78bf..a419350992 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TopLevelGeoPoint_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TopLevelGeoPoint_generated.cs @@ -223,7 +223,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TypeEmbeddedObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TypeEmbeddedObject_generated.cs index 4c139f1141..0613fabf58 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TypeEmbeddedObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/TypeEmbeddedObject_generated.cs @@ -220,7 +220,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/UnqueryableBacklinks_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/UnqueryableBacklinks_generated.cs index 182c99f85c..12978eb3dd 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/UnqueryableBacklinks_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/UnqueryableBacklinks_generated.cs @@ -218,7 +218,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Walker_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Walker_generated.cs index 6b51af2d88..55c5cf1a3d 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Walker_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Walker_generated.cs @@ -233,7 +233,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/Realm.SourceGenerator.Tests/ComparisonTests.cs b/Tests/SourceGenerators/Realm.SourceGenerator.Tests/ComparisonTests.cs index c9d79740b7..8387ed3ab3 100644 --- a/Tests/SourceGenerators/Realm.SourceGenerator.Tests/ComparisonTests.cs +++ b/Tests/SourceGenerators/Realm.SourceGenerator.Tests/ComparisonTests.cs @@ -17,6 +17,8 @@ //////////////////////////////////////////////////////////////////////////// using System.Text.RegularExpressions; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Testing; using Realms.SourceGenerator; using RealmGeneratorVerifier = SourceGeneratorTests.CSharpSourceGeneratorVerifier; @@ -69,6 +71,22 @@ public async Task IgnoreObjectNullabilityTest() await test.RunAsync(); } + [Test] + public async Task OldCSharpVersionTest() + { + var className = "AllTypesClass"; + var source = GetSource(className, ClassFolder.Test); + var error = new DiagnosticResult("RLM100", DiagnosticSeverity.Error) + .WithMessage("It is not possible to use the Realm source generator with C# versions older than 8.0."); + + var test = new RealmGeneratorVerifier.Test(); + test.LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp7; + test.TestState.Sources.Add(source); + test.TestState.ExpectedDiagnostics.Add(error); + + await test.RunAsync(); + } + private static ComparisonTestInfo[] GetTestInfos(string folder) => Directory.GetFiles(folder) .Select(f => diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AllTypesClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AllTypesClass_generated.cs index fa14f0e3d7..c2e92423ad 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AllTypesClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AllTypesClass_generated.cs @@ -408,7 +408,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AutomaticPropertiesClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AutomaticPropertiesClass_generated.cs index 58fae4a958..2042e5959a 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AutomaticPropertiesClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AutomaticPropertiesClass_generated.cs @@ -212,7 +212,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ClassWithoutParameterlessConstructor_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ClassWithoutParameterlessConstructor_generated.cs index fc33b35293..cfd6b586a5 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ClassWithoutParameterlessConstructor_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ClassWithoutParameterlessConstructor_generated.cs @@ -213,7 +213,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ConfusingNamespaceClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ConfusingNamespaceClass_generated.cs index 4690a68c29..321b82a932 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ConfusingNamespaceClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/ConfusingNamespaceClass_generated.cs @@ -212,7 +212,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dog_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dog_generated.cs index 0608c39b00..fae3c184e3 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dog_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dog_generated.cs @@ -218,7 +218,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedObj_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedObj_generated.cs index 93fd7dc59d..a0233488e7 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedObj_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/EmbeddedObj_generated.cs @@ -216,7 +216,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IgnoreObjectNullabilityClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IgnoreObjectNullabilityClass_generated.cs index f9696b2dea..bf514b6625 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IgnoreObjectNullabilityClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IgnoreObjectNullabilityClass_generated.cs @@ -243,7 +243,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexedClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexedClass_generated.cs index 0370ae6c65..aa47133079 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexedClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/IndexedClass_generated.cs @@ -234,7 +234,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/InitializerNamespaceClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/InitializerNamespaceClass_generated.cs index 2277a823f0..ee9a06f573 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/InitializerNamespaceClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/InitializerNamespaceClass_generated.cs @@ -210,7 +210,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NamespaceObj_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NamespaceObj_generated.cs index b3af52bba5..6749958b08 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NamespaceObj_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NamespaceObj_generated.cs @@ -219,7 +219,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NestedClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NestedClass_generated.cs index 3b56374f9c..b81ff2175c 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NestedClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NestedClass_generated.cs @@ -220,7 +220,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NoNamespaceClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NoNamespaceClass_generated.cs index c2993b16fe..e5c7bce65d 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NoNamespaceClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NoNamespaceClass_generated.cs @@ -206,7 +206,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NullableClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NullableClass_generated.cs index 8c4e962b0d..7c75e078da 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NullableClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/NullableClass_generated.cs @@ -275,7 +275,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OtherNamespaceObj_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OtherNamespaceObj_generated.cs index a901baa59c..5d50cf032f 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OtherNamespaceObj_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/OtherNamespaceObj_generated.cs @@ -212,7 +212,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PartialClass_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PartialClass_generated.cs index 3ecc95bb5d..79455129e8 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PartialClass_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/PartialClass_generated.cs @@ -214,7 +214,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Person_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Person_generated.cs index 97a8d071a1..eac0a6e766 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Person_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Person_generated.cs @@ -218,7 +218,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmObj_generated.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmObj_generated.cs index dbb91b4f4a..6b14d5f8ec 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmObj_generated.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmObj_generated.cs @@ -212,7 +212,7 @@ public override bool Equals(object? obj) return !IsValid; } - if (obj is not Realms.IRealmObjectBase iro) + if (!(obj is Realms.IRealmObjectBase iro)) { return false; } diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmObjectAndEmbeddedObjectClass.diagnostics.cs b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmObjectAndEmbeddedObjectClass.diagnostics.cs index 64793f6b2f..aa72222a34 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmObjectAndEmbeddedObjectClass.diagnostics.cs +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/RealmObjectAndEmbeddedObjectClass.diagnostics.cs @@ -2,7 +2,7 @@ { "Id": "RLM002", "Severity": 3, - "Message": "Class RealmObjectAndEmbeddedObjectClass is declared as implementing multiple class interfaces.A class can implement only one interface between IRealmObject, IEmbeddedObject, IAsymmetricObject.", + "Message": "Class RealmObjectAndEmbeddedObjectClass is declared as implementing multiple class interfaces. A class can implement only one interface between IRealmObject, IEmbeddedObject, IAsymmetricObject.", "Location": { "StartLine": 23, "StartColumn": 26, diff --git a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/SourceGeneratorAssemblyToProcess.csproj b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/SourceGeneratorAssemblyToProcess.csproj index 99107aa272..0dc901ace3 100644 --- a/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/SourceGeneratorAssemblyToProcess.csproj +++ b/Tests/SourceGenerators/SourceGeneratorAssemblyToProcess/SourceGeneratorAssemblyToProcess.csproj @@ -3,7 +3,6 @@ Library net6.0 disable - disable true Generated enable