[CSharpCodeGenerator] Revert change for not ignoring Final attr on fields
authorLluis Sanchez <lluis@xamarin.com>
Wed, 28 Sep 2011 16:20:42 +0000 (18:20 +0200)
committerLluis Sanchez <lluis@xamarin.com>
Wed, 28 Sep 2011 16:20:42 +0000 (18:20 +0200)
MS.NET does ignore the Final attribute for fields, so we
have to ignore it to be compatible. Also, CodeMemberField
objects are created with the Final flag set, so with this
change all fields were now generated as readonly, which
is a severe regression.

mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs

index e1a97db934bbe499540007cfcc57f96d8c1a513e..17bb14597b293bf53e511ad0122d9ae538ece385 100644 (file)
@@ -1002,9 +1002,6 @@ namespace Mono.CSharp
                protected override void OutputFieldScopeModifier (MemberAttributes attributes)
                {
                        switch (attributes & MemberAttributes.ScopeMask) {
-                               case MemberAttributes.Final:
-                                       Output.Write ("readonly ");
-                                       break;
                                case MemberAttributes.Static:
                                        Output.Write ("static ");
                                        break;