Is this a compiler bug?
I tried to help someone on a discord server who posted a snippet that didn’t compile, but I wasn’t able to find an answer to why it wouldn’t compile. I managed to generalize it to a minimal runnable (or, in this case, not runnable) example:
object A
object B
fun A.foo() = println("Test A")
fun B.foo() = println("Test B")
fun main() {
var test: A? = A
test = null
test?.foo()
}
(playground link: <a href="
https://pl.kotl.in/K19LwF8Ti" class="inline-onebox" rel="noopener nofollow...