I am trying to create a 2nd constructor and call the parent class with a different generic type based on the constructor invocation. 1 type is GroupTrackInfoDTO and the other one is TrackInfoDTO but I keep getting a compiling error
Platform declaration clash: The following declarations have the same JVM signature
My code:
class GetSettingsTask
: BizOperationTask {
private var mCallback: BizTaskCallback<TrackSettings>? = null
constructor(operation: BizOperation<GroupTrackInfoDTO>, mCallback: BizTaskCallback<TrackSettings>) : super(operation) {
this.mCallback = mCallback
}
constructor(o: BizOperation<TrackInfoDTO>, mCallback: BizTaskCallback<TrackSettings>) : super(o) {
this.mCallback = mCallback
}
if I add a dummy parameter to one of the constructors it worked but no idea why
constructor(o: BizOperation<TrackInfoDTO>, mCallback: BizTaskCallback<TrackSettings>, i: Int = 0) : super(o) {
this.mCallback = mCallback
}