mirror of https://github.com/icsharpcode/ILSpy.git
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.
50 lines
747 B
50 lines
747 B
namespace ICSharpCode.Decompiler.Tests.TestCases.CovariantReturns |
|
{ |
|
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(); |
|
} |
|
} |
|
} |