我将枚举用作参数,但出现此错误
error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
private final kotlin.jvm.functions.Function1<com.tylertech.newworld.mobility.enum.CustomAlertDialogEvents, kotlin.Unit> itemClicked = null;
下面是我的枚举类
enum class CustomAlertDialogEvents(var resId: Int, val value: Int) {
ACTION_OPEN_SETTINGS(R.string.open, 0),
ACTION_CLOSE_SETTINGS(R.string.close, 1),
}
我正在这样使用
private val itemClicked: (CustomAlertDialogEvents) -> Unit
任何想法为什么会出现此错误?