marcinmoskala
03/04/2019, 7:45 AMSiebelsTim
03/04/2019, 8:16 AMThe same is true about when: The closest supertype of String, String and Nothing is Nothing?It should be String, String and Nothing? -> String?, right?
marcinmoskala
03/04/2019, 8:22 AMPavlo Liapota
03/04/2019, 10:06 AMNon-nullable type is a supertype of the nullable oneShould be other way around.
Pavlo Liapota
03/04/2019, 10:10 AMWhen function declares Nothing as a return type, it means that it will throw an errorNot necessary. You can also declare function with
Nothing
return type and have an infinite loop inside.Pavlo Liapota
03/04/2019, 10:20 AMWhen an expression declares Nothing as a return type, everything surely executed after that will be unreachableI would not say everything here. If this expression is inside
try-catch
block, then everything after this block is reachable.
Also continue
and break
expressions return Nothing
too, but only code after them and until loop’s end is unreachable.Dico
03/04/2019, 10:45 AMDico
03/04/2019, 10:47 AMPavlo Liapota
03/04/2019, 10:51 AMDico
03/04/2019, 10:57 AMmarcinmoskala
03/04/2019, 1:41 PM