Fix jvm method events

This commit is contained in:
Him188 2020-12-01 12:44:34 +08:00
parent 66ec1ab76a
commit a7416704b6

View File

@ -298,7 +298,7 @@ private fun Method.registerEvent(
require(!kotlinFunction.returnType.isMarkedNullable) {
"Kotlin event handlers cannot have nullable return type."
}
require(kotlinFunction.parameters.any { it.type.isMarkedNullable }) {
require(kotlinFunction.parameters.none { it.type.isMarkedNullable }) {
"Kotlin event handlers cannot have nullable parameter type."
}
when (kotlinFunction.returnType.classifier) {