Skip to content

Commit

Permalink
Fix capitalization in immutability diagnostic #675 (#676)
Browse files Browse the repository at this point in the history
- Added ".toString().toLower()" to force lowercase of "class", "interface" and "structure"
- Adjusted tests to take new capitalization into account

Closes: #675

Co-authored-by: Timothy J Cowen <[email protected]>
  • Loading branch information
TimothyJCowen and TimothyJCowen authored Dec 11, 2020
1 parent 08a8eab commit 39ea7ad
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ out diagnostic
diagnostic = Diagnostic.Create(
Diagnostics.NonImmutableTypeHeldByImmutable,
getLocation(),
type.TypeKind,
type.TypeKind.ToString().ToLower(),
type.Name,
kind == ImmutableTypeKind.Instance && !type.IsSealed ? " (or [ImmutableBaseClass])" : ""
);
Expand All @@ -189,7 +189,7 @@ out diagnostic
diagnostic = Diagnostic.Create(
Diagnostics.NonImmutableTypeHeldByImmutable,
getLocation(),
type.TypeKind,
type.TypeKind.ToString().ToLower(),
type.Name,
""
);
Expand Down
Loading

0 comments on commit 39ea7ad

Please sign in to comment.