Is it possible to use an enum as a parameter of a function declaration within an interface? For example have:
class FloatingToastDialog(val messageType: FloatingToastType) {
companion object {
enum class FloatingToastType { Alert, Warning, Error }
}
...
}
I would like to declare in an interface a function that takes an enum as input parameter like so:
interface SecurityCallbacks {
fun showFloatingToast(message: String, msgType: FloatingToastType)
}
but the compiler fails to import the enum by saying Unresolved reference: FloatingToastType
Is it possible to do that without using ordinals or other such escamotages?