projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #951 from ermshiperete/bug-xamarin-2462
[mono.git]
/
mcs
/
tests
/
gtest-608.cs
1
using System;
2
3
class R<T, U>
4
where T : System.IDisposable
5
where U : T
6
{
7
public void M (U u)
8
{
9
using (u) {
10
}
11
}
12
}
13
14
struct S<T, U>
15
where T : System.IDisposable
16
where U : struct, T
17
{
18
public void M (U u)
19
{
20
using (u) {
21
}
22
}
23
}
24
25
class X : IDisposable
26
{
27
public void Dispose ()
28
{
29
}
30
31
public static void Main ()
32
{
33
new R<X, X> ().M (new X ());
34
new S<Y, Y> ().M (new Y ());
35
}
36
}
37
38
struct Y : IDisposable
39
{
40
public void Dispose ()
41
{
42
}
43
}