Kotlin: give external extension properties with matching name and file distinct trap filenames

This commit is contained in:
Chris Smowton
2022-10-21 14:26:42 +01:00
parent 5e28e5a170
commit 42d6968c20
7 changed files with 29 additions and 6 deletions

View File

@@ -0,0 +1,2 @@
| user.kt:3:22:3:22 | getF(...) | lib/lib/TestKt.class:0:0:0:0 | getF |
| user.kt:3:28:3:28 | getF(...) | lib/lib/TestKt.class:0:0:0:0 | getF |

View File

@@ -0,0 +1,7 @@
package lib
val String.f
get() = 1
val Int.f
get() = 2

View File

@@ -0,0 +1,4 @@
from create_database_utils import *
runSuccessfully(["kotlinc", "test.kt", "-d", "lib"])
run_codeql_database_create(["kotlinc user.kt -cp lib"], lang="java")

View File

@@ -0,0 +1,4 @@
import java
from MethodAccess ma
select ma, ma.getCallee()

View File

@@ -0,0 +1,3 @@
import lib.f
fun test() = "hello".f + 1.f