Analyzer skips an obvious error and application crashes in a runtime

Hello everyone. I wrote a topic about unexpected analyzer behavior yesterday. The topic describes about unexpected behavior of the Kotlin code analyzer when i use Realm library.

After discuss, I started investigate this problem more deeper and now I’ve got a lot of questions and suspicions. Now Realm library doesn’t affect to the problem, and this problem became only language specific. Please, look at the images below.

f

s
On this line i’ve got “The spread operator (*foo) may not be applied to an argument of nullable type” error.

t
The same error’s here.

f
And here’s no error. This line crashes an application in a runtime with a NPE when a JVM tries to get a length of the array.
I’ve got a 1.3.10 Kotlin release and got the same behavior with 1.3.20.
Thanks for attention.

Reproduced only with the experimental new inference and reported https://youtrack.jetbrains.com/issue/KT-30808. If you feel that your case is actually different, please file a separate issue at http://kotl.in/issue. Thanks.