mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Kotlin: Mangle names of internal functions to match JVM symbols
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
public class User {
|
||||
|
||||
public static int test(Test1 test1, Test2 test2, Test3 test3) {
|
||||
|
||||
return test1.f$main() + test2.f$mymodule() + test3.f$reservedchars___();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
| User.java:3:21:3:24 | test |
|
||||
| test1.kt:3:12:3:22 | f$main |
|
||||
| test2.kt:3:12:3:22 | f$mymodule |
|
||||
| test3.kt:3:12:3:22 | f$reservedchars___ |
|
||||
@@ -0,0 +1,3 @@
|
||||
from create_database_utils import *
|
||||
|
||||
run_codeql_database_create(["kotlinc test1.kt", "kotlinc test2.kt -module-name mymodule", "kotlinc test3.kt -module-name reservedchars\\\"${}/", "javac User.java -cp ." ], lang="java")
|
||||
@@ -0,0 +1,5 @@
|
||||
import java
|
||||
|
||||
from Method m
|
||||
where m.fromSource()
|
||||
select m
|
||||
@@ -0,0 +1,5 @@
|
||||
public class Test1 {
|
||||
|
||||
internal fun f() = 1
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
public class Test2 {
|
||||
|
||||
internal fun f() = 2
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
public class Test3 {
|
||||
|
||||
internal fun f() = 3
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user