You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
C# printer: an inner class of a generic class needs the outer type's arguments (Outer<A>.Inner) #142
A class nested in a generic class, used from outside it, needs the outer class's type arguments in C#: Java's ElementAwareArrayList<Mapped_>.Entry is C#'s ElementAwareArrayList<Mapped_>.Entry. The CST's ParameterizedType
of Entry does not carry the outer type's arguments, so the C# printer writes ElementAwareArrayList.Entry, which
names the non-generic companion class of the static members, where there is no Entry (CS0426).
In timefold this is 5 errors (AbstractToListSlot, AbstractToCollectionSlot, AbstractLeftDatasetInstance, RandomAccessLeafIndexer). A smaller sample:
prints private Holder.Store.Entry cached; (wanted: Holder.Store<string>.Entry), and also qualifies Entry
inside Store<T> itself as Holder.Store.Entry, where plain Entry (or Store<T>.Entry) would do.
What is needed
front end: the outer type's arguments on the ParameterizedType of an inner class's use (javac has them on the ClassType's enclosing type);
C# printer: print them, Outer<A>.Inner, and inside the generic class leave a nested type simple.
Fixed on devel: the front end carries the outer type's arguments on an inner class's use (f4cccf3). The C# printer writes Outer<T>.Inner (0e36107, probe in 56348e8), and the Kotlin printer handles an inner class constructed by its simple name (bf19316).
Activity
java-openjdk: an inner class of a generic class carries the outer typ…
Kotlin printer: an inner class constructed by its simple name, also w…
C#: behaviour probe for an inner class of a generic outer whose type …
bnaudts commentedon Nov 10, 2026
Fixed on devel: the front end carries the outer type's arguments on an inner class's use (f4cccf3). The C# printer writes
Outer<T>.Inner(0e36107, probe in 56348e8), and the Kotlin printer handles an inner class constructed by its simple name (bf19316).🤖 Generated with Claude Code