Youssef Shoaib [MOD]
12/26/2025, 7:39 PMcontract { } blocks used context parameters instead of a receiver. It'd make referring to the receiver of the function way easier:
fun String?.foo() {
contract { returns() implies (this != null) } // error now. Would be nice if it worked
}
Since they're experimental anyway, I don't see the harm in this change. There's no real reason someone would've referred to this intending the ContractBuilder