marcinmoskala03/04/2019, 7:45 AM
SiebelsTim03/04/2019, 8:16 AM
The same is true about when: The closest supertype of String, String and Nothing is Nothing?It should be String, String and Nothing? -> String?, right?
marcinmoskala03/04/2019, 8:22 AM
Pavlo Liapota03/04/2019, 10:06 AM
Non-nullable type is a supertype of the nullable oneShould be other way around.
When function declares Nothing as a return type, it means that it will throw an errorNot necessary. You can also declare function with
return type and have an infinite loop inside.
When 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
block, then everything after this block is reachable. Also
too, but only code after them and until loop’s end is unreachable.
Dico03/04/2019, 10:45 AM
Pavlo Liapota03/04/2019, 10:51 AM
Dico03/04/2019, 10:57 AM
marcinmoskala03/04/2019, 1:41 PM