Bug 41917 - GetRuntimeProperties
Summary: GetRuntimeProperties
Status: RESOLVED DUPLICATE of bug 41874
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 4.4.0 (C7)
Hardware: PC Windows
: --- normal
Target Milestone: (C7SR0)
Assignee: Marek Safar
Depends on:
Reported: 2016-06-16 22:38 UTC by Christian Schwarz
Modified: 2016-06-17 11:53 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Christian Schwarz 2016-06-16 22:38:08 UTC
public abstract class A<T>
	public abstract T Item { get; set; }

public class B : A<string>
	public override string Item { get; set; }


Returns Item twice instead of once.

Works as expected in a console application and with dotnet core.
Comment 1 Jonathan Pryor 2016-06-16 22:47:55 UTC
This happens with desktop Mono 4.4 as well:

  using System;
  using System.Linq;
  using System.Reflection;
  using System.Collections.Generic;
  public abstract class A<T>
    public abstract T Item {get;set;}
  public abstract class B : A<string>
    public override string Item {get;set;}
  class App {
     static void Main ()
       var props = typeof(B).GetTypeInfo().GetRuntimeProperties().ToList();
       Console.WriteLine (string.Join ("\n", props.Select (p => p.Name)));

Output when running:

Comment 2 Jonathan Pryor 2016-06-16 22:48:35 UTC
Marek: I suspect that this is similar/related to Bug #41874.
Comment 3 Marek Safar 2016-06-17 11:53:26 UTC

*** This bug has been marked as a duplicate of bug 41874 ***