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

41 lines
492 B
C#

using System;
class First
{
public virtual object this [string name]
{
get { return "First"; }
set { }
}
}
class Second : First
{
public override object this [string name]
{
get { return "Second"; }
set { }
}
}
class Third : Second
{
public override object this [string name]
{
get { return base [name]; }
set { }
}
}
class a
{
public static int Main (string[] args)
{
First t = (First)new Third ();
if (t ["test"] != "Second")
return 1;
return 0;
}
}