Skip to content

Covariant return not detected for abstract override property #3545

Description

@PetSerAl

Input code

public abstract class B
{
	public abstract object M();
	public abstract object P1 { get; }
	public abstract object P2 { get; }
}

public abstract class D : B
{
	public abstract override string M();
	public abstract override string P1 { get; }
	public override string P2 => string.Empty;
}

Erroneous output

using System.Runtime.CompilerServices;

public abstract class B
{
	public abstract object P1 { get; }

	public abstract object P2 { get; }

	public abstract object M();
}

public abstract class D : B
{
	public abstract string P1
	{
		[PreserveBaseOverrides]
		get;
	}

	public override string P2 => string.Empty;

	public abstract override string M();
}

Details

  • Product in use: ILSpy
  • Version in use: 9.1.0.7988+03b7444943e720b3134d296c0c8dd3876f8ea4ce

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDecompilerThe decompiler engine itself

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions