Paul Woitaschek
04/16/2019, 8:27 AMhho
04/16/2019, 8:37 AMvalue
in this case) in a contract. Only parameters of the method (but yours doesn't have any).
Like this maybe? (untested)
@ExperimentalContracts
fun isValidEmail(value: String?): Boolean {
contract {
returns(true) implies (value != null)
}
return value != null && mailRegex.matches(value)
}
Paul Woitaschek
04/16/2019, 8:37 AMhho
04/16/2019, 8:52 AMStephan Schroeder
04/16/2019, 8:58 AMvalue
is this
?!?