--- /dev/null
+// CS0534: `Foo' does not implement inherited abstract member `SomeAbstract.SomeProperty.get'
+// Line: 13
+
+public class SomeProperty
+{
+}
+
+public abstract class SomeAbstract
+{
+ public abstract SomeProperty SomeProperty { get; }
+}
+
+public class Foo : SomeAbstract
+{
+ public static SomeProperty SomeProperty { get { return null; } }
+}
+
--- /dev/null
+// CS0540: `Foo.ISomeProp.SomeProperty': containing type does not implement interface `ISomeProp'
+// Line: 18
+
+public class SomeProperty
+{
+}
+
+public abstract class SomeAbstract : ISomeProp
+{
+ public abstract SomeProperty SomeProperty { get; }
+}
+
+interface ISomeProp
+{
+ SomeProperty SomeProperty { get; }
+}
+
+public class Foo : SomeAbstract
+{
+ SomeProperty ISomeProp.SomeProperty { get { return null; } }
+
+ public override SomeProperty SomeProperty { get { return null; } }
+
+ public static void Main ()
+ {
+ }
+}
/// </summary>
public bool VerifyImplements (InterfaceMemberBase mb)
{
- var ifaces = spec.Interfaces;
+ var ifaces = PartialContainer.Interfaces;
if (ifaces != null) {
foreach (TypeSpec t in ifaces){
if (t == mb.InterfaceType)
return true;
+
+ var expanded_base = t.Interfaces;
+ if (expanded_base == null)
+ continue;
+
+ foreach (var bt in expanded_base) {
+ if (bt == mb.InterfaceType)
+ return true;
+ }
}
}
}
}
- if (!IsInterface && base_member.IsAbstract && !overrides) {
+ if (!IsInterface && base_member.IsAbstract && !overrides && !IsStatic) {
Report.SymbolRelatedToPreviousError (base_member);
Report.Error (533, Location, "`{0}' hides inherited abstract member `{1}'",
GetSignatureForError (), base_member.GetSignatureForError ());