projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Revert "[build] Put back mcs to monolite to support boostrap with mcs only"
[mono.git]
/
mcs
/
tests
/
test-834.cs
1
using System;
2
3
class A
4
{
5
public int Value;
6
7
public A (object o)
8
{
9
Value = 500;
10
}
11
12
protected A (int a)
13
{
14
Value = a;
15
}
16
17
public int Test (object o)
18
{
19
return 2;
20
}
21
22
protected int Test(int i)
23
{
24
return 5;
25
}
26
27
protected int this [int i] {
28
get { return i; }
29
}
30
31
public int this [object i] {
32
get {
33
return 2;
34
}
35
}
36
}
37
38
class B : A
39
{
40
public B ()
41
: base (1)
42
{
43
}
44
45
public static int Main ()
46
{
47
int r;
48
A a = new A (1);
49
if (a.Value != 500)
50
return 1;
51
52
r = a.Test (1);
53
if (r != 2)
54
return 2;
55
56
r = a [0];
57
if (r != 2)
58
return 3;
59
60
Console.WriteLine ("ok");
61
return 0;
62
}
63
}