0.4.3-SNAPSHOT: disallow unintentionally overriding command implementations
This commit is contained in:
1 parent
40fe234070
commit
8aa4b6bc3d
6 files changed
+48
-12
No files matched your search
@@ -13,8 +13,8 @@ class CommandDescriptor<A, R>(
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
suspend operator fun invoke(adapter: Adapter<*>): R = adapter.invokeCommand(this,Unit as A)
|
||||
|
||||
operator fun <I: WithAdapter>invoke(commandHost: CommandHost<I>, block: suspend I.(A)->R) {
|
||||
commandHost.on(this, block)
|
||||
operator fun <I: WithAdapter>invoke(commandHost: CommandHost<I>, overwrite: Boolean = false,block: suspend I.(A)->R) {
|
||||
commandHost.on(this, overwrite, block)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user