Skip to content

GetTypeName: include generic type arguments#582

Open
ada-l0velace wants to merge 1 commit into
SamboyCoding:developmentfrom
ada-l0velace:generic-type-args
Open

GetTypeName: include generic type arguments#582
ada-l0velace wants to merge 1 commit into
SamboyCoding:developmentfrom
ada-l0velace:generic-type-args

Conversation

@ada-l0velace

Copy link
Copy Markdown
Contributor

GetTypeName: include generic type arguments

GetTypeName currently removes the CLR arity suffix but also drops generic arguments.

List`1 → List
Dictionary`2 → Dictionary

This change keeps the base name and appends the arguments recursively.

Before / after

// before
private List _entries;
private Dictionary _scores;

// after
private List<LeaderboardEntry> _entries;
private Dictionary<int, PlayerScore> _scores;

Nested generics also work:

List<Dictionary<int, PlayerScore>>

Test

GenericTypeArgsTests verifies that generic arguments are included, nested arguments use GetTypeName, and CLR markers such as `1 and `2 do not appear.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 29466353224

Coverage increased (+0.01%) to 36.313%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: 4 of 4 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 12952
Covered Lines: 5081
Line Coverage: 39.23%
Relevant Branches: 8572
Covered Branches: 2735
Branch Coverage: 31.91%
Branches in Coverage %: Yes
Coverage Strength: 175260.57 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants