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 <noreply@anthropic.com>
This commit is contained in:
parent
30e1f3fb95
commit
439efd1550
2 changed files with 2 additions and 8 deletions
|
|
@ -561,7 +561,7 @@ namespace GameCult.Caching
|
|||
CultInspectorGrouping Refused(string reason) =>
|
||||
new CultInspectorGrouping(listed, Array.Empty<CultInspectorMember>(), $"[CultInspectorGroupBy] on {listed.Name}: {reason} The list is not grouped.");
|
||||
|
||||
if (listed.GetCustomAttribute<CultGlobalAttribute>(true) != null)
|
||||
if (listed.GetCustomAttribute<CultGlobalAttribute>() != null)
|
||||
return Refused("a global document is never grouped.");
|
||||
var members = new List<CultInspectorMember>();
|
||||
foreach (var name in declared.Members)
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue