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

Strum355

09/28/2023, 12:21 PM
Im surprised that control flow nullability check isnt working for the first case, is this expected? kotlin 1.9.10 where
val server: CodyAgentServer?
and the error of course is
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type CodyAgentServer?
d

dmitriy.novozhilov

09/28/2023, 2:39 PM
Such smartcasts are supported in K2 compiler You can check it with 2.0 language version
👍 1
👀 1