Could anyone explain why this works ``` val longs ...
# announcements
s
Could anyone explain why this works
Copy code
val longs = List(100) { random.nextLong(6868L) }
assertThat(longs.all { it < 6869L }).isTrue()
But when I use property access syntax for
isTrue
it throws
Cannot infer type parameter SELF in val <SELF : AbstractBooleanAssert<SELF!>!> AbstractBooleanAssert<SELF>.isTrue: SELF!
Copy code
val longs = List(100) { random.nextLong(6868L) }
assertThat(longs.all { it < 6869L }).isTrue
I'm using assertJ. Just wondering if this is kotlin or assertj issue.
w
🤔
Copy code
class AssertJTest {
    @Test
    fun asas1() {
        val longs = List(100) { Random.nextLong(6868L) }
        Assertions.assertThat(longs.all { it < 6869L }).isTrue()
    }

    @Test
    fun asas2() {
        val longs = List(100) { Random.nextLong(6868L) }
        Assertions.assertThat(longs.all { it < 6869L }).isTrue
    }
}
Could be an issue? When I'm looking into the bytecode, both will generate the same.