mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-04 15:40:13 +08:00
Fix jvm method events
This commit is contained in:
parent
66ec1ab76a
commit
a7416704b6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user