Files
mono/mcs/errors/error-3.cs
T
Martin Baulig fd39b4c920 2003-05-18 Martin Baulig <[email protected]>
* error-3.cs: Added testcase for CS0188.

svn path=/trunk/mcs/; revision=14670
2003-05-18 18:49:41 +00:00

84 lines
776 B
C#

using System;
struct A
{
public int a;
private long b;
private float c;
public A (int foo)
// CS0171
{
a = foo;
// CS0170
b = (long) c;
}
}
struct B
{
public int a;
public B (int foo)
{
// CS0188
Test ();
}
public void Test ()
{
Console.WriteLine (a);
}
}
class X
{
// CS0177
static void test1 (out A a)
{
a.a = 5;
}
static void test_output (A a)
{
}
static void test2 ()
{
A a;
// CS0165
test_output (a);
}
static void test3 ()
{
A a;
a.a = 5;
// CS0165
test_output (a);
}
static void test4 ()
{
A a;
// CS0170
Console.WriteLine (a.a);
}
static void test5 (out A a)
{
// CS0165
test_output (a);
a = new A (5);
}
public static int Main ()
{
// Compilation-only test.
return 0;
}
}