[LL FIR] add lazy resolve check to ensure that all nested declarations are resolved
This bow includes: value parameters, property accessors and class members; before, only class members was checked
This commit is contained in:
+5
-5
@@ -71,13 +71,13 @@ public inline fun buildErrorWithAttachment(
|
||||
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
public inline fun checkWithAttachmentBuilder(
|
||||
value: Boolean,
|
||||
lazyMessage: () -> String,
|
||||
condition: Boolean,
|
||||
message: () -> String,
|
||||
buildAttachment: ExceptionAttachmentBuilder.() -> Unit = {}
|
||||
) {
|
||||
contract { returns() implies (value) }
|
||||
contract { returns() implies (condition) }
|
||||
|
||||
if (!value) {
|
||||
buildErrorWithAttachment(lazyMessage(), buildAttachment = buildAttachment)
|
||||
if (!condition) {
|
||||
buildErrorWithAttachment(message(), buildAttachment = buildAttachment)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user