Merge pull request #3499 from kumpera/fix_logging
[mono.git] / mcs / mcs / property.cs
index 718fe669922f885d4191817f1de83d06e4543221..8036f2c1126a56319198464e021386325110ca10 100644 (file)
@@ -17,7 +17,7 @@ using System.Collections.Generic;
 using System.Text;
 using Mono.CompilerServices.SymbolWriter;
 
-#if NET_2_1
+#if MOBILE
 using XmlElement = System.Object;
 #endif
 
@@ -82,8 +82,6 @@ namespace Mono.CSharp
                        }
                }
 
-               public abstract void PrepareEmit ();
-
                protected override bool VerifyClsCompliance ()
                {
                        if (!base.VerifyClsCompliance ())
@@ -903,7 +901,7 @@ namespace Mono.CSharp
 
                public override void Emit ()
                {
-                       if ((AccessorFirst.ModFlags & (Modifiers.STATIC | Modifiers.COMPILER_GENERATED)) == Modifiers.COMPILER_GENERATED && Parent.PartialContainer.HasExplicitLayout) {
+                       if ((AccessorFirst.ModFlags & (Modifiers.STATIC | Modifiers.AutoProperty)) == Modifiers.AutoProperty && Parent.PartialContainer.HasExplicitLayout) {
                                Report.Error (842, Location,
                                        "Automatically implemented property `{0}' cannot be used inside a type with an explicit StructLayout attribute",
                                        GetSignatureForError ());
@@ -1451,6 +1449,8 @@ namespace Mono.CSharp
 
                public override void PrepareEmit ()
                {
+                       base.PrepareEmit ();
+
                        add.PrepareEmit ();
                        remove.PrepareEmit ();
 
@@ -1760,9 +1760,8 @@ namespace Mono.CSharp
 
                public override void PrepareEmit ()
                {
-                       parameters.ResolveDefaultValues (this);
-
                        base.PrepareEmit ();
+                       parameters.ResolveDefaultValues (this);
                }
 
                protected override bool VerifyClsCompliance ()