Closed
Description
When targeting System.Collections.Immutable.1.7.1, GenAPI generates a class implementation which doesn't implement the interface that its member explicitly attempts to implement.
This illustrates the issue:
public sealed partial class ImmutableHashSet<T> : IEnumerable, ICollection
{
bool Generic.ICollection<T>.IsReadOnly { get { throw null; } }
}
This results in a build error:
error CS0540: 'ImmutableHashSet<T>.ICollection<T>.IsReadOnly': containing type does not implement interface 'ICollection<T>'
You can see that the generated class doesn't implement any of the generic interfaces that it should:
public sealed class ImmutableHashSet<T> : IImmutableSet<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, IHashKeyCollection<T>, ICollection<T>, ISet<T>, ICollection, IStrongEnumerable<T, ImmutableHashSet<T>.Enumerator>