[ci] Small improvements for run-jenkins and collect-coverage. (#5669)
[mono.git] / mcs / tests / gtest-577.cs
1 using System;
2
3 static class Program
4 {
5         public interface I1
6         {
7                 string Id { get; }
8         }
9
10         public class BaseClass
11         {
12                 public int Id {
13                         get {
14                                 return 4;
15                         }
16                 }
17         }
18
19         public class Derived : BaseClass, I1
20         {
21                 public new string Id {
22                         get {
23                                 return "aa";
24                         }
25                 }
26         }
27
28         static void Generic<T> (T item) where T : BaseClass, I1
29         {
30                 if (item.Id != 4)
31                         throw new Exception ("Doom!");
32         }
33
34         static void Main ()
35         {
36                 Generic (new Derived ());
37         }
38 }