using System;
public class Test
{
interface Foo {
void Bar(int a, int b = 1);
}
class FooImpl : Foo {
public void Bar(int a, int b) {
Console.WriteLine("bar/2");
}
public void Bar(int a) {
Console.WriteLine("bar/1");
}
}
public static void Main()
{
Foo f1 = new FooImpl();
f1.Bar(1);
FooImpl f2 = new FooImpl();
f2.Bar(1);
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJaW50ZXJmYWNlIEZvbyB7CgkJdm9pZCBCYXIoaW50IGEsIGludCBiID0gMSk7Cgl9CgljbGFzcyBGb29JbXBsIDogRm9vIHsKCQlwdWJsaWMgdm9pZCBCYXIoaW50IGEsIGludCBiKSB7CgkJCUNvbnNvbGUuV3JpdGVMaW5lKCJiYXIvMiIpOwoJCX0KCQlwdWJsaWMgdm9pZCBCYXIoaW50IGEpIHsKCQkJQ29uc29sZS5Xcml0ZUxpbmUoImJhci8xIik7CgkJfQoJfQoJCglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkJRm9vIGYxID0gbmV3IEZvb0ltcGwoKTsKCQlmMS5CYXIoMSk7CgkJRm9vSW1wbCBmMiA9IG5ldyBGb29JbXBsKCk7CgkJZjIuQmFyKDEpOwoJfQp9