Compile error when nested generic class with constraints

IDE: VS 2015
Version: 8.4.96.2033
Target (If relevant): All
Description:

public class LinkedList<TValue, TNode>
    where TNode : LinkedListNode<TValue, TNode> {

    /*
        This nested class is compiled with warnings in MS C#, but failed with errors in RO C#:
        (E210) Generic parameter doesn't fulfill constraint "SharedProject1.LinkedListNode<TValue,TNode>" for "TNode"
     */
    private class LinkedListIterator<TValue, TNode>
        where TNode : LinkedListNode<TValue, TNode> {
        /* If the above where constraint is removed, the error will be gone */
    }
}

public class LinkedListNode<TValue, TNode>
    where TNode : LinkedListNode<TValue, TNode> {}

hmm but that can’t work? You can’t repeat generic parameters in nested classes, they’d count as dupes.

If the constraint of TNode of the nested class is removed, the compile error will be gone…So I guess there’s a compiler bug.

MS C# just gives warnings about the repeated generic parameters for nested class, so it will be good to see the same behavior of Element.

What’s the use case here though? imo this shouldn’t work at all (neither in MS C#)

oke just found the repeated declaration of generic types for nested class is unnecessary. This issue can be ignored.

Oh sorry, right I should have explained that it’s not needed because they’re inherited