https://kotlinlang.org logo
#compiler
Title
# compiler
r

reactormonk

07/12/2023, 2:35 PM
Polling, the ugly way, but the compiler tells me
c
will always be null:
Copy code
cardScope.launch { 
                            var contact: WhatsAppVideo? = null
                            while (contact == null) {
                                delay(500)
                                contact = getContact()
                            }
                            callContact(c!!)
                        }
a

Adam S

07/12/2023, 2:47 PM
which Kotlin version? I knocked up a quick demo and I see a warning https://pl.kotl.in/wwzfDN5Xj
image.png
r

reactormonk

07/12/2023, 3:00 PM
Ah, 🤦
c
vs.
contact