From 8d538e14a0f7a1e60e1384541e1e71dfc143efbe Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 18 May 2017 16:11:42 +0200 Subject: [PATCH] Minor: add a doc for the "using" infix function. --- core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt b/core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt index 0711228d38..437dcb4e96 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt @@ -56,6 +56,7 @@ infix fun Amount.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")