mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Kotlin: Tweak superTypes test to give better locations
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
| classes.kt:81:16:81:38 | new Interface1(...) { ... } | classes.kt:59:1:59:23 | Interface1 |
|
||||
| classes.kt:85:16:85:25 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
|
||||
| classes.kt:89:16:89:44 | new Interface3<Integer>(...) { ... } | classes.kt:61:1:61:26 | Interface3<Integer> |
|
||||
| file://<external>/superChain.kt:1:1:1:33 | SuperChain1<T3,String> | file://<external>/Object.class:0:0:0:0 | Object |
|
||||
| file://<external>/superChain.kt:2:1:2:60 | SuperChain2<T5,String> | file://<external>/superChain.kt:1:1:1:33 | SuperChain1<T3,String> |
|
||||
| superChain.kt:1:1:1:33 | SuperChain1 | file://<external>/Object.class:0:0:0:0 | Object |
|
||||
| superChain.kt:2:1:2:60 | SuperChain2 | file://<external>/superChain.kt:1:1:1:33 | SuperChain1<T3,String> |
|
||||
| superChain.kt:3:1:3:60 | SuperChain3 | file://<external>/superChain.kt:2:1:2:60 | SuperChain2<T5,String> |
|
||||
| superChain.kt:1:1:1:33 | SuperChain1<T3,String> | file://<external>/Object.class:0:0:0:0 | Object |
|
||||
| superChain.kt:2:1:2:60 | SuperChain2 | superChain.kt:1:1:1:33 | SuperChain1<T3,String> |
|
||||
| superChain.kt:2:1:2:60 | SuperChain2<T5,String> | superChain.kt:1:1:1:33 | SuperChain1<T3,String> |
|
||||
| superChain.kt:3:1:3:60 | SuperChain3 | superChain.kt:2:1:2:60 | SuperChain2<T5,String> |
|
||||
|
||||
@@ -5,7 +5,7 @@ class ClassLocation extends Class {
|
||||
override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
|
||||
exists(string fullPath |
|
||||
super.hasLocationInfo(fullPath, sl, sc, el, ec) |
|
||||
if this.fromSource()
|
||||
if exists(this.getFile().getRelativePath())
|
||||
then path = fullPath
|
||||
else path = fullPath.regexpReplaceAll(".*/", "<external>/"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user