"Doesn't warn about line 2, did I misunderstand yo...
# announcements
o
"Doesn't warn about line 2, did I misunderstand you?" This is because line 2 can succeed. If
a
is
null
. What @Andreas Sinz said holds true if
a
is of type
String
, which he did specify. In your example
a
is of type
String?
. If you change the type of
a
to
String
you will get the same warning for line 2.