mirror of
https://github.com/corda/corda.git
synced 2025-01-31 00:24:59 +00:00
Minor: add a doc for the "using" infix function.
This commit is contained in:
parent
8dde7757f1
commit
8d538e14a0
@ -56,6 +56,7 @@ infix fun Amount<Currency>.issuedBy(deposit: PartyAndReference) = Amount(quantit
|
||||
//// Requirements /////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
object Requirements {
|
||||
/** Throws [IllegalArgumentException] if the given expression evaluates to false. */
|
||||
@Suppress("NOTHING_TO_INLINE") // Inlining this takes it out of our committed ABI.
|
||||
infix inline fun String.using(expr: Boolean) {
|
||||
if (!expr) throw IllegalArgumentException("Failed requirement: $this")
|
||||
|
Loading…
x
Reference in New Issue
Block a user