2005-06-05 Peter Bartok <pbartok@novell.com>
[mono.git] / mcs / tests / gen-76.cs
1 using System;
2
3 struct Foo<T>
4 {
5         public T Data;
6
7         public Foo (T data)
8         {
9                 this.Data = data;
10         }
11 }
12
13 class Test<T>
14 {
15         public Foo<T> GetFoo (T data)
16         {
17                 return new Foo<T> (data);
18         }
19 }
20
21 class X
22 {
23         static int Main ()
24         {
25                 Test<long> test = new Test<long> ();
26                 Foo<long> foo = test.GetFoo (0x800);
27                 //
28                 // This is a very simple test, just make sure the struct
29                 // is returned correctly.  This was broken until recently
30                 // and I just fixed it on amd64.
31                 if (foo.Data != 0x800)
32                         return 1;
33                 return 0;
34         }
35 }
36