-Fix GetFieldsAndProperties so that it returns a distinct list of member names in cases where there are overriden abstract generic properties

This commit is contained in:
JamesNK
2008-08-16 07:34:54 +00:00
parent ee281662c4
commit d4c6a8de26
2 changed files with 53 additions and 1 deletions
@@ -1264,5 +1264,22 @@ keyword such as type of business.""
IncompatibleJsonAttributeClass c = new IncompatibleJsonAttributeClass();
JavaScriptConvert.SerializeObject(c);
}
public abstract class AbstractGenericBase<TKey>
{
public abstract TKey Id { get; set; }
}
public class GenericImpl : AbstractGenericBase<int>
{
public override int Id { get; set; }
}
[Test]
public void GenericAbstractProperty()
{
string json = JavaScriptConvert.SerializeObject(new GenericImpl());
Assert.AreEqual(@"{""Id"":0}", json);
}
}
}