Merge pull request #952 from ermshiperete/bug-xamarin-2912
[mono.git] / mcs / errors / cs0315-5.cs
1 // CS0315: The type `int' cannot be used as type parameter `T' in the generic type or method `H<T>'. There is no boxing conversion from `int' to `I'
2 // Line: 27
3
4 using System;
5
6 interface I
7 {
8 }
9
10 class H<T> where T : I, new()
11 {
12 }
13
14 public class A
15 {
16         static void Test (Action a)
17         {
18         }
19
20         static void Foo<T>()
21         {
22         }
23
24         static void Main ()
25         {
26                 Test (() => {
27                         Foo<H<int>> ();
28                 });
29         }
30 }