if (!rc.HasSet (ResolveContext.Options.ConstructorScope))
return false;
+ if (prop.Parent.PartialContainer != rc.CurrentMemberDefinition.Parent.PartialContainer) {
+ var ps = MemberCache.FindMember (rc.CurrentType, MemberFilter.Property (prop.ShortName, prop.MemberType), BindingRestriction.DeclaredOnly) as PropertySpec;
+ if (ps == null)
+ return false;
+
+ prop = (Property) ps.MemberDefinition;
+ }
+
var spec = prop.BackingField;
if (spec == null)
return false;
--- /dev/null
+abstract class Node
+{
+ public virtual int Next { get; }
+}
+
+class NodeLinked : Node
+{
+ public NodeLinked (int next)
+ {
+ this.Next = next;
+ }
+
+ public override int Next { get; }
+
+ public static int Main ()
+ {
+ var nl = new NodeLinked (5);
+ if (nl.Next != 5)
+ return 1;
+
+ return 0;
+ }
+}
</method>
</type>
</test>
+ <test name="gtest-autoproperty-19.cs">
+ <type name="Node">
+ <method name="Int32 get_Next()" attrs="2502">
+ <size>14</size>
+ </method>
+ <method name="Void .ctor()" attrs="6276">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="NodeLinked">
+ <method name="Int32 get_Next()" attrs="2246">
+ <size>14</size>
+ </method>
+ <method name="Int32 Main()" attrs="150">
+ <size>36</size>
+ </method>
+ <method name="Void .ctor(Int32)" attrs="6278">
+ <size>15</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-collectioninit-01.cs">
<type name="Test">
<method name="Void TestList(System.Collections.Generic.List`1[System.Int32], Int32)" attrs="145">