Parent.PartialContainer.Members.Add (BackingField);
FieldExpr fe = new FieldExpr (BackingField, Location);
- if ((BackingField.ModFlags & Modifiers.STATIC) == 0)
+ if ((BackingField.ModFlags & Modifiers.STATIC) == 0) {
fe.InstanceExpression = new CompilerGeneratedThis (Parent.CurrentType, Location);
+ Parent.PartialContainer.HasInstanceField = true;
+ }
//
// Create get block but we careful with location to
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 ();