.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

61 lines
1.0 KiB

namespace ICSharpCode.Decompiler.Tests.TestCases.CovariantReturns
{
public abstract class AbstractDerived : Base
{
public abstract override AbstractDerived Instance { get; }
public abstract override AbstractDerived this[int index] { get; }
public abstract override AbstractDerived Build();
protected abstract override AbstractDerived SetParent(object parent);
}
public abstract class Base
{
public abstract Base Instance { get; }
public abstract Base this[int index] { get; }
public virtual Base Build()
{
throw null;
}
protected abstract Base SetParent(object parent);
}
public class Derived : Base
{
public override Derived Instance { get; }
public override Derived this[int index] {
get {
throw null;
}
}
public override Derived Build()
{
throw null;
}
protected override Derived SetParent(object parent)
{
throw null;
}
}
public class UseSites
{
public Base Test(Base x)
{
return x.Build();
}
public Derived Test(Derived x)
{
return x.Build();
}
}
}