Method getThis has incompatible type
Closed this issue · 1 comments
froth30 commented
After recent revisions, it looks like test class Broadcast
is no longer allowing me to initialize devices using a cyclic style of calling setter methods:
device = new SomeConcreteDevice.Builder(...)
.productCode(...)
.serialNumber(...)
.connectors(...)
.build()
This must mean that my getThis
method is not properly retaining its usability from its definition in AbstractDevice
. So, instead of returning type T
, it ends up returning type Nothing
in concrete device classes such as Hub
, SisterPrinter
, CannonPrinter
, and GoAmateur
.
froth30 commented
After redefining all concrete device classes with type parameters and overriding getThis
, it appears that everything has been cleared up.