I am trying to subclass a function ActionableNotification.java
which reads similar to this:
package com.venmo.notifications.notifications;
import android.content.ContextWrapper;
import com.squareup.picasso.Target;
public abstract class ActionableNotification extends ContextWrapper implements Target {
@NonNull
protected abstract String getTrackingNotificationCategory();
// ...
}
The inheriting class reads similar to this
class DeclineInsufficientFundsBalanceOnlyCardNotification(context : Context, intent : Intent) : ActionableNotification(context, intent) {
override fun getTrackingNotificationCategory() = ""
// ...
}
However, when I try to compile I get this error:
/Users/kupeek/dev/venmo-android/p2p-app/src/main/java/com/venmo/notifications/notifications/DeclineInsufficientFundsBalanceOnlyCardNotification.kt: (21, 53): Return type of 'getTrackingNotificationCategory' is not a subtype of the return type of the overridden member '@NonNull protected/protected and package/ abstract fun getTrackingNotificationCategory(): String defined in com.venmo.notifications.notifications.ActionableNotification'
I don't understand this error message, because the return type of the Kotlin inheriting class is a string, as is the base class?