Skip to content

Commit 2c2dcca

Browse files
authored
Merge pull request github#14833 from igfoo/igfoo/kot2tests
Kotlin: Add a kotlin2 copy of the testsuite
2 parents d26dc68 + 007f181 commit 2c2dcca

File tree

627 files changed

+32867
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

627 files changed

+32867
-1
lines changed

codeql-workspace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
provide:
22
- "*/ql/src/qlpack.yml"
33
- "*/ql/lib/qlpack.yml"
4-
- "*/ql/test/qlpack.yml"
4+
- "*/ql/test*/qlpack.yml"
55
- "*/ql/examples/qlpack.yml"
66
- "*/ql/consistency-queries/qlpack.yml"
77
- "*/ql/automodel/src/qlpack.yml"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
META-INF
2+
*.class
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| Generated.kt:0:0:0:0 | Generated |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This file was auto generated by me
2+
3+
class B
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import java
2+
3+
from GeneratedFile f
4+
select f
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This file was not generated
2+
3+
class A
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| test.kt:4:5:6:5 | keySet | 0 | java.util.concurrent.ConcurrentHashMap$KeySetView<K,V> |
2+
| test.kt:8:5:10:5 | keySet | 1 | java.util.concurrent.ConcurrentHashMap$KeySetView<K,V> |
3+
| test.kt:17:5:19:5 | keySet | 0 | java.util.Set<K> |
4+
| test.kt:21:5:23:5 | keySet | 1 | java.util.concurrent.OtherConcurrentHashMap$KeySetView<K,V> |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import java
2+
3+
from Method m
4+
where m.fromSource()
5+
select m, m.getNumberOfParameters(), m.getReturnType().(RefType).getQualifiedName()
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package java.util.concurrent
2+
3+
class ConcurrentHashMap<K,V> {
4+
fun keySet(): MutableSet<K> {
5+
return null!!
6+
}
7+
8+
fun keySet(p: V): KeySetView<K,V>? {
9+
return null
10+
}
11+
12+
class KeySetView<K,V> {
13+
}
14+
}
15+
16+
class OtherConcurrentHashMap<K,V> {
17+
fun keySet(): MutableSet<K> {
18+
return null!!
19+
}
20+
21+
fun keySet(p: V): KeySetView<K,V>? {
22+
return null
23+
}
24+
25+
class KeySetView<K,V> {
26+
}
27+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
test.kt:
2+
# 0| [CompilationUnit] test
3+
# 3| 1: [Interface] A
4+
#-----| -3: (Annotations)
5+
# 0| 1: [Annotation] Retention
6+
# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
7+
# 0| -1: [TypeAccess] RetentionPolicy
8+
# 3| 1: [Method] c1
9+
# 3| 3: [TypeAccess] Class<?>
10+
# 3| 0: [WildcardTypeAccess] ? ...
11+
# 3| 2: [Method] c2
12+
# 3| 3: [TypeAccess] Class<? extends CharSequence>
13+
# 3| 0: [WildcardTypeAccess] ? ...
14+
# 3| 0: [TypeAccess] CharSequence
15+
# 3| 3: [Method] c3
16+
# 3| 3: [TypeAccess] Class<String>
17+
# 3| 0: [TypeAccess] String
18+
# 3| 4: [Method] c4
19+
# 3| 3: [TypeAccess] Class<?>[]
20+
# 3| 0: [TypeAccess] Class<?>
21+
# 3| 0: [WildcardTypeAccess] ? ...

0 commit comments

Comments
 (0)