using System.Text;
using Mono.CompilerServices.SymbolWriter;
-#if NET_2_1
+#if MOBILE
using XmlElement = System.Object;
#endif
}
}
- public abstract void PrepareEmit ();
-
protected override bool VerifyClsCompliance ()
{
if (!base.VerifyClsCompliance ())
protected override void ApplyToExtraTarget (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
{
if (a.Target == AttributeTargets.Parameter) {
- parameters[0].ApplyAttributeBuilder (a, ctor, cdata, pa);
+ parameters[parameters.Count - 1].ApplyAttributeBuilder (a, ctor, cdata, pa);
return;
}
GetSignatureForError ());
}
} else if ((ModFlags & Modifiers.OVERRIDE) == 0 &&
- (Get == null && (Set.ModFlags & Modifiers.AccessibilityMask) != 0) ||
- (Set == null && (Get.ModFlags & Modifiers.AccessibilityMask) != 0)) {
+ ((Get == null && (Set.ModFlags & Modifiers.AccessibilityMask) != 0) || (Set == null && (Get.ModFlags & Modifiers.AccessibilityMask) != 0))) {
Report.Error (276, Location,
"`{0}': accessibility modifiers on accessors may only be used if the property or indexer has both a get and a set accessor",
GetSignatureForError ());
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 ());
backing_field = new Field (Parent,
new TypeExpression (MemberType, Location),
- Modifiers.BACKING_FIELD | Modifiers.COMPILER_GENERATED | Modifiers.PRIVATE | (ModFlags & (Modifiers.STATIC | Modifiers.UNSAFE)),
+ Modifiers.BACKING_FIELD | Modifiers.COMPILER_GENERATED | Modifiers.DEBUGGER_HIDDEN | Modifiers.PRIVATE | (ModFlags & (Modifiers.STATIC | Modifiers.UNSAFE)),
MemberName, null);
Parent.PartialContainer.Members.Add (backing_field);
backing_field.Initializer = Initializer;
- backing_field.ModFlags &= ~Modifiers.COMPILER_GENERATED;
// Call define because we passed fields definition
backing_field.Define ();
public override void PrepareEmit ()
{
+ base.PrepareEmit ();
+
add.PrepareEmit ();
remove.PrepareEmit ();
public override void PrepareEmit ()
{
- parameters.ResolveDefaultValues (this);
-
base.PrepareEmit ();
+ parameters.ResolveDefaultValues (this);
}
protected override bool VerifyClsCompliance ()