Given the code below, I get the following compiler error: Type mismatch: cannot convert from Object to
String
What I don't understand, is why the compiler is unable to resolve T to String in this case (by simply removing <X> (which isn't used), or eg declaring newShape as Shape<Integer> all works fine)