tipsy
09/13/2019, 9:53 PMif (header?.startsWith("Basic ") != true) throw Exception
.
intellij is suggesting i replace this with require(header?.startsWith("Basic ") == true)
, but if i do that, header
is no longer smart castwasyl
09/13/2019, 9:59 PMheader
is not smart cast to String
either. Is that what you meant by smart cast?wasyl
09/13/2019, 10:01 PMwasyl
09/13/2019, 10:06 PMheader[0]
it works. Anyway, it seems like it should be possible to infer nullability in this case. The quick fix shouldn’t change the semantics, thoughkarelpeeters
09/14/2019, 7:33 AM