Static Property "List" always returns all derived SmartEnum of root class
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 184
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
First Thanks for your work. Just a little issue with SmartEnum "inheritance".
If you add this test in SmartEnumList.cs, it won't pass :
```
[Fact]
public void ReturnsOnlyDerivedSmartEnums()
{
var result = DerivedTestEnumWithValues1.List;
result.Should().BeEquivalentTo(DerivedTestEnumWithValues1.A, DerivedTestEnumWithValues1.B);
}
```
Contributor guide
Research direction
Start with SmartEnumList.cs and add or run the ReturnsOnlyDerivedSmartEnums test shown in the issue. Trace how DerivedTestEnumWithValues1.List gathers values, then verify that the list contains only DerivedTestEnumWithValues1.A and DerivedTestEnumWithValues1.B.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100