Sam
06/12/2023, 12:05 PMKlitos Kyriacou
06/12/2023, 3:47 PMString? means "`null` or `String`".
So String?? means "`null` or `String?".!!` turns a T? to a T.
Therefore:
fun foo(a: String??) {
val x = a!!
}
x should now be String? but it's a String!xtof
06/12/2023, 3:48 PMreturn return return return return yourResult statement as a delimiter to make it more visible. 🤪Sam
06/12/2023, 3:49 PMKlitos Kyriacou
06/12/2023, 3:51 PMthrow return yourResult when you just want a normal return