-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Labels
Milestone
Description
using System;
M(new C1());
M(new C2());
static void M(I x)
{
x.M1();
x.M2();
}
partial interface I
{
public void M1()
{
Console.Write(1);
}
public partial void M2();
public partial void M2()
{
Console.Write(2);
}
}
class C1 : I;
class C2 : I
{
public void M1()
{
Console.Write(3);
}
public void M2()
{
Console.Write(4);
}
}Expected behavior: Outputs 1234.
Actual behavior: Outputs 1232. That is, the partial method is not virtual unlike the non-partial method.
Notes: Partial properties and events behave similarly.
emonarafat