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

gtest-048.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 99f3b27595501c03a51ca7eca6b218ba7ab47ab6 (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
// This fixed a problem in the JIT.

public class Stack<T>
{
	T[] data;

	public Stack ()
	{
		data = new T [10];
	}

	public void Add (T t)
	{
		data [0] = t;
	}
}

struct Foo
{
	int a;
}

class X
{
	public static void Main ()
	{
		Foo foo = new Foo ();
		Stack<Foo> stack = new Stack<Foo> ();
		stack.Add (foo);
	}
}