From 7084c6c24fcb6f168f1f5cfd979f98c63a99dd9d Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sun, 23 May 2021 23:54:45 -0700 Subject: [PATCH] fix(codegen): Fixes primitive check (#612) --- .../Rules/PrimitiveTypeMigrationRule.cs | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/Projects/SerializationGenerator/SerializableMigration/Rules/PrimitiveTypeMigrationRule.cs b/Projects/SerializationGenerator/SerializableMigration/Rules/PrimitiveTypeMigrationRule.cs index c4bb15cd1..b083b726e 100644 --- a/Projects/SerializationGenerator/SerializableMigration/Rules/PrimitiveTypeMigrationRule.cs +++ b/Projects/SerializationGenerator/SerializableMigration/Rules/PrimitiveTypeMigrationRule.cs @@ -40,22 +40,23 @@ namespace SerializationGenerator } if ( - symbol is not ITypeSymbol typeSymbol || - typeSymbol.SpecialType is not - SpecialType.System_Boolean or - SpecialType.System_SByte or - SpecialType.System_Int16 or - SpecialType.System_Int32 or - SpecialType.System_Int64 or - SpecialType.System_Byte or - SpecialType.System_UInt16 or - SpecialType.System_UInt32 or - SpecialType.System_UInt64 or - SpecialType.System_Single or - SpecialType.System_Double or - SpecialType.System_String or - SpecialType.System_Decimal or - SpecialType.System_DateTime + symbol is not ITypeSymbol { + SpecialType: not (not + SpecialType.System_Boolean and not + SpecialType.System_SByte and not + SpecialType.System_Int16 and not + SpecialType.System_Int32 and not + SpecialType.System_Int64 and not + SpecialType.System_Byte and not + SpecialType.System_UInt16 and not + SpecialType.System_UInt32 and not + SpecialType.System_UInt64 and not + SpecialType.System_Single and not + SpecialType.System_Double and not + SpecialType.System_String and not + SpecialType.System_Decimal and not + SpecialType.System_DateTime) + } typeSymbol ) { ruleArguments = null;