Should line numbers in exception backtraces correspond to actual linenumbers in Kotlin files? I ask because I'm getting a backtrace that doesn't seem to.
j
Jakub Pi
05/01/2020, 4:14 PM
In general yes. However, this can fail if the file is being decompiled or if there is a mismatch in versions (you may accidentally load a different version in some circumstances). At least this is the case in Java. This should only happen in code loaded as dependencies, never in your own code.
j
Joe
05/01/2020, 4:29 PM
also use of inline functions appends the body of the inline function to the end of the file, resulting in line #s beyond the end of the file
k
Kroppeb
05/01/2020, 5:06 PM
Unless there is a compiler plugin, the lines should match up