mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Add declaring type to test to distinguish ambiguously-named methods
This commit is contained in:
committed by
Ian Lynagh
parent
fa9971c6f3
commit
d2e626cbee
@@ -1,52 +1,52 @@
|
||||
methods
|
||||
| methods2.kt:4:1:5:1 | fooBarTopLevelMethod | fooBarTopLevelMethod(int,int) |
|
||||
| methods2.kt:7:1:10:1 | <obinit> | <obinit>() |
|
||||
| methods2.kt:7:1:10:1 | equals | equals(java.lang.Object) |
|
||||
| methods2.kt:7:1:10:1 | hashCode | hashCode() |
|
||||
| methods2.kt:7:1:10:1 | toString | toString() |
|
||||
| methods2.kt:8:5:9:5 | fooBarClassMethod | fooBarClassMethod(int,int) |
|
||||
| methods3.kt:3:1:3:42 | fooBarTopLevelMethodExt | fooBarTopLevelMethodExt(int,int) |
|
||||
| methods3.kt:5:1:7:1 | <obinit> | <obinit>() |
|
||||
| methods3.kt:5:1:7:1 | equals | equals(java.lang.Object) |
|
||||
| methods3.kt:5:1:7:1 | hashCode | hashCode() |
|
||||
| methods3.kt:5:1:7:1 | toString | toString() |
|
||||
| methods3.kt:6:5:6:46 | fooBarTopLevelMethodExt | fooBarTopLevelMethodExt(int,int) |
|
||||
| methods4.kt:3:1:11:1 | <obinit> | <obinit>() |
|
||||
| methods4.kt:3:1:11:1 | equals | equals(java.lang.Object) |
|
||||
| methods4.kt:3:1:11:1 | hashCode | hashCode() |
|
||||
| methods4.kt:3:1:11:1 | toString | toString() |
|
||||
| methods4.kt:5:3:9:3 | <obinit> | <obinit>() |
|
||||
| methods4.kt:5:3:9:3 | equals | equals(java.lang.Object) |
|
||||
| methods4.kt:5:3:9:3 | hashCode | hashCode() |
|
||||
| methods4.kt:5:3:9:3 | toString | toString() |
|
||||
| methods4.kt:7:5:7:34 | m | m(foo.bar.NestedTest.InsideNestedTest) |
|
||||
| methods5.kt:3:1:11:1 | x | x() |
|
||||
| methods5.kt:5:3:5:27 | a | a(int) |
|
||||
| methods5.kt:9:3:9:32 | f1 | f1(foo.bar.C1,int) |
|
||||
| methods5.kt:13:1:13:14 | <obinit> | <obinit>() |
|
||||
| methods5.kt:13:1:13:14 | equals | equals(java.lang.Object) |
|
||||
| methods5.kt:13:1:13:14 | equals | equals(java.lang.Object) |
|
||||
| methods5.kt:13:1:13:14 | hashCode | hashCode() |
|
||||
| methods5.kt:13:1:13:14 | hashCode | hashCode() |
|
||||
| methods5.kt:13:1:13:14 | toString | toString() |
|
||||
| methods5.kt:13:1:13:14 | toString | toString() |
|
||||
| methods.kt:2:1:3:1 | topLevelMethod | topLevelMethod(int,int) |
|
||||
| methods.kt:5:1:13:1 | <obinit> | <obinit>() |
|
||||
| methods.kt:5:1:13:1 | equals | equals(java.lang.Object) |
|
||||
| methods.kt:5:1:13:1 | hashCode | hashCode() |
|
||||
| methods.kt:5:1:13:1 | toString | toString() |
|
||||
| methods.kt:6:5:7:5 | classMethod | classMethod(int,int) |
|
||||
| methods.kt:9:5:12:5 | anotherClassMethod | anotherClassMethod(int,int) |
|
||||
| methods2.kt:0:0:0:0 | Methods2Kt | methods2.kt:4:1:5:1 | fooBarTopLevelMethod | fooBarTopLevelMethod(int,int) |
|
||||
| methods2.kt:7:1:10:1 | Class2 | methods2.kt:7:1:10:1 | <obinit> | <obinit>() |
|
||||
| methods2.kt:7:1:10:1 | Class2 | methods2.kt:7:1:10:1 | equals | equals(java.lang.Object) |
|
||||
| methods2.kt:7:1:10:1 | Class2 | methods2.kt:7:1:10:1 | hashCode | hashCode() |
|
||||
| methods2.kt:7:1:10:1 | Class2 | methods2.kt:7:1:10:1 | toString | toString() |
|
||||
| methods2.kt:7:1:10:1 | Class2 | methods2.kt:8:5:9:5 | fooBarClassMethod | fooBarClassMethod(int,int) |
|
||||
| methods3.kt:0:0:0:0 | Methods3Kt | methods3.kt:3:1:3:42 | fooBarTopLevelMethodExt | fooBarTopLevelMethodExt(int,int) |
|
||||
| methods3.kt:5:1:7:1 | Class3 | methods3.kt:5:1:7:1 | <obinit> | <obinit>() |
|
||||
| methods3.kt:5:1:7:1 | Class3 | methods3.kt:5:1:7:1 | equals | equals(java.lang.Object) |
|
||||
| methods3.kt:5:1:7:1 | Class3 | methods3.kt:5:1:7:1 | hashCode | hashCode() |
|
||||
| methods3.kt:5:1:7:1 | Class3 | methods3.kt:5:1:7:1 | toString | toString() |
|
||||
| methods3.kt:5:1:7:1 | Class3 | methods3.kt:6:5:6:46 | fooBarTopLevelMethodExt | fooBarTopLevelMethodExt(int,int) |
|
||||
| methods4.kt:3:1:11:1 | NestedTest | methods4.kt:3:1:11:1 | <obinit> | <obinit>() |
|
||||
| methods4.kt:3:1:11:1 | NestedTest | methods4.kt:3:1:11:1 | equals | equals(java.lang.Object) |
|
||||
| methods4.kt:3:1:11:1 | NestedTest | methods4.kt:3:1:11:1 | hashCode | hashCode() |
|
||||
| methods4.kt:3:1:11:1 | NestedTest | methods4.kt:3:1:11:1 | toString | toString() |
|
||||
| methods4.kt:5:3:9:3 | InsideNestedTest | methods4.kt:5:3:9:3 | <obinit> | <obinit>() |
|
||||
| methods4.kt:5:3:9:3 | InsideNestedTest | methods4.kt:5:3:9:3 | equals | equals(java.lang.Object) |
|
||||
| methods4.kt:5:3:9:3 | InsideNestedTest | methods4.kt:5:3:9:3 | hashCode | hashCode() |
|
||||
| methods4.kt:5:3:9:3 | InsideNestedTest | methods4.kt:5:3:9:3 | toString | toString() |
|
||||
| methods4.kt:5:3:9:3 | InsideNestedTest | methods4.kt:7:5:7:34 | m | m(foo.bar.NestedTest.InsideNestedTest) |
|
||||
| methods5.kt:0:0:0:0 | Methods5Kt | methods5.kt:3:1:11:1 | x | x() |
|
||||
| methods5.kt:5:3:5:27 | new Object(...) { ... } | methods5.kt:5:3:5:27 | a | a(int) |
|
||||
| methods5.kt:9:3:9:32 | new Object(...) { ... } | methods5.kt:9:3:9:32 | f1 | f1(foo.bar.C1,int) |
|
||||
| methods5.kt:13:1:13:14 | C1 | methods5.kt:13:1:13:14 | <obinit> | <obinit>() |
|
||||
| methods5.kt:13:1:13:14 | C1 | methods5.kt:13:1:13:14 | equals | equals(java.lang.Object) |
|
||||
| methods5.kt:13:1:13:14 | C1 | methods5.kt:13:1:13:14 | hashCode | hashCode() |
|
||||
| methods5.kt:13:1:13:14 | C1 | methods5.kt:13:1:13:14 | toString | toString() |
|
||||
| methods5.kt:13:1:13:14 | C1<Integer> | methods5.kt:13:1:13:14 | equals | equals(java.lang.Object) |
|
||||
| methods5.kt:13:1:13:14 | C1<Integer> | methods5.kt:13:1:13:14 | hashCode | hashCode() |
|
||||
| methods5.kt:13:1:13:14 | C1<Integer> | methods5.kt:13:1:13:14 | toString | toString() |
|
||||
| methods.kt:0:0:0:0 | MethodsKt | methods.kt:2:1:3:1 | topLevelMethod | topLevelMethod(int,int) |
|
||||
| methods.kt:5:1:13:1 | Class | methods.kt:5:1:13:1 | <obinit> | <obinit>() |
|
||||
| methods.kt:5:1:13:1 | Class | methods.kt:5:1:13:1 | equals | equals(java.lang.Object) |
|
||||
| methods.kt:5:1:13:1 | Class | methods.kt:5:1:13:1 | hashCode | hashCode() |
|
||||
| methods.kt:5:1:13:1 | Class | methods.kt:5:1:13:1 | toString | toString() |
|
||||
| methods.kt:5:1:13:1 | Class | methods.kt:6:5:7:5 | classMethod | classMethod(int,int) |
|
||||
| methods.kt:5:1:13:1 | Class | methods.kt:9:5:12:5 | anotherClassMethod | anotherClassMethod(int,int) |
|
||||
constructors
|
||||
| methods2.kt:7:1:10:1 | Class2 | Class2() |
|
||||
| methods3.kt:5:1:7:1 | Class3 | Class3() |
|
||||
| methods4.kt:3:1:11:1 | NestedTest | NestedTest() |
|
||||
| methods4.kt:5:3:9:3 | InsideNestedTest | InsideNestedTest() |
|
||||
| methods5.kt:5:3:5:27 | | |
|
||||
| methods5.kt:9:3:9:32 | | |
|
||||
| methods5.kt:13:1:13:14 | C1 | C1() |
|
||||
| methods5.kt:13:1:13:14 | C1<Integer> | C1<Integer>() |
|
||||
| methods.kt:5:1:13:1 | Class | Class() |
|
||||
| methods2.kt:7:1:10:1 | Class2 | methods2.kt:7:1:10:1 | Class2 | Class2() |
|
||||
| methods3.kt:5:1:7:1 | Class3 | methods3.kt:5:1:7:1 | Class3 | Class3() |
|
||||
| methods4.kt:3:1:11:1 | NestedTest | methods4.kt:3:1:11:1 | NestedTest | NestedTest() |
|
||||
| methods4.kt:5:3:9:3 | InsideNestedTest | methods4.kt:5:3:9:3 | InsideNestedTest | InsideNestedTest() |
|
||||
| methods5.kt:5:3:5:27 | new Object(...) { ... } | methods5.kt:5:3:5:27 | | |
|
||||
| methods5.kt:9:3:9:32 | new Object(...) { ... } | methods5.kt:9:3:9:32 | | |
|
||||
| methods5.kt:13:1:13:14 | C1 | methods5.kt:13:1:13:14 | C1 | C1() |
|
||||
| methods5.kt:13:1:13:14 | C1<Integer> | methods5.kt:13:1:13:14 | C1<Integer> | C1<Integer>() |
|
||||
| methods.kt:5:1:13:1 | Class | methods.kt:5:1:13:1 | Class | Class() |
|
||||
extensions
|
||||
| methods3.kt:3:1:3:42 | fooBarTopLevelMethodExt | file://:0:0:0:0 | int |
|
||||
| methods3.kt:6:5:6:46 | fooBarTopLevelMethodExt | file://:0:0:0:0 | int |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java
|
||||
|
||||
query predicate methods(Method m, string signature) { m.fromSource() and signature = m.getSignature() }
|
||||
query predicate methods(RefType declType, Method m, string signature) { m.fromSource() and declType = m.getDeclaringType() and signature = m.getSignature() }
|
||||
|
||||
query predicate constructors(Constructor c, string signature) { c.fromSource() and signature = c.getSignature() }
|
||||
query predicate constructors(RefType declType, Constructor c, string signature) { c.fromSource() and declType = c.getDeclaringType() and signature = c.getSignature() }
|
||||
|
||||
query predicate extensions(ExtensionMethod m, Type t) { m.getExtendedType() = t and m.fromSource() }
|
||||
|
||||
Reference in New Issue
Block a user