It would be nice if `contract { }` blocks used con...
# language-evolution
y
It would be nice if
contract { }
blocks used context parameters instead of a receiver. It'd make referring to the receiver of the function way easier:
Copy code
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
9