Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update KotlinInlineFilter for crossinline #1523

Open
Godin opened this issue Oct 11, 2023 · 0 comments
Open

Update KotlinInlineFilter for crossinline #1523

Godin opened this issue Oct 11, 2023 · 0 comments

Comments

@Godin
Copy link
Member

Godin commented Oct 11, 2023

For

src/a/A.kt

package a;

public inline fun a(crossinline p: () -> Unit) = { p() }

src/b/B.kt

package b;

fun b() {
  a.a { } // line 4
}

execution of

kotlin-compiler-1.9.0/bin/kotlinc -d classes src
java -jar jacoco-0.8.10/lib/jacococli.jar report --classfiles classes --sourcefiles src --html report

produces report

Screenshot 2023-10-11 at 21 27 38

that contains

Source file "b/A.kt" was not found during generation of report.

Output of javap -v -p classes/b/BKt\$b\$\$inlined\$a\$1.class

      LineNumberTable:
        line 3: 0
        line 5: 2
        line 3: 3

      LineNumberTable:
        line 3: 0

SourceFile: "A.kt"
SourceDebugExtension:
  SMAP
  A.kt
  Kotlin
  *S Kotlin
  *F
  + 1 A.kt
  a/AKt$a$1
  + 2 B.kt
  b/BKt
  *L
  1#1,4:1
  4#2:5
  *E

ie according to SMAP
lines from 1 to 4 correspond to lines in class a/AKt$a$1
and line 5 corresponds to line 4 in class b/BKt

@Godin Godin self-assigned this Oct 11, 2023
@Godin Godin added this to Awaiting triage in Filtering via automation Oct 11, 2023
@Godin Godin moved this from Awaiting triage to To Do in Filtering Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Filtering
  
To Do
Development

No branches or pull requests

1 participant