David Glasser
10/01/2020, 9:10 PMsomethingReturningNullable().let {
it.shouldNotBeNull()
it.foo.shouldBeNull()
}
which works fine due to the contracts thing.
I thought I could rewrite it as
somethingReturningNullable().apply { shouldNotBeNull() }.foo.shouldBeNull()
but this doesn’t actually work. I guess contracts aren’t smart enough?
Is there a more concise way to do something like this? I mean certainly I can just use !!
but it’s nice to get better errors back from the matcher, I think