Describe the bug
We are upgrading from 11.2.1 to 16.0.0. Aside from a handful of function signature breaking changes which were easy to deal with, we have found a functionality break. We have a base class with a [Yamlgnore] property. The derived class declares a new property of the same name. Previously this worked as expected. With 16.0.0 it fails with an AmbiguousMatchException. I didn't spend any time isolating exactly when it changed but it seems related to the refactoring to use Type.GetRuntimeProperty .
To Reproduce
public class IgnoreTest
{
public class Base
{
[YamlIgnore]
public object Prop { get; set; }
}
public class Derived<T> : Base
{
public new T Prop { get; set; }
}
[Fact]
public void Test()
{
var yaml = @"
prop: Jack
";
var sut = new DeserializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance)
.Build();
sut.Deserialize<Derived<string>>(yaml);
}
}
Perhaps there is some configuration bit we don't know about to make this work?
Describe the bug We are upgrading from 11.2.1 to 16.0.0. Aside from a handful of function signature breaking changes which were easy to deal with, we have found a functionality break. We have a base class with a
[Yamlgnore]
property. The derived class declares anew
property of the same name. Previously this worked as expected. With 16.0.0 it fails with anAmbiguousMatchException
. I didn't spend any time isolating exactly when it changed but it seems related to the refactoring to useType.GetRuntimeProperty
.To Reproduce
Perhaps there is some configuration bit we don't know about to make this work?