From 5405f8ac3b1768cbdf6eec1e420b28e09796f07c Mon Sep 17 00:00:00 2001 From: Kristoffer Strube - Relewise <119578211+KSGRelewise@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:41:34 +0200 Subject: [PATCH] =?UTF-8?q?comment=20by=20S=C3=B8ren?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Søren Ernst <168634585+soe-relewise@users.noreply.github.com> --- Generator/Extensions/TypeExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Generator/Extensions/TypeExtensions.cs b/Generator/Extensions/TypeExtensions.cs index 86875b4f..568a64e9 100644 --- a/Generator/Extensions/TypeExtensions.cs +++ b/Generator/Extensions/TypeExtensions.cs @@ -2,6 +2,6 @@ public static class TypeExtensions { - public static bool IsConcreteTypeOfSomethingPolymorphic(this Type type) => ((type.BaseType != typeof(object) && type.BaseType is not null) || type.GetInterfaces().Length > 0) && !type.IsAbstract; + public static bool IsConcreteTypeOfSomethingPolymorphic(this Type type) => ((type.BaseType is not null && type.BaseType != typeof(object)) || type.GetInterfaces().Length > 0) && !type.IsAbstract; public static bool IsMaybeBaseClassOfSomethingPolymorphic(this Type type) => type.IsAbstract || type.IsInterface; } \ No newline at end of file