blob: 0ce693979d6c2728c18187ffee76391e4f9dc70c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
//
// This tests member lookups on inherited interfaces.
//
// The bug was exposed because FindMembers in MemberLookup
// would not return all the members on interfaces, but only
// the members from the most close type.
//
using System;
using System.Collections;
namespace N1
{
interface A
{
void method1 ();
}
interface B:A
{
void method2 ();
}
public class C
{
void method (ref B p)
{
p.method2();//<- works declared in 'B'
p.method1();//<- fails declared in 'A'
}
}
}
class Test {
public static int Main () {
IList list = new ArrayList ();
int n = list.Count;
return 0;
}
}
|