Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

36 lines
489 B
C#

class Foo<T>
{
public void Hello ()
{ }
public void World (T t)
{
Hello ();
}
}
//
// This is some kind of a `recursive' declaration:
//
// Note that we're using the class we're currently defining (Bar)
// as argument of its parent.
//
// Is is important to run the resulting executable since this is
// both a test for the compiler and the runtime.
//
class Bar : Foo<Bar>
{
public void Test ()
{
Hello ();
World (this);
}
}
class X
{
public static void Main ()
{ }
}