Beef icon indicating copy to clipboard operation
Beef copied to clipboard

Cannot access inherited property on derived interface

Open jayrulez opened this issue 2 years ago • 0 comments

interface IParent
{
	bool IsEnabled {get; set;}
}

interface IChild : IParent
{
}

class Implementation : IChild{
	public bool IsEnabled {get; set;}
}

class Program 
{
	public static void Main()
	{
		IChild c = scope Implementation();
		var enabled = c.IsEnabled;
	}
}

A compiler error is reported by the line: var enabled = c.IsEnabled;

jayrulez avatar Aug 14 '23 02:08 jayrulez