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
The exercises uses <T> List<T> flatten(List<T> list). The problem with this is that T can only be an Object type because the tests provides a List of different type of objects. For example, testFiveLevelsOfNestingWithNoNulls gives a list with an int, a char and a List. Because they are different types of objects, T can only be an Object.
I propose that method's the return and parameter be updated to be either a List<Object> or List<?>.
The text was updated successfully, but these errors were encountered:
A PR has been raised to address this issue: PR #2900. It updates the method signature in the starter code and ensures the example solution is consistent with the updated signature. Please review it at your convenience.
The exercises uses
<T> List<T> flatten(List<T> list)
. The problem with this is thatT
can only be anObject
type because the tests provides aList
of different type of objects. For example,testFiveLevelsOfNestingWithNoNulls
gives a list with anint
, achar
and aList
. Because they are different types of objects,T
can only be anObject
.I propose that method's the return and parameter be updated to be either a
List<Object>
orList<?>
.The text was updated successfully, but these errors were encountered: