Previous behavior would throw an IllegalArgumentException when a line outside of the expected range was encountered. This makes sense, but prevents the plugin from operating with non-Java JVM languages that are sometimes forced to include source lines outside the expected range. The example motivating this change is the case of functions that Kotlin inlines, which result in source line numbers that are higher than the number of lines in the source file.
The new behavior here is to simply log an error to standard error in that event, and not update coverage. This does mean that such unusual lines will not get included properly in coverage, but that seems a better outcome than runtime failure.
Coverage remained the same at 97.914% when pulling bc8d78a3571d1b5c5f33046d80dd374c0d87baba on nonvirtualthunk:kotlin-fix into 0a4b0e6d8448e51f723046643ad88f8ac43c52ca on trautonen:master.
IllegalArgumentException
when a line outside of the expected range was encountered. This makes sense, but prevents the plugin from operating with non-Java JVM languages that are sometimes forced to include source lines outside the expected range. The example motivating this change is the case of functions that Kotlin inlines, which result in source line numbers that are higher than the number of lines in the source file.