bod
05/11/2020, 8:49 AMfun parseDate(dateStr: String?): Date?
and want to express that if dateStr
is null
then the result will be null
- and also the opposite. Possible?rafi
05/11/2020, 9:18 AMbod
05/11/2020, 9:23 AMnull
)rafi
05/11/2020, 11:55 AMbod
05/11/2020, 12:10 PMval d: Date = parseDate(nonNullStr)
parseDate
can return null according to the compiler, even though it's not possible in that case)dmitriy.novozhilov
05/12/2020, 10:04 AMreturnsNotNull() implies dateStr != Null
means that "if call parseDate(str)
returned not null than `str != null`"
There is no support of contracts that you want but we are considering support this casebod
05/12/2020, 10:07 AM