Skip to content

Commit

Permalink
Merge pull request #314 from tannergooding/main
Browse files Browse the repository at this point in the history
Ensure anonymous enums get tracked as part of a top-level class
  • Loading branch information
tannergooding authored Dec 19, 2021
2 parents d104db8 + de7026b commit 82ebd16
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ private void VisitEnumDecl(EnumDecl enumDecl)
if (!TryGetClass(name, out var className, disallowPrefixMatch: true))
{
className = _config.DefaultClass;
_ = _topLevelClassNames.Add(className);
_ = _topLevelClassNames.Add($"{className}Tests");
AddDiagnostic(DiagnosticLevel.Info, $"Found anonymous enum: {name}. Mapping values as constants in: {className}", enumDecl);
}

Expand Down

0 comments on commit 82ebd16

Please sign in to comment.