Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-167.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b86e49df66834680488a708983296fc0e9dd5e03 (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
//
// See bug 31834 for details about this bug
//

using System;

class X
{
        static int Test (params Foo[] foo)
        { 
		if (foo.Length != 1)
			return 1;

		if (foo [0] != Foo.A)
			return 2;

		return 0;	
	}

        enum Foo {
                A, B
        }

        static int Main ()
        {
                int v = Test (Foo.A);
		if (v != 0)
			return v;

		MyEnum [] arr = new MyEnum [2];
		arr [0] = MyEnum.c;

		if (arr [0] != MyEnum.c)
			return 3;
		return 0;
        }

        enum MyEnum {a,b,c};
}