D-Programming-Language/dmd — pull request #1199 by AndrejMitrovic (2012-10-20 18:37:21+00:00)
Title: Fix Issue 8777 - "final fields" in error messages 

Add modToChars to avoid code duplication in diagnostics.
Avoid code duplication by using new modToChars
Add test-cases for const/immutable diagnostics.

I've introduced a **modToChars** function which simply returns a string representation of a modifier (const/immutable/shared/inout). There were some code duplication already doing this inline but in the future this function can be called.