cucharro
08/19/2019, 3:27 PMRobert Menke
08/19/2019, 3:31 PMcucharro
08/19/2019, 3:32 PMKris Wong
08/19/2019, 3:33 PMcucharro
08/19/2019, 3:34 PMKris Wong
08/19/2019, 3:34 PMlouiscad
08/19/2019, 3:34 PMfinally
block? You'll need to put the breakpoint on a line having this actual code, I don't think lines where the finally
keyword is the only code can have breakpoints (the IDE shows you a checkmark or a stop mark to tell you about it once the class is loaded)cucharro
08/19/2019, 3:34 PMRobert Menke
08/19/2019, 3:35 PMlouiscad
08/19/2019, 3:37 PMfinally
is always executed after the return
expression, just before the value is actually returned.try
block of course.cucharro
08/19/2019, 3:39 PMKris Wong
08/19/2019, 3:40 PMRobert Menke
08/19/2019, 3:40 PMKris Wong
08/19/2019, 3:41 PMcucharro
08/19/2019, 3:41 PMKris Wong
08/19/2019, 3:41 PMcucharro
08/19/2019, 3:41 PMKris Wong
08/19/2019, 3:42 PMcucharro
08/19/2019, 3:42 PMKris Wong
08/19/2019, 3:42 PMcucharro
08/19/2019, 3:42 PMlouiscad
08/19/2019, 3:46 PMRobert Menke
08/19/2019, 3:48 PMfinally
intercepts a return in a try block.
fun foo(): String {
try {
return "hello"
}
finally {
return "world"
}
}
but I suppose it makes senselouiscad
08/19/2019, 3:56 PMreturn
keyword in a finally
block.Robert Menke
08/19/2019, 3:57 PMdefer
keyword for that.louiscad
08/19/2019, 3:57 PMfinally
wins.defer
means something entirely different to measync
from kotlinx.coroutines returns Deferred<T>