a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
39 lines
386 B
C#
39 lines
386 B
C#
using System;
|
|
|
|
interface I<T>
|
|
{
|
|
}
|
|
|
|
class A
|
|
{
|
|
public virtual I<T> Foo<T> () where T : IDisposable
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
class AA : A
|
|
{
|
|
public override I<V> Foo<V> ()
|
|
{
|
|
return base.Foo<V> ();
|
|
}
|
|
}
|
|
|
|
class B : AA, IDisposable
|
|
{
|
|
public void Dispose ()
|
|
{
|
|
}
|
|
|
|
public override I<R> Foo<R> ()
|
|
{
|
|
return base.Foo<R> ();
|
|
}
|
|
|
|
public static void Main ()
|
|
{
|
|
new B ().Foo<B> ();
|
|
}
|
|
}
|