projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2004-06-09 Atsushi Enomoto <atsushi@ximian.com>
[mono.git]
/
mcs
/
errors
/
error-3.cs
1
using System;
2
3
struct A
4
{
5
public int a;
6
private long b;
7
private float c;
8
9
public A (int foo)
10
// CS0171
11
{
12
a = foo;
13
// CS0170
14
b = (long) c;
15
}
16
}
17
18
struct B
19
{
20
public int a;
21
22
public B (int foo)
23
{
24
// CS0188
25
Test ();
26
}
27
28
public void Test ()
29
{
30
Console.WriteLine (a);
31
}
32
}
33
34
class X
35
{
36
// CS0177
37
static void test1 (out A a)
38
{
39
a.a = 5;
40
}
41
42
static void test_output (A a)
43
{
44
}
45
46
static void test2 ()
47
{
48
A a;
49
50
// CS0165
51
test_output (a);
52
}
53
54
static void test3 ()
55
{
56
A a;
57
58
a.a = 5;
59
// CS0165
60
test_output (a);
61
}
62
63
static void test4 ()
64
{
65
A a;
66
67
// CS0170
68
Console.WriteLine (a.a);
69
}
70
71
static void test5 (out A a)
72
{
73
// CS0165
74
test_output (a);
75
a = new A (5);
76
}
77
78
public static int Main ()
79
{
80
// Compilation-only test.
81
return 0;
82
}
83
}