From 439efd1550da1cbadbf233cd02402a21237a554c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 13:16:11 +0200 Subject: [PATCH] Drop the inert inherit flag from the global check and its derived-type case [CultGlobal] is not inherited, so the flag changed nothing and no test can tell. Co-Authored-By: Claude Sonnet 5 --- src/GameCult.Caching/CultInspectorModel.cs | 2 +- tests/GameCult.Caching.Tests/CultInspectorModelTests.cs | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/GameCult.Caching/CultInspectorModel.cs b/src/GameCult.Caching/CultInspectorModel.cs index 7c3cb45e..efb602d3 100644 --- a/src/GameCult.Caching/CultInspectorModel.cs +++ b/src/GameCult.Caching/CultInspectorModel.cs @@ -561,7 +561,7 @@ namespace GameCult.Caching CultInspectorGrouping Refused(string reason) => new CultInspectorGrouping(listed, Array.Empty(), $"[CultInspectorGroupBy] on {listed.Name}: {reason} The list is not grouped."); - if (listed.GetCustomAttribute(true) != null) + if (listed.GetCustomAttribute() != null) return Refused("a global document is never grouped."); var members = new List(); foreach (var name in declared.Members) diff --git a/tests/GameCult.Caching.Tests/CultInspectorModelTests.cs b/tests/GameCult.Caching.Tests/CultInspectorModelTests.cs index 3432c858..bf0c815a 100644 --- a/tests/GameCult.Caching.Tests/CultInspectorModelTests.cs +++ b/tests/GameCult.Caching.Tests/CultInspectorModelTests.cs @@ -630,7 +630,6 @@ namespace GameCult.Caching.Tests [TestCase(typeof(GroupDuplicate), "Kind")] [TestCase(typeof(GroupValidThenInvalid), "Mass")] [TestCase(typeof(GroupGlobal), "global")] - [TestCase(typeof(GroupGlobalChild), "global")] public void GroupInvalidDeclarationsGiveANoticeAndAFlatList(Type listed, string mentions) { var model = GroupModel(); @@ -888,17 +887,12 @@ namespace GameCult.Caching.Tests [CultGlobal] [CultDocument("tests.group_global", "tests.group_global.v1")] [MessagePackObject] - public class GroupGlobal + public sealed class GroupGlobal { [Key(0)] public string Kind = string.Empty; } - [CultInspectorGroupBy("Kind")] - public sealed class GroupGlobalChild : GroupGlobal - { - } - [CultInspectorGroupBy("Kind")] [CultDocument("tests.group_no_ctor", "tests.group_no_ctor.v1")] [MessagePackObject]