dlr bug
[mcs.git] / tests / gtest-111.cs
blob847799ee504277f872f37f61827fcbc5ad3adb2f
1 using System;
3 public struct KeyValuePair<K,V>
5 public K key;
6 public V value;
8 public KeyValuePair(K k, V v) { key = k; value = v; }
10 public KeyValuePair(K k) { key = k; value = default(V); }
13 public class Collection<T>
15 public readonly T Item;
17 public Collection (T item)
19 this.Item = item;
22 public void Find (ref T item)
24 item = Item;
28 class X
30 static int Main ()
32 KeyValuePair<int,long> p = new KeyValuePair<int,long> (3);
33 KeyValuePair<int,long> q = new KeyValuePair<int,long> (5, 9);
35 Collection<KeyValuePair<int,long>> c = new Collection<KeyValuePair<int,long>> (q);
36 c.Find (ref p);
38 if (p.key != 5)
39 return 1;
40 if (p.value != 9)
41 return 2;
43 return 0;