ILSpy
ILSpy copied to clipboard
Missing nullable annotation for generic base type
Input code
public class Test : Test<KeyValuePair<int, object?>>
{
}
public class Test<T> : IList<T>
{
public T this[int index] { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public int Count => throw new NotImplementedException();
public bool IsReadOnly => throw new NotImplementedException();
public void Add(T item)
{
throw new NotImplementedException();
}
public void Clear()
{
throw new NotImplementedException();
}
public bool Contains(T item)
{
throw new NotImplementedException();
}
public void CopyTo(T[] array, int arrayIndex)
{
throw new NotImplementedException();
}
public IEnumerator<T> GetEnumerator()
{
throw new NotImplementedException();
}
public int IndexOf(T item)
{
throw new NotImplementedException();
}
public void Insert(int index, T item)
{
throw new NotImplementedException();
}
public bool Remove(T item)
{
throw new NotImplementedException();
}
public void RemoveAt(int index)
{
throw new NotImplementedException();
}
IEnumerator IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
}
}
Erroneous output
I expected base type to have nullable object type in the output. It is skipped though.

Details
Assembly compiled with .NET 6.0.400 Decompiled with ILSpy extension for VS Studio:

I've got the same output when using ICSharpCode.Decompiler 7.2.0.6844.