blob: 466d14e8e3d7d366caf32a54231e06e85954bc62 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
using System;
using System.Collections;
using System.Reflection;
using Mono.Test;
class Program
{
public static int Main ()
{
BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Instance |
BindingFlags.DeclaredOnly;
Type type = typeof (Info);
PropertyInfo [] properties = type.GetProperties (flags);
if (properties.Length != 2) {
Console.WriteLine ("#1: " + properties.Length.ToString ());
return 1;
}
if (properties [0].Name != "System.Collections.IEnumerator.Current") {
Console.WriteLine ("#2: " + properties [0].Name);
return 2;
}
if (properties [1].Name != "Mono.Test.ITest.Item") {
Console.WriteLine ("#3: " + properties [1].Name);
return 3;
}
return 0;
}
}
namespace Mono.Test
{
interface ITest
{
object this [int index]
{
get;
set;
}
}
}
class Info : IEnumerator, ITest
{
object IEnumerator.Current
{
get { return null; }
}
bool IEnumerator.MoveNext ()
{
return false;
}
void IEnumerator.Reset ()
{
}
object ITest.this [int index]
{
get { return null; }
set { }
}
}
|