Merge pull request #14833 from igfoo/igfoo/kot2tests

Kotlin: Add a kotlin2 copy of the testsuite
This commit is contained in:
Ian Lynagh
2023-11-21 12:24:49 +00:00
committed by GitHub
627 changed files with 32867 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
META-INF
*.class

View File

@@ -0,0 +1 @@
| Generated.kt:0:0:0:0 | Generated |

View File

@@ -0,0 +1,3 @@
// This file was auto generated by me
class B

View File

@@ -0,0 +1,4 @@
import java
from GeneratedFile f
select f

View File

@@ -0,0 +1,3 @@
// This file was not generated
class A

View File

@@ -0,0 +1,4 @@
| test.kt:4:5:6:5 | keySet | 0 | java.util.concurrent.ConcurrentHashMap$KeySetView<K,V> |
| test.kt:8:5:10:5 | keySet | 1 | java.util.concurrent.ConcurrentHashMap$KeySetView<K,V> |
| test.kt:17:5:19:5 | keySet | 0 | java.util.Set<K> |
| test.kt:21:5:23:5 | keySet | 1 | java.util.concurrent.OtherConcurrentHashMap$KeySetView<K,V> |

View File

@@ -0,0 +1,5 @@
import java
from Method m
where m.fromSource()
select m, m.getNumberOfParameters(), m.getReturnType().(RefType).getQualifiedName()

View File

@@ -0,0 +1,27 @@
package java.util.concurrent
class ConcurrentHashMap<K,V> {
fun keySet(): MutableSet<K> {
return null!!
}
fun keySet(p: V): KeySetView<K,V>? {
return null
}
class KeySetView<K,V> {
}
}
class OtherConcurrentHashMap<K,V> {
fun keySet(): MutableSet<K> {
return null!!
}
fun keySet(p: V): KeySetView<K,V>? {
return null
}
class KeySetView<K,V> {
}
}

View File

@@ -0,0 +1,21 @@
test.kt:
# 0| [CompilationUnit] test
# 3| 1: [Interface] A
#-----| -3: (Annotations)
# 0| 1: [Annotation] Retention
# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
# 0| -1: [TypeAccess] RetentionPolicy
# 3| 1: [Method] c1
# 3| 3: [TypeAccess] Class<?>
# 3| 0: [WildcardTypeAccess] ? ...
# 3| 2: [Method] c2
# 3| 3: [TypeAccess] Class<? extends CharSequence>
# 3| 0: [WildcardTypeAccess] ? ...
# 3| 0: [TypeAccess] CharSequence
# 3| 3: [Method] c3
# 3| 3: [TypeAccess] Class<String>
# 3| 0: [TypeAccess] String
# 3| 4: [Method] c4
# 3| 3: [TypeAccess] Class<?>[]
# 3| 0: [TypeAccess] Class<?>
# 3| 0: [WildcardTypeAccess] ? ...

View File

@@ -0,0 +1 @@
semmle/code/java/PrintAst.ql

View File

@@ -0,0 +1,11 @@
classExprs
| test.kt:3:20:3:36 | Class<?> | Class<?> |
| test.kt:3:39:3:70 | Class<? extends CharSequence> | Class<? extends CharSequence> |
| test.kt:3:73:3:94 | Class<String> | Class<String> |
| test.kt:3:97:3:120 | Class<?> | Class<?> |
| test.kt:3:97:3:120 | Class<?>[] | Class<?>[] |
#select
| test.kt:3:20:3:36 | c1 | Class<?> |
| test.kt:3:39:3:70 | c2 | Class<? extends CharSequence> |
| test.kt:3:73:3:94 | c3 | Class<String> |
| test.kt:3:97:3:120 | c4 | Class<?>[] |

View File

@@ -0,0 +1,3 @@
import kotlin.reflect.KClass
annotation class A(val c1: KClass<*>, val c2: KClass<out CharSequence>, val c3: KClass<String>, val c4: Array<KClass<*>>) { }

View File

@@ -0,0 +1,11 @@
import java
query predicate classExprs(Expr e, string tstr) {
exists(e.getFile().getRelativePath()) and
tstr = e.getType().toString() and
tstr.matches("%Class%")
}
from Method m
where m.getDeclaringType().fromSource()
select m, m.getReturnType().toString()

View File

@@ -0,0 +1,3 @@
public @interface Annot0j {
int abc() default 0;
}

View File

@@ -0,0 +1,15 @@
public @interface Annot1j {
int a() default 2;
String b() default "ab";
Class c() default X.class;
Y d() default Y.A;
Y[] e() default { Y.A, Y.B };
Annot0j f() default @Annot0j(
abc = 1
);
}

View File

@@ -0,0 +1,283 @@
Annot0j.java:
# 0| [CompilationUnit] Annot0j
# 1| 1: [Interface] Annot0j
# 2| 1: [Method] abc
# 2| 3: [TypeAccess] int
Annot1j.java:
# 0| [CompilationUnit] Annot1j
# 1| 1: [Interface] Annot1j
# 2| 1: [Method] a
# 2| 3: [TypeAccess] int
# 4| 2: [Method] b
# 4| 3: [TypeAccess] String
# 6| 3: [Method] c
# 6| 3: [TypeAccess] Class<>
# 8| 4: [Method] d
# 8| 3: [TypeAccess] Y
# 10| 5: [Method] e
# 10| 3: [ArrayTypeAccess] ...[]
# 10| 0: [TypeAccess] Y
# 12| 6: [Method] f
# 12| 3: [TypeAccess] Annot0j
def.kt:
# 0| [CompilationUnit] def
# 0| 1: [Class] DefKt
# 45| 2: [Method] fn
#-----| 1: (Annotations)
# 45| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
#-----| 2: (Generic Parameters)
# 46| 0: [TypeVariable] T
# 45| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 46| 0: [Parameter] a
#-----| -1: (Annotations)
# 46| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 46| 0: [TypeAccess] Annot0k
# 46| 5: [BlockStmt] { ... }
# 47| 0: [ExprStmt] <Expr>;
# 47| 0: [MethodCall] println(...)
# 47| -1: [TypeAccess] ConsoleKt
# 47| 0: [MethodCall] a(...)
# 47| -1: [VarAccess] a
# 49| 1: [LocalVariableDeclStmt] var ...;
# 49| 1: [LocalVariableDeclExpr] x
# 50| 0: [IntegerLiteral] 10
# 53| 3: [Method] getP
#-----| 1: (Annotations)
# 54| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 53| 3: [TypeAccess] int
# 53| 5: [BlockStmt] { ... }
# 53| 0: [ReturnStmt] return ...
# 53| 0: [VarAccess] DefKt.p
# 53| -1: [TypeAccess] DefKt
# 53| 4: [FieldDeclaration] int p;
#-----| -2: (Annotations)
# 56| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 53| -1: [TypeAccess] int
# 57| 0: [IntegerLiteral] 5
# 53| 5: [Method] setP
#-----| 1: (Annotations)
# 55| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 53| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 53| 0: [Parameter] <set-?>
# 53| 0: [TypeAccess] int
# 53| 5: [BlockStmt] { ... }
# 53| 0: [ExprStmt] <Expr>;
# 53| 0: [AssignExpr] ...=...
# 53| 0: [VarAccess] DefKt.p
# 53| -1: [TypeAccess] DefKt
# 53| 1: [VarAccess] <set-?>
# 59| 6: [ExtensionMethod] myExtension
# 59| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 59| 0: [Parameter] <this>
#-----| -1: (Annotations)
# 59| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 59| 0: [TypeAccess] String
# 59| 5: [BlockStmt] { ... }
# 5| 2: [Interface] Annot0k
#-----| -3: (Annotations)
# 0| 1: [Annotation] Retention
# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
# 0| -1: [TypeAccess] RetentionPolicy
# 0| 2: [Annotation] Target
# 0| 1: [ArrayInit] {...}
# 0| 1: [VarAccess] ElementType.TYPE
# 0| -1: [TypeAccess] ElementType
# 0| 2: [VarAccess] ElementType.FIELD
# 0| -1: [TypeAccess] ElementType
# 0| 3: [VarAccess] ElementType.METHOD
# 0| -1: [TypeAccess] ElementType
# 0| 4: [VarAccess] ElementType.PARAMETER
# 0| -1: [TypeAccess] ElementType
# 0| 5: [VarAccess] ElementType.CONSTRUCTOR
# 0| -1: [TypeAccess] ElementType
# 0| 6: [VarAccess] ElementType.LOCAL_VARIABLE
# 0| -1: [TypeAccess] ElementType
# 0| 7: [VarAccess] ElementType.ANNOTATION_TYPE
# 0| -1: [TypeAccess] ElementType
# 0| 8: [VarAccess] ElementType.TYPE_PARAMETER
# 0| -1: [TypeAccess] ElementType
# 0| 9: [VarAccess] ElementType.TYPE_USE
# 0| -1: [TypeAccess] ElementType
# 5| 3: [Annotation] Target
# 5| 1: [ArrayInit] {...}
# 5| 1: [VarAccess] AnnotationTarget.CLASS
# 5| -1: [TypeAccess] AnnotationTarget
# 6| 2: [VarAccess] AnnotationTarget.ANNOTATION_CLASS
# 6| -1: [TypeAccess] AnnotationTarget
# 7| 3: [VarAccess] AnnotationTarget.TYPE_PARAMETER
# 7| -1: [TypeAccess] AnnotationTarget
# 8| 4: [VarAccess] AnnotationTarget.PROPERTY
# 8| -1: [TypeAccess] AnnotationTarget
# 9| 5: [VarAccess] AnnotationTarget.FIELD
# 9| -1: [TypeAccess] AnnotationTarget
# 10| 6: [VarAccess] AnnotationTarget.LOCAL_VARIABLE
# 10| -1: [TypeAccess] AnnotationTarget
# 11| 7: [VarAccess] AnnotationTarget.VALUE_PARAMETER
# 11| -1: [TypeAccess] AnnotationTarget
# 12| 8: [VarAccess] AnnotationTarget.CONSTRUCTOR
# 12| -1: [TypeAccess] AnnotationTarget
# 13| 9: [VarAccess] AnnotationTarget.FUNCTION
# 13| -1: [TypeAccess] AnnotationTarget
# 14| 10: [VarAccess] AnnotationTarget.PROPERTY_GETTER
# 14| -1: [TypeAccess] AnnotationTarget
# 15| 11: [VarAccess] AnnotationTarget.PROPERTY_SETTER
# 15| -1: [TypeAccess] AnnotationTarget
# 16| 12: [VarAccess] AnnotationTarget.TYPE
# 16| -1: [TypeAccess] AnnotationTarget
# 18| 13: [VarAccess] AnnotationTarget.FILE
# 18| -1: [TypeAccess] AnnotationTarget
# 19| 14: [VarAccess] AnnotationTarget.TYPEALIAS
# 19| -1: [TypeAccess] AnnotationTarget
# 21| 1: [Method] a
#-----| 1: (Annotations)
# 21| 1: [Annotation] JvmName
# 21| 1: [StringLiteral] "a"
# 21| 3: [TypeAccess] int
# 23| 3: [Interface] Annot1k
#-----| -3: (Annotations)
# 0| 1: [Annotation] Retention
# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
# 0| -1: [TypeAccess] RetentionPolicy
# 23| 2: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 25| 1: [Method] a
# 25| 3: [TypeAccess] int
# 26| 2: [Method] b
# 26| 3: [TypeAccess] String
# 27| 3: [Method] c
# 27| 3: [TypeAccess] Class<?>
# 27| 0: [WildcardTypeAccess] ? ...
# 28| 4: [Method] d
# 28| 3: [TypeAccess] Y
# 29| 5: [Method] e
# 29| 3: [TypeAccess] Y[]
# 29| 0: [TypeAccess] Y
# 30| 6: [Method] f
# 30| 3: [TypeAccess] Annot0k
# 33| 4: [Class] X
# 33| 1: [Constructor] X
# 33| 5: [BlockStmt] { ... }
# 33| 0: [SuperConstructorInvocationStmt] super(...)
# 33| 1: [BlockStmt] { ... }
# 34| 5: [Class] Y
# 34| 2: [Constructor] Y
# 34| 5: [BlockStmt] { ... }
# 34| 0: [ExprStmt] <Expr>;
# 34| 0: [ClassInstanceExpr] new Enum<Y>(...)
# 34| -3: [TypeAccess] Enum<Y>
# 34| 0: [TypeAccess] Y
# 34| 0: [NullLiteral] null
# 34| 1: [IntegerLiteral] 0
# 34| 1: [BlockStmt] { ... }
# 34| 3: [Method] getEntries
# 34| 3: [TypeAccess] EnumEntries<Y>
# 34| 0: [TypeAccess] Y
# 34| 4: [Method] valueOf
# 34| 3: [TypeAccess] Y
#-----| 4: (Parameters)
# 34| 0: [Parameter] value
# 34| 0: [TypeAccess] String
# 34| 5: [Method] values
# 34| 3: [TypeAccess] Y[]
# 34| 0: [TypeAccess] Y
# 35| 6: [FieldDeclaration] Y A;
# 35| -1: [TypeAccess] Y
# 35| 0: [ClassInstanceExpr] new Y(...)
# 35| -3: [TypeAccess] Y
# 35| 7: [FieldDeclaration] Y B;
# 35| -1: [TypeAccess] Y
# 35| 0: [ClassInstanceExpr] new Y(...)
# 35| -3: [TypeAccess] Y
# 35| 8: [FieldDeclaration] Y C;
# 35| -1: [TypeAccess] Y
# 35| 0: [ClassInstanceExpr] new Y(...)
# 35| -3: [TypeAccess] Y
# 38| 6: [Class] Z
#-----| -3: (Annotations)
# 38| 1: [Annotation] Annot0k
# 38| 1: [IntegerLiteral] 1
# 39| 2: [Annotation] Annot1k
# 25| 1: [IntegerLiteral] 2
# 26| 2: [StringLiteral] "ab"
# 27| 3: [TypeLiteral] X.class
# 27| 0: [TypeAccess] X
# 30| 4: [Annotation] Annot0k
# 30| 1: [IntegerLiteral] 1
# 39| 5: [VarAccess] Y.B
# 39| -1: [TypeAccess] Y
# 39| 6: [ArrayInit] {...}
# 39| 1: [VarAccess] Y.C
# 39| -1: [TypeAccess] Y
# 39| 2: [VarAccess] Y.A
# 39| -1: [TypeAccess] Y
# 41| 1: [Constructor] Z
#-----| 1: (Annotations)
# 41| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 41| 5: [BlockStmt] { ... }
# 42| 0: [SuperConstructorInvocationStmt] super(...)
# 41| 1: [BlockStmt] { ... }
use.java:
# 0| [CompilationUnit] use
# 1| 1: [Class] use
#-----| -1: (Base Types)
# 1| 0: [TypeAccess] Annot0k
# 3| 2: [Method] a
#-----| 1: (Annotations)
# 2| 1: [Annotation] Override
# 3| 3: [TypeAccess] int
# 3| 5: [BlockStmt] { ... }
# 3| 0: [ReturnStmt] return ...
# 3| 0: [IntegerLiteral] 1
# 6| 3: [Method] annotationType
#-----| 1: (Annotations)
# 5| 1: [Annotation] Override
# 6| 3: [TypeAccess] Class<? extends Annotation>
# 6| 0: [WildcardTypeAccess] ? ...
# 6| 0: [TypeAccess] Annotation
# 6| 5: [BlockStmt] { ... }
# 7| 0: [ReturnStmt] return ...
# 7| 0: [NullLiteral] null
# 14| 4: [Class] Z
#-----| -3: (Annotations)
# 10| 1: [Annotation] Annot0j
# 10| 1: [IntegerLiteral] 1
# 11| 2: [Annotation] Annot1j
# 11| 1: [IntegerLiteral] 1
# 11| 2: [StringLiteral] "ac"
# 11| 3: [TypeLiteral] X.class
# 11| 0: [TypeAccess] X
# 11| 4: [VarAccess] Y.B
# 11| -1: [TypeAccess] Y
# 11| 5: [ArrayInit] {...}
# 11| 3: [VarAccess] Y.C
# 11| -1: [TypeAccess] Y
# 11| 4: [VarAccess] Y.A
# 11| -1: [TypeAccess] Y
# 11| 6: [Annotation] Annot0j
# 11| 1: [IntegerLiteral] 2
# 12| 3: [Annotation] Annot0k
# 12| 1: [IntegerLiteral] 1
# 13| 4: [Annotation] Annot1k
# 13| 1: [IntegerLiteral] 1
# 13| 2: [StringLiteral] "ac"
# 13| 3: [TypeLiteral] X.class
# 13| 0: [TypeAccess] X
# 13| 4: [VarAccess] Y.B
# 13| -1: [TypeAccess] Y
# 13| 5: [ArrayInit] {...}
# 13| 3: [VarAccess] Y.C
# 13| -1: [TypeAccess] Y
# 13| 4: [VarAccess] Y.A
# 13| -1: [TypeAccess] Y
# 13| 6: [Annotation] Annot0k
# 13| 1: [IntegerLiteral] 2

View File

@@ -0,0 +1 @@
semmle/code/java/PrintAst.ql

View File

@@ -0,0 +1,82 @@
#select
| Annot0j.java:1:19:1:25 | Annot0j | Interface |
| Annot1j.java:1:19:1:25 | Annot1j | Interface |
| def.kt:0:0:0:0 | DefKt | Class |
| def.kt:5:1:21:60 | Annot0k | Interface |
| def.kt:23:1:31:1 | Annot1k | Interface |
| def.kt:33:1:33:10 | X | Class |
| def.kt:34:1:36:1 | Y | Class |
| def.kt:38:1:43:1 | Z | Class |
| use.java:1:14:1:16 | use | Class |
| use.java:14:18:14:18 | Z | Class |
annotationDeclarations
| Annot0j.java:1:19:1:25 | Annot0j | Annot0j.java:2:9:2:11 | abc |
| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:2:9:2:9 | a |
| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:4:12:4:12 | b |
| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:6:11:6:11 | c |
| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:8:7:8:7 | d |
| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:10:9:10:9 | e |
| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:12:13:12:13 | f |
| def.kt:5:1:21:60 | Annot0k | def.kt:21:26:21:59 | a |
| def.kt:23:1:31:1 | Annot1k | def.kt:25:5:25:18 | a |
| def.kt:23:1:31:1 | Annot1k | def.kt:26:5:26:24 | b |
| def.kt:23:1:31:1 | Annot1k | def.kt:27:5:27:31 | c |
| def.kt:23:1:31:1 | Annot1k | def.kt:28:5:28:18 | d |
| def.kt:23:1:31:1 | Annot1k | def.kt:29:5:29:32 | e |
| def.kt:23:1:31:1 | Annot1k | def.kt:30:5:30:31 | f |
annotations
| def.kt:23:1:23:8 | Annot0k | def.kt:23:1:31:1 | Annot1k | def.kt:5:1:21:60 | Annot0k |
| def.kt:30:22:30:31 | Annot0k | def.kt:39:1:39:40 | Annot1k | def.kt:5:1:21:60 | Annot0k |
| def.kt:38:1:38:17 | Annot0k | def.kt:38:1:43:1 | Z | def.kt:5:1:21:60 | Annot0k |
| def.kt:39:1:39:40 | Annot1k | def.kt:38:1:43:1 | Z | def.kt:23:1:31:1 | Annot1k |
| def.kt:41:5:41:12 | Annot0k | def.kt:41:5:42:19 | Z | def.kt:5:1:21:60 | Annot0k |
| def.kt:45:1:45:8 | Annot0k | def.kt:45:1:51:1 | fn | def.kt:5:1:21:60 | Annot0k |
| def.kt:46:21:46:28 | Annot0k | def.kt:46:21:46:39 | a | def.kt:5:1:21:60 | Annot0k |
| def.kt:54:1:54:12 | Annot0k | def.kt:53:1:57:23 | getP | def.kt:5:1:21:60 | Annot0k |
| def.kt:55:1:55:12 | Annot0k | def.kt:53:1:57:23 | setP | def.kt:5:1:21:60 | Annot0k |
| def.kt:56:1:56:14 | Annot0k | def.kt:53:1:57:23 | p | def.kt:5:1:21:60 | Annot0k |
| def.kt:59:5:59:21 | Annot0k | def.kt:59:5:59:28 | <this> | def.kt:5:1:21:60 | Annot0k |
| use.java:10:5:10:21 | Annot0j | use.java:14:18:14:18 | Z | Annot0j.java:1:19:1:25 | Annot0j |
| use.java:11:5:11:90 | Annot1j | use.java:14:18:14:18 | Z | Annot1j.java:1:19:1:25 | Annot1j |
| use.java:11:73:11:89 | Annot0j | use.java:11:5:11:90 | Annot1j | Annot0j.java:1:19:1:25 | Annot0j |
| use.java:12:5:12:19 | Annot0k | use.java:14:18:14:18 | Z | def.kt:5:1:21:60 | Annot0k |
| use.java:13:5:13:88 | Annot1k | use.java:14:18:14:18 | Z | def.kt:23:1:31:1 | Annot1k |
| use.java:13:73:13:87 | Annot0k | use.java:13:5:13:88 | Annot1k | def.kt:5:1:21:60 | Annot0k |
annotationValues
| def.kt:0:0:0:0 | Retention | def.kt:0:0:0:0 | RetentionPolicy.RUNTIME |
| def.kt:0:0:0:0 | Retention | def.kt:0:0:0:0 | RetentionPolicy.RUNTIME |
| def.kt:0:0:0:0 | Target | def.kt:0:0:0:0 | {...} |
| def.kt:5:1:20:1 | Target | def.kt:5:9:19:30 | {...} |
| def.kt:21:26:21:42 | JvmName | def.kt:21:39:21:41 | "a" |
| def.kt:23:1:23:8 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:30:22:30:31 | Annot0k | def.kt:30:30:30:30 | 1 |
| def.kt:38:1:38:17 | Annot0k | def.kt:38:16:38:16 | 1 |
| def.kt:39:1:39:40 | Annot1k | def.kt:25:18:25:18 | 2 |
| def.kt:39:1:39:40 | Annot1k | def.kt:26:21:26:24 | "ab" |
| def.kt:39:1:39:40 | Annot1k | def.kt:27:24:27:31 | X.class |
| def.kt:39:1:39:40 | Annot1k | def.kt:30:22:30:31 | Annot0k |
| def.kt:39:1:39:40 | Annot1k | def.kt:39:16:39:16 | Y.B |
| def.kt:39:1:39:40 | Annot1k | def.kt:39:23:39:39 | {...} |
| def.kt:41:5:41:12 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:45:1:45:8 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:46:21:46:28 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:54:1:54:12 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:55:1:55:12 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:56:1:56:14 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:59:5:59:21 | Annot0k | def.kt:21:59:21:59 | 0 |
| use.java:10:5:10:21 | Annot0j | use.java:10:20:10:20 | 1 |
| use.java:11:5:11:90 | Annot1j | use.java:11:18:11:18 | 1 |
| use.java:11:5:11:90 | Annot1j | use.java:11:25:11:28 | "ac" |
| use.java:11:5:11:90 | Annot1j | use.java:11:35:11:41 | X.class |
| use.java:11:5:11:90 | Annot1j | use.java:11:48:11:50 | Y.B |
| use.java:11:5:11:90 | Annot1j | use.java:11:57:11:66 | {...} |
| use.java:11:5:11:90 | Annot1j | use.java:11:73:11:89 | Annot0j |
| use.java:11:73:11:89 | Annot0j | use.java:11:88:11:88 | 2 |
| use.java:12:5:12:19 | Annot0k | use.java:12:18:12:18 | 1 |
| use.java:13:5:13:88 | Annot1k | use.java:13:18:13:18 | 1 |
| use.java:13:5:13:88 | Annot1k | use.java:13:25:13:28 | "ac" |
| use.java:13:5:13:88 | Annot1k | use.java:13:35:13:41 | X.class |
| use.java:13:5:13:88 | Annot1k | use.java:13:48:13:50 | Y.B |
| use.java:13:5:13:88 | Annot1k | use.java:13:57:13:66 | {...} |
| use.java:13:5:13:88 | Annot1k | use.java:13:73:13:87 | Annot0k |
| use.java:13:73:13:87 | Annot0k | use.java:13:86:13:86 | 2 |

View File

@@ -0,0 +1,20 @@
import java
from ClassOrInterface x
where x.fromSource()
select x, x.getPrimaryQlClasses()
query predicate annotationDeclarations(AnnotationType at, AnnotationElement ae) {
at.fromSource() and
at.getAnAnnotationElement() = ae
}
query predicate annotations(Annotation a, Element e, AnnotationType at) {
at.fromSource() and
a.getAnnotatedElement() = e and
at = a.getType()
}
query predicate annotationValues(Annotation a, Expr v) {
a.getValue(_) = v and v.getFile().isSourceFile()
}

View File

@@ -0,0 +1,62 @@
@file:Annot0k
import kotlin.reflect.KClass
@Target(AnnotationTarget.CLASS,
AnnotationTarget.ANNOTATION_CLASS,
AnnotationTarget.TYPE_PARAMETER,
AnnotationTarget.PROPERTY,
AnnotationTarget.FIELD,
AnnotationTarget.LOCAL_VARIABLE, // TODO
AnnotationTarget.VALUE_PARAMETER,
AnnotationTarget.CONSTRUCTOR,
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY_GETTER,
AnnotationTarget.PROPERTY_SETTER,
AnnotationTarget.TYPE, // TODO
//AnnotationTarget.EXPRESSION, // TODO
AnnotationTarget.FILE, // TODO
AnnotationTarget.TYPEALIAS // TODO
)
annotation class Annot0k(@get:JvmName("a") val abc: Int = 0)
@Annot0k
annotation class Annot1k(
val a: Int = 2,
val b: String = "ab",
val c: KClass<*> = X::class,
val d: Y = Y.A,
val e: Array<Y> = [Y.A, Y.B],
val f: Annot0k = Annot0k(1)
)
class X {}
enum class Y {
A,B,C
}
@Annot0k(abc = 1)
@Annot1k(d = Y.B, e = arrayOf(Y.C, Y.A))
class Z {
@Annot0k
constructor(){}
}
@Annot0k
fun <@Annot0k T> fn(@Annot0k a: Annot0k) {
println(a.abc)
@Annot0k
var x = 10
}
@Annot0k
@get:Annot0k
@set:Annot0k
@field:Annot0k
var p: @Annot0k Int = 5
fun @receiver:Annot0k String.myExtension() { }
@Annot0k
typealias AAA = Z

View File

@@ -0,0 +1,15 @@
public class use implements Annot0k {
@Override
public int a() { return 1; }
@Override
public Class<? extends java.lang.annotation.Annotation> annotationType() {
return null;
}
@Annot0j(abc = 1)
@Annot1j(a = 1, b = "ac", c = X.class, d = Y.B, e = {Y.C, Y.A}, f = @Annot0j(abc = 2))
@Annot0k(a = 1)
@Annot1k(a = 1, b = "ac", c = X.class, d = Y.B, e = {Y.C, Y.A}, f = @Annot0k(a = 2))
public class Z { }
}

View File

@@ -0,0 +1,5 @@
class Test {
public void m() {
int i = new X().getX_prop();
}
}

View File

@@ -0,0 +1,8 @@
| Test.java:2:17:2:17 | m | m | m |
| test.kt:3:9:4:18 | getX_prop | getX_prop | getX |
| test.kt:6:5:6:19 | getX | getX | getX |
| test.kt:8:5:10:19 | changeY | changeY | setY |
| test.kt:8:5:10:19 | y | y | getY |
| test.kt:12:5:13:15 | method | method | fn |
| test.kt:17:5:17:14 | p | p | p |
| test.kt:18:5:18:32 | w | w | q |

View File

@@ -0,0 +1,18 @@
class X {
val x: Int
@JvmName("getX_prop")
get() = 15
fun getX() = 10
@get:JvmName("y")
@set:JvmName("changeY")
var y: Int = 23
@JvmName("method")
fun fn() {}
}
annotation class Ann(
val p: Int,
@get:JvmName("w") val q: Int)

View File

@@ -0,0 +1,5 @@
import java
query predicate names(Method m, string name, string kotlinName) {
m.fromSource() and name = m.getName() and kotlinName = m.getKotlinName()
}

View File

@@ -0,0 +1,11 @@
public class User {
public static void test() {
TakesArrayList tal = new TakesArrayList();
tal.invarArray(null);
// Using one method suffices to get the extractor to describe all the methods defined on takesArrayList.
}
}

View File

@@ -0,0 +1,112 @@
public class TakesArrayList {
// There is a Java user to flag up any problems, as if the .class file differs from my
// claimed types above we'll see two overloads and two parameter types instead of one.
// Test how Array types with a variance should be lowered:
fun invarArray(a: Array<CharSequence>) { }
fun outArray(a: Array<out CharSequence>) { }
fun inArray(a: Array<in CharSequence>) { }
fun invarInvarArray(a: Array<Array<CharSequence>>) { }
fun invarOutArray(a: Array<Array<out CharSequence>>) { }
fun invarInArray(a: Array<Array<in CharSequence>>) { }
fun outInvarArray(a: Array<out Array<CharSequence>>) { }
fun outOutArray(a: Array<out Array<out CharSequence>>) { }
fun outInArray(a: Array<out Array<in CharSequence>>) { }
fun inInvarArray(a: Array<in Array<CharSequence>>) { }
fun inOutArray(a: Array<in Array<out CharSequence>>) { }
fun inInArray(a: Array<in Array<in CharSequence>>) { }
// Test how Array type arguments with a variance should acquire implicit wildcards:
fun invarArrayList(l: List<Array<CharSequence>>) { }
fun outArrayList(l: List<Array<out CharSequence>>) { }
fun inArrayList(l: List<Array<in CharSequence>>) { }
// Check the cases of nested arrays:
fun invarInvarArrayList(l: List<Array<Array<CharSequence>>>) { }
fun invarOutArrayList(l: List<Array<Array<out CharSequence>>>) { }
fun invarInArrayList(l: List<Array<Array<in CharSequence>>>) { }
fun outInvarArrayList(l: List<Array<out Array<CharSequence>>>) { }
fun outOutArrayList(l: List<Array<out Array<out CharSequence>>>) { }
fun outInArrayList(l: List<Array<out Array<in CharSequence>>>) { }
fun inInvarArrayList(l: List<Array<in Array<CharSequence>>>) { }
fun inOutArrayList(l: List<Array<in Array<out CharSequence>>>) { }
fun inInArrayList(l: List<Array<in Array<in CharSequence>>>) { }
// Now check all of that again for Comparable, whose type parameter is contravariant:
fun invarArrayComparable(c: Comparable<Array<CharSequence>>) { }
fun outArrayComparable(c: Comparable<Array<out CharSequence>>) { }
fun inArrayComparable(c: Comparable<Array<in CharSequence>>) { }
fun invarInvarArrayComparable(c: Comparable<Array<Array<CharSequence>>>) { }
fun invarOutArrayComparable(c: Comparable<Array<Array<out CharSequence>>>) { }
fun invarInArrayComparable(c: Comparable<Array<Array<in CharSequence>>>) { }
fun outInvarArrayComparable(c: Comparable<Array<out Array<CharSequence>>>) { }
fun outOutArrayComparable(c: Comparable<Array<out Array<out CharSequence>>>) { }
fun outInArrayComparable(c: Comparable<Array<out Array<in CharSequence>>>) { }
fun inInvarArrayComparable(c: Comparable<Array<in Array<CharSequence>>>) { }
fun inOutArrayComparable(c: Comparable<Array<in Array<out CharSequence>>>) { }
fun inInArrayComparable(c: Comparable<Array<in Array<in CharSequence>>>) { }
// ... duplicate all of that for a final array element (I choose String as a final type), which sometimes suppresses addition of `? extends ...`
fun invarArrayListFinal(l: List<Array<String>>) { }
fun outArrayListFinal(l: List<Array<out String>>) { }
fun inArrayListFinal(l: List<Array<in String>>) { }
fun invarInvarArrayListFinal(l: List<Array<Array<String>>>) { }
fun invarOutArrayListFinal(l: List<Array<Array<out String>>>) { }
fun invarInArrayListFinal(l: List<Array<Array<in String>>>) { }
fun outInvarArrayListFinal(l: List<Array<out Array<String>>>) { }
fun outOutArrayListFinal(l: List<Array<out Array<out String>>>) { }
fun outInArrayListFinal(l: List<Array<out Array<in String>>>) { }
fun inInvarArrayListFinal(l: List<Array<in Array<String>>>) { }
fun inOutArrayListFinal(l: List<Array<in Array<out String>>>) { }
fun inInArrayListFinal(l: List<Array<in Array<in String>>>) { }
fun invarArrayComparableFinal(c: Comparable<Array<String>>) { }
fun outArrayComparableFinal(c: Comparable<Array<out String>>) { }
fun inArrayComparableFinal(c: Comparable<Array<in String>>) { }
fun invarInvarArrayComparableFinal(c: Comparable<Array<Array<String>>>) { }
fun invarOutArrayComparableFinal(c: Comparable<Array<Array<out String>>>) { }
fun invarInArrayComparableFinal(c: Comparable<Array<Array<in String>>>) { }
fun outInvarArrayComparableFinal(c: Comparable<Array<out Array<String>>>) { }
fun outOutArrayComparableFinal(c: Comparable<Array<out Array<out String>>>) { }
fun outInArrayComparableFinal(c: Comparable<Array<out Array<in String>>>) { }
fun inInvarArrayComparableFinal(c: Comparable<Array<in Array<String>>>) { }
fun inOutArrayComparableFinal(c: Comparable<Array<in Array<out String>>>) { }
fun inInArrayComparableFinal(c: Comparable<Array<in Array<in String>>>) { }
// ... and duplicate it once more with Any as the array element, which can suppress adding `? super ...`
fun invarArrayListAny(l: List<Array<Any>>) { }
fun outArrayListAny(l: List<Array<out Any>>) { }
fun inArrayListAny(l: List<Array<in Any>>) { }
fun invarInvarArrayListAny(l: List<Array<Array<Any>>>) { }
fun invarOutArrayListAny(l: List<Array<Array<out Any>>>) { }
fun invarInArrayListAny(l: List<Array<Array<in Any>>>) { }
fun outInvarArrayListAny(l: List<Array<out Array<Any>>>) { }
fun outOutArrayListAny(l: List<Array<out Array<out Any>>>) { }
fun outInArrayListAny(l: List<Array<out Array<in Any>>>) { }
fun inInvarArrayListAny(l: List<Array<in Array<Any>>>) { }
fun inOutArrayListAny(l: List<Array<in Array<out Any>>>) { }
fun inInArrayListAny(l: List<Array<in Array<in Any>>>) { }
fun invarArrayComparableAny(c: Comparable<Array<Any>>) { }
fun outArrayComparableAny(c: Comparable<Array<out Any>>) { }
fun inArrayComparableAny(c: Comparable<Array<in Any>>) { }
fun invarInvarArrayComparableAny(c: Comparable<Array<Array<Any>>>) { }
fun invarOutArrayComparableAny(c: Comparable<Array<Array<out Any>>>) { }
fun invarInArrayComparableAny(c: Comparable<Array<Array<in Any>>>) { }
fun outInvarArrayComparableAny(c: Comparable<Array<out Array<Any>>>) { }
fun outOutArrayComparableAny(c: Comparable<Array<out Array<out Any>>>) { }
fun outInArrayComparableAny(c: Comparable<Array<out Array<in Any>>>) { }
fun inInvarArrayComparableAny(c: Comparable<Array<in Array<Any>>>) { }
fun inOutArrayComparableAny(c: Comparable<Array<in Array<out Any>>>) { }
fun inInArrayComparableAny(c: Comparable<Array<in Array<in Any>>>) { }
}

View File

@@ -0,0 +1,86 @@
broken
#select
| inArray | Object[] |
| inArrayComparable | Comparable<? super Object[]> |
| inArrayComparableAny | Comparable<? super Object[]> |
| inArrayComparableFinal | Comparable<? super Object[]> |
| inArrayList | List<? extends Object[]> |
| inArrayListAny | List<Object[]> |
| inArrayListFinal | List<? extends Object[]> |
| inInArray | Object[] |
| inInArrayComparable | Comparable<? super Object[]> |
| inInArrayComparableAny | Comparable<? super Object[]> |
| inInArrayComparableFinal | Comparable<? super Object[]> |
| inInArrayList | List<? extends Object[]> |
| inInArrayListAny | List<? extends Object[]> |
| inInArrayListFinal | List<? extends Object[]> |
| inInvarArray | Object[] |
| inInvarArrayComparable | Comparable<? super Object[]> |
| inInvarArrayComparableAny | Comparable<? super Object[]> |
| inInvarArrayComparableFinal | Comparable<? super Object[]> |
| inInvarArrayList | List<? extends Object[]> |
| inInvarArrayListAny | List<? extends Object[]> |
| inInvarArrayListFinal | List<? extends Object[]> |
| inOutArray | Object[] |
| inOutArrayComparable | Comparable<? super Object[]> |
| inOutArrayComparableAny | Comparable<? super Object[]> |
| inOutArrayComparableFinal | Comparable<? super Object[]> |
| inOutArrayList | List<? extends Object[]> |
| inOutArrayListAny | List<? extends Object[]> |
| inOutArrayListFinal | List<? extends Object[]> |
| invarArray | CharSequence[] |
| invarArrayComparable | Comparable<? super CharSequence[]> |
| invarArrayComparableAny | Comparable<? super Object[]> |
| invarArrayComparableFinal | Comparable<? super String[]> |
| invarArrayList | List<CharSequence[]> |
| invarArrayListAny | List<Object[]> |
| invarArrayListFinal | List<String[]> |
| invarInArray | Object[][] |
| invarInArrayComparable | Comparable<? super Object[][]> |
| invarInArrayComparableAny | Comparable<? super Object[][]> |
| invarInArrayComparableFinal | Comparable<? super Object[][]> |
| invarInArrayList | List<Object[][]> |
| invarInArrayListAny | List<Object[][]> |
| invarInArrayListFinal | List<Object[][]> |
| invarInvarArray | CharSequence[][] |
| invarInvarArrayComparable | Comparable<? super CharSequence[][]> |
| invarInvarArrayComparableAny | Comparable<? super Object[][]> |
| invarInvarArrayComparableFinal | Comparable<? super String[][]> |
| invarInvarArrayList | List<CharSequence[][]> |
| invarInvarArrayListAny | List<Object[][]> |
| invarInvarArrayListFinal | List<String[][]> |
| invarOutArray | CharSequence[][] |
| invarOutArrayComparable | Comparable<? super CharSequence[][]> |
| invarOutArrayComparableAny | Comparable<? super Object[][]> |
| invarOutArrayComparableFinal | Comparable<? super String[][]> |
| invarOutArrayList | List<CharSequence[][]> |
| invarOutArrayListAny | List<Object[][]> |
| invarOutArrayListFinal | List<String[][]> |
| outArray | CharSequence[] |
| outArrayComparable | Comparable<? super CharSequence[]> |
| outArrayComparableAny | Comparable<? super Object[]> |
| outArrayComparableFinal | Comparable<? super String[]> |
| outArrayList | List<? extends CharSequence[]> |
| outArrayListAny | List<? extends Object[]> |
| outArrayListFinal | List<String[]> |
| outInArray | Object[][] |
| outInArrayComparable | Comparable<? super Object[][]> |
| outInArrayComparableAny | Comparable<? super Object[][]> |
| outInArrayComparableFinal | Comparable<? super Object[][]> |
| outInArrayList | List<? extends Object[][]> |
| outInArrayListAny | List<Object[][]> |
| outInArrayListFinal | List<? extends Object[][]> |
| outInvarArray | CharSequence[][] |
| outInvarArrayComparable | Comparable<? super CharSequence[][]> |
| outInvarArrayComparableAny | Comparable<? super Object[][]> |
| outInvarArrayComparableFinal | Comparable<? super String[][]> |
| outInvarArrayList | List<CharSequence[][]> |
| outInvarArrayListAny | List<Object[][]> |
| outInvarArrayListFinal | List<String[][]> |
| outOutArray | CharSequence[][] |
| outOutArrayComparable | Comparable<? super CharSequence[][]> |
| outOutArrayComparableAny | Comparable<? super Object[][]> |
| outOutArrayComparableFinal | Comparable<? super String[][]> |
| outOutArrayList | List<? extends CharSequence[][]> |
| outOutArrayListAny | List<? extends Object[][]> |
| outOutArrayListFinal | List<String[][]> |

View File

@@ -0,0 +1,13 @@
import java
class InterestingMethod extends Method {
InterestingMethod() { this.getDeclaringType().getName() = "TakesArrayList" }
}
query predicate broken(string methodName) {
methodName = any(InterestingMethod m).getName() and
count(Type t, InterestingMethod m | methodName = m.getName() and t = m.getAParamType() | t) != 1
}
from InterestingMethod m
select m.getName(), m.getAParamType().toString()

View File

@@ -0,0 +1,22 @@
| arrayGetsSets.kt:12:3:12:7 | ...[...] | arrayGetsSets.kt:12:3:12:7 | ...=... | int[] | arrayGetsSets.kt:12:3:12:4 | a1 | arrayGetsSets.kt:12:6:12:6 | 0 |
| arrayGetsSets.kt:12:11:12:15 | ...[...] | arrayGetsSets.kt:12:3:12:7 | ...=... | int | arrayGetsSets.kt:12:11:12:12 | a1 | arrayGetsSets.kt:12:14:12:14 | 0 |
| arrayGetsSets.kt:13:3:13:7 | ...[...] | arrayGetsSets.kt:13:3:13:7 | ...=... | short[] | arrayGetsSets.kt:13:3:13:4 | a2 | arrayGetsSets.kt:13:6:13:6 | 0 |
| arrayGetsSets.kt:13:11:13:15 | ...[...] | arrayGetsSets.kt:13:3:13:7 | ...=... | short | arrayGetsSets.kt:13:11:13:12 | a2 | arrayGetsSets.kt:13:14:13:14 | 0 |
| arrayGetsSets.kt:14:3:14:7 | ...[...] | arrayGetsSets.kt:14:3:14:7 | ...=... | byte[] | arrayGetsSets.kt:14:3:14:4 | a3 | arrayGetsSets.kt:14:6:14:6 | 0 |
| arrayGetsSets.kt:14:11:14:15 | ...[...] | arrayGetsSets.kt:14:3:14:7 | ...=... | byte | arrayGetsSets.kt:14:11:14:12 | a3 | arrayGetsSets.kt:14:14:14:14 | 0 |
| arrayGetsSets.kt:15:3:15:7 | ...[...] | arrayGetsSets.kt:15:3:15:7 | ...=... | long[] | arrayGetsSets.kt:15:3:15:4 | a4 | arrayGetsSets.kt:15:6:15:6 | 0 |
| arrayGetsSets.kt:15:11:15:15 | ...[...] | arrayGetsSets.kt:15:3:15:7 | ...=... | long | arrayGetsSets.kt:15:11:15:12 | a4 | arrayGetsSets.kt:15:14:15:14 | 0 |
| arrayGetsSets.kt:16:3:16:7 | ...[...] | arrayGetsSets.kt:16:3:16:7 | ...=... | float[] | arrayGetsSets.kt:16:3:16:4 | a5 | arrayGetsSets.kt:16:6:16:6 | 0 |
| arrayGetsSets.kt:16:11:16:15 | ...[...] | arrayGetsSets.kt:16:3:16:7 | ...=... | float | arrayGetsSets.kt:16:11:16:12 | a5 | arrayGetsSets.kt:16:14:16:14 | 0 |
| arrayGetsSets.kt:17:3:17:7 | ...[...] | arrayGetsSets.kt:17:3:17:7 | ...=... | double[] | arrayGetsSets.kt:17:3:17:4 | a6 | arrayGetsSets.kt:17:6:17:6 | 0 |
| arrayGetsSets.kt:17:11:17:15 | ...[...] | arrayGetsSets.kt:17:3:17:7 | ...=... | double | arrayGetsSets.kt:17:11:17:12 | a6 | arrayGetsSets.kt:17:14:17:14 | 0 |
| arrayGetsSets.kt:18:3:18:7 | ...[...] | arrayGetsSets.kt:18:3:18:7 | ...=... | boolean[] | arrayGetsSets.kt:18:3:18:4 | a7 | arrayGetsSets.kt:18:6:18:6 | 0 |
| arrayGetsSets.kt:18:11:18:15 | ...[...] | arrayGetsSets.kt:18:3:18:7 | ...=... | boolean | arrayGetsSets.kt:18:11:18:12 | a7 | arrayGetsSets.kt:18:14:18:14 | 0 |
| arrayGetsSets.kt:19:3:19:7 | ...[...] | arrayGetsSets.kt:19:3:19:7 | ...=... | char[] | arrayGetsSets.kt:19:3:19:4 | a8 | arrayGetsSets.kt:19:6:19:6 | 0 |
| arrayGetsSets.kt:19:11:19:15 | ...[...] | arrayGetsSets.kt:19:3:19:7 | ...=... | char | arrayGetsSets.kt:19:11:19:12 | a8 | arrayGetsSets.kt:19:14:19:14 | 0 |
| arrayGetsSets.kt:20:3:20:7 | ...[...] | arrayGetsSets.kt:20:3:20:7 | ...=... | Object[] | arrayGetsSets.kt:20:3:20:4 | a9 | arrayGetsSets.kt:20:6:20:6 | 0 |
| arrayGetsSets.kt:20:11:20:15 | ...[...] | arrayGetsSets.kt:20:3:20:7 | ...=... | Object | arrayGetsSets.kt:20:11:20:12 | a9 | arrayGetsSets.kt:20:14:20:14 | 0 |
| arrayGetsSets.kt:32:3:32:7 | ...[...] | arrayGetsSets.kt:32:3:32:7 | ...+=... | int | arrayGetsSets.kt:32:3:32:4 | a1 | arrayGetsSets.kt:32:6:32:6 | 0 |
| arrayGetsSets.kt:38:3:38:7 | ...[...] | arrayGetsSets.kt:38:3:38:7 | .../=... | long | arrayGetsSets.kt:38:3:38:4 | a4 | arrayGetsSets.kt:38:6:38:6 | 0 |
| arrayGetsSets.kt:39:3:39:7 | ...[...] | arrayGetsSets.kt:39:3:39:7 | ...-=... | float | arrayGetsSets.kt:39:3:39:4 | a5 | arrayGetsSets.kt:39:6:39:6 | 0 |
| arrayGetsSets.kt:40:3:40:7 | ...[...] | arrayGetsSets.kt:40:3:40:7 | ...*=... | double | arrayGetsSets.kt:40:3:40:4 | a6 | arrayGetsSets.kt:40:6:40:6 | 0 |

View File

@@ -0,0 +1,4 @@
import java
from ArrayAccess aa
select aa, aa.getParent(), aa.getType().toString(), aa.getArray(), aa.getIndexExpr()

View File

@@ -0,0 +1,115 @@
arrayCreationTypes
| arrayCreations.kt:5:14:5:33 | new Integer[] | file://:0:0:0:0 | Integer[] | arrayCreations.kt:5:14:5:33 | Integer |
| arrayCreations.kt:6:14:6:32 | new Integer[] | file://:0:0:0:0 | Integer[] | arrayCreations.kt:6:14:6:32 | Integer |
| arrayCreations.kt:7:14:7:46 | new double[] | file://:0:0:0:0 | double[] | arrayCreations.kt:7:14:7:46 | double |
| arrayCreations.kt:8:14:8:49 | new float[] | file://:0:0:0:0 | float[] | arrayCreations.kt:8:14:8:49 | float |
| arrayCreations.kt:9:14:9:36 | new long[] | file://:0:0:0:0 | long[] | arrayCreations.kt:9:14:9:36 | long |
| arrayCreations.kt:10:14:10:35 | new int[] | file://:0:0:0:0 | int[] | arrayCreations.kt:10:14:10:35 | int |
| arrayCreations.kt:11:14:11:34 | new char[] | file://:0:0:0:0 | char[] | arrayCreations.kt:11:14:11:34 | char |
| arrayCreations.kt:12:14:12:37 | new short[] | file://:0:0:0:0 | short[] | arrayCreations.kt:12:14:12:37 | short |
| arrayCreations.kt:13:14:13:36 | new byte[] | file://:0:0:0:0 | byte[] | arrayCreations.kt:13:14:13:36 | byte |
| arrayCreations.kt:14:14:14:52 | new boolean[] | file://:0:0:0:0 | boolean[] | arrayCreations.kt:14:14:14:52 | boolean |
| arrayCreations.kt:17:14:17:68 | new int[][] | file://:0:0:0:0 | int[][] | arrayCreations.kt:17:14:17:68 | int[] |
| arrayCreations.kt:17:22:17:43 | new int[] | file://:0:0:0:0 | int[] | arrayCreations.kt:17:22:17:43 | int |
| arrayCreations.kt:17:46:17:67 | new int[] | file://:0:0:0:0 | int[] | arrayCreations.kt:17:46:17:67 | int |
| arrayCreations.kt:18:14:18:65 | new Object[] | file://:0:0:0:0 | Object[] | arrayCreations.kt:18:14:18:65 | Object |
| arrayCreations.kt:18:22:18:43 | new int[] | file://:0:0:0:0 | int[] | arrayCreations.kt:18:22:18:43 | int |
| arrayCreations.kt:18:46:18:64 | new Integer[] | file://:0:0:0:0 | Integer[] | arrayCreations.kt:18:46:18:64 | Integer |
| arrayCreations.kt:19:14:19:62 | new Integer[][] | file://:0:0:0:0 | Integer[][] | arrayCreations.kt:19:14:19:62 | Integer[] |
| arrayCreations.kt:19:22:19:40 | new Integer[] | file://:0:0:0:0 | Integer[] | arrayCreations.kt:19:22:19:40 | Integer |
| arrayCreations.kt:19:43:19:61 | new Integer[] | file://:0:0:0:0 | Integer[] | arrayCreations.kt:19:43:19:61 | Integer |
arrayCreationDimensions
| arrayCreations.kt:5:14:5:33 | new Integer[] | arrayCreations.kt:5:32:5:32 | 1 | 0 |
| arrayCreations.kt:6:14:6:32 | new Integer[] | arrayCreations.kt:6:14:6:32 | 4 | 0 |
| arrayCreations.kt:7:14:7:46 | new double[] | arrayCreations.kt:7:14:7:46 | 4 | 0 |
| arrayCreations.kt:8:14:8:49 | new float[] | arrayCreations.kt:8:14:8:49 | 4 | 0 |
| arrayCreations.kt:9:14:9:36 | new long[] | arrayCreations.kt:9:14:9:36 | 4 | 0 |
| arrayCreations.kt:10:14:10:35 | new int[] | arrayCreations.kt:10:14:10:35 | 4 | 0 |
| arrayCreations.kt:11:14:11:34 | new char[] | arrayCreations.kt:11:14:11:34 | 2 | 0 |
| arrayCreations.kt:12:14:12:37 | new short[] | arrayCreations.kt:12:14:12:37 | 4 | 0 |
| arrayCreations.kt:13:14:13:36 | new byte[] | arrayCreations.kt:13:14:13:36 | 4 | 0 |
| arrayCreations.kt:14:14:14:52 | new boolean[] | arrayCreations.kt:14:14:14:52 | 4 | 0 |
| arrayCreations.kt:17:14:17:68 | new int[][] | arrayCreations.kt:17:14:17:68 | 2 | 0 |
| arrayCreations.kt:17:22:17:43 | new int[] | arrayCreations.kt:17:22:17:43 | 4 | 0 |
| arrayCreations.kt:17:46:17:67 | new int[] | arrayCreations.kt:17:46:17:67 | 4 | 0 |
| arrayCreations.kt:18:14:18:65 | new Object[] | arrayCreations.kt:18:14:18:65 | 2 | 0 |
| arrayCreations.kt:18:22:18:43 | new int[] | arrayCreations.kt:18:22:18:43 | 4 | 0 |
| arrayCreations.kt:18:46:18:64 | new Integer[] | arrayCreations.kt:18:46:18:64 | 4 | 0 |
| arrayCreations.kt:19:14:19:62 | new Integer[][] | arrayCreations.kt:19:14:19:62 | 2 | 0 |
| arrayCreations.kt:19:22:19:40 | new Integer[] | arrayCreations.kt:19:22:19:40 | 4 | 0 |
| arrayCreations.kt:19:43:19:61 | new Integer[] | arrayCreations.kt:19:43:19:61 | 4 | 0 |
arrayCreationInit
| arrayCreations.kt:6:14:6:32 | new Integer[] | arrayCreations.kt:6:14:6:32 | {...} | arrayCreations.kt:6:22:6:22 | 1 | 0 |
| arrayCreations.kt:6:14:6:32 | new Integer[] | arrayCreations.kt:6:14:6:32 | {...} | arrayCreations.kt:6:25:6:25 | 2 | 1 |
| arrayCreations.kt:6:14:6:32 | new Integer[] | arrayCreations.kt:6:14:6:32 | {...} | arrayCreations.kt:6:28:6:28 | 3 | 2 |
| arrayCreations.kt:6:14:6:32 | new Integer[] | arrayCreations.kt:6:14:6:32 | {...} | arrayCreations.kt:6:31:6:31 | 4 | 3 |
| arrayCreations.kt:7:14:7:46 | new double[] | arrayCreations.kt:7:14:7:46 | {...} | arrayCreations.kt:7:28:7:30 | 1.0 | 0 |
| arrayCreations.kt:7:14:7:46 | new double[] | arrayCreations.kt:7:14:7:46 | {...} | arrayCreations.kt:7:33:7:35 | 2.0 | 1 |
| arrayCreations.kt:7:14:7:46 | new double[] | arrayCreations.kt:7:14:7:46 | {...} | arrayCreations.kt:7:38:7:40 | 3.0 | 2 |
| arrayCreations.kt:7:14:7:46 | new double[] | arrayCreations.kt:7:14:7:46 | {...} | arrayCreations.kt:7:43:7:45 | 4.0 | 3 |
| arrayCreations.kt:8:14:8:49 | new float[] | arrayCreations.kt:8:14:8:49 | {...} | arrayCreations.kt:8:27:8:30 | 1.0 | 0 |
| arrayCreations.kt:8:14:8:49 | new float[] | arrayCreations.kt:8:14:8:49 | {...} | arrayCreations.kt:8:33:8:36 | 2.0 | 1 |
| arrayCreations.kt:8:14:8:49 | new float[] | arrayCreations.kt:8:14:8:49 | {...} | arrayCreations.kt:8:39:8:42 | 3.0 | 2 |
| arrayCreations.kt:8:14:8:49 | new float[] | arrayCreations.kt:8:14:8:49 | {...} | arrayCreations.kt:8:45:8:48 | 4.0 | 3 |
| arrayCreations.kt:9:14:9:36 | new long[] | arrayCreations.kt:9:14:9:36 | {...} | arrayCreations.kt:9:26:9:26 | 1 | 0 |
| arrayCreations.kt:9:14:9:36 | new long[] | arrayCreations.kt:9:14:9:36 | {...} | arrayCreations.kt:9:29:9:29 | 2 | 1 |
| arrayCreations.kt:9:14:9:36 | new long[] | arrayCreations.kt:9:14:9:36 | {...} | arrayCreations.kt:9:32:9:32 | 3 | 2 |
| arrayCreations.kt:9:14:9:36 | new long[] | arrayCreations.kt:9:14:9:36 | {...} | arrayCreations.kt:9:35:9:35 | 4 | 3 |
| arrayCreations.kt:10:14:10:35 | new int[] | arrayCreations.kt:10:14:10:35 | {...} | arrayCreations.kt:10:25:10:25 | 1 | 0 |
| arrayCreations.kt:10:14:10:35 | new int[] | arrayCreations.kt:10:14:10:35 | {...} | arrayCreations.kt:10:28:10:28 | 2 | 1 |
| arrayCreations.kt:10:14:10:35 | new int[] | arrayCreations.kt:10:14:10:35 | {...} | arrayCreations.kt:10:31:10:31 | 3 | 2 |
| arrayCreations.kt:10:14:10:35 | new int[] | arrayCreations.kt:10:14:10:35 | {...} | arrayCreations.kt:10:34:10:34 | 4 | 3 |
| arrayCreations.kt:11:14:11:34 | new char[] | arrayCreations.kt:11:14:11:34 | {...} | arrayCreations.kt:11:26:11:28 | a | 0 |
| arrayCreations.kt:11:14:11:34 | new char[] | arrayCreations.kt:11:14:11:34 | {...} | arrayCreations.kt:11:31:11:33 | b | 1 |
| arrayCreations.kt:12:14:12:37 | new short[] | arrayCreations.kt:12:14:12:37 | {...} | arrayCreations.kt:12:27:12:27 | 1 | 0 |
| arrayCreations.kt:12:14:12:37 | new short[] | arrayCreations.kt:12:14:12:37 | {...} | arrayCreations.kt:12:30:12:30 | 2 | 1 |
| arrayCreations.kt:12:14:12:37 | new short[] | arrayCreations.kt:12:14:12:37 | {...} | arrayCreations.kt:12:33:12:33 | 3 | 2 |
| arrayCreations.kt:12:14:12:37 | new short[] | arrayCreations.kt:12:14:12:37 | {...} | arrayCreations.kt:12:36:12:36 | 4 | 3 |
| arrayCreations.kt:13:14:13:36 | new byte[] | arrayCreations.kt:13:14:13:36 | {...} | arrayCreations.kt:13:26:13:26 | 1 | 0 |
| arrayCreations.kt:13:14:13:36 | new byte[] | arrayCreations.kt:13:14:13:36 | {...} | arrayCreations.kt:13:29:13:29 | 2 | 1 |
| arrayCreations.kt:13:14:13:36 | new byte[] | arrayCreations.kt:13:14:13:36 | {...} | arrayCreations.kt:13:32:13:32 | 3 | 2 |
| arrayCreations.kt:13:14:13:36 | new byte[] | arrayCreations.kt:13:14:13:36 | {...} | arrayCreations.kt:13:35:13:35 | 4 | 3 |
| arrayCreations.kt:14:14:14:52 | new boolean[] | arrayCreations.kt:14:14:14:52 | {...} | arrayCreations.kt:14:29:14:32 | true | 0 |
| arrayCreations.kt:14:14:14:52 | new boolean[] | arrayCreations.kt:14:14:14:52 | {...} | arrayCreations.kt:14:35:14:39 | false | 1 |
| arrayCreations.kt:14:14:14:52 | new boolean[] | arrayCreations.kt:14:14:14:52 | {...} | arrayCreations.kt:14:42:14:45 | true | 2 |
| arrayCreations.kt:14:14:14:52 | new boolean[] | arrayCreations.kt:14:14:14:52 | {...} | arrayCreations.kt:14:48:14:51 | true | 3 |
| arrayCreations.kt:17:14:17:68 | new int[][] | arrayCreations.kt:17:14:17:68 | {...} | arrayCreations.kt:17:22:17:43 | new int[] | 0 |
| arrayCreations.kt:17:14:17:68 | new int[][] | arrayCreations.kt:17:14:17:68 | {...} | arrayCreations.kt:17:46:17:67 | new int[] | 1 |
| arrayCreations.kt:17:22:17:43 | new int[] | arrayCreations.kt:17:22:17:43 | {...} | arrayCreations.kt:17:33:17:33 | 1 | 0 |
| arrayCreations.kt:17:22:17:43 | new int[] | arrayCreations.kt:17:22:17:43 | {...} | arrayCreations.kt:17:36:17:36 | 2 | 1 |
| arrayCreations.kt:17:22:17:43 | new int[] | arrayCreations.kt:17:22:17:43 | {...} | arrayCreations.kt:17:39:17:39 | 3 | 2 |
| arrayCreations.kt:17:22:17:43 | new int[] | arrayCreations.kt:17:22:17:43 | {...} | arrayCreations.kt:17:42:17:42 | 4 | 3 |
| arrayCreations.kt:17:46:17:67 | new int[] | arrayCreations.kt:17:46:17:67 | {...} | arrayCreations.kt:17:57:17:57 | 1 | 0 |
| arrayCreations.kt:17:46:17:67 | new int[] | arrayCreations.kt:17:46:17:67 | {...} | arrayCreations.kt:17:60:17:60 | 2 | 1 |
| arrayCreations.kt:17:46:17:67 | new int[] | arrayCreations.kt:17:46:17:67 | {...} | arrayCreations.kt:17:63:17:63 | 3 | 2 |
| arrayCreations.kt:17:46:17:67 | new int[] | arrayCreations.kt:17:46:17:67 | {...} | arrayCreations.kt:17:66:17:66 | 4 | 3 |
| arrayCreations.kt:18:14:18:65 | new Object[] | arrayCreations.kt:18:14:18:65 | {...} | arrayCreations.kt:18:22:18:43 | new int[] | 0 |
| arrayCreations.kt:18:14:18:65 | new Object[] | arrayCreations.kt:18:14:18:65 | {...} | arrayCreations.kt:18:46:18:64 | new Integer[] | 1 |
| arrayCreations.kt:18:22:18:43 | new int[] | arrayCreations.kt:18:22:18:43 | {...} | arrayCreations.kt:18:33:18:33 | 1 | 0 |
| arrayCreations.kt:18:22:18:43 | new int[] | arrayCreations.kt:18:22:18:43 | {...} | arrayCreations.kt:18:36:18:36 | 2 | 1 |
| arrayCreations.kt:18:22:18:43 | new int[] | arrayCreations.kt:18:22:18:43 | {...} | arrayCreations.kt:18:39:18:39 | 3 | 2 |
| arrayCreations.kt:18:22:18:43 | new int[] | arrayCreations.kt:18:22:18:43 | {...} | arrayCreations.kt:18:42:18:42 | 4 | 3 |
| arrayCreations.kt:18:46:18:64 | new Integer[] | arrayCreations.kt:18:46:18:64 | {...} | arrayCreations.kt:18:54:18:54 | 1 | 0 |
| arrayCreations.kt:18:46:18:64 | new Integer[] | arrayCreations.kt:18:46:18:64 | {...} | arrayCreations.kt:18:57:18:57 | 2 | 1 |
| arrayCreations.kt:18:46:18:64 | new Integer[] | arrayCreations.kt:18:46:18:64 | {...} | arrayCreations.kt:18:60:18:60 | 3 | 2 |
| arrayCreations.kt:18:46:18:64 | new Integer[] | arrayCreations.kt:18:46:18:64 | {...} | arrayCreations.kt:18:63:18:63 | 4 | 3 |
| arrayCreations.kt:19:14:19:62 | new Integer[][] | arrayCreations.kt:19:14:19:62 | {...} | arrayCreations.kt:19:22:19:40 | new Integer[] | 0 |
| arrayCreations.kt:19:14:19:62 | new Integer[][] | arrayCreations.kt:19:14:19:62 | {...} | arrayCreations.kt:19:43:19:61 | new Integer[] | 1 |
| arrayCreations.kt:19:22:19:40 | new Integer[] | arrayCreations.kt:19:22:19:40 | {...} | arrayCreations.kt:19:30:19:30 | 1 | 0 |
| arrayCreations.kt:19:22:19:40 | new Integer[] | arrayCreations.kt:19:22:19:40 | {...} | arrayCreations.kt:19:33:19:33 | 2 | 1 |
| arrayCreations.kt:19:22:19:40 | new Integer[] | arrayCreations.kt:19:22:19:40 | {...} | arrayCreations.kt:19:36:19:36 | 3 | 2 |
| arrayCreations.kt:19:22:19:40 | new Integer[] | arrayCreations.kt:19:22:19:40 | {...} | arrayCreations.kt:19:39:19:39 | 4 | 3 |
| arrayCreations.kt:19:43:19:61 | new Integer[] | arrayCreations.kt:19:43:19:61 | {...} | arrayCreations.kt:19:51:19:51 | 1 | 0 |
| arrayCreations.kt:19:43:19:61 | new Integer[] | arrayCreations.kt:19:43:19:61 | {...} | arrayCreations.kt:19:54:19:54 | 2 | 1 |
| arrayCreations.kt:19:43:19:61 | new Integer[] | arrayCreations.kt:19:43:19:61 | {...} | arrayCreations.kt:19:57:19:57 | 3 | 2 |
| arrayCreations.kt:19:43:19:61 | new Integer[] | arrayCreations.kt:19:43:19:61 | {...} | arrayCreations.kt:19:60:19:60 | 4 | 3 |
cloneCalls
| arrayCreations.kt:29:18:29:29 | clone(...) | file://:0:0:0:0 | Integer[] |
| arrayCreations.kt:30:18:30:35 | clone(...) | file://:0:0:0:0 | double[] |
| arrayCreations.kt:31:18:31:34 | clone(...) | file://:0:0:0:0 | float[] |
| arrayCreations.kt:32:18:32:33 | clone(...) | file://:0:0:0:0 | long[] |
| arrayCreations.kt:33:18:33:32 | clone(...) | file://:0:0:0:0 | int[] |
| arrayCreations.kt:34:18:34:33 | clone(...) | file://:0:0:0:0 | char[] |
| arrayCreations.kt:35:18:35:34 | clone(...) | file://:0:0:0:0 | short[] |
| arrayCreations.kt:36:18:36:33 | clone(...) | file://:0:0:0:0 | byte[] |
| arrayCreations.kt:37:18:37:36 | clone(...) | file://:0:0:0:0 | boolean[] |

View File

@@ -0,0 +1,39 @@
package test
class TestArrayCreation {
fun test1() {
val a0 = arrayOfNulls<Int>(1)
val a1 = arrayOf(1, 2, 3, 4)
val a2 = doubleArrayOf(1.0, 2.0, 3.0, 4.0)
val a3 = floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f)
val a4 = longArrayOf(1, 2, 3, 4)
val a5 = intArrayOf(1, 2, 3, 4)
val a6 = charArrayOf('a', 'b')
val a7 = shortArrayOf(1, 2, 3, 4)
val a8 = byteArrayOf(1, 2, 3, 4)
val a9 = booleanArrayOf(true, false, true, true)
// TODO: These don't match the corresponding Java hierarchy
val n0 = arrayOf(intArrayOf(1, 2, 3, 4), intArrayOf(1, 2, 3, 4)) // int[][]
val n1 = arrayOf(intArrayOf(1, 2, 3, 4), arrayOf(1, 2, 3, 4)) // Object[]
val n2 = arrayOf(arrayOf(1, 2, 3, 4), arrayOf(1, 2, 3, 4)) // Integer[][]
// TODO: these are constructor calls:
val a10 = Array<Int>(1) { 1 }
val a11 = Array(5) { 1 }
val a12 = IntArray(5)
val a13 = IntArray(5) { 1 }
var a14 = IntArray(5) { it * 1 }
val a15 = Array(4) { IntArray(2) }
val clone1 = arrayOf(*a1)
val clone2 = doubleArrayOf(*a2)
val clone3 = floatArrayOf(*a3)
val clone4 = longArrayOf(*a4)
val clone5 = intArrayOf(*a5)
val clone6 = charArrayOf(*a6)
val clone7 = shortArrayOf(*a7)
val clone8 = byteArrayOf(*a8)
val clone9 = booleanArrayOf(*a9)
}
}

View File

@@ -0,0 +1,18 @@
import java
query predicate arrayCreationTypes(ArrayCreationExpr ace, Type t, TypeAccess elementType) {
t = ace.getType() and elementType.getParent() = ace
}
query predicate arrayCreationDimensions(ArrayCreationExpr ace, Expr dimension, int dimensionIdx) {
ace.getDimension(dimensionIdx) = dimension
}
query predicate arrayCreationInit(ArrayCreationExpr ace, ArrayInit init, Expr e, int idx) {
ace.getInit() = init and
init.getInit(idx) = e
}
query predicate cloneCalls(MethodCall ma, Type resultType) {
ma.getMethod().getName() = "clone" and resultType = ma.getType()
}

View File

@@ -0,0 +1,41 @@
fun arrayGetSet(
a1: IntArray,
a2: ShortArray,
a3: ByteArray,
a4: LongArray,
a5: FloatArray,
a6: DoubleArray,
a7: BooleanArray,
a8: CharArray,
a9: Array<Any>) {
a1[0] = a1[0]
a2[0] = a2[0]
a3[0] = a3[0]
a4[0] = a4[0]
a5[0] = a5[0]
a6[0] = a6[0]
a7[0] = a7[0]
a8[0] = a8[0]
a9[0] = a9[0]
}
fun arrayGetSetInPlace(
a1: IntArray,
//a2: ShortArray,
//a3: ByteArray,
a4: LongArray,
a5: FloatArray,
a6: DoubleArray) {
a1[0] += 1
// Short and Byte's arithmetic operators yield an Int,
// so we don't have syntax to convert the result of the arithmetic op
// back to the right type.
//a2[0] %= 1.toShort()
//a3[0] *= 1.toByte()
a4[0] /= 1L
a5[0] -= 1f
a6[0] *= 1.0
}

View File

@@ -0,0 +1,3 @@
| arrayIterators.kt:10:14:10:25 | iterator(...) | iterator(java.lang.Object[]) | kotlin.jvm.internal.ArrayIteratorKt |
| arrayIterators.kt:11:14:11:25 | iterator(...) | iterator(int[]) | kotlin.jvm.internal.ArrayIteratorsKt |
| arrayIterators.kt:12:14:12:25 | iterator(...) | iterator(boolean[]) | kotlin.jvm.internal.ArrayIteratorsKt |

View File

@@ -0,0 +1,13 @@
fun test(
a: Array<Int>,
b: IntArray,
c: BooleanArray) {
for (i in a) { }
for (i in b) { }
for (i in c) { }
val i1 = a.iterator()
val i2 = b.iterator()
val i3 = c.iterator()
}

View File

@@ -0,0 +1,10 @@
import java
query predicate iterator(MethodCall ma, string mn, string t) {
exists(Method m |
ma.getMethod() = m and
m.getName() = "iterator" and
mn = m.getSignature() and
t = ma.getMethod().getDeclaringType().getQualifiedName()
)
}

View File

@@ -0,0 +1,4 @@
| arrayGetsSets.kt:32:3:32:7 | ...+=... | += | int[] | arrayGetsSets.kt:32:3:32:7 | ...[...] | int | arrayGetsSets.kt:32:12:32:12 | 1 | int |
| arrayGetsSets.kt:38:3:38:7 | .../=... | /= | long[] | arrayGetsSets.kt:38:3:38:7 | ...[...] | long | arrayGetsSets.kt:38:12:38:13 | 1 | long |
| arrayGetsSets.kt:39:3:39:7 | ...-=... | -= | float[] | arrayGetsSets.kt:39:3:39:7 | ...[...] | float | arrayGetsSets.kt:39:12:39:13 | 1.0 | float |
| arrayGetsSets.kt:40:3:40:7 | ...*=... | *= | double[] | arrayGetsSets.kt:40:3:40:7 | ...[...] | double | arrayGetsSets.kt:40:12:40:14 | 1.0 | double |

View File

@@ -0,0 +1,5 @@
import java
from AssignOp ae
select ae, ae.getOp(), ae.getType().toString(), ae.getDest(), ae.getDest().getType().toString(),
ae.getRhs(), ae.getRhs().getType().toString()

View File

@@ -0,0 +1,7 @@
package test
class Test {
fun test(a: Array<Int>, b: Array<Int?>, c: IntArray, d: Array<Array<Int?>>, e: Array<Array<Int>>, f: Array<IntArray>) { }
}

View File

@@ -0,0 +1,30 @@
#select
| primitiveArrays.kt:5:12:5:24 | a | file://:0:0:0:0 | Integer[] | Integer | Integer | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
| primitiveArrays.kt:5:27:5:40 | b | file://:0:0:0:0 | Integer[] | Integer | Integer | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
| primitiveArrays.kt:5:43:5:53 | c | file://:0:0:0:0 | int[] | int | int | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
| primitiveArrays.kt:5:56:5:76 | d | file://:0:0:0:0 | Integer[][] | Integer[] | Integer | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
| primitiveArrays.kt:5:79:5:98 | e | file://:0:0:0:0 | Integer[][] | Integer[] | Integer | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
| primitiveArrays.kt:5:101:5:118 | f | file://:0:0:0:0 | int[][] | int[] | int | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
cloneMethods
| file://:0:0:0:0 | clone | clone() | file://:0:0:0:0 | Integer[] | file://:0:0:0:0 | Integer[] | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
| file://:0:0:0:0 | clone | clone() | file://:0:0:0:0 | Integer[][] | file://:0:0:0:0 | Integer[][] | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
| file://:0:0:0:0 | clone | clone() | file://:0:0:0:0 | int[] | file://:0:0:0:0 | int[] | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
| file://:0:0:0:0 | clone | clone() | file://:0:0:0:0 | int[][] | file://:0:0:0:0 | int[][] | file://:0:0:0:0 | Kotlin nullable FakeKotlinClass |
sourceSignatures
| arrayCreations.kt:3:1:39:1 | TestArrayCreation | TestArrayCreation() |
| arrayCreations.kt:4:3:38:3 | test1 | test1() |
| arrayCreations.kt:22:29:22:33 | | |
| arrayCreations.kt:22:29:22:33 | invoke | invoke(int) |
| arrayCreations.kt:23:24:23:28 | | |
| arrayCreations.kt:23:24:23:28 | invoke | invoke(int) |
| arrayCreations.kt:25:27:25:31 | | |
| arrayCreations.kt:25:27:25:31 | invoke | invoke(int) |
| arrayCreations.kt:26:27:26:36 | | |
| arrayCreations.kt:26:27:26:36 | invoke | invoke(int) |
| arrayCreations.kt:27:24:27:38 | | |
| arrayCreations.kt:27:24:27:38 | invoke | invoke(int) |
| arrayGetsSets.kt:1:1:22:1 | arrayGetSet | arrayGetSet(int[],short[],byte[],long[],float[],double[],boolean[],char[],java.lang.Object[]) |
| arrayGetsSets.kt:24:1:41:1 | arrayGetSetInPlace | arrayGetSetInPlace(int[],long[],float[],double[]) |
| arrayIterators.kt:1:1:13:1 | test | test(java.lang.Integer[],int[],boolean[]) |
| primitiveArrays.kt:3:1:7:1 | Test | Test() |
| primitiveArrays.kt:5:3:5:123 | test | test(java.lang.Integer[],java.lang.Integer[],int[],java.lang.Integer[][],java.lang.Integer[][],int[][]) |

View File

@@ -0,0 +1,23 @@
import java
class InterestingParameter extends Parameter {
InterestingParameter() { this.getFile().getBaseName() = "primitiveArrays.kt" }
}
from InterestingParameter p, Array a, KotlinType ktType
where p.getType() = a and ktType = p.getKotlinType()
select p, a, a.getComponentType().toString(), a.getElementType().toString(), ktType
query predicate cloneMethods(
Method m, string signature, Array declType, Type returnType, KotlinType ktReturnType
) {
any(InterestingParameter p).getType() = declType and
signature = m.getSignature() and
declType = m.getDeclaringType() and
returnType = m.getReturnType() and
ktReturnType = m.getReturnKotlinType()
}
query predicate sourceSignatures(Callable c, string signature) {
c.getSignature() = signature and c.fromSource()
}

View File

@@ -0,0 +1 @@
| test.kt:1:17:1:26 | toChar(...) |

View File

@@ -0,0 +1,3 @@
fun f(x: Int) = x.toChar()
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Int.toChar in java.lang.Integer%

View File

@@ -0,0 +1,4 @@
import java
from MethodCall ma
select ma

View File

@@ -0,0 +1,9 @@
| |
| <clinit> |
| A |
| B |
| get |
| getX |
| invoke |
| x$delegatepackagename$$subpackagename$$A |
| x$delegatepackagename$$subpackagename$$B |

View File

@@ -0,0 +1,7 @@
package packagename.subpackagename
public class A { }
public class B { }
val A.x : String by lazy { "HelloA" }
val B.x : String by lazy { "HelloB" }

View File

@@ -0,0 +1,5 @@
import java
from Class c
where c.fromSource()
select c.getAMember().toString()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
semmle/code/java/PrintAst.ql

View File

@@ -0,0 +1,18 @@
| classes.kt:66:20:66:54 | new Object(...) { ... } | classes.kt:66:20:66:54 | new (...) | | classes.kt:66:20:66:54 | Object | classes.kt:66:20:66:54 | class ... |
| classes.kt:68:20:68:74 | new Object(...) { ... } | classes.kt:68:20:68:74 | new (...) | | classes.kt:68:20:68:74 | Object | classes.kt:68:20:68:74 | class ... |
| classes.kt:72:16:77:10 | new Object(...) { ... } | classes.kt:72:16:77:10 | new (...) | | classes.kt:72:16:77:10 | Object | classes.kt:72:16:77:10 | class ... |
| classes.kt:75:24:75:33 | new Object(...) { ... } | classes.kt:75:24:75:33 | new (...) | | classes.kt:75:24:75:33 | Object | classes.kt:75:24:75:33 | class ... |
| classes.kt:81:16:81:38 | new Interface1(...) { ... } | classes.kt:81:16:81:38 | new (...) | | classes.kt:81:16:81:38 | Interface1 | classes.kt:81:16:81:38 | class ... |
| classes.kt:85:16:85:25 | new Object(...) { ... } | classes.kt:85:16:85:25 | new (...) | | classes.kt:85:16:85:25 | Object | classes.kt:85:16:85:25 | class ... |
| classes.kt:89:16:89:44 | new Interface3<Integer>(...) { ... } | classes.kt:89:16:89:44 | new (...) | | classes.kt:89:16:89:44 | Interface3<Integer> | classes.kt:89:16:89:44 | class ... |
| classes.kt:127:16:134:9 | new Object(...) { ... } | classes.kt:127:16:134:9 | new (...) | | classes.kt:127:16:134:9 | Object | classes.kt:127:16:134:9 | class ... |
| classes.kt:162:13:162:22 | new Object(...) { ... } | classes.kt:162:13:162:22 | new (...) | | classes.kt:162:13:162:22 | Object | classes.kt:162:13:162:22 | class ... |
| generic_anonymous.kt:3:19:5:3 | new Object(...) { ... } | generic_anonymous.kt:3:19:5:3 | new (...) | | generic_anonymous.kt:3:19:5:3 | Object | generic_anonymous.kt:3:19:5:3 | class ... |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | generic_anonymous.kt:26:13:26:37 | new (...) | | generic_anonymous.kt:26:13:26:37 | Object | generic_anonymous.kt:26:13:26:37 | class ... |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | generic_anonymous.kt:27:13:27:37 | new (...) | | generic_anonymous.kt:27:13:27:37 | Object | generic_anonymous.kt:27:13:27:37 | class ... |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | generic_anonymous.kt:28:13:28:41 | new (...) | | generic_anonymous.kt:28:13:28:41 | Object | generic_anonymous.kt:28:13:28:41 | class ... |
| generic_anonymous.kt:29:13:29:29 | new C0<U2>(...) { ... } | generic_anonymous.kt:29:13:29:29 | new (...) | | generic_anonymous.kt:29:13:29:29 | C0<U2> | generic_anonymous.kt:29:13:29:29 | class ... |
| generic_anonymous.kt:30:13:30:33 | new C0<String>(...) { ... } | generic_anonymous.kt:30:13:30:33 | new (...) | | generic_anonymous.kt:30:13:30:33 | C0<String> | generic_anonymous.kt:30:13:30:33 | class ... |
| local_anonymous.kt:5:16:7:9 | new Object(...) { ... } | local_anonymous.kt:5:16:7:9 | new (...) | | local_anonymous.kt:5:16:7:9 | Object | local_anonymous.kt:5:16:7:9 | class ... |
| local_anonymous.kt:29:31:35:5 | new Object(...) { ... } | local_anonymous.kt:29:31:35:5 | new (...) | | local_anonymous.kt:29:31:35:5 | Object | local_anonymous.kt:29:31:35:5 | class ... |
| local_anonymous.kt:40:14:44:5 | new Interface2(...) { ... } | local_anonymous.kt:40:14:44:5 | new (...) | | local_anonymous.kt:40:14:44:5 | Interface2 | local_anonymous.kt:40:14:44:5 | class ... |

View File

@@ -0,0 +1,7 @@
import java
from AnonymousClass c, LocalTypeDeclStmt stmt
where c.fromSource() and stmt.getLocalType() = c
select c, c.getClassInstanceExpr(),
c.getClassInstanceExpr().getConstructor().getDeclaringType().getName(),
c.getClassInstanceExpr().getTypeName(), stmt

View File

@@ -0,0 +1,69 @@
| classes.kt:0:0:0:0 | ClassesKt | ClassesKt | final, public |
| classes.kt:2:1:2:18 | ClassOne | ClassOne | final, public |
| classes.kt:4:1:6:1 | ClassTwo | ClassTwo | final, public |
| classes.kt:8:1:10:1 | ClassThree | ClassThree | abstract, public |
| classes.kt:12:1:15:1 | ClassFour | ClassFour | public |
| classes.kt:17:1:18:1 | ClassFive | ClassFive | final, public |
| classes.kt:28:1:30:1 | ClassSix | ClassSix | final, public |
| classes.kt:34:1:47:1 | ClassSeven | ClassSeven | final, public |
| classes.kt:49:1:51:1 | Direction | Direction | final, public |
| classes.kt:53:1:57:1 | Color | Color | final, public |
| classes.kt:63:1:91:1 | Class1 | Class1 | final, public |
| classes.kt:66:20:66:54 | new Object(...) { ... } | <anonymous class> | final, private |
| classes.kt:68:20:68:74 | new Object(...) { ... } | <anonymous class> | final, private |
| classes.kt:72:16:77:10 | new Object(...) { ... } | <anonymous class> | final, private |
| classes.kt:75:24:75:33 | new Object(...) { ... } | <anonymous class> | final, private |
| classes.kt:81:16:81:38 | new Interface1(...) { ... } | <anonymous class> | final, private |
| classes.kt:85:16:85:25 | new Object(...) { ... } | <anonymous class> | final, private |
| classes.kt:89:16:89:44 | new Interface3<Integer>(...) { ... } | <anonymous class> | final, private |
| classes.kt:93:1:93:26 | pulicClass | pulicClass | final, public |
| classes.kt:94:1:94:29 | privateClass | privateClass | final, private |
| classes.kt:95:1:95:31 | internalClass | internalClass | final, internal |
| classes.kt:96:1:96:34 | noExplicitVisibilityClass | noExplicitVisibilityClass | final, public |
| classes.kt:98:1:104:1 | nestedClassVisibilities | nestedClassVisibilities | final, public |
| classes.kt:99:5:99:36 | pulicNestedClass | nestedClassVisibilities$pulicNestedClass | final, public |
| classes.kt:100:5:100:43 | protectedNestedClass | nestedClassVisibilities$protectedNestedClass | final, protected |
| classes.kt:101:5:101:39 | privateNestedClass | nestedClassVisibilities$privateNestedClass | final, private |
| classes.kt:102:5:102:41 | internalNestedClass | nestedClassVisibilities$internalNestedClass | final, internal |
| classes.kt:103:5:103:44 | noExplicitVisibilityNestedClass | nestedClassVisibilities$noExplicitVisibilityNestedClass | final, public |
| classes.kt:106:1:106:27 | sealedClass | sealedClass | public, sealed |
| classes.kt:107:1:107:23 | openClass | openClass | public |
| classes.kt:109:1:136:1 | C1 | C1 | final, public |
| classes.kt:111:9:113:9 | Local1 | C1$Local1 | final, private |
| classes.kt:118:9:123:9 | | C1$ | final, private |
| classes.kt:119:13:121:13 | Local2 | C1$Local2 | final, private |
| classes.kt:127:16:134:9 | new Object(...) { ... } | <anonymous class> | final, private |
| classes.kt:129:17:131:17 | Local3 | C1$$Local3 | final, private |
| classes.kt:138:1:148:1 | Cl0 | Cl0 | final, public |
| classes.kt:140:9:146:9 | | Cl0$ | final, private |
| classes.kt:141:13:145:13 | Cl1 | Cl0$Cl1 | final, private |
| classes.kt:150:1:156:1 | Cl00 | Cl00 | final, public |
| classes.kt:151:5:155:5 | Cl01 | Cl00$Cl01 | final, public |
| classes.kt:159:5:159:14 | X | ClassesKt$X | final, private |
| classes.kt:162:13:162:22 | new Object(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:0:0:0:0 | Generic_anonymousKt | Generic_anonymousKt | final, public |
| generic_anonymous.kt:1:1:9:1 | Generic | Generic | final, private |
| generic_anonymous.kt:3:19:5:3 | new Object(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:15:1:33:1 | Outer | Outer | final, public |
| generic_anonymous.kt:25:9:31:9 | | Outer$ | final, private |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:29:13:29:29 | new C0<U2>(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:30:13:30:33 | new C0<String>(...) { ... } | <anonymous class> | final, private |
| localClassField.kt:1:1:11:1 | A | A | final, public |
| localClassField.kt:3:9:3:19 | L | A$L | final, private |
| localClassField.kt:8:9:8:19 | L | A$L | final, private |
| local_anonymous.kt:3:1:36:1 | Class1 | LocalAnonymous.Class1 | final, public |
| local_anonymous.kt:5:16:7:9 | new Object(...) { ... } | <anonymous class> | final, private |
| local_anonymous.kt:11:9:11:24 | | Class1$ | final, private |
| local_anonymous.kt:16:23:16:49 | new Function2<Integer,Integer,Integer>(...) { ... } | <anonymous class> | final, private |
| local_anonymous.kt:17:23:17:49 | new Function2<Integer,Integer,Integer>(...) { ... } | <anonymous class> | final, private |
| local_anonymous.kt:21:21:21:31 | new Function1<Class1,Unit>(...) { ... } | <anonymous class> | final, private |
| local_anonymous.kt:25:9:25:27 | LocalClass | LocalAnonymous.Class1$LocalClass | final, private |
| local_anonymous.kt:29:31:35:5 | new Object(...) { ... } | <anonymous class> | final, private |
| local_anonymous.kt:39:1:45:1 | Class2 | LocalAnonymous.Class2 | final, public |
| local_anonymous.kt:40:14:44:5 | new Interface2(...) { ... } | <anonymous class> | final, private |
| superChain.kt:1:1:1:33 | SuperChain1 | SuperChain1 | public |
| superChain.kt:2:1:2:60 | SuperChain2 | SuperChain2 | public |
| superChain.kt:3:1:3:60 | SuperChain3 | SuperChain3 | public |

View File

@@ -0,0 +1,162 @@
class ClassOne { }
class ClassTwo (val arg: Int) {
val x: Int = 3
}
abstract class ClassThree {
abstract fun foo(arg: Int)
}
open class ClassFour: ClassThree() {
override fun foo(arg: Int) {
}
}
class ClassFive: ClassFour() {
}
interface IF1 {
fun funIF1() {}
}
interface IF2 {
fun funIF2() {}
}
class ClassSix(): ClassFour(), IF1, IF2 {
constructor(i: Int): this(){ }
}
fun f(s: String) {}
class ClassSeven {
constructor(i: String) {
f(i)
}
init {
f("init1")
}
val x: Int = 3
init {
f("init2")
}
}
enum class Direction {
NORTH, SOUTH, WEST, EAST
}
enum class Color(val rgb: Int) {
RED(0xFF0000),
GREEN(0x00FF00),
BLUE(0x0000FF)
}
interface Interface1 {}
interface Interface2 {}
interface Interface3<T> {}
class Class1 {
private fun getObject1(b: Boolean) : Any {
if (b)
return object : Interface1, Interface2 { }
else
return object : Interface1, Interface2, Interface3<String> { }
}
private fun getObject2() : Interface1 {
return object : Interface1, Interface2 {
val x = 1
fun foo(): Any {
return object { }
}
}
}
private fun getObject3() : Any {
return object : Interface1 { }
}
private fun getObject4() : Any {
return object { }
}
private fun getObject5() : Any {
return object : Interface3<Int?> { }
}
}
public class pulicClass {}
private class privateClass {}
internal class internalClass {}
class noExplicitVisibilityClass {}
class nestedClassVisibilities {
public class pulicNestedClass {}
protected class protectedNestedClass {}
private class privateNestedClass {}
internal class internalNestedClass {}
class noExplicitVisibilityNestedClass {}
}
sealed class sealedClass {}
open class openClass {}
class C1 {
fun fn1(p: Int) {
class Local1<T1> {
fun foo(p: Int) { }
}
Local1<Int>().foo(p)
}
fun fn2(p: Int) {
fun localFn() {
class Local2<T1> {
fun foo(p: Int) { }
}
Local2<Int>().foo(p)
}
}
fun fn3(p: Int): Any {
return object {
fun fn() {
class Local3<T1> {
fun foo(p: Int) { }
}
Local3<Int>().foo(p)
}
}
}
}
class Cl0<U0> {
fun <U1> func1() {
fun <U2> func2() {
class Cl1<U3>{
fun fn() {
val x = Cl1<U3>()
}
}
}
}
}
class Cl00<U0> {
class Cl01<U1>{
fun fn() {
val x = Cl01<U1>()
}
}
}
fun fn1() {
class X {}
}
fun fn2() = object { }

View File

@@ -0,0 +1,5 @@
import java
from Class c
where c.fromSource()
select c, c.getQualifiedName(), concat(string s | c.hasModifier(s) | s, ", ")

View File

@@ -0,0 +1,68 @@
thisCall
| classes.kt:29:26:29:31 | this(...) |
superCall
| classes.kt:2:1:2:18 | super(...) |
| classes.kt:4:16:4:29 | super(...) |
| classes.kt:8:1:10:1 | super(...) |
| classes.kt:12:23:12:34 | super(...) |
| classes.kt:17:18:17:28 | super(...) |
| classes.kt:28:19:28:29 | super(...) |
| classes.kt:35:27:35:27 | super(...) |
| classes.kt:63:1:91:1 | super(...) |
| classes.kt:66:20:66:54 | super(...) |
| classes.kt:68:20:68:74 | super(...) |
| classes.kt:72:16:77:10 | super(...) |
| classes.kt:75:24:75:33 | super(...) |
| classes.kt:81:16:81:38 | super(...) |
| classes.kt:85:16:85:25 | super(...) |
| classes.kt:89:16:89:44 | super(...) |
| classes.kt:93:1:93:26 | super(...) |
| classes.kt:94:1:94:29 | super(...) |
| classes.kt:95:1:95:31 | super(...) |
| classes.kt:96:1:96:34 | super(...) |
| classes.kt:98:1:104:1 | super(...) |
| classes.kt:99:5:99:36 | super(...) |
| classes.kt:100:5:100:43 | super(...) |
| classes.kt:101:5:101:39 | super(...) |
| classes.kt:102:5:102:41 | super(...) |
| classes.kt:103:5:103:44 | super(...) |
| classes.kt:106:1:106:27 | super(...) |
| classes.kt:107:1:107:23 | super(...) |
| classes.kt:109:1:136:1 | super(...) |
| classes.kt:111:9:113:9 | super(...) |
| classes.kt:118:9:123:9 | super(...) |
| classes.kt:119:13:121:13 | super(...) |
| classes.kt:127:16:134:9 | super(...) |
| classes.kt:129:17:131:17 | super(...) |
| classes.kt:138:1:148:1 | super(...) |
| classes.kt:140:9:146:9 | super(...) |
| classes.kt:141:13:145:13 | super(...) |
| classes.kt:150:1:156:1 | super(...) |
| classes.kt:151:5:155:5 | super(...) |
| classes.kt:159:5:159:14 | super(...) |
| classes.kt:162:13:162:22 | super(...) |
| generic_anonymous.kt:1:25:1:34 | super(...) |
| generic_anonymous.kt:3:19:5:3 | super(...) |
| generic_anonymous.kt:15:1:33:1 | super(...) |
| generic_anonymous.kt:25:9:31:9 | super(...) |
| generic_anonymous.kt:26:13:26:37 | super(...) |
| generic_anonymous.kt:27:13:27:37 | super(...) |
| generic_anonymous.kt:28:13:28:41 | super(...) |
| generic_anonymous.kt:29:13:29:29 | super(...) |
| generic_anonymous.kt:30:13:30:33 | super(...) |
| localClassField.kt:1:1:11:1 | super(...) |
| localClassField.kt:3:9:3:19 | super(...) |
| localClassField.kt:8:9:8:19 | super(...) |
| local_anonymous.kt:3:1:36:1 | super(...) |
| local_anonymous.kt:5:16:7:9 | super(...) |
| local_anonymous.kt:11:9:11:24 | super(...) |
| local_anonymous.kt:16:23:16:49 | super(...) |
| local_anonymous.kt:17:23:17:49 | super(...) |
| local_anonymous.kt:21:21:21:31 | super(...) |
| local_anonymous.kt:25:9:25:27 | super(...) |
| local_anonymous.kt:29:31:35:5 | super(...) |
| local_anonymous.kt:39:1:45:1 | super(...) |
| local_anonymous.kt:40:14:44:5 | super(...) |
| superChain.kt:1:1:1:33 | super(...) |
| superChain.kt:2:33:2:57 | super(...) |
| superChain.kt:3:33:3:57 | super(...) |

View File

@@ -0,0 +1,5 @@
import java
query predicate thisCall(ThisConstructorInvocationStmt stmt) { any() }
query predicate superCall(SuperConstructorInvocationStmt stmt) { any() }

View File

@@ -0,0 +1,109 @@
| generic_anonymous.kt:1:26:1:33 | ...=... | T |
| generic_anonymous.kt:1:26:1:33 | T | T |
| generic_anonymous.kt:1:26:1:33 | T | T |
| generic_anonymous.kt:1:26:1:33 | T | T |
| generic_anonymous.kt:1:26:1:33 | t | T |
| generic_anonymous.kt:1:26:1:33 | t | T |
| generic_anonymous.kt:1:26:1:33 | this | Generic |
| generic_anonymous.kt:1:26:1:33 | this.t | T |
| generic_anonymous.kt:3:3:5:3 | ...=... | new Object(...) { ... } |
| generic_anonymous.kt:3:3:5:3 | T | T |
| generic_anonymous.kt:3:3:5:3 | T | T |
| generic_anonymous.kt:3:3:5:3 | new Object(...) { ... } | new Object(...) { ... } |
| generic_anonymous.kt:3:3:5:3 | new Object(...) { ... } | new Object(...) { ... } |
| generic_anonymous.kt:3:3:5:3 | this | Generic |
| generic_anonymous.kt:3:3:5:3 | this.x | new Object(...) { ... } |
| generic_anonymous.kt:3:3:5:3 | x | new Object(...) { ... } |
| generic_anonymous.kt:3:19:5:3 | <Stmt> | new Object(...) { ... } |
| generic_anonymous.kt:3:19:5:3 | Object | Object |
| generic_anonymous.kt:3:19:5:3 | new (...) | new Object(...) { ... } |
| generic_anonymous.kt:4:7:4:20 | ...=... | T |
| generic_anonymous.kt:4:7:4:20 | T | T |
| generic_anonymous.kt:4:7:4:20 | T | T |
| generic_anonymous.kt:4:7:4:20 | member | T |
| generic_anonymous.kt:4:7:4:20 | this | new Object(...) { ... } |
| generic_anonymous.kt:4:7:4:20 | this.member | T |
| generic_anonymous.kt:4:20:4:20 | Generic | Generic |
| generic_anonymous.kt:4:20:4:20 | Generic.this | Generic |
| generic_anonymous.kt:4:20:4:20 | getT(...) | T |
| generic_anonymous.kt:7:3:7:22 | T | T |
| generic_anonymous.kt:7:15:7:15 | getX$private(...) | new Object(...) { ... } |
| generic_anonymous.kt:7:15:7:15 | this | Generic |
| generic_anonymous.kt:7:15:7:22 | getMember(...) | T |
| generic_anonymous.kt:11:1:11:56 | String | String |
| generic_anonymous.kt:11:20:11:28 | String | String |
| generic_anonymous.kt:11:33:11:50 | Generic<String> | Generic<String> |
| generic_anonymous.kt:11:33:11:50 | String | String |
| generic_anonymous.kt:11:33:11:50 | new Generic<String>(...) | Generic<String> |
| generic_anonymous.kt:11:33:11:56 | get(...) | String |
| generic_anonymous.kt:11:49:11:49 | s | String |
| generic_anonymous.kt:13:1:13:47 | int | int |
| generic_anonymous.kt:13:17:13:22 | int | int |
| generic_anonymous.kt:13:27:13:41 | Generic<Integer> | Generic<Integer> |
| generic_anonymous.kt:13:27:13:41 | Integer | Integer |
| generic_anonymous.kt:13:27:13:41 | new Generic<Integer>(...) | Generic<Integer> |
| generic_anonymous.kt:13:27:13:47 | get(...) | int |
| generic_anonymous.kt:13:40:13:40 | i | int |
| generic_anonymous.kt:17:9:17:29 | T0 | T0 |
| generic_anonymous.kt:17:26:17:29 | null | Void |
| generic_anonymous.kt:21:9:21:29 | T1 | T1 |
| generic_anonymous.kt:21:26:21:29 | null | Void |
| generic_anonymous.kt:24:5:32:5 | Unit | Unit |
| generic_anonymous.kt:25:9:31:9 | Unit | Unit |
| generic_anonymous.kt:26:13:26:37 | <Stmt> | new Object(...) { ... } |
| generic_anonymous.kt:26:13:26:37 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:26:13:26:37 | C0 | C0 |
| generic_anonymous.kt:26:13:26:37 | C0.super | C0 |
| generic_anonymous.kt:26:13:26:37 | C1 | C1 |
| generic_anonymous.kt:26:13:26:37 | C1.super | C1 |
| generic_anonymous.kt:26:13:26:37 | Object | Object |
| generic_anonymous.kt:26:13:26:37 | U2 | U2 |
| generic_anonymous.kt:26:13:26:37 | U3 | U3 |
| generic_anonymous.kt:26:13:26:37 | Unit | Unit |
| generic_anonymous.kt:26:13:26:37 | fn0(...) | U2 |
| generic_anonymous.kt:26:13:26:37 | fn1(...) | U3 |
| generic_anonymous.kt:26:13:26:37 | new (...) | new Object(...) { ... } |
| generic_anonymous.kt:27:13:27:37 | <Stmt> | new Object(...) { ... } |
| generic_anonymous.kt:27:13:27:37 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:27:13:27:37 | C0 | C0 |
| generic_anonymous.kt:27:13:27:37 | C0.super | C0 |
| generic_anonymous.kt:27:13:27:37 | C1 | C1 |
| generic_anonymous.kt:27:13:27:37 | C1.super | C1 |
| generic_anonymous.kt:27:13:27:37 | Object | Object |
| generic_anonymous.kt:27:13:27:37 | U2 | U2 |
| generic_anonymous.kt:27:13:27:37 | U2 | U2 |
| generic_anonymous.kt:27:13:27:37 | Unit | Unit |
| generic_anonymous.kt:27:13:27:37 | fn0(...) | U2 |
| generic_anonymous.kt:27:13:27:37 | fn1(...) | U2 |
| generic_anonymous.kt:27:13:27:37 | new (...) | new Object(...) { ... } |
| generic_anonymous.kt:28:13:28:41 | <Stmt> | new Object(...) { ... } |
| generic_anonymous.kt:28:13:28:41 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:28:13:28:41 | C0 | C0 |
| generic_anonymous.kt:28:13:28:41 | C0.super | C0 |
| generic_anonymous.kt:28:13:28:41 | C1 | C1 |
| generic_anonymous.kt:28:13:28:41 | C1.super | C1 |
| generic_anonymous.kt:28:13:28:41 | Object | Object |
| generic_anonymous.kt:28:13:28:41 | String | String |
| generic_anonymous.kt:28:13:28:41 | U2 | U2 |
| generic_anonymous.kt:28:13:28:41 | Unit | Unit |
| generic_anonymous.kt:28:13:28:41 | fn0(...) | U2 |
| generic_anonymous.kt:28:13:28:41 | fn1(...) | String |
| generic_anonymous.kt:28:13:28:41 | new (...) | new Object(...) { ... } |
| generic_anonymous.kt:29:13:29:29 | <Stmt> | new C0<U2>(...) { ... } |
| generic_anonymous.kt:29:13:29:29 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:29:13:29:29 | C0 | C0 |
| generic_anonymous.kt:29:13:29:29 | C0.super | C0 |
| generic_anonymous.kt:29:13:29:29 | C0<U2> | C0<U2> |
| generic_anonymous.kt:29:13:29:29 | U2 | U2 |
| generic_anonymous.kt:29:13:29:29 | Unit | Unit |
| generic_anonymous.kt:29:13:29:29 | fn0(...) | U2 |
| generic_anonymous.kt:29:13:29:29 | new (...) | new C0<U2>(...) { ... } |
| generic_anonymous.kt:30:13:30:33 | <Stmt> | new C0<String>(...) { ... } |
| generic_anonymous.kt:30:13:30:33 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:30:13:30:33 | C0 | C0 |
| generic_anonymous.kt:30:13:30:33 | C0.super | C0 |
| generic_anonymous.kt:30:13:30:33 | C0<String> | C0<String> |
| generic_anonymous.kt:30:13:30:33 | String | String |
| generic_anonymous.kt:30:13:30:33 | Unit | Unit |
| generic_anonymous.kt:30:13:30:33 | fn0(...) | String |
| generic_anonymous.kt:30:13:30:33 | new (...) | new C0<String>(...) { ... } |

View File

@@ -0,0 +1,5 @@
import java
from Expr e
where e.getLocation().getFile().getBaseName() = "generic_anonymous.kt"
select e, e.getType().toString()

View File

@@ -0,0 +1,33 @@
private class Generic<T>(val t: T) {
private val x = object {
val member = t
}
fun get() = x.member
}
fun stringIdentity(s: String) = Generic<String>(s).get()
fun intIdentity(i: Int) = Generic<Int>(i).get()
class Outer<T0> {
open interface C0<T0> {
fun fn0(): T0? = null
}
open interface C1<T1> {
fun fn1(): T1? = null
}
fun <U2> func1() {
fun <U3> func2() {
object: C0<U2>, C1<U3> {}
object: C0<U2>, C1<U2> {}
object: C0<U2>, C1<String> {}
object: C0<U2> {}
object: C0<String> {}
}
}
}

View File

@@ -0,0 +1,8 @@
| classes.kt:20:1:22:1 | IF1 |
| classes.kt:24:1:26:1 | IF2 |
| classes.kt:59:1:59:23 | Interface1 |
| classes.kt:60:1:60:23 | Interface2 |
| classes.kt:61:1:61:26 | Interface3 |
| generic_anonymous.kt:16:5:18:5 | C0 |
| generic_anonymous.kt:20:5:22:5 | C1 |
| local_anonymous.kt:38:1:38:23 | Interface2 |

View File

@@ -0,0 +1,5 @@
import java
from Interface i
where i.fromSource()
select i

View File

@@ -0,0 +1,12 @@
| classes.kt:111:9:113:9 | class ... | classes.kt:111:9:113:9 | Local1 | classes.kt:110:5:115:5 | fn1 | classes.kt:109:1:136:1 | C1 |
| classes.kt:118:9:123:9 | class ... | classes.kt:118:9:123:9 | | classes.kt:117:5:124:5 | fn2 | classes.kt:109:1:136:1 | C1 |
| classes.kt:119:13:121:13 | class ... | classes.kt:119:13:121:13 | Local2 | classes.kt:118:9:123:9 | localFn | classes.kt:109:1:136:1 | C1 |
| classes.kt:129:17:131:17 | class ... | classes.kt:129:17:131:17 | Local3 | classes.kt:128:13:133:13 | fn | classes.kt:127:16:134:9 | new Object(...) { ... } |
| classes.kt:140:9:146:9 | class ... | classes.kt:140:9:146:9 | | classes.kt:139:5:147:5 | func1 | classes.kt:138:1:148:1 | Cl0 |
| classes.kt:141:13:145:13 | class ... | classes.kt:141:13:145:13 | Cl1 | classes.kt:140:9:146:9 | func2 | classes.kt:138:1:148:1 | Cl0 |
| classes.kt:159:5:159:14 | class ... | classes.kt:159:5:159:14 | X | classes.kt:158:1:160:1 | fn1 | classes.kt:0:0:0:0 | ClassesKt |
| generic_anonymous.kt:25:9:31:9 | class ... | generic_anonymous.kt:25:9:31:9 | | generic_anonymous.kt:24:5:32:5 | func1 | generic_anonymous.kt:15:1:33:1 | Outer |
| localClassField.kt:3:9:3:19 | class ... | localClassField.kt:3:9:3:19 | L | localClassField.kt:1:1:11:1 | A | localClassField.kt:1:1:11:1 | A |
| localClassField.kt:8:9:8:19 | class ... | localClassField.kt:8:9:8:19 | L | localClassField.kt:1:1:11:1 | A | localClassField.kt:1:1:11:1 | A |
| local_anonymous.kt:11:9:11:24 | class ... | local_anonymous.kt:11:9:11:24 | | local_anonymous.kt:10:5:13:5 | fn2 | local_anonymous.kt:3:1:36:1 | Class1 |
| local_anonymous.kt:25:9:25:27 | class ... | local_anonymous.kt:25:9:25:27 | LocalClass | local_anonymous.kt:24:5:27:5 | fn5 | local_anonymous.kt:3:1:36:1 | Class1 |

View File

@@ -0,0 +1,5 @@
import java
from LocalTypeDeclStmt s
where not s.getLocalType() instanceof AnonymousClass
select s, s.getLocalType(), s.getEnclosingCallable(), s.getLocalType().getEnclosingType()

View File

@@ -0,0 +1,11 @@
class A {
val x = if (true) {
class L { }
L()
} else {}
val y = if (true) {
class L { }
L()
} else {}
}

View File

@@ -0,0 +1,14 @@
anonymousObjects
| local_anonymous.kt:5:16:7:9 | new (...) | local_anonymous.kt:5:16:7:9 | new Object(...) { ... } | anonymous | local |
| local_anonymous.kt:29:31:35:5 | new (...) | local_anonymous.kt:29:31:35:5 | new Object(...) { ... } | anonymous | local |
| local_anonymous.kt:40:14:44:5 | new (...) | local_anonymous.kt:40:14:44:5 | new Interface2(...) { ... } | anonymous | local |
localFunctions
| local_anonymous.kt:11:9:11:24 | fnLocal | local_anonymous.kt:11:9:11:24 | | not anonymous | local |
lambdas
| local_anonymous.kt:16:23:16:49 | ...->... | local_anonymous.kt:16:23:16:49 | new Function2<Integer,Integer,Integer>(...) { ... } | anonymous | not local |
| local_anonymous.kt:17:23:17:49 | ...->... | local_anonymous.kt:17:23:17:49 | new Function2<Integer,Integer,Integer>(...) { ... } | anonymous | not local |
memberRefs
| local_anonymous.kt:21:21:21:31 | ...::... | local_anonymous.kt:21:21:21:31 | new Function1<Class1,Unit>(...) { ... } | anonymous | not local |
localClasses
| local_anonymous.kt:11:9:11:24 | | not anonymous | local |
| local_anonymous.kt:25:9:25:27 | LocalClass | not anonymous | local |

View File

@@ -0,0 +1,45 @@
package LocalAnonymous
class Class1 {
fun fn1(): Any {
return object {
fun fn() {}
}
}
fun fn2() {
fun fnLocal() {}
fnLocal()
}
fun fn3() {
val lambda1 = { a: Int, b: Int -> a + b }
val lambda2 = fun(a: Int, b: Int) = a + b
}
fun fn4() {
val fnRef = Class1::fn3
}
fun fn5() {
class LocalClass {}
LocalClass()
}
fun nullableAnonymous() = object {
var x = 1
fun member() {
val maybeThis = if (x == 1) this else null // Expression with nullable anonymous type
}
}
}
interface Interface2 {}
class Class2 {
var i = object: Interface2 {
init {
var answer: String = "42" // Local variable in anonymous class initializer
}
}
}

View File

@@ -0,0 +1,53 @@
import java
private predicate filterFile(Top t) {
t.getFile().getRelativePath().matches("%/local_anonymous.kt")
}
private string isAnonymousType(Type t) {
if t instanceof AnonymousClass then result = "anonymous" else result = "not anonymous"
}
private string isLocalType(Type t) {
if t instanceof LocalClassOrInterface then result = "local" else result = "not local"
}
query predicate anonymousObjects(ClassInstanceExpr e, Type t, string anon, string local) {
filterFile(e) and
exists(AnonymousClass c | e = c.getClassInstanceExpr()) and
not exists(LambdaExpr l | l.getType() = t) and
not exists(MemberRefExpr mr | mr.getType() = t) and
not exists(Method m | m = t.(Class).getAMethod() and m.isLocal()) and
t = e.getType() and
anon = isAnonymousType(t) and
local = isLocalType(t)
}
query predicate localFunctions(Method m, Type t, string anon, string local) {
filterFile(m) and
m.isLocal() and
t = m.getDeclaringType() and
anon = isAnonymousType(t) and
local = isLocalType(t)
}
query predicate lambdas(LambdaExpr e, Type t, string anon, string local) {
filterFile(e) and
t = e.getType() and
anon = isAnonymousType(t) and
local = isLocalType(t)
}
query predicate memberRefs(MemberRefExpr e, Type t, string anon, string local) {
filterFile(e) and
t = e.getType() and
anon = isAnonymousType(t) and
local = isLocalType(t)
}
query predicate localClasses(LocalClass c, string anon, string local) {
filterFile(c) and
not c instanceof AnonymousClass and
anon = isAnonymousType(c) and
local = isLocalType(c)
}

View File

@@ -0,0 +1,26 @@
| classes.kt:111:9:113:9 | Local1 | 0 | classes.kt:111:22:111:23 | T1 |
| classes.kt:119:13:121:13 | Local2 | 0 | classes.kt:119:26:119:27 | T1 |
| classes.kt:129:17:131:17 | Local3 | 0 | classes.kt:129:30:129:31 | T1 |
| classes.kt:138:1:148:1 | Cl0 | 0 | classes.kt:138:11:138:12 | U0 |
| classes.kt:141:13:145:13 | Cl1 | 0 | classes.kt:141:23:141:24 | U3 |
| classes.kt:150:1:156:1 | Cl00 | 0 | classes.kt:150:12:150:13 | U0 |
| classes.kt:151:5:155:5 | Cl01 | 0 | classes.kt:151:16:151:17 | U1 |
| file://<external>/C1$<no name provided>$Local3.class:0:0:0:0 | Local3<Integer> | 0 | file://<external>/Integer.class:0:0:0:0 | Integer |
| file://<external>/C1$Local1.class:0:0:0:0 | Local1<Integer> | 0 | file://<external>/Integer.class:0:0:0:0 | Integer |
| file://<external>/C1$Local2.class:0:0:0:0 | Local2<Integer> | 0 | file://<external>/Integer.class:0:0:0:0 | Integer |
| file://<external>/Generic.class:0:0:0:0 | Generic<Integer> | 0 | file://<external>/Integer.class:0:0:0:0 | Integer |
| file://<external>/Generic.class:0:0:0:0 | Generic<String> | 0 | file://<external>/String.class:0:0:0:0 | String |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T3,String> | 0 | superChain.kt:2:24:2:25 | T3 |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T3,String> | 1 | file://<external>/String.class:0:0:0:0 | String |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T5,String> | 0 | superChain.kt:3:24:3:25 | T5 |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T5,String> | 1 | file://<external>/String.class:0:0:0:0 | String |
| file://<external>/SuperChain2.class:0:0:0:0 | SuperChain2<T5,String> | 0 | superChain.kt:3:24:3:25 | T5 |
| file://<external>/SuperChain2.class:0:0:0:0 | SuperChain2<T5,String> | 1 | file://<external>/String.class:0:0:0:0 | String |
| generic_anonymous.kt:1:1:9:1 | Generic | 0 | generic_anonymous.kt:1:23:1:23 | T |
| generic_anonymous.kt:15:1:33:1 | Outer | 0 | generic_anonymous.kt:15:13:15:14 | T0 |
| superChain.kt:1:1:1:33 | SuperChain1 | 0 | superChain.kt:1:24:1:25 | T1 |
| superChain.kt:1:1:1:33 | SuperChain1 | 1 | superChain.kt:1:28:1:29 | T2 |
| superChain.kt:2:1:2:60 | SuperChain2 | 0 | superChain.kt:2:24:2:25 | T3 |
| superChain.kt:2:1:2:60 | SuperChain2 | 1 | superChain.kt:2:28:2:29 | T4 |
| superChain.kt:3:1:3:60 | SuperChain3 | 0 | superChain.kt:3:24:3:25 | T5 |
| superChain.kt:3:1:3:60 | SuperChain3 | 1 | superChain.kt:3:28:3:29 | T6 |

View File

@@ -0,0 +1,16 @@
import java
// Stop external filepaths from appearing in the results
class ClassOrInterfaceLocation extends ClassOrInterface {
override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
exists(string fullPath | super.hasLocationInfo(fullPath, sl, sc, el, ec) |
if exists(this.getFile().getRelativePath())
then path = fullPath
else path = fullPath.regexpReplaceAll(".*/", "<external>/")
)
}
}
from ParameterizedClass c, int i
where c.getSourceDeclaration().fromSource()
select c, i, c.getTypeArgument(i)

View File

@@ -0,0 +1,5 @@
open class SuperChain1<T1, T2> {}
open class SuperChain2<T3, T4>: SuperChain1<T3, String>() {}
open class SuperChain3<T5, T6>: SuperChain2<T5, String>() {}
// This should end up with SuperChain2<T5, String> having
// SuperChain1<T5, String> as a supertype.

View File

@@ -0,0 +1,198 @@
#select
| classes.kt:2:1:2:18 | ClassOne | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:4:1:6:1 | ClassTwo | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:8:1:10:1 | ClassThree | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:12:1:15:1 | ClassFour | classes.kt:8:1:10:1 | ClassThree |
| classes.kt:17:1:18:1 | ClassFive | classes.kt:12:1:15:1 | ClassFour |
| classes.kt:28:1:30:1 | ClassSix | classes.kt:12:1:15:1 | ClassFour |
| classes.kt:28:1:30:1 | ClassSix | classes.kt:20:1:22:1 | IF1 |
| classes.kt:28:1:30:1 | ClassSix | classes.kt:24:1:26:1 | IF2 |
| classes.kt:34:1:47:1 | ClassSeven | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:49:1:51:1 | Direction | file://<external>/Enum.class:0:0:0:0 | Enum<Direction> |
| classes.kt:53:1:57:1 | Color | file://<external>/Enum.class:0:0:0:0 | Enum<Color> |
| classes.kt:63:1:91:1 | Class1 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:66:20:66:54 | new Object(...) { ... } | classes.kt:59:1:59:23 | Interface1 |
| classes.kt:66:20:66:54 | new Object(...) { ... } | classes.kt:60:1:60:23 | Interface2 |
| classes.kt:68:20:68:74 | new Object(...) { ... } | classes.kt:59:1:59:23 | Interface1 |
| classes.kt:68:20:68:74 | new Object(...) { ... } | classes.kt:60:1:60:23 | Interface2 |
| classes.kt:68:20:68:74 | new Object(...) { ... } | file://<external>/Interface3.class:0:0:0:0 | Interface3<String> |
| classes.kt:72:16:77:10 | new Object(...) { ... } | classes.kt:59:1:59:23 | Interface1 |
| classes.kt:72:16:77:10 | new Object(...) { ... } | classes.kt:60:1:60:23 | Interface2 |
| classes.kt:75:24:75:33 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| 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>(...) { ... } | file://<external>/Interface3.class:0:0:0:0 | Interface3<Integer> |
| classes.kt:93:1:93:26 | pulicClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:94:1:94:29 | privateClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:95:1:95:31 | internalClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:96:1:96:34 | noExplicitVisibilityClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:98:1:104:1 | nestedClassVisibilities | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:99:5:99:36 | pulicNestedClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:100:5:100:43 | protectedNestedClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:101:5:101:39 | privateNestedClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:102:5:102:41 | internalNestedClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:103:5:103:44 | noExplicitVisibilityNestedClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:106:1:106:27 | sealedClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:107:1:107:23 | openClass | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:109:1:136:1 | C1 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:111:9:113:9 | Local1 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:118:9:123:9 | | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:119:13:121:13 | Local2 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:127:16:134:9 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:129:17:131:17 | Local3 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:138:1:148:1 | Cl0 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:140:9:146:9 | | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:141:13:145:13 | Cl1 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:150:1:156:1 | Cl00 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:151:5:155:5 | Cl01 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:159:5:159:14 | X | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:162:13:162:22 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/C1$<no name provided>$Local3.class:0:0:0:0 | Local3<Integer> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/C1$Local1.class:0:0:0:0 | Local1<Integer> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/C1$Local2.class:0:0:0:0 | Local2<Integer> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/Generic.class:0:0:0:0 | Generic<Integer> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/Generic.class:0:0:0:0 | Generic<Integer> | generic_anonymous.kt:1:1:9:1 | Generic<> |
| file://<external>/Generic.class:0:0:0:0 | Generic<String> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/Generic.class:0:0:0:0 | Generic<String> | generic_anonymous.kt:1:1:9:1 | Generic<> |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T3,String> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T5,String> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/SuperChain2.class:0:0:0:0 | SuperChain2<T5,String> | file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T5,String> |
| generic_anonymous.kt:1:1:9:1 | Generic | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:1:1:9:1 | Generic | generic_anonymous.kt:1:1:9:1 | Generic<> |
| generic_anonymous.kt:1:1:9:1 | Generic<> | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:3:19:5:3 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:3:19:5:3 | new Object(...) { ... }<> | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:15:1:33:1 | Outer | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:25:9:31:9 | | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | file://<external>/Outer$C1.class:0:0:0:0 | C1<U3> |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | file://<external>/Outer$C1.class:0:0:0:0 | C1<U2> |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | file://<external>/Outer$C1.class:0:0:0:0 | C1<String> |
| generic_anonymous.kt:29:13:29:29 | new C0<U2>(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> |
| generic_anonymous.kt:30:13:30:33 | new C0<String>(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<String> |
| localClassField.kt:1:1:11:1 | A | file://<external>/Object.class:0:0:0:0 | Object |
| localClassField.kt:3:9:3:19 | L | file://<external>/Object.class:0:0:0:0 | Object |
| localClassField.kt:8:9:8:19 | L | file://<external>/Object.class:0:0:0:0 | Object |
| local_anonymous.kt:3:1:36:1 | Class1 | file://<external>/Object.class:0:0:0:0 | Object |
| local_anonymous.kt:5:16:7:9 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| local_anonymous.kt:11:9:11:24 | | file://<external>/Object.class:0:0:0:0 | Object |
| local_anonymous.kt:16:23:16:49 | new Function2<Integer,Integer,Integer>(...) { ... } | file://<external>/Function2.class:0:0:0:0 | Function2<Integer,Integer,Integer> |
| local_anonymous.kt:16:23:16:49 | new Function2<Integer,Integer,Integer>(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| local_anonymous.kt:17:23:17:49 | new Function2<Integer,Integer,Integer>(...) { ... } | file://<external>/Function2.class:0:0:0:0 | Function2<Integer,Integer,Integer> |
| local_anonymous.kt:17:23:17:49 | new Function2<Integer,Integer,Integer>(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| local_anonymous.kt:21:21:21:31 | new Function1<Class1,Unit>(...) { ... } | file://<external>/Function1.class:0:0:0:0 | Function1<Class1,Unit> |
| local_anonymous.kt:21:21:21:31 | new Function1<Class1,Unit>(...) { ... } | file://<external>/FunctionReference.class:0:0:0:0 | FunctionReference |
| local_anonymous.kt:25:9:25:27 | LocalClass | file://<external>/Object.class:0:0:0:0 | Object |
| local_anonymous.kt:29:31:35:5 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| local_anonymous.kt:39:1:45:1 | Class2 | file://<external>/Object.class:0:0:0:0 | Object |
| local_anonymous.kt:40:14:44:5 | new Interface2(...) { ... } | local_anonymous.kt:38:1:38:23 | Interface2 |
| 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>/SuperChain1.class:0:0:0:0 | SuperChain1<T3,String> |
| superChain.kt:3:1:3:60 | SuperChain3 | file://<external>/SuperChain2.class:0:0:0:0 | SuperChain2<T5,String> |
extendsOrImplements
| classes.kt:2:1:2:18 | ClassOne | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:4:1:6:1 | ClassTwo | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:8:1:10:1 | ClassThree | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:12:1:15:1 | ClassFour | classes.kt:8:1:10:1 | ClassThree | extends |
| classes.kt:17:1:18:1 | ClassFive | classes.kt:12:1:15:1 | ClassFour | extends |
| classes.kt:20:1:22:1 | IF1 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:24:1:26:1 | IF2 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:28:1:30:1 | ClassSix | classes.kt:12:1:15:1 | ClassFour | extends |
| classes.kt:28:1:30:1 | ClassSix | classes.kt:20:1:22:1 | IF1 | implements |
| classes.kt:28:1:30:1 | ClassSix | classes.kt:24:1:26:1 | IF2 | implements |
| classes.kt:34:1:47:1 | ClassSeven | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:49:1:51:1 | Direction | file://<external>/Enum.class:0:0:0:0 | Enum<Direction> | extends |
| classes.kt:53:1:57:1 | Color | file://<external>/Enum.class:0:0:0:0 | Enum<Color> | extends |
| classes.kt:59:1:59:23 | Interface1 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:60:1:60:23 | Interface2 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:61:1:61:26 | Interface3 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:63:1:91:1 | Class1 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:66:20:66:54 | new Object(...) { ... } | classes.kt:59:1:59:23 | Interface1 | implements |
| classes.kt:66:20:66:54 | new Object(...) { ... } | classes.kt:60:1:60:23 | Interface2 | implements |
| classes.kt:68:20:68:74 | new Object(...) { ... } | classes.kt:59:1:59:23 | Interface1 | implements |
| classes.kt:68:20:68:74 | new Object(...) { ... } | classes.kt:60:1:60:23 | Interface2 | implements |
| classes.kt:68:20:68:74 | new Object(...) { ... } | file://<external>/Interface3.class:0:0:0:0 | Interface3<String> | implements |
| classes.kt:72:16:77:10 | new Object(...) { ... } | classes.kt:59:1:59:23 | Interface1 | implements |
| classes.kt:72:16:77:10 | new Object(...) { ... } | classes.kt:60:1:60:23 | Interface2 | implements |
| classes.kt:75:24:75:33 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:81:16:81:38 | new Interface1(...) { ... } | classes.kt:59:1:59:23 | Interface1 | implements |
| classes.kt:85:16:85:25 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:89:16:89:44 | new Interface3<Integer>(...) { ... } | file://<external>/Interface3.class:0:0:0:0 | Interface3<Integer> | implements |
| classes.kt:93:1:93:26 | pulicClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:94:1:94:29 | privateClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:95:1:95:31 | internalClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:96:1:96:34 | noExplicitVisibilityClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:98:1:104:1 | nestedClassVisibilities | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:99:5:99:36 | pulicNestedClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:100:5:100:43 | protectedNestedClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:101:5:101:39 | privateNestedClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:102:5:102:41 | internalNestedClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:103:5:103:44 | noExplicitVisibilityNestedClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:106:1:106:27 | sealedClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:107:1:107:23 | openClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:109:1:136:1 | C1 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:111:9:113:9 | Local1 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:118:9:123:9 | | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:119:13:121:13 | Local2 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:127:16:134:9 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:129:17:131:17 | Local3 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:138:1:148:1 | Cl0 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:140:9:146:9 | | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:141:13:145:13 | Cl1 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:150:1:156:1 | Cl00 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:151:5:155:5 | Cl01 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:159:5:159:14 | X | file://<external>/Object.class:0:0:0:0 | Object | extends |
| classes.kt:162:13:162:22 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/C1$<no name provided>$Local3.class:0:0:0:0 | Local3<Integer> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/C1$Local1.class:0:0:0:0 | Local1<Integer> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/C1$Local2.class:0:0:0:0 | Local2<Integer> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/Generic.class:0:0:0:0 | Generic<Integer> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/Generic.class:0:0:0:0 | Generic<String> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/Interface3.class:0:0:0:0 | Interface3<Integer> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/Interface3.class:0:0:0:0 | Interface3<String> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/Outer$C0.class:0:0:0:0 | C0<String> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/Outer$C1.class:0:0:0:0 | C1<String> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/Outer$C1.class:0:0:0:0 | C1<U2> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/Outer$C1.class:0:0:0:0 | C1<U3> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T3,String> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T5,String> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| file://<external>/SuperChain2.class:0:0:0:0 | SuperChain2<T5,String> | file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T5,String> | extends |
| generic_anonymous.kt:1:1:9:1 | Generic | file://<external>/Object.class:0:0:0:0 | Object | extends |
| generic_anonymous.kt:1:1:9:1 | Generic<> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| generic_anonymous.kt:3:19:5:3 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object | extends |
| generic_anonymous.kt:3:19:5:3 | new Object(...) { ... }<> | file://<external>/Object.class:0:0:0:0 | Object | extends |
| generic_anonymous.kt:15:1:33:1 | Outer | file://<external>/Object.class:0:0:0:0 | Object | extends |
| generic_anonymous.kt:16:5:18:5 | C0 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| generic_anonymous.kt:20:5:22:5 | C1 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| generic_anonymous.kt:25:9:31:9 | | file://<external>/Object.class:0:0:0:0 | Object | extends |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> | implements |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | file://<external>/Outer$C1.class:0:0:0:0 | C1<U3> | implements |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> | implements |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | file://<external>/Outer$C1.class:0:0:0:0 | C1<U2> | implements |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> | implements |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | file://<external>/Outer$C1.class:0:0:0:0 | C1<String> | implements |
| generic_anonymous.kt:29:13:29:29 | new C0<U2>(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> | implements |
| generic_anonymous.kt:30:13:30:33 | new C0<String>(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<String> | implements |
| localClassField.kt:1:1:11:1 | A | file://<external>/Object.class:0:0:0:0 | Object | extends |
| localClassField.kt:3:9:3:19 | L | file://<external>/Object.class:0:0:0:0 | Object | extends |
| localClassField.kt:8:9:8:19 | L | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:3:1:36:1 | Class1 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:5:16:7:9 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:11:9:11:24 | | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:16:23:16:49 | new Function2<Integer,Integer,Integer>(...) { ... } | file://<external>/Function2.class:0:0:0:0 | Function2<Integer,Integer,Integer> | implements |
| local_anonymous.kt:16:23:16:49 | new Function2<Integer,Integer,Integer>(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:17:23:17:49 | new Function2<Integer,Integer,Integer>(...) { ... } | file://<external>/Function2.class:0:0:0:0 | Function2<Integer,Integer,Integer> | implements |
| local_anonymous.kt:17:23:17:49 | new Function2<Integer,Integer,Integer>(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:21:21:21:31 | new Function1<Class1,Unit>(...) { ... } | file://<external>/Function1.class:0:0:0:0 | Function1<Class1,Unit> | implements |
| local_anonymous.kt:21:21:21:31 | new Function1<Class1,Unit>(...) { ... } | file://<external>/FunctionReference.class:0:0:0:0 | FunctionReference | extends |
| local_anonymous.kt:25:9:25:27 | LocalClass | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:29:31:35:5 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:38:1:38:23 | Interface2 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:39:1:45:1 | Class2 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| local_anonymous.kt:40:14:44:5 | new Interface2(...) { ... } | local_anonymous.kt:38:1:38:23 | Interface2 | implements |
| superChain.kt:1:1:1:33 | SuperChain1 | file://<external>/Object.class:0:0:0:0 | Object | extends |
| superChain.kt:2:1:2:60 | SuperChain2 | file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T3,String> | extends |
| superChain.kt:3:1:3:60 | SuperChain3 | file://<external>/SuperChain2.class:0:0:0:0 | SuperChain2<T5,String> | extends |

View File

@@ -0,0 +1,27 @@
import java
// Stop external filepaths from appearing in the results
class ClassOrInterfaceLocation extends ClassOrInterface {
override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
exists(string fullPath | super.hasLocationInfo(fullPath, sl, sc, el, ec) |
if exists(this.getFile().getRelativePath())
then path = fullPath
else path = fullPath.regexpReplaceAll(".*/", "<external>/")
)
}
}
from Class c, Type superType
where
c.getSourceDeclaration().fromSource() and
superType = c.getASupertype()
select c, superType
query predicate extendsOrImplements(ClassOrInterface c, Type superType, string kind) {
c.getSourceDeclaration().fromSource() and
(
extendsReftype(c, superType) and kind = "extends"
or
implInterface(c, superType) and kind = "implements"
)
}

View File

@@ -0,0 +1,12 @@
test.kt:
# 0| [CompilationUnit] test
# 1| 1: [Interface] Ann
#-----| -3: (Annotations)
# 0| 1: [Annotation] Retention
# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
# 0| -1: [TypeAccess] RetentionPolicy
# 1| 1: [Method] arr1
# 1| 3: [TypeAccess] String[]
# 1| 0: [TypeAccess] String
# 1| 2: [Method] arr2
# 1| 3: [TypeAccess] int[]

View File

@@ -0,0 +1 @@
semmle/code/java/PrintAst.ql

View File

@@ -0,0 +1 @@
annotation class Ann(val arr1: Array<String> = ["hello", "world"], val arr2: IntArray = [1, 2, 3]) { }

View File

@@ -0,0 +1,82 @@
comments
| comments.kt:1:1:1:25 | /** Kdoc with no owner */ | /** Kdoc with no owner */ |
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ |
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | /**\n * Members of this group.\n */ |
| comments.kt:19:5:22:7 | /**\n * Adds a [member] to this group.\n * @return the new size of the group.\n */ | /**\n * Adds a [member] to this group.\n * @return the new size of the group.\n */ |
| comments.kt:24:9:24:25 | // A line comment | // A line comment |
| comments.kt:28:5:30:6 | /*\n A block comment\n */ | /*\n A block comment\n */ |
| comments.kt:35:5:35:34 | /** Medium is in the middle */ | /** Medium is in the middle */ |
| comments.kt:37:5:37:23 | /** This is high */ | /** This is high */ |
| comments.kt:42:5:44:7 | /**\n * A variable.\n */ | /**\n * A variable.\n */ |
| comments.kt:48:1:50:3 | /**\n * A type alias comment\n */ | /**\n * A type alias comment\n */ |
| comments.kt:54:5:56:7 | /**\n * An init block comment\n */ | /**\n * An init block comment\n */ |
| comments.kt:61:5:63:7 | /**\n * A prop comment\n */ | /**\n * A prop comment\n */ |
| comments.kt:65:9:67:11 | /**\n * An accessor comment\n */ | /**\n * An accessor comment\n */ |
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | /**\n * An anonymous function comment\n */ |
| comments.kt:79:9:81:11 | /**\n * A local function comment\n */ | /**\n * A local function comment\n */ |
| comments.kt:88:10:90:11 | /**\n * An anonymous object comment\n */ | /**\n * An anonymous object comment\n */ |
| comments.kt:95:1:95:163 | // Diagnostic Matches: % Couldn't get owner of KDoc. The comment is extracted without an owner. ...while extracting a file (comments.kt) at %comments.kt:1:1:96:0% | // Diagnostic Matches: % Couldn't get owner of KDoc. The comment is extracted without an owner. ...while extracting a file (comments.kt) at %comments.kt:1:1:96:0% |
commentOwners
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | comments.kt:12:1:31:1 | Group |
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | comments.kt:12:1:31:1 | Group |
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:5:17:46 | members |
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:5:17:46 | members |
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:13:17:46 | getMembers$private |
| comments.kt:19:5:22:7 | /**\n * Adds a [member] to this group.\n * @return the new size of the group.\n */ | comments.kt:23:5:26:5 | add |
| comments.kt:35:5:35:34 | /** Medium is in the middle */ | comments.kt:36:5:36:14 | Medium |
| comments.kt:37:5:37:23 | /** This is high */ | comments.kt:38:5:38:11 | High |
| comments.kt:48:1:50:3 | /**\n * A type alias comment\n */ | comments.kt:51:1:51:24 | MyType |
| comments.kt:54:5:56:7 | /**\n * An init block comment\n */ | comments.kt:53:1:58:1 | InitBlock |
| comments.kt:61:5:63:7 | /**\n * A prop comment\n */ | comments.kt:64:5:68:17 | prop |
| comments.kt:65:9:67:11 | /**\n * An accessor comment\n */ | comments.kt:68:9:68:17 | getProp |
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | comments.kt:70:5:76:10 | getL |
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | comments.kt:70:5:76:10 | l |
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | comments.kt:70:5:76:10 | l |
| comments.kt:79:9:81:11 | /**\n * A local function comment\n */ | comments.kt:82:9:82:24 | localFn |
| comments.kt:88:10:90:11 | /**\n * An anonymous object comment\n */ | comments.kt:87:15:92:5 | |
| comments.kt:88:10:90:11 | /**\n * An anonymous object comment\n */ | comments.kt:87:15:92:5 | new X(...) { ... } |
commentNoOwners
| comments.kt:1:1:1:25 | /** Kdoc with no owner */ |
| comments.kt:24:9:24:25 | // A line comment |
| comments.kt:28:5:30:6 | /*\n A block comment\n */ |
| comments.kt:42:5:44:7 | /**\n * A variable.\n */ |
| comments.kt:95:1:95:163 | // Diagnostic Matches: % Couldn't get owner of KDoc. The comment is extracted without an owner. ...while extracting a file (comments.kt) at %comments.kt:1:1:96:0% |
commentSections
| comments.kt:1:1:1:25 | /** Kdoc with no owner */ | Kdoc with no owner |
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | A group of *members*.\n\nThis class has no useful logic; it's just a documentation example.\n\n |
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | Creates an empty group. |
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | the name of this group. |
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | Members of this group. |
| comments.kt:19:5:22:7 | /**\n * Adds a [member] to this group.\n * @return the new size of the group.\n */ | Adds a [member] to this group.\n |
| comments.kt:35:5:35:34 | /** Medium is in the middle */ | Medium is in the middle |
| comments.kt:37:5:37:23 | /** This is high */ | This is high |
| comments.kt:42:5:44:7 | /**\n * A variable.\n */ | A variable. |
| comments.kt:48:1:50:3 | /**\n * A type alias comment\n */ | A type alias comment |
| comments.kt:54:5:56:7 | /**\n * An init block comment\n */ | An init block comment |
| comments.kt:61:5:63:7 | /**\n * A prop comment\n */ | A prop comment |
| comments.kt:65:9:67:11 | /**\n * An accessor comment\n */ | An accessor comment |
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | An anonymous function comment |
| comments.kt:79:9:81:11 | /**\n * A local function comment\n */ | A local function comment |
| comments.kt:88:10:90:11 | /**\n * An anonymous object comment\n */ | An anonymous object comment |
commentSectionContents
| A group of *members*.\n\nThis class has no useful logic; it's just a documentation example.\n\n | A group of *members*.\n\nThis class has no useful logic; it's just a documentation example.\n\n |
| A local function comment | A local function comment |
| A prop comment | A prop comment |
| A type alias comment | A type alias comment |
| A variable. | A variable. |
| Adds a [member] to this group.\n | Adds a [member] to this group.\n |
| An accessor comment | An accessor comment |
| An anonymous function comment | An anonymous function comment |
| An anonymous object comment | An anonymous object comment |
| An init block comment | An init block comment |
| Creates an empty group. | Creates an empty group. |
| Kdoc with no owner | Kdoc with no owner |
| Medium is in the middle | Medium is in the middle |
| Members of this group. | Members of this group. |
| This is high | This is high |
| the name of this group. | the name of this group. |
commentSectionNames
| Creates an empty group. | constructor |
| the name of this group. | property |
commentSectionSubjectNames
| the name of this group. | name |

View File

@@ -0,0 +1,95 @@
/** Kdoc with no owner */
package foo.bar
/**
* A group of *members*.
*
* This class has no useful logic; it's just a documentation example.
*
* @property name the name of this group.
* @constructor Creates an empty group.
*/
class Group(val name: String) {
/**
* Members of this group.
*/
private val members = mutableListOf<Any>()
/**
* Adds a [member] to this group.
* @return the new size of the group.
*/
fun add(member: Int): Int {
// A line comment
return 42
}
/*
A block comment
*/
}
enum class Severity(val sev: Int) {
Low(1),
/** Medium is in the middle */
Medium(2),
/** This is high */
High(3)
}
fun fn1() {
/**
* A variable.
*/
val a = 1
}
/**
* A type alias comment
*/
typealias MyType = Group
class InitBlock {
/**
* An init block comment
*/
init { }
}
open class X {
/**
* A prop comment
*/
val prop: Int
/**
* An accessor comment
*/
get() = 5
val l: Lazy<Int> = lazy(
/**
* An anonymous function comment
*/
fun(): Int {
return 5
})
fun fn() {
/**
* A local function comment
*/
fun localFn() {}
}
}
class XX {
fun f() = object :
/**
* An anonymous object comment
*/
X() {
}
}
// Diagnostic Matches: % Couldn't get owner of KDoc. The comment is extracted without an owner. ...while extracting a file (comments.kt) at %comments.kt:1:1:96:0%

View File

@@ -0,0 +1,15 @@
import java
query predicate comments(KtComment c, string s) { c.getText() = s }
query predicate commentOwners(KtComment c, Top t) { c.getOwner() = t }
query predicate commentNoOwners(KtComment c) { not exists(c.getOwner()) }
query predicate commentSections(KtComment c, KtCommentSection s) { c.getSections() = s }
query predicate commentSectionContents(KtCommentSection s, string c) { s.getContent() = c }
query predicate commentSectionNames(KtCommentSection s, string c) { s.getName() = c }
query predicate commentSectionSubjectNames(KtCommentSection s, string c) { s.getSubjectName() = c }

View File

@@ -0,0 +1,2 @@
| companion_objects.kt:3:5:5:5 | MyClassCompanion | companion_objects.kt:23:5:23:11 | MyClassCompanion |
| companion_objects.kt:10:5:12:5 | MyInterfaceCompanion | companion_objects.kt:25:5:25:15 | MyInterfaceCompanion |

View File

@@ -0,0 +1,5 @@
import java
from VarAccess va, CompanionObject cco
where va.getVariable() = cco.getInstance()
select cco, va

View File

@@ -0,0 +1,2 @@
| companion_objects.kt:1:1:6:1 | MyClass | companion_objects.kt:3:5:5:5 | MyClassCompanion | companion_objects.kt:3:5:5:5 | MyClassCompanion | companion_objects.kt:1:1:6:1 | MyClass | final,public,static |
| companion_objects.kt:8:1:13:1 | MyInterface | companion_objects.kt:10:5:12:5 | MyInterfaceCompanion | companion_objects.kt:10:5:12:5 | MyInterfaceCompanion | companion_objects.kt:8:1:13:1 | MyInterface | final,public,static |

View File

@@ -0,0 +1,28 @@
class MyClass {
fun funInClass() {}
companion object MyClassCompanion {
fun funInCompanion() {}
}
}
interface MyInterface {
fun funInInterface()
companion object MyInterfaceCompanion {
fun funInCompanion() {}
}
}
class Imp : MyInterface {
override fun funInInterface() {
TODO("Not yet implemented")
}
}
fun user() {
MyClass.funInCompanion()
MyClass().funInClass()
MyInterface.funInCompanion()
Imp().funInInterface()
}

View File

@@ -0,0 +1,8 @@
import java
from ClassOrInterface c, CompanionObject cco, Field f
where
c.fromSource() and
cco = c.getCompanionObject() and
f = cco.getInstance()
select c, f, cco, f.getDeclaringType(), concat(f.getAModifier().toString(), ",")

View File

@@ -0,0 +1,5 @@
| companion_objects.kt:17:9:17:35 | StandardKt | TypeAccess | file:///!unknown-binary-location/kotlin/StandardKt.class:0:0:0:0 | TODO |
| companion_objects.kt:23:5:23:11 | MyClassCompanion | VarAccess | companion_objects.kt:4:9:4:31 | funInCompanion |
| companion_objects.kt:24:5:24:13 | new MyClass(...) | ClassInstanceExpr | companion_objects.kt:2:5:2:23 | funInClass |
| companion_objects.kt:25:5:25:15 | MyInterfaceCompanion | VarAccess | companion_objects.kt:11:9:11:31 | funInCompanion |
| companion_objects.kt:26:5:26:9 | new Imp(...) | ClassInstanceExpr | companion_objects.kt:16:5:18:5 | funInInterface |

View File

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

View File

@@ -0,0 +1,9 @@
| AbstractList | .../AbstractList.class:0:0:0:0 |
| AbstractList$RandomAccessSpliterator | .../AbstractList$RandomAccessSpliterator.class:0:0:0:0 |
| ArrayList | .../ArrayList.class:0:0:0:0 |
| ArrayList$ArrayListSpliterator | .../ArrayList$ArrayListSpliterator.class:0:0:0:0 |
| List | .../List.class:0:0:0:0 |
| ListIterator | .../ListIterator.class:0:0:0:0 |
| MutableList | .../MutableList.class:0:0:0:0 |
| MutableListIterator | .../MutableListIterator.class:0:0:0:0 |
| test | .../test.kt:0:0:0:0 |

View File

@@ -0,0 +1,5 @@
import java
from CompilationUnit cu
where cu.fromSource() or cu.toString().matches("%List%")
select cu.toString(), cu.getLocation().toString().regexpReplaceAll(".*/", ".../")

View File

@@ -0,0 +1,5 @@
class A {
val a : ArrayList<String> = ArrayList<String>()
}

View File

@@ -0,0 +1,126 @@
package dominance;
public class Test {
fun test() {
var x: Int = 0
var y: Long = 50
var z: Int = 0
var w: Int = 0
// if-else, multiple statements in block
if (x > 0) {
y = 20
z = 10
} else {
y = 30
}
z = 0
// if-else with return in one branch
if(x < 0)
y = 40
else
return
// this is not the start of a BB due to the return
z = 10
// single-branch if-else
if (x == 0) {
y = 60
z = 10
}
z = 20
// while loop
while(x > 0) {
y = 10
x--
}
z = 30
/*
TODO
// for loop
for(j in 0 .. 19) {
y = 0
w = 10
}
z = 40
// nested control flow
for(j in 0 .. 9) {
y = 30
if(z > 0)
if(y > 0) {
w = 0
break;
} else {
w = 20
}
else {
w = 10
continue
}
x = 0
}
*/
z = 50
// nested control-flow
w = 40
return
}
}
fun t1(o: Any): Int {
try {
val x = o as Int
return 1
} catch (e: ClassCastException) {
return 2
}
}
fun t2(o: Any?): Int {
try {
val x = o!!
return 1
} catch (e: NullPointerException) {
return 2
}
}
fun fn(x:Any?, y: Any?) {
if (x == null && y == null) {
throw Exception()
}
if (x != null) {
println("x not null")
} else if (y != null) {
println("y not null")
}
}
fun fn(x: Boolean, y: Boolean) {
if (x && y) {
}
}
fun fn_when(x: Boolean, y: Boolean) {
when {
when {
x -> y
else -> false
} -> { } }
}
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Int.dec in java.lang.Integer ...while extracting a call (<no name>) at %Test.kt:40:4:40:6%

View File

@@ -0,0 +1,192 @@
| Test.kt:3:1:80:1 | { ... } | 0 | Test.kt:3:1:80:1 | { ... } |
| Test.kt:3:1:80:1 | { ... } | 1 | Test.kt:3:1:80:1 | super(...) |
| Test.kt:3:1:80:1 | { ... } | 2 | Test.kt:3:1:80:1 | { ... } |
| Test.kt:3:1:80:1 | { ... } | 3 | Test.kt:3:1:80:1 | Test |
| Test.kt:4:2:79:2 | test | 0 | Test.kt:4:2:79:2 | test |
| Test.kt:4:13:79:2 | { ... } | 0 | Test.kt:4:13:79:2 | { ... } |
| Test.kt:4:13:79:2 | { ... } | 1 | Test.kt:5:3:5:16 | var ...; |
| Test.kt:4:13:79:2 | { ... } | 2 | Test.kt:5:16:5:16 | 0 |
| Test.kt:4:13:79:2 | { ... } | 3 | Test.kt:5:3:5:16 | x |
| Test.kt:4:13:79:2 | { ... } | 4 | Test.kt:6:3:6:18 | var ...; |
| Test.kt:4:13:79:2 | { ... } | 5 | Test.kt:6:17:6:18 | 50 |
| Test.kt:4:13:79:2 | { ... } | 6 | Test.kt:6:3:6:18 | y |
| Test.kt:4:13:79:2 | { ... } | 7 | Test.kt:7:3:7:16 | var ...; |
| Test.kt:4:13:79:2 | { ... } | 8 | Test.kt:7:16:7:16 | 0 |
| Test.kt:4:13:79:2 | { ... } | 9 | Test.kt:7:3:7:16 | z |
| Test.kt:4:13:79:2 | { ... } | 10 | Test.kt:8:3:8:16 | var ...; |
| Test.kt:4:13:79:2 | { ... } | 11 | Test.kt:8:16:8:16 | 0 |
| Test.kt:4:13:79:2 | { ... } | 12 | Test.kt:8:3:8:16 | w |
| Test.kt:4:13:79:2 | { ... } | 13 | Test.kt:11:3:16:3 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | 14 | Test.kt:11:3:16:3 | when ... |
| Test.kt:4:13:79:2 | { ... } | 15 | Test.kt:11:7:11:11 | ... -> ... |
| Test.kt:4:13:79:2 | { ... } | 16 | Test.kt:11:7:11:7 | x |
| Test.kt:4:13:79:2 | { ... } | 17 | Test.kt:11:11:11:11 | 0 |
| Test.kt:4:13:79:2 | { ... } | 18 | Test.kt:11:7:11:11 | ... > ... |
| Test.kt:11:14:14:3 | { ... } | 0 | Test.kt:11:14:14:3 | { ... } |
| Test.kt:11:14:14:3 | { ... } | 1 | Test.kt:12:4:12:9 | <Expr>; |
| Test.kt:11:14:14:3 | { ... } | 2 | Test.kt:12:8:12:9 | 20 |
| Test.kt:11:14:14:3 | { ... } | 3 | Test.kt:12:4:12:9 | ...=... |
| Test.kt:11:14:14:3 | { ... } | 4 | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:11:14:14:3 | { ... } | 5 | Test.kt:13:8:13:9 | 10 |
| Test.kt:11:14:14:3 | { ... } | 6 | Test.kt:13:4:13:9 | ...=... |
| Test.kt:14:10:16:3 | ... -> ... | 0 | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:14:10:16:3 | ... -> ... | 1 | Test.kt:14:10:16:3 | true |
| Test.kt:14:10:16:3 | ... -> ... | 2 | Test.kt:14:10:16:3 | { ... } |
| Test.kt:14:10:16:3 | ... -> ... | 3 | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:14:10:16:3 | ... -> ... | 4 | Test.kt:15:8:15:9 | 30 |
| Test.kt:14:10:16:3 | ... -> ... | 5 | Test.kt:15:4:15:9 | ...=... |
| Test.kt:18:3:18:7 | <Expr>; | 0 | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | 1 | Test.kt:18:7:18:7 | 0 |
| Test.kt:18:3:18:7 | <Expr>; | 2 | Test.kt:18:3:18:7 | ...=... |
| Test.kt:18:3:18:7 | <Expr>; | 3 | Test.kt:21:3:24:9 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | 4 | Test.kt:21:3:24:9 | when ... |
| Test.kt:18:3:18:7 | <Expr>; | 5 | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:18:3:18:7 | <Expr>; | 6 | Test.kt:21:6:21:6 | x |
| Test.kt:18:3:18:7 | <Expr>; | 7 | Test.kt:21:10:21:10 | 0 |
| Test.kt:18:3:18:7 | <Expr>; | 8 | Test.kt:21:6:21:10 | ... < ... |
| Test.kt:22:4:22:9 | { ... } | 0 | Test.kt:22:4:22:9 | { ... } |
| Test.kt:22:4:22:9 | { ... } | 1 | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | 2 | Test.kt:22:8:22:9 | 40 |
| Test.kt:22:4:22:9 | { ... } | 3 | Test.kt:22:4:22:9 | ...=... |
| Test.kt:22:4:22:9 | { ... } | 4 | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | 5 | Test.kt:27:7:27:8 | 10 |
| Test.kt:22:4:22:9 | { ... } | 6 | Test.kt:27:3:27:8 | ...=... |
| Test.kt:22:4:22:9 | { ... } | 7 | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | 8 | Test.kt:30:3:33:3 | when ... |
| Test.kt:22:4:22:9 | { ... } | 9 | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:22:4:22:9 | { ... } | 10 | Test.kt:30:7:30:7 | x |
| Test.kt:22:4:22:9 | { ... } | 11 | Test.kt:30:12:30:12 | 0 |
| Test.kt:22:4:22:9 | { ... } | 12 | Test.kt:30:7:30:12 | ... (value equals) ... |
| Test.kt:24:4:24:9 | ... -> ... | 0 | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:24:4:24:9 | ... -> ... | 1 | Test.kt:24:4:24:9 | true |
| Test.kt:24:4:24:9 | ... -> ... | 2 | Test.kt:24:10:24:10 | INSTANCE |
| Test.kt:24:4:24:9 | ... -> ... | 3 | Test.kt:24:4:24:9 | return ... |
| Test.kt:30:15:33:3 | { ... } | 0 | Test.kt:30:15:33:3 | { ... } |
| Test.kt:30:15:33:3 | { ... } | 1 | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:30:15:33:3 | { ... } | 2 | Test.kt:31:8:31:9 | 60 |
| Test.kt:30:15:33:3 | { ... } | 3 | Test.kt:31:4:31:9 | ...=... |
| Test.kt:30:15:33:3 | { ... } | 4 | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:30:15:33:3 | { ... } | 5 | Test.kt:32:8:32:9 | 10 |
| Test.kt:30:15:33:3 | { ... } | 6 | Test.kt:32:4:32:9 | ...=... |
| Test.kt:35:3:35:8 | <Expr>; | 0 | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | 1 | Test.kt:35:7:35:8 | 20 |
| Test.kt:35:3:35:8 | <Expr>; | 2 | Test.kt:35:3:35:8 | ...=... |
| Test.kt:35:3:35:8 | <Expr>; | 3 | Test.kt:38:3:41:3 | while (...) |
| Test.kt:38:9:38:9 | x | 0 | Test.kt:38:9:38:9 | x |
| Test.kt:38:9:38:9 | x | 1 | Test.kt:38:13:38:13 | 0 |
| Test.kt:38:9:38:9 | x | 2 | Test.kt:38:9:38:13 | ... > ... |
| Test.kt:38:16:41:3 | { ... } | 0 | Test.kt:38:16:41:3 | { ... } |
| Test.kt:38:16:41:3 | { ... } | 1 | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | 2 | Test.kt:39:8:39:9 | 10 |
| Test.kt:38:16:41:3 | { ... } | 3 | Test.kt:39:4:39:9 | ...=... |
| Test.kt:38:16:41:3 | { ... } | 4 | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | 5 | Test.kt:40:4:40:6 | <Stmt> |
| Test.kt:38:16:41:3 | { ... } | 6 | Test.kt:40:4:40:6 | { ... } |
| Test.kt:38:16:41:3 | { ... } | 7 | Test.kt:40:4:40:6 | var ...; |
| Test.kt:38:16:41:3 | { ... } | 8 | Test.kt:40:4:40:4 | x |
| Test.kt:38:16:41:3 | { ... } | 9 | Test.kt:40:4:40:6 | <unary> |
| Test.kt:38:16:41:3 | { ... } | 10 | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | 11 | Test.kt:40:4:40:6 | <unary> |
| Test.kt:38:16:41:3 | { ... } | 12 | Test.kt:40:4:40:6 | dec(...) |
| Test.kt:38:16:41:3 | { ... } | 13 | Test.kt:40:4:40:6 | ...=... |
| Test.kt:38:16:41:3 | { ... } | 14 | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | 15 | Test.kt:40:4:40:6 | <unary> |
| Test.kt:38:16:41:3 | { ... } | 16 | Test.kt:40:4:40:6 | <implicit coercion to unit> |
| Test.kt:43:3:43:8 | <Expr>; | 0 | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:43:3:43:8 | <Expr>; | 1 | Test.kt:43:7:43:8 | 30 |
| Test.kt:43:3:43:8 | <Expr>; | 2 | Test.kt:43:3:43:8 | ...=... |
| Test.kt:43:3:43:8 | <Expr>; | 3 | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:43:3:43:8 | <Expr>; | 4 | Test.kt:73:7:73:8 | 50 |
| Test.kt:43:3:43:8 | <Expr>; | 5 | Test.kt:73:3:73:8 | ...=... |
| Test.kt:43:3:43:8 | <Expr>; | 6 | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:43:3:43:8 | <Expr>; | 7 | Test.kt:77:7:77:8 | 40 |
| Test.kt:43:3:43:8 | <Expr>; | 8 | Test.kt:77:3:77:8 | ...=... |
| Test.kt:43:3:43:8 | <Expr>; | 9 | Test.kt:78:9:78:9 | INSTANCE |
| Test.kt:43:3:43:8 | <Expr>; | 10 | Test.kt:78:3:78:8 | return ... |
| Test.kt:82:1:89:1 | t1 | 0 | Test.kt:82:1:89:1 | t1 |
| Test.kt:82:21:89:1 | { ... } | 0 | Test.kt:82:21:89:1 | { ... } |
| Test.kt:82:21:89:1 | { ... } | 1 | Test.kt:83:2:88:2 | try ... |
| Test.kt:82:21:89:1 | { ... } | 2 | Test.kt:83:6:86:2 | { ... } |
| Test.kt:82:21:89:1 | { ... } | 3 | Test.kt:84:3:84:18 | var ...; |
| Test.kt:82:21:89:1 | { ... } | 4 | Test.kt:84:11:84:11 | o |
| Test.kt:82:21:89:1 | { ... } | 5 | Test.kt:84:11:84:18 | (...)... |
| Test.kt:84:3:84:18 | x | 0 | Test.kt:84:3:84:18 | x |
| Test.kt:84:3:84:18 | x | 1 | Test.kt:85:10:85:10 | 1 |
| Test.kt:84:3:84:18 | x | 2 | Test.kt:85:3:85:10 | return ... |
| Test.kt:86:4:88:2 | catch (...) | 0 | Test.kt:86:4:88:2 | catch (...) |
| Test.kt:86:4:88:2 | catch (...) | 1 | Test.kt:86:11:86:31 | e |
| Test.kt:86:4:88:2 | catch (...) | 2 | Test.kt:86:34:88:2 | { ... } |
| Test.kt:86:4:88:2 | catch (...) | 3 | Test.kt:87:10:87:10 | 2 |
| Test.kt:86:4:88:2 | catch (...) | 4 | Test.kt:87:3:87:10 | return ... |
| Test.kt:91:1:98:1 | t2 | 0 | Test.kt:91:1:98:1 | t2 |
| Test.kt:91:22:98:1 | { ... } | 0 | Test.kt:91:22:98:1 | { ... } |
| Test.kt:91:22:98:1 | { ... } | 1 | Test.kt:92:2:97:2 | try ... |
| Test.kt:91:22:98:1 | { ... } | 2 | Test.kt:92:6:95:2 | { ... } |
| Test.kt:91:22:98:1 | { ... } | 3 | Test.kt:93:3:93:13 | var ...; |
| Test.kt:91:22:98:1 | { ... } | 4 | Test.kt:93:11:93:11 | o |
| Test.kt:91:22:98:1 | { ... } | 5 | Test.kt:93:11:93:13 | ...!! |
| Test.kt:93:3:93:13 | x | 0 | Test.kt:93:3:93:13 | x |
| Test.kt:93:3:93:13 | x | 1 | Test.kt:94:10:94:10 | 1 |
| Test.kt:93:3:93:13 | x | 2 | Test.kt:94:3:94:10 | return ... |
| Test.kt:95:4:97:2 | catch (...) | 0 | Test.kt:95:4:97:2 | catch (...) |
| Test.kt:95:4:97:2 | catch (...) | 1 | Test.kt:95:11:95:33 | e |
| Test.kt:95:4:97:2 | catch (...) | 2 | Test.kt:95:36:97:2 | { ... } |
| Test.kt:95:4:97:2 | catch (...) | 3 | Test.kt:96:10:96:10 | 2 |
| Test.kt:95:4:97:2 | catch (...) | 4 | Test.kt:96:3:96:10 | return ... |
| Test.kt:100:1:110:1 | fn | 0 | Test.kt:100:1:110:1 | fn |
| Test.kt:100:25:110:1 | { ... } | 0 | Test.kt:100:25:110:1 | { ... } |
| Test.kt:100:25:110:1 | { ... } | 1 | Test.kt:101:5:103:5 | <Expr>; |
| Test.kt:100:25:110:1 | { ... } | 2 | Test.kt:101:5:103:5 | when ... |
| Test.kt:100:25:110:1 | { ... } | 3 | Test.kt:101:9:101:30 | ... -> ... |
| Test.kt:100:25:110:1 | { ... } | 4 | Test.kt:101:9:101:30 | ... && ... |
| Test.kt:100:25:110:1 | { ... } | 5 | Test.kt:101:9:101:9 | x |
| Test.kt:100:25:110:1 | { ... } | 6 | Test.kt:101:14:101:17 | null |
| Test.kt:100:25:110:1 | { ... } | 7 | Test.kt:101:9:101:17 | ... (value equals) ... |
| Test.kt:101:22:101:22 | y | 0 | Test.kt:101:22:101:22 | y |
| Test.kt:101:22:101:22 | y | 1 | Test.kt:101:27:101:30 | null |
| Test.kt:101:22:101:22 | y | 2 | Test.kt:101:22:101:30 | ... (value equals) ... |
| Test.kt:101:33:103:5 | { ... } | 0 | Test.kt:101:33:103:5 | { ... } |
| Test.kt:101:33:103:5 | { ... } | 1 | Test.kt:102:15:102:25 | new Exception(...) |
| Test.kt:101:33:103:5 | { ... } | 2 | Test.kt:102:9:102:25 | throw ... |
| Test.kt:105:5:109:5 | <Expr>; | 0 | Test.kt:105:5:109:5 | <Expr>; |
| Test.kt:105:5:109:5 | <Expr>; | 1 | Test.kt:105:5:109:5 | when ... |
| Test.kt:105:5:109:5 | <Expr>; | 2 | Test.kt:105:9:105:17 | ... -> ... |
| Test.kt:105:5:109:5 | <Expr>; | 3 | Test.kt:105:9:105:9 | x |
| Test.kt:105:5:109:5 | <Expr>; | 4 | Test.kt:105:14:105:17 | null |
| Test.kt:105:5:109:5 | <Expr>; | 5 | Test.kt:105:9:105:17 | ... (value not-equals) ... |
| Test.kt:105:20:107:5 | { ... } | 0 | Test.kt:105:20:107:5 | { ... } |
| Test.kt:105:20:107:5 | { ... } | 1 | Test.kt:106:9:106:29 | <Expr>; |
| Test.kt:105:20:107:5 | { ... } | 2 | Test.kt:106:17:106:28 | "x not null" |
| Test.kt:105:20:107:5 | { ... } | 3 | Test.kt:106:9:106:29 | println(...) |
| Test.kt:107:16:107:24 | ... -> ... | 0 | Test.kt:107:16:107:24 | ... -> ... |
| Test.kt:107:16:107:24 | ... -> ... | 1 | Test.kt:107:16:107:16 | y |
| Test.kt:107:16:107:24 | ... -> ... | 2 | Test.kt:107:21:107:24 | null |
| Test.kt:107:16:107:24 | ... -> ... | 3 | Test.kt:107:16:107:24 | ... (value not-equals) ... |
| Test.kt:107:27:109:5 | { ... } | 0 | Test.kt:107:27:109:5 | { ... } |
| Test.kt:107:27:109:5 | { ... } | 1 | Test.kt:108:9:108:29 | <Expr>; |
| Test.kt:107:27:109:5 | { ... } | 2 | Test.kt:108:17:108:28 | "y not null" |
| Test.kt:107:27:109:5 | { ... } | 3 | Test.kt:108:9:108:29 | println(...) |
| Test.kt:112:1:116:1 | fn | 0 | Test.kt:112:1:116:1 | fn |
| Test.kt:112:32:116:1 | { ... } | 0 | Test.kt:112:32:116:1 | { ... } |
| Test.kt:112:32:116:1 | { ... } | 1 | Test.kt:113:5:115:5 | <Expr>; |
| Test.kt:112:32:116:1 | { ... } | 2 | Test.kt:113:5:115:5 | when ... |
| Test.kt:112:32:116:1 | { ... } | 3 | Test.kt:113:9:113:14 | ... -> ... |
| Test.kt:112:32:116:1 | { ... } | 4 | Test.kt:113:9:113:14 | ... && ... |
| Test.kt:112:32:116:1 | { ... } | 5 | Test.kt:113:9:113:9 | x |
| Test.kt:113:14:113:14 | y | 0 | Test.kt:113:14:113:14 | y |
| Test.kt:113:17:115:5 | { ... } | 0 | Test.kt:113:17:115:5 | { ... } |
| Test.kt:118:1:124:1 | fn_when | 0 | Test.kt:118:1:124:1 | fn_when |
| Test.kt:118:37:124:1 | { ... } | 0 | Test.kt:118:37:124:1 | { ... } |
| Test.kt:118:37:124:1 | { ... } | 1 | Test.kt:119:2:123:12 | <Expr>; |
| Test.kt:118:37:124:1 | { ... } | 2 | Test.kt:119:2:123:12 | when ... |
| Test.kt:118:37:124:1 | { ... } | 3 | Test.kt:120:3:123:10 | ... -> ... |
| Test.kt:118:37:124:1 | { ... } | 4 | Test.kt:120:3:123:3 | when ... |
| Test.kt:118:37:124:1 | { ... } | 5 | Test.kt:121:4:121:9 | ... -> ... |
| Test.kt:118:37:124:1 | { ... } | 6 | Test.kt:121:4:121:4 | x |
| Test.kt:121:9:121:9 | <Expr>; | 0 | Test.kt:121:9:121:9 | <Expr>; |
| Test.kt:121:9:121:9 | <Expr>; | 1 | Test.kt:121:9:121:9 | y |
| Test.kt:122:12:122:16 | ... -> ... | 0 | Test.kt:122:12:122:16 | ... -> ... |
| Test.kt:122:12:122:16 | ... -> ... | 1 | Test.kt:122:12:122:16 | true |
| Test.kt:122:12:122:16 | ... -> ... | 2 | Test.kt:122:12:122:16 | <Expr>; |
| Test.kt:122:12:122:16 | ... -> ... | 3 | Test.kt:122:12:122:16 | false |
| Test.kt:123:8:123:10 | { ... } | 0 | Test.kt:123:8:123:10 | { ... } |

View File

@@ -0,0 +1,7 @@
import default
from BasicBlock b, int i, ControlFlowNode n
where
b.getNode(i) = n and
b.getFile().(CompilationUnit).fromSource()
select b, i, n

View File

@@ -0,0 +1,56 @@
| Test.kt:4:13:79:2 | { ... } | Test.kt:4:2:79:2 | test |
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:4:13:79:2 | { ... } | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:22:4:22:9 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:4:13:79:2 | { ... } | Test.kt:30:15:33:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:38:9:38:9 | x |
| Test.kt:4:13:79:2 | { ... } | Test.kt:38:16:41:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:4:2:79:2 | test |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:22:4:22:9 | { ... } |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:38:9:38:9 | x |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:30:15:33:3 | { ... } |
| Test.kt:22:4:22:9 | { ... } | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:38:9:38:9 | x |
| Test.kt:22:4:22:9 | { ... } | Test.kt:38:16:41:3 | { ... } |
| Test.kt:22:4:22:9 | { ... } | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:38:9:38:9 | x |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:38:9:38:9 | x | Test.kt:38:16:41:3 | { ... } |
| Test.kt:38:9:38:9 | x | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | t1 |
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | x |
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) |
| Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | t2 |
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | x |
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) |
| Test.kt:100:25:110:1 | { ... } | Test.kt:100:1:110:1 | fn |
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y |
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:33:103:5 | { ... } |
| Test.kt:100:25:110:1 | { ... } | Test.kt:105:5:109:5 | <Expr>; |
| Test.kt:100:25:110:1 | { ... } | Test.kt:105:20:107:5 | { ... } |
| Test.kt:100:25:110:1 | { ... } | Test.kt:107:16:107:24 | ... -> ... |
| Test.kt:100:25:110:1 | { ... } | Test.kt:107:27:109:5 | { ... } |
| Test.kt:101:22:101:22 | y | Test.kt:101:33:103:5 | { ... } |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:105:20:107:5 | { ... } |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:16:107:24 | ... -> ... |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:27:109:5 | { ... } |
| Test.kt:107:16:107:24 | ... -> ... | Test.kt:107:27:109:5 | { ... } |
| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | fn |
| Test.kt:112:32:116:1 | { ... } | Test.kt:113:14:113:14 | y |
| Test.kt:112:32:116:1 | { ... } | Test.kt:113:17:115:5 | { ... } |
| Test.kt:113:14:113:14 | y | Test.kt:113:17:115:5 | { ... } |
| Test.kt:118:37:124:1 | { ... } | Test.kt:118:1:124:1 | fn_when |
| Test.kt:118:37:124:1 | { ... } | Test.kt:121:9:121:9 | <Expr>; |
| Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | ... -> ... |
| Test.kt:118:37:124:1 | { ... } | Test.kt:123:8:123:10 | { ... } |
| Test.kt:121:9:121:9 | <Expr>; | Test.kt:123:8:123:10 | { ... } |

View File

@@ -0,0 +1,6 @@
import default
import semmle.code.java.controlflow.Dominance
from BasicBlock b, BasicBlock b2
where bbStrictlyDominates(b, b2)
select b, b2

View File

@@ -0,0 +1,45 @@
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:11:14:14:3 | { ... } | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:14:10:16:3 | ... -> ... | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:22:4:22:9 | { ... } |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:22:4:22:9 | { ... } | Test.kt:30:15:33:3 | { ... } |
| Test.kt:22:4:22:9 | { ... } | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:24:4:24:9 | ... -> ... | Test.kt:4:2:79:2 | test |
| Test.kt:30:15:33:3 | { ... } | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:38:9:38:9 | x |
| Test.kt:38:9:38:9 | x | Test.kt:38:16:41:3 | { ... } |
| Test.kt:38:9:38:9 | x | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | Test.kt:38:9:38:9 | x |
| Test.kt:43:3:43:8 | <Expr>; | Test.kt:4:2:79:2 | test |
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | x |
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) |
| Test.kt:84:3:84:18 | x | Test.kt:82:1:89:1 | t1 |
| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | t1 |
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | x |
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) |
| Test.kt:93:3:93:13 | x | Test.kt:91:1:98:1 | t2 |
| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | t2 |
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y |
| Test.kt:100:25:110:1 | { ... } | Test.kt:105:5:109:5 | <Expr>; |
| Test.kt:101:22:101:22 | y | Test.kt:101:33:103:5 | { ... } |
| Test.kt:101:22:101:22 | y | Test.kt:105:5:109:5 | <Expr>; |
| Test.kt:101:33:103:5 | { ... } | Test.kt:100:1:110:1 | fn |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:105:20:107:5 | { ... } |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:16:107:24 | ... -> ... |
| Test.kt:105:20:107:5 | { ... } | Test.kt:100:1:110:1 | fn |
| Test.kt:107:16:107:24 | ... -> ... | Test.kt:100:1:110:1 | fn |
| Test.kt:107:16:107:24 | ... -> ... | Test.kt:107:27:109:5 | { ... } |
| Test.kt:107:27:109:5 | { ... } | Test.kt:100:1:110:1 | fn |
| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | fn |
| Test.kt:112:32:116:1 | { ... } | Test.kt:113:14:113:14 | y |
| Test.kt:113:14:113:14 | y | Test.kt:112:1:116:1 | fn |
| Test.kt:113:14:113:14 | y | Test.kt:113:17:115:5 | { ... } |
| Test.kt:113:17:115:5 | { ... } | Test.kt:112:1:116:1 | fn |
| Test.kt:118:37:124:1 | { ... } | Test.kt:121:9:121:9 | <Expr>; |
| Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | ... -> ... |
| Test.kt:121:9:121:9 | <Expr>; | Test.kt:118:1:124:1 | fn_when |
| Test.kt:121:9:121:9 | <Expr>; | Test.kt:123:8:123:10 | { ... } |
| Test.kt:122:12:122:16 | ... -> ... | Test.kt:118:1:124:1 | fn_when |
| Test.kt:123:8:123:10 | { ... } | Test.kt:118:1:124:1 | fn_when |

View File

@@ -0,0 +1,5 @@
import default
from BasicBlock b, BasicBlock b2
where b.getABBSuccessor() = b2
select b, b2

View File

@@ -0,0 +1,262 @@
#select
| Test.kt:0:0:0:0 | TestKt | Class | file://:0:0:0:0 | <none> | <none> |
| Test.kt:3:1:80:1 | Test | Class | file://:0:0:0:0 | <none> | <none> |
| Test.kt:3:1:80:1 | Test | Constructor | file://:0:0:0:0 | <none> | <none> |
| Test.kt:3:1:80:1 | super(...) | SuperConstructorInvocationStmt | Test.kt:3:1:80:1 | { ... } | BlockStmt |
| Test.kt:3:1:80:1 | { ... } | BlockStmt | Test.kt:3:1:80:1 | Test | Constructor |
| Test.kt:3:1:80:1 | { ... } | BlockStmt | Test.kt:3:1:80:1 | super(...) | SuperConstructorInvocationStmt |
| Test.kt:4:2:79:2 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:4:2:79:2 | test | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:4:13:79:2 | { ... } | BlockStmt | Test.kt:5:3:5:16 | var ...; | LocalVariableDeclStmt |
| Test.kt:5:3:5:16 | int x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:5:3:5:16 | var ...; | LocalVariableDeclStmt | Test.kt:5:16:5:16 | 0 | IntegerLiteral |
| Test.kt:5:3:5:16 | x | LocalVariableDeclExpr | Test.kt:6:3:6:18 | var ...; | LocalVariableDeclStmt |
| Test.kt:5:16:5:16 | 0 | IntegerLiteral | Test.kt:5:3:5:16 | x | LocalVariableDeclExpr |
| Test.kt:6:3:6:18 | long y | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:6:3:6:18 | var ...; | LocalVariableDeclStmt | Test.kt:6:17:6:18 | 50 | LongLiteral |
| Test.kt:6:3:6:18 | y | LocalVariableDeclExpr | Test.kt:7:3:7:16 | var ...; | LocalVariableDeclStmt |
| Test.kt:6:17:6:18 | 50 | LongLiteral | Test.kt:6:3:6:18 | y | LocalVariableDeclExpr |
| Test.kt:7:3:7:16 | int z | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:7:3:7:16 | var ...; | LocalVariableDeclStmt | Test.kt:7:16:7:16 | 0 | IntegerLiteral |
| Test.kt:7:3:7:16 | z | LocalVariableDeclExpr | Test.kt:8:3:8:16 | var ...; | LocalVariableDeclStmt |
| Test.kt:7:16:7:16 | 0 | IntegerLiteral | Test.kt:7:3:7:16 | z | LocalVariableDeclExpr |
| Test.kt:8:3:8:16 | int w | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:8:3:8:16 | var ...; | LocalVariableDeclStmt | Test.kt:8:16:8:16 | 0 | IntegerLiteral |
| Test.kt:8:3:8:16 | w | LocalVariableDeclExpr | Test.kt:11:3:16:3 | <Expr>; | ExprStmt |
| Test.kt:8:16:8:16 | 0 | IntegerLiteral | Test.kt:8:3:8:16 | w | LocalVariableDeclExpr |
| Test.kt:11:3:16:3 | <Expr>; | ExprStmt | Test.kt:11:3:16:3 | when ... | WhenExpr |
| Test.kt:11:3:16:3 | when ... | WhenExpr | Test.kt:11:7:11:11 | ... -> ... | WhenBranch |
| Test.kt:11:7:11:7 | x | VarAccess | Test.kt:11:11:11:11 | 0 | IntegerLiteral |
| Test.kt:11:7:11:11 | ... -> ... | WhenBranch | Test.kt:11:7:11:7 | x | VarAccess |
| Test.kt:11:7:11:11 | ... > ... | GTExpr | Test.kt:11:14:14:3 | { ... } | BlockStmt |
| Test.kt:11:7:11:11 | ... > ... | GTExpr | Test.kt:14:10:16:3 | ... -> ... | WhenBranch |
| Test.kt:11:11:11:11 | 0 | IntegerLiteral | Test.kt:11:7:11:11 | ... > ... | GTExpr |
| Test.kt:11:14:14:3 | { ... } | BlockStmt | Test.kt:12:4:12:9 | <Expr>; | ExprStmt |
| Test.kt:12:4:12:9 | ...=... | AssignExpr | Test.kt:13:4:13:9 | <Expr>; | ExprStmt |
| Test.kt:12:4:12:9 | <Expr>; | ExprStmt | Test.kt:12:8:12:9 | 20 | LongLiteral |
| Test.kt:12:4:12:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:12:8:12:9 | 20 | LongLiteral | Test.kt:12:4:12:9 | ...=... | AssignExpr |
| Test.kt:13:4:13:9 | ...=... | AssignExpr | Test.kt:18:3:18:7 | <Expr>; | ExprStmt |
| Test.kt:13:4:13:9 | <Expr>; | ExprStmt | Test.kt:13:8:13:9 | 10 | IntegerLiteral |
| Test.kt:13:4:13:9 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:13:8:13:9 | 10 | IntegerLiteral | Test.kt:13:4:13:9 | ...=... | AssignExpr |
| Test.kt:14:10:16:3 | ... -> ... | WhenBranch | Test.kt:14:10:16:3 | true | BooleanLiteral |
| Test.kt:14:10:16:3 | true | BooleanLiteral | Test.kt:14:10:16:3 | { ... } | BlockStmt |
| Test.kt:14:10:16:3 | { ... } | BlockStmt | Test.kt:15:4:15:9 | <Expr>; | ExprStmt |
| Test.kt:15:4:15:9 | ...=... | AssignExpr | Test.kt:18:3:18:7 | <Expr>; | ExprStmt |
| Test.kt:15:4:15:9 | <Expr>; | ExprStmt | Test.kt:15:8:15:9 | 30 | LongLiteral |
| Test.kt:15:4:15:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:15:8:15:9 | 30 | LongLiteral | Test.kt:15:4:15:9 | ...=... | AssignExpr |
| Test.kt:18:3:18:7 | ...=... | AssignExpr | Test.kt:21:3:24:9 | <Expr>; | ExprStmt |
| Test.kt:18:3:18:7 | <Expr>; | ExprStmt | Test.kt:18:7:18:7 | 0 | IntegerLiteral |
| Test.kt:18:3:18:7 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:18:7:18:7 | 0 | IntegerLiteral | Test.kt:18:3:18:7 | ...=... | AssignExpr |
| Test.kt:21:3:24:9 | <Expr>; | ExprStmt | Test.kt:21:3:24:9 | when ... | WhenExpr |
| Test.kt:21:3:24:9 | when ... | WhenExpr | Test.kt:21:6:21:10 | ... -> ... | WhenBranch |
| Test.kt:21:6:21:6 | x | VarAccess | Test.kt:21:10:21:10 | 0 | IntegerLiteral |
| Test.kt:21:6:21:10 | ... -> ... | WhenBranch | Test.kt:21:6:21:6 | x | VarAccess |
| Test.kt:21:6:21:10 | ... < ... | LTExpr | Test.kt:22:4:22:9 | { ... } | BlockStmt |
| Test.kt:21:6:21:10 | ... < ... | LTExpr | Test.kt:24:4:24:9 | ... -> ... | WhenBranch |
| Test.kt:21:10:21:10 | 0 | IntegerLiteral | Test.kt:21:6:21:10 | ... < ... | LTExpr |
| Test.kt:22:4:22:9 | ...=... | AssignExpr | Test.kt:27:3:27:8 | <Expr>; | ExprStmt |
| Test.kt:22:4:22:9 | <Expr>; | ExprStmt | Test.kt:22:8:22:9 | 40 | LongLiteral |
| Test.kt:22:4:22:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:22:4:22:9 | { ... } | BlockStmt | Test.kt:22:4:22:9 | <Expr>; | ExprStmt |
| Test.kt:22:8:22:9 | 40 | LongLiteral | Test.kt:22:4:22:9 | ...=... | AssignExpr |
| Test.kt:24:4:24:9 | ... -> ... | WhenBranch | Test.kt:24:4:24:9 | true | BooleanLiteral |
| Test.kt:24:4:24:9 | return ... | ReturnStmt | Test.kt:4:2:79:2 | test | Method |
| Test.kt:24:4:24:9 | true | BooleanLiteral | Test.kt:24:10:24:10 | INSTANCE | VarAccess |
| Test.kt:24:10:24:10 | INSTANCE | VarAccess | Test.kt:24:4:24:9 | return ... | ReturnStmt |
| Test.kt:27:3:27:8 | ...=... | AssignExpr | Test.kt:30:3:33:3 | <Expr>; | ExprStmt |
| Test.kt:27:3:27:8 | <Expr>; | ExprStmt | Test.kt:27:7:27:8 | 10 | IntegerLiteral |
| Test.kt:27:3:27:8 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:27:7:27:8 | 10 | IntegerLiteral | Test.kt:27:3:27:8 | ...=... | AssignExpr |
| Test.kt:30:3:33:3 | <Expr>; | ExprStmt | Test.kt:30:3:33:3 | when ... | WhenExpr |
| Test.kt:30:3:33:3 | when ... | WhenExpr | Test.kt:30:7:30:12 | ... -> ... | WhenBranch |
| Test.kt:30:7:30:7 | x | VarAccess | Test.kt:30:12:30:12 | 0 | IntegerLiteral |
| Test.kt:30:7:30:12 | ... (value equals) ... | ValueEQExpr | Test.kt:30:15:33:3 | { ... } | BlockStmt |
| Test.kt:30:7:30:12 | ... (value equals) ... | ValueEQExpr | Test.kt:35:3:35:8 | <Expr>; | ExprStmt |
| Test.kt:30:7:30:12 | ... -> ... | WhenBranch | Test.kt:30:7:30:7 | x | VarAccess |
| Test.kt:30:12:30:12 | 0 | IntegerLiteral | Test.kt:30:7:30:12 | ... (value equals) ... | ValueEQExpr |
| Test.kt:30:15:33:3 | { ... } | BlockStmt | Test.kt:31:4:31:9 | <Expr>; | ExprStmt |
| Test.kt:31:4:31:9 | ...=... | AssignExpr | Test.kt:32:4:32:9 | <Expr>; | ExprStmt |
| Test.kt:31:4:31:9 | <Expr>; | ExprStmt | Test.kt:31:8:31:9 | 60 | LongLiteral |
| Test.kt:31:4:31:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:31:8:31:9 | 60 | LongLiteral | Test.kt:31:4:31:9 | ...=... | AssignExpr |
| Test.kt:32:4:32:9 | ...=... | AssignExpr | Test.kt:35:3:35:8 | <Expr>; | ExprStmt |
| Test.kt:32:4:32:9 | <Expr>; | ExprStmt | Test.kt:32:8:32:9 | 10 | IntegerLiteral |
| Test.kt:32:4:32:9 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:32:8:32:9 | 10 | IntegerLiteral | Test.kt:32:4:32:9 | ...=... | AssignExpr |
| Test.kt:35:3:35:8 | ...=... | AssignExpr | Test.kt:38:3:41:3 | while (...) | WhileStmt |
| Test.kt:35:3:35:8 | <Expr>; | ExprStmt | Test.kt:35:7:35:8 | 20 | IntegerLiteral |
| Test.kt:35:3:35:8 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:35:7:35:8 | 20 | IntegerLiteral | Test.kt:35:3:35:8 | ...=... | AssignExpr |
| Test.kt:38:3:41:3 | while (...) | WhileStmt | Test.kt:38:9:38:9 | x | VarAccess |
| Test.kt:38:9:38:9 | x | VarAccess | Test.kt:38:13:38:13 | 0 | IntegerLiteral |
| Test.kt:38:9:38:13 | ... > ... | GTExpr | Test.kt:38:16:41:3 | { ... } | BlockStmt |
| Test.kt:38:9:38:13 | ... > ... | GTExpr | Test.kt:43:3:43:8 | <Expr>; | ExprStmt |
| Test.kt:38:13:38:13 | 0 | IntegerLiteral | Test.kt:38:9:38:13 | ... > ... | GTExpr |
| Test.kt:38:16:41:3 | { ... } | BlockStmt | Test.kt:39:4:39:9 | <Expr>; | ExprStmt |
| Test.kt:39:4:39:9 | ...=... | AssignExpr | Test.kt:40:4:40:6 | <Expr>; | ExprStmt |
| Test.kt:39:4:39:9 | <Expr>; | ExprStmt | Test.kt:39:8:39:9 | 10 | LongLiteral |
| Test.kt:39:4:39:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:39:8:39:9 | 10 | LongLiteral | Test.kt:39:4:39:9 | ...=... | AssignExpr |
| Test.kt:40:4:40:4 | x | VarAccess | Test.kt:40:4:40:6 | <unary> | LocalVariableDeclExpr |
| Test.kt:40:4:40:6 | ...=... | AssignExpr | Test.kt:40:4:40:6 | <Expr>; | ExprStmt |
| Test.kt:40:4:40:6 | <Expr>; | ExprStmt | Test.kt:40:4:40:6 | <Stmt> | StmtExpr |
| Test.kt:40:4:40:6 | <Expr>; | ExprStmt | Test.kt:40:4:40:6 | <unary> | VarAccess |
| Test.kt:40:4:40:6 | <Expr>; | ExprStmt | Test.kt:40:4:40:6 | <unary> | VarAccess |
| Test.kt:40:4:40:6 | <Stmt> | StmtExpr | Test.kt:40:4:40:6 | { ... } | BlockStmt |
| Test.kt:40:4:40:6 | <implicit coercion to unit> | ImplicitCoercionToUnitExpr | Test.kt:38:9:38:9 | x | VarAccess |
| Test.kt:40:4:40:6 | <unary> | LocalVariableDeclExpr | Test.kt:40:4:40:6 | <Expr>; | ExprStmt |
| Test.kt:40:4:40:6 | <unary> | VarAccess | Test.kt:40:4:40:6 | <implicit coercion to unit> | ImplicitCoercionToUnitExpr |
| Test.kt:40:4:40:6 | <unary> | VarAccess | Test.kt:40:4:40:6 | dec(...) | MethodCall |
| Test.kt:40:4:40:6 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:40:4:40:6 | dec(...) | MethodCall | Test.kt:40:4:40:6 | ...=... | AssignExpr |
| Test.kt:40:4:40:6 | int <unary> | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt | Test.kt:40:4:40:4 | x | VarAccess |
| Test.kt:40:4:40:6 | x | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:40:4:40:6 | { ... } | BlockStmt | Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt |
| Test.kt:43:3:43:8 | ...=... | AssignExpr | Test.kt:73:3:73:8 | <Expr>; | ExprStmt |
| Test.kt:43:3:43:8 | <Expr>; | ExprStmt | Test.kt:43:7:43:8 | 30 | IntegerLiteral |
| Test.kt:43:3:43:8 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:43:7:43:8 | 30 | IntegerLiteral | Test.kt:43:3:43:8 | ...=... | AssignExpr |
| Test.kt:73:3:73:8 | ...=... | AssignExpr | Test.kt:77:3:77:8 | <Expr>; | ExprStmt |
| Test.kt:73:3:73:8 | <Expr>; | ExprStmt | Test.kt:73:7:73:8 | 50 | IntegerLiteral |
| Test.kt:73:3:73:8 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:73:7:73:8 | 50 | IntegerLiteral | Test.kt:73:3:73:8 | ...=... | AssignExpr |
| Test.kt:77:3:77:8 | ...=... | AssignExpr | Test.kt:78:9:78:9 | INSTANCE | VarAccess |
| Test.kt:77:3:77:8 | <Expr>; | ExprStmt | Test.kt:77:7:77:8 | 40 | IntegerLiteral |
| Test.kt:77:3:77:8 | w | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:77:7:77:8 | 40 | IntegerLiteral | Test.kt:77:3:77:8 | ...=... | AssignExpr |
| Test.kt:78:3:78:8 | return ... | ReturnStmt | Test.kt:4:2:79:2 | test | Method |
| Test.kt:78:9:78:9 | INSTANCE | VarAccess | Test.kt:78:3:78:8 | return ... | ReturnStmt |
| Test.kt:82:1:89:1 | int | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:1:89:1 | t1 | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:8:82:13 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:8:82:13 | o | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:21:89:1 | { ... } | BlockStmt | Test.kt:83:2:88:2 | try ... | TryStmt |
| Test.kt:83:2:88:2 | try ... | TryStmt | Test.kt:83:6:86:2 | { ... } | BlockStmt |
| Test.kt:83:6:86:2 | { ... } | BlockStmt | Test.kt:84:3:84:18 | var ...; | LocalVariableDeclStmt |
| Test.kt:84:3:84:18 | int x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:84:3:84:18 | var ...; | LocalVariableDeclStmt | Test.kt:84:11:84:11 | o | VarAccess |
| Test.kt:84:3:84:18 | x | LocalVariableDeclExpr | Test.kt:85:10:85:10 | 1 | IntegerLiteral |
| Test.kt:84:11:84:11 | o | VarAccess | Test.kt:84:11:84:18 | (...)... | CastExpr |
| Test.kt:84:11:84:18 | (...)... | CastExpr | Test.kt:84:3:84:18 | x | LocalVariableDeclExpr |
| Test.kt:84:11:84:18 | (...)... | CastExpr | Test.kt:86:4:88:2 | catch (...) | CatchClause |
| Test.kt:84:11:84:18 | int | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:85:3:85:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | t1 | Method |
| Test.kt:85:10:85:10 | 1 | IntegerLiteral | Test.kt:85:3:85:10 | return ... | ReturnStmt |
| Test.kt:86:4:88:2 | catch (...) | CatchClause | Test.kt:86:11:86:31 | e | LocalVariableDeclExpr |
| Test.kt:86:11:86:31 | ClassCastException | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:86:11:86:31 | ClassCastException e | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:86:11:86:31 | e | LocalVariableDeclExpr | Test.kt:86:34:88:2 | { ... } | BlockStmt |
| Test.kt:86:34:88:2 | { ... } | BlockStmt | Test.kt:87:10:87:10 | 2 | IntegerLiteral |
| Test.kt:87:3:87:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | t1 | Method |
| Test.kt:87:10:87:10 | 2 | IntegerLiteral | Test.kt:87:3:87:10 | return ... | ReturnStmt |
| Test.kt:91:1:98:1 | int | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:1:98:1 | t2 | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:8:91:14 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:8:91:14 | o | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:22:98:1 | { ... } | BlockStmt | Test.kt:92:2:97:2 | try ... | TryStmt |
| Test.kt:92:2:97:2 | try ... | TryStmt | Test.kt:92:6:95:2 | { ... } | BlockStmt |
| Test.kt:92:6:95:2 | { ... } | BlockStmt | Test.kt:93:3:93:13 | var ...; | LocalVariableDeclStmt |
| Test.kt:93:3:93:13 | Object x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:93:3:93:13 | var ...; | LocalVariableDeclStmt | Test.kt:93:11:93:11 | o | VarAccess |
| Test.kt:93:3:93:13 | x | LocalVariableDeclExpr | Test.kt:94:10:94:10 | 1 | IntegerLiteral |
| Test.kt:93:11:93:11 | o | VarAccess | Test.kt:93:11:93:13 | ...!! | NotNullExpr |
| Test.kt:93:11:93:13 | ...!! | NotNullExpr | Test.kt:93:3:93:13 | x | LocalVariableDeclExpr |
| Test.kt:93:11:93:13 | ...!! | NotNullExpr | Test.kt:95:4:97:2 | catch (...) | CatchClause |
| Test.kt:94:3:94:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | t2 | Method |
| Test.kt:94:10:94:10 | 1 | IntegerLiteral | Test.kt:94:3:94:10 | return ... | ReturnStmt |
| Test.kt:95:4:97:2 | catch (...) | CatchClause | Test.kt:95:11:95:33 | e | LocalVariableDeclExpr |
| Test.kt:95:11:95:33 | NullPointerException | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:95:11:95:33 | NullPointerException e | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:95:11:95:33 | e | LocalVariableDeclExpr | Test.kt:95:36:97:2 | { ... } | BlockStmt |
| Test.kt:95:36:97:2 | { ... } | BlockStmt | Test.kt:96:10:96:10 | 2 | IntegerLiteral |
| Test.kt:96:3:96:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | t2 | Method |
| Test.kt:96:10:96:10 | 2 | IntegerLiteral | Test.kt:96:3:96:10 | return ... | ReturnStmt |
| Test.kt:100:1:110:1 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:1:110:1 | fn | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:8:100:13 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:8:100:13 | x | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:16:100:22 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:16:100:22 | y | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:25:110:1 | { ... } | BlockStmt | Test.kt:101:5:103:5 | <Expr>; | ExprStmt |
| Test.kt:101:5:103:5 | <Expr>; | ExprStmt | Test.kt:101:5:103:5 | when ... | WhenExpr |
| Test.kt:101:5:103:5 | when ... | WhenExpr | Test.kt:101:9:101:30 | ... -> ... | WhenBranch |
| Test.kt:101:9:101:9 | x | VarAccess | Test.kt:101:14:101:17 | null | NullLiteral |
| Test.kt:101:9:101:17 | ... (value equals) ... | ValueEQExpr | Test.kt:101:22:101:22 | y | VarAccess |
| Test.kt:101:9:101:17 | ... (value equals) ... | ValueEQExpr | Test.kt:105:5:109:5 | <Expr>; | ExprStmt |
| Test.kt:101:9:101:30 | ... && ... | AndLogicalExpr | Test.kt:101:9:101:9 | x | VarAccess |
| Test.kt:101:9:101:30 | ... -> ... | WhenBranch | Test.kt:101:9:101:30 | ... && ... | AndLogicalExpr |
| Test.kt:101:14:101:17 | null | NullLiteral | Test.kt:101:9:101:17 | ... (value equals) ... | ValueEQExpr |
| Test.kt:101:22:101:22 | y | VarAccess | Test.kt:101:27:101:30 | null | NullLiteral |
| Test.kt:101:22:101:30 | ... (value equals) ... | ValueEQExpr | Test.kt:101:33:103:5 | { ... } | BlockStmt |
| Test.kt:101:22:101:30 | ... (value equals) ... | ValueEQExpr | Test.kt:105:5:109:5 | <Expr>; | ExprStmt |
| Test.kt:101:27:101:30 | null | NullLiteral | Test.kt:101:22:101:30 | ... (value equals) ... | ValueEQExpr |
| Test.kt:101:33:103:5 | { ... } | BlockStmt | Test.kt:102:15:102:25 | new Exception(...) | ClassInstanceExpr |
| Test.kt:102:9:102:25 | throw ... | ThrowStmt | Test.kt:100:1:110:1 | fn | Method |
| Test.kt:102:15:102:25 | Exception | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:102:15:102:25 | new Exception(...) | ClassInstanceExpr | Test.kt:102:9:102:25 | throw ... | ThrowStmt |
| Test.kt:105:5:109:5 | <Expr>; | ExprStmt | Test.kt:105:5:109:5 | when ... | WhenExpr |
| Test.kt:105:5:109:5 | when ... | WhenExpr | Test.kt:105:9:105:17 | ... -> ... | WhenBranch |
| Test.kt:105:9:105:9 | x | VarAccess | Test.kt:105:14:105:17 | null | NullLiteral |
| Test.kt:105:9:105:17 | ... (value not-equals) ... | ValueNEExpr | Test.kt:105:20:107:5 | { ... } | BlockStmt |
| Test.kt:105:9:105:17 | ... (value not-equals) ... | ValueNEExpr | Test.kt:107:16:107:24 | ... -> ... | WhenBranch |
| Test.kt:105:9:105:17 | ... -> ... | WhenBranch | Test.kt:105:9:105:9 | x | VarAccess |
| Test.kt:105:14:105:17 | null | NullLiteral | Test.kt:105:9:105:17 | ... (value not-equals) ... | ValueNEExpr |
| Test.kt:105:20:107:5 | { ... } | BlockStmt | Test.kt:106:9:106:29 | <Expr>; | ExprStmt |
| Test.kt:106:9:106:29 | <Expr>; | ExprStmt | Test.kt:106:17:106:28 | "x not null" | StringLiteral |
| Test.kt:106:9:106:29 | ConsoleKt | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:106:9:106:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | fn | Method |
| Test.kt:106:17:106:28 | "x not null" | StringLiteral | Test.kt:106:9:106:29 | println(...) | MethodCall |
| Test.kt:107:16:107:16 | y | VarAccess | Test.kt:107:21:107:24 | null | NullLiteral |
| Test.kt:107:16:107:24 | ... (value not-equals) ... | ValueNEExpr | Test.kt:100:1:110:1 | fn | Method |
| Test.kt:107:16:107:24 | ... (value not-equals) ... | ValueNEExpr | Test.kt:107:27:109:5 | { ... } | BlockStmt |
| Test.kt:107:16:107:24 | ... -> ... | WhenBranch | Test.kt:107:16:107:16 | y | VarAccess |
| Test.kt:107:21:107:24 | null | NullLiteral | Test.kt:107:16:107:24 | ... (value not-equals) ... | ValueNEExpr |
| Test.kt:107:27:109:5 | { ... } | BlockStmt | Test.kt:108:9:108:29 | <Expr>; | ExprStmt |
| Test.kt:108:9:108:29 | <Expr>; | ExprStmt | Test.kt:108:17:108:28 | "y not null" | StringLiteral |
| Test.kt:108:9:108:29 | ConsoleKt | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:108:9:108:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | fn | Method |
| Test.kt:108:17:108:28 | "y not null" | StringLiteral | Test.kt:108:9:108:29 | println(...) | MethodCall |
| Test.kt:112:1:116:1 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:1:116:1 | fn | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:8:112:17 | boolean | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:8:112:17 | x | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:20:112:29 | boolean | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:20:112:29 | y | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:32:116:1 | { ... } | BlockStmt | Test.kt:113:5:115:5 | <Expr>; | ExprStmt |
| Test.kt:113:5:115:5 | <Expr>; | ExprStmt | Test.kt:113:5:115:5 | when ... | WhenExpr |
| Test.kt:113:5:115:5 | when ... | WhenExpr | Test.kt:113:9:113:14 | ... -> ... | WhenBranch |
| Test.kt:113:9:113:9 | x | VarAccess | Test.kt:112:1:116:1 | fn | Method |
| Test.kt:113:9:113:9 | x | VarAccess | Test.kt:113:14:113:14 | y | VarAccess |
| Test.kt:113:9:113:14 | ... && ... | AndLogicalExpr | Test.kt:113:9:113:9 | x | VarAccess |
| Test.kt:113:9:113:14 | ... -> ... | WhenBranch | Test.kt:113:9:113:14 | ... && ... | AndLogicalExpr |
| Test.kt:113:14:113:14 | y | VarAccess | Test.kt:112:1:116:1 | fn | Method |
| Test.kt:113:14:113:14 | y | VarAccess | Test.kt:113:17:115:5 | { ... } | BlockStmt |
| Test.kt:113:17:115:5 | { ... } | BlockStmt | Test.kt:112:1:116:1 | fn | Method |
| Test.kt:118:1:124:1 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:1:124:1 | fn_when | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:13:118:22 | boolean | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:13:118:22 | x | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:25:118:34 | boolean | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:25:118:34 | y | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:37:124:1 | { ... } | BlockStmt | Test.kt:119:2:123:12 | <Expr>; | ExprStmt |
| Test.kt:119:2:123:12 | <Expr>; | ExprStmt | Test.kt:119:2:123:12 | when ... | WhenExpr |
| Test.kt:119:2:123:12 | when ... | WhenExpr | Test.kt:120:3:123:10 | ... -> ... | WhenBranch |
| Test.kt:120:3:123:3 | when ... | WhenExpr | Test.kt:121:4:121:9 | ... -> ... | WhenBranch |
| Test.kt:120:3:123:10 | ... -> ... | WhenBranch | Test.kt:120:3:123:3 | when ... | WhenExpr |
| Test.kt:121:4:121:4 | x | VarAccess | Test.kt:121:9:121:9 | <Expr>; | ExprStmt |
| Test.kt:121:4:121:4 | x | VarAccess | Test.kt:122:12:122:16 | ... -> ... | WhenBranch |
| Test.kt:121:4:121:9 | ... -> ... | WhenBranch | Test.kt:121:4:121:4 | x | VarAccess |
| Test.kt:121:9:121:9 | <Expr>; | ExprStmt | Test.kt:121:9:121:9 | y | VarAccess |
| Test.kt:121:9:121:9 | y | VarAccess | Test.kt:118:1:124:1 | fn_when | Method |
| Test.kt:121:9:121:9 | y | VarAccess | Test.kt:123:8:123:10 | { ... } | BlockStmt |
| Test.kt:122:12:122:16 | ... -> ... | WhenBranch | Test.kt:122:12:122:16 | true | BooleanLiteral |
| Test.kt:122:12:122:16 | <Expr>; | ExprStmt | Test.kt:122:12:122:16 | false | BooleanLiteral |
| Test.kt:122:12:122:16 | false | BooleanLiteral | Test.kt:118:1:124:1 | fn_when | Method |
| Test.kt:122:12:122:16 | true | BooleanLiteral | Test.kt:122:12:122:16 | <Expr>; | ExprStmt |
| Test.kt:123:8:123:10 | { ... } | BlockStmt | Test.kt:118:1:124:1 | fn_when | Method |
missingSuccessor

View File

@@ -0,0 +1,54 @@
import java
newtype TMaybeControlFlowNode =
TControlFlowNode(ControlFlowNode c) or
TNoControlFlowNode()
class MaybeControlFlowNode extends TMaybeControlFlowNode {
abstract string toString();
abstract Location getLocation();
abstract string getPrimaryQlClasses();
}
class YesMaybeControlFlowNode extends MaybeControlFlowNode {
ControlFlowNode c;
YesMaybeControlFlowNode() { this = TControlFlowNode(c) }
override string toString() { result = c.toString() }
override Location getLocation() { result = c.getLocation() }
override string getPrimaryQlClasses() { result = c.getPrimaryQlClasses() }
}
class NoMaybeControlFlowNode extends MaybeControlFlowNode {
NoMaybeControlFlowNode() { this = TNoControlFlowNode() }
override string toString() { result = "<none>" }
override Location getLocation() { result.toString() = "file://:0:0:0:0" }
override string getPrimaryQlClasses() { result = "<none>" }
}
MaybeControlFlowNode maybeSuccessor(ControlFlowNode n) {
if exists(n.getASuccessor())
then result = TControlFlowNode(n.getASuccessor())
else result = TNoControlFlowNode()
}
from ControlFlowNode n, MaybeControlFlowNode m
where
m = maybeSuccessor(n) and
n.getFile().(CompilationUnit).fromSource()
select n, n.getPrimaryQlClasses(), m, m.getPrimaryQlClasses()
query predicate missingSuccessor(Expr n) {
maybeSuccessor(n) instanceof NoMaybeControlFlowNode and
n.getFile().(CompilationUnit).fromSource() and
not n instanceof TypeAccess and
not n instanceof VarWrite
}

View File

@@ -0,0 +1,596 @@
| Test.kt:3:1:80:1 | super(...) | Test.kt:3:1:80:1 | { ... } |
| Test.kt:3:1:80:1 | { ... } | Test.kt:3:1:80:1 | super(...) |
| Test.kt:3:1:80:1 | { ... } | Test.kt:3:1:80:1 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:5:3:5:16 | var ...; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:6:3:6:18 | var ...; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:7:3:7:16 | var ...; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:8:3:8:16 | var ...; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:3:16:3 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:7:11:11 | ... -> ... |
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:12:4:12:9 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:4:13:79:2 | { ... } | Test.kt:14:10:16:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:21:3:24:9 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:4:13:79:2 | { ... } | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:22:4:22:9 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:4:13:79:2 | { ... } | Test.kt:24:4:24:9 | return ... |
| Test.kt:4:13:79:2 | { ... } | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:4:13:79:2 | { ... } | Test.kt:30:15:33:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:38:3:41:3 | while (...) |
| Test.kt:4:13:79:2 | { ... } | Test.kt:38:16:41:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:40:4:40:6 | var ...; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:40:4:40:6 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:4:13:79:2 | { ... } | Test.kt:78:3:78:8 | return ... |
| Test.kt:5:3:5:16 | var ...; | Test.kt:6:3:6:18 | var ...; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:7:3:7:16 | var ...; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:8:3:8:16 | var ...; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:11:3:16:3 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:11:7:11:11 | ... -> ... |
| Test.kt:5:3:5:16 | var ...; | Test.kt:11:14:14:3 | { ... } |
| Test.kt:5:3:5:16 | var ...; | Test.kt:12:4:12:9 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:5:3:5:16 | var ...; | Test.kt:14:10:16:3 | { ... } |
| Test.kt:5:3:5:16 | var ...; | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:21:3:24:9 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:5:3:5:16 | var ...; | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:22:4:22:9 | { ... } |
| Test.kt:5:3:5:16 | var ...; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:5:3:5:16 | var ...; | Test.kt:24:4:24:9 | return ... |
| Test.kt:5:3:5:16 | var ...; | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:5:3:5:16 | var ...; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:5:3:5:16 | var ...; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:5:3:5:16 | var ...; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:5:3:5:16 | var ...; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:5:3:5:16 | var ...; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:5:3:5:16 | var ...; | Test.kt:78:3:78:8 | return ... |
| Test.kt:6:3:6:18 | var ...; | Test.kt:7:3:7:16 | var ...; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:8:3:8:16 | var ...; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:11:3:16:3 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:11:7:11:11 | ... -> ... |
| Test.kt:6:3:6:18 | var ...; | Test.kt:11:14:14:3 | { ... } |
| Test.kt:6:3:6:18 | var ...; | Test.kt:12:4:12:9 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:6:3:6:18 | var ...; | Test.kt:14:10:16:3 | { ... } |
| Test.kt:6:3:6:18 | var ...; | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:21:3:24:9 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:6:3:6:18 | var ...; | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:22:4:22:9 | { ... } |
| Test.kt:6:3:6:18 | var ...; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:6:3:6:18 | var ...; | Test.kt:24:4:24:9 | return ... |
| Test.kt:6:3:6:18 | var ...; | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:6:3:6:18 | var ...; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:6:3:6:18 | var ...; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:6:3:6:18 | var ...; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:6:3:6:18 | var ...; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:6:3:6:18 | var ...; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:6:3:6:18 | var ...; | Test.kt:78:3:78:8 | return ... |
| Test.kt:7:3:7:16 | var ...; | Test.kt:8:3:8:16 | var ...; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:11:3:16:3 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:11:7:11:11 | ... -> ... |
| Test.kt:7:3:7:16 | var ...; | Test.kt:11:14:14:3 | { ... } |
| Test.kt:7:3:7:16 | var ...; | Test.kt:12:4:12:9 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:7:3:7:16 | var ...; | Test.kt:14:10:16:3 | { ... } |
| Test.kt:7:3:7:16 | var ...; | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:21:3:24:9 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:7:3:7:16 | var ...; | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:22:4:22:9 | { ... } |
| Test.kt:7:3:7:16 | var ...; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:7:3:7:16 | var ...; | Test.kt:24:4:24:9 | return ... |
| Test.kt:7:3:7:16 | var ...; | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:7:3:7:16 | var ...; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:7:3:7:16 | var ...; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:7:3:7:16 | var ...; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:7:3:7:16 | var ...; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:7:3:7:16 | var ...; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:7:3:7:16 | var ...; | Test.kt:78:3:78:8 | return ... |
| Test.kt:8:3:8:16 | var ...; | Test.kt:11:3:16:3 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:11:7:11:11 | ... -> ... |
| Test.kt:8:3:8:16 | var ...; | Test.kt:11:14:14:3 | { ... } |
| Test.kt:8:3:8:16 | var ...; | Test.kt:12:4:12:9 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:8:3:8:16 | var ...; | Test.kt:14:10:16:3 | { ... } |
| Test.kt:8:3:8:16 | var ...; | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:21:3:24:9 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:8:3:8:16 | var ...; | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:22:4:22:9 | { ... } |
| Test.kt:8:3:8:16 | var ...; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:8:3:8:16 | var ...; | Test.kt:24:4:24:9 | return ... |
| Test.kt:8:3:8:16 | var ...; | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:8:3:8:16 | var ...; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:8:3:8:16 | var ...; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:8:3:8:16 | var ...; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:8:3:8:16 | var ...; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:8:3:8:16 | var ...; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:8:3:8:16 | var ...; | Test.kt:78:3:78:8 | return ... |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:11:7:11:11 | ... -> ... |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:11:14:14:3 | { ... } |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:12:4:12:9 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:14:10:16:3 | { ... } |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:21:3:24:9 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:22:4:22:9 | { ... } |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:24:4:24:9 | return ... |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:11:3:16:3 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:11:14:14:3 | { ... } |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:12:4:12:9 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:14:10:16:3 | { ... } |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:18:3:18:7 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:21:3:24:9 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:22:4:22:9 | { ... } |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:24:4:24:9 | return ... |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:30:15:33:3 | { ... } |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:38:3:41:3 | while (...) |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:38:16:41:3 | { ... } |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:40:4:40:6 | var ...; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:40:4:40:6 | { ... } |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:11:7:11:11 | ... -> ... | Test.kt:78:3:78:8 | return ... |
| Test.kt:11:14:14:3 | { ... } | Test.kt:12:4:12:9 | <Expr>; |
| Test.kt:11:14:14:3 | { ... } | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:12:4:12:9 | <Expr>; | Test.kt:13:4:13:9 | <Expr>; |
| Test.kt:14:10:16:3 | ... -> ... | Test.kt:14:10:16:3 | { ... } |
| Test.kt:14:10:16:3 | ... -> ... | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:14:10:16:3 | { ... } | Test.kt:15:4:15:9 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:21:3:24:9 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:22:4:22:9 | { ... } |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:24:4:24:9 | return ... |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:21:6:21:10 | ... -> ... |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:22:4:22:9 | { ... } |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:24:4:24:9 | return ... |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:21:3:24:9 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:22:4:22:9 | { ... } |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:24:4:24:9 | return ... |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:30:15:33:3 | { ... } |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:38:3:41:3 | while (...) |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:38:16:41:3 | { ... } |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:40:4:40:6 | var ...; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:40:4:40:6 | { ... } |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:21:6:21:10 | ... -> ... | Test.kt:78:3:78:8 | return ... |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:22:4:22:9 | { ... } | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:27:3:27:8 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:22:4:22:9 | { ... } | Test.kt:30:15:33:3 | { ... } |
| Test.kt:22:4:22:9 | { ... } | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:38:3:41:3 | while (...) |
| Test.kt:22:4:22:9 | { ... } | Test.kt:38:16:41:3 | { ... } |
| Test.kt:22:4:22:9 | { ... } | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:40:4:40:6 | var ...; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:40:4:40:6 | { ... } |
| Test.kt:22:4:22:9 | { ... } | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:22:4:22:9 | { ... } | Test.kt:78:3:78:8 | return ... |
| Test.kt:24:4:24:9 | ... -> ... | Test.kt:24:4:24:9 | return ... |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:30:3:33:3 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:27:3:27:8 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:30:7:30:12 | ... -> ... |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:30:3:33:3 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:30:15:33:3 | { ... } |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:38:3:41:3 | while (...) |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:38:16:41:3 | { ... } |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:40:4:40:6 | var ...; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:40:4:40:6 | { ... } |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:30:7:30:12 | ... -> ... | Test.kt:78:3:78:8 | return ... |
| Test.kt:30:15:33:3 | { ... } | Test.kt:31:4:31:9 | <Expr>; |
| Test.kt:30:15:33:3 | { ... } | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:31:4:31:9 | <Expr>; | Test.kt:32:4:32:9 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:38:3:41:3 | while (...) |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:38:16:41:3 | { ... } |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:38:3:41:3 | while (...) | Test.kt:38:16:41:3 | { ... } |
| Test.kt:38:3:41:3 | while (...) | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:38:3:41:3 | while (...) | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:38:3:41:3 | while (...) | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:38:3:41:3 | while (...) | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:38:3:41:3 | while (...) | Test.kt:40:4:40:6 | var ...; |
| Test.kt:38:3:41:3 | while (...) | Test.kt:40:4:40:6 | { ... } |
| Test.kt:38:3:41:3 | while (...) | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:38:3:41:3 | while (...) | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:38:3:41:3 | while (...) | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:38:3:41:3 | while (...) | Test.kt:78:3:78:8 | return ... |
| Test.kt:38:16:41:3 | { ... } | Test.kt:39:4:39:9 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | Test.kt:40:4:40:6 | var ...; |
| Test.kt:38:16:41:3 | { ... } | Test.kt:40:4:40:6 | { ... } |
| Test.kt:39:4:39:9 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:39:4:39:9 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:39:4:39:9 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:39:4:39:9 | <Expr>; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:39:4:39:9 | <Expr>; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:40:4:40:6 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:40:4:40:6 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:40:4:40:6 | <Expr>; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:40:4:40:6 | <Expr>; | Test.kt:40:4:40:6 | var ...; |
| Test.kt:40:4:40:6 | <Expr>; | Test.kt:40:4:40:6 | { ... } |
| Test.kt:40:4:40:6 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:40:4:40:6 | var ...; | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:40:4:40:6 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:40:4:40:6 | { ... } | Test.kt:40:4:40:6 | <Expr>; |
| Test.kt:40:4:40:6 | { ... } | Test.kt:40:4:40:6 | var ...; |
| Test.kt:43:3:43:8 | <Expr>; | Test.kt:73:3:73:8 | <Expr>; |
| Test.kt:43:3:43:8 | <Expr>; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:43:3:43:8 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:73:3:73:8 | <Expr>; | Test.kt:77:3:77:8 | <Expr>; |
| Test.kt:73:3:73:8 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:77:3:77:8 | <Expr>; | Test.kt:78:3:78:8 | return ... |
| Test.kt:82:21:89:1 | { ... } | Test.kt:83:2:88:2 | try ... |
| Test.kt:82:21:89:1 | { ... } | Test.kt:83:6:86:2 | { ... } |
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | var ...; |
| Test.kt:82:21:89:1 | { ... } | Test.kt:85:3:85:10 | return ... |
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) |
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:34:88:2 | { ... } |
| Test.kt:82:21:89:1 | { ... } | Test.kt:87:3:87:10 | return ... |
| Test.kt:83:2:88:2 | try ... | Test.kt:83:6:86:2 | { ... } |
| Test.kt:83:2:88:2 | try ... | Test.kt:84:3:84:18 | var ...; |
| Test.kt:83:2:88:2 | try ... | Test.kt:85:3:85:10 | return ... |
| Test.kt:83:2:88:2 | try ... | Test.kt:86:4:88:2 | catch (...) |
| Test.kt:83:2:88:2 | try ... | Test.kt:86:34:88:2 | { ... } |
| Test.kt:83:2:88:2 | try ... | Test.kt:87:3:87:10 | return ... |
| Test.kt:83:6:86:2 | { ... } | Test.kt:84:3:84:18 | var ...; |
| Test.kt:83:6:86:2 | { ... } | Test.kt:85:3:85:10 | return ... |
| Test.kt:83:6:86:2 | { ... } | Test.kt:86:4:88:2 | catch (...) |
| Test.kt:83:6:86:2 | { ... } | Test.kt:86:34:88:2 | { ... } |
| Test.kt:83:6:86:2 | { ... } | Test.kt:87:3:87:10 | return ... |
| Test.kt:84:3:84:18 | var ...; | Test.kt:85:3:85:10 | return ... |
| Test.kt:84:3:84:18 | var ...; | Test.kt:86:4:88:2 | catch (...) |
| Test.kt:84:3:84:18 | var ...; | Test.kt:86:34:88:2 | { ... } |
| Test.kt:84:3:84:18 | var ...; | Test.kt:87:3:87:10 | return ... |
| Test.kt:86:4:88:2 | catch (...) | Test.kt:86:34:88:2 | { ... } |
| Test.kt:86:4:88:2 | catch (...) | Test.kt:87:3:87:10 | return ... |
| Test.kt:86:34:88:2 | { ... } | Test.kt:87:3:87:10 | return ... |
| Test.kt:91:22:98:1 | { ... } | Test.kt:92:2:97:2 | try ... |
| Test.kt:91:22:98:1 | { ... } | Test.kt:92:6:95:2 | { ... } |
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | var ...; |
| Test.kt:91:22:98:1 | { ... } | Test.kt:94:3:94:10 | return ... |
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) |
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:36:97:2 | { ... } |
| Test.kt:91:22:98:1 | { ... } | Test.kt:96:3:96:10 | return ... |
| Test.kt:92:2:97:2 | try ... | Test.kt:92:6:95:2 | { ... } |
| Test.kt:92:2:97:2 | try ... | Test.kt:93:3:93:13 | var ...; |
| Test.kt:92:2:97:2 | try ... | Test.kt:94:3:94:10 | return ... |
| Test.kt:92:2:97:2 | try ... | Test.kt:95:4:97:2 | catch (...) |
| Test.kt:92:2:97:2 | try ... | Test.kt:95:36:97:2 | { ... } |
| Test.kt:92:2:97:2 | try ... | Test.kt:96:3:96:10 | return ... |
| Test.kt:92:6:95:2 | { ... } | Test.kt:93:3:93:13 | var ...; |
| Test.kt:92:6:95:2 | { ... } | Test.kt:94:3:94:10 | return ... |
| Test.kt:92:6:95:2 | { ... } | Test.kt:95:4:97:2 | catch (...) |
| Test.kt:92:6:95:2 | { ... } | Test.kt:95:36:97:2 | { ... } |
| Test.kt:92:6:95:2 | { ... } | Test.kt:96:3:96:10 | return ... |
| Test.kt:93:3:93:13 | var ...; | Test.kt:94:3:94:10 | return ... |
| Test.kt:93:3:93:13 | var ...; | Test.kt:95:4:97:2 | catch (...) |
| Test.kt:93:3:93:13 | var ...; | Test.kt:95:36:97:2 | { ... } |
| Test.kt:93:3:93:13 | var ...; | Test.kt:96:3:96:10 | return ... |
| Test.kt:95:4:97:2 | catch (...) | Test.kt:95:36:97:2 | { ... } |
| Test.kt:95:4:97:2 | catch (...) | Test.kt:96:3:96:10 | return ... |
| Test.kt:95:36:97:2 | { ... } | Test.kt:96:3:96:10 | return ... |
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:5:103:5 | <Expr>; |
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:9:101:30 | ... -> ... |
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:33:103:5 | { ... } |
| Test.kt:100:25:110:1 | { ... } | Test.kt:102:9:102:25 | throw ... |
| Test.kt:100:25:110:1 | { ... } | Test.kt:105:5:109:5 | <Expr>; |
| Test.kt:100:25:110:1 | { ... } | Test.kt:105:9:105:17 | ... -> ... |
| Test.kt:100:25:110:1 | { ... } | Test.kt:105:20:107:5 | { ... } |
| Test.kt:100:25:110:1 | { ... } | Test.kt:106:9:106:29 | <Expr>; |
| Test.kt:100:25:110:1 | { ... } | Test.kt:107:16:107:24 | ... -> ... |
| Test.kt:100:25:110:1 | { ... } | Test.kt:107:27:109:5 | { ... } |
| Test.kt:100:25:110:1 | { ... } | Test.kt:108:9:108:29 | <Expr>; |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:101:9:101:30 | ... -> ... |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:101:33:103:5 | { ... } |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:102:9:102:25 | throw ... |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:105:5:109:5 | <Expr>; |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:105:9:105:17 | ... -> ... |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:105:20:107:5 | { ... } |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:106:9:106:29 | <Expr>; |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:107:16:107:24 | ... -> ... |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:107:27:109:5 | { ... } |
| Test.kt:101:5:103:5 | <Expr>; | Test.kt:108:9:108:29 | <Expr>; |
| Test.kt:101:9:101:30 | ... -> ... | Test.kt:101:33:103:5 | { ... } |
| Test.kt:101:9:101:30 | ... -> ... | Test.kt:102:9:102:25 | throw ... |
| Test.kt:101:9:101:30 | ... -> ... | Test.kt:105:5:109:5 | <Expr>; |
| Test.kt:101:9:101:30 | ... -> ... | Test.kt:105:9:105:17 | ... -> ... |
| Test.kt:101:9:101:30 | ... -> ... | Test.kt:105:20:107:5 | { ... } |
| Test.kt:101:9:101:30 | ... -> ... | Test.kt:106:9:106:29 | <Expr>; |
| Test.kt:101:9:101:30 | ... -> ... | Test.kt:107:16:107:24 | ... -> ... |
| Test.kt:101:9:101:30 | ... -> ... | Test.kt:107:27:109:5 | { ... } |
| Test.kt:101:9:101:30 | ... -> ... | Test.kt:108:9:108:29 | <Expr>; |
| Test.kt:101:33:103:5 | { ... } | Test.kt:102:9:102:25 | throw ... |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:105:9:105:17 | ... -> ... |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:105:20:107:5 | { ... } |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:106:9:106:29 | <Expr>; |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:16:107:24 | ... -> ... |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:27:109:5 | { ... } |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:108:9:108:29 | <Expr>; |
| Test.kt:105:9:105:17 | ... -> ... | Test.kt:105:20:107:5 | { ... } |
| Test.kt:105:9:105:17 | ... -> ... | Test.kt:106:9:106:29 | <Expr>; |
| Test.kt:105:9:105:17 | ... -> ... | Test.kt:107:16:107:24 | ... -> ... |
| Test.kt:105:9:105:17 | ... -> ... | Test.kt:107:27:109:5 | { ... } |
| Test.kt:105:9:105:17 | ... -> ... | Test.kt:108:9:108:29 | <Expr>; |
| Test.kt:105:20:107:5 | { ... } | Test.kt:106:9:106:29 | <Expr>; |
| Test.kt:107:16:107:24 | ... -> ... | Test.kt:107:27:109:5 | { ... } |
| Test.kt:107:16:107:24 | ... -> ... | Test.kt:108:9:108:29 | <Expr>; |
| Test.kt:107:27:109:5 | { ... } | Test.kt:108:9:108:29 | <Expr>; |
| Test.kt:112:32:116:1 | { ... } | Test.kt:113:5:115:5 | <Expr>; |
| Test.kt:112:32:116:1 | { ... } | Test.kt:113:9:113:14 | ... -> ... |
| Test.kt:112:32:116:1 | { ... } | Test.kt:113:17:115:5 | { ... } |
| Test.kt:113:5:115:5 | <Expr>; | Test.kt:113:9:113:14 | ... -> ... |
| Test.kt:113:5:115:5 | <Expr>; | Test.kt:113:17:115:5 | { ... } |
| Test.kt:113:9:113:14 | ... -> ... | Test.kt:113:17:115:5 | { ... } |
| Test.kt:118:37:124:1 | { ... } | Test.kt:119:2:123:12 | <Expr>; |
| Test.kt:118:37:124:1 | { ... } | Test.kt:120:3:123:10 | ... -> ... |
| Test.kt:118:37:124:1 | { ... } | Test.kt:121:4:121:9 | ... -> ... |
| Test.kt:118:37:124:1 | { ... } | Test.kt:121:9:121:9 | <Expr>; |
| Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | ... -> ... |
| Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | <Expr>; |
| Test.kt:118:37:124:1 | { ... } | Test.kt:123:8:123:10 | { ... } |
| Test.kt:119:2:123:12 | <Expr>; | Test.kt:120:3:123:10 | ... -> ... |
| Test.kt:119:2:123:12 | <Expr>; | Test.kt:121:4:121:9 | ... -> ... |
| Test.kt:119:2:123:12 | <Expr>; | Test.kt:121:9:121:9 | <Expr>; |
| Test.kt:119:2:123:12 | <Expr>; | Test.kt:122:12:122:16 | ... -> ... |
| Test.kt:119:2:123:12 | <Expr>; | Test.kt:122:12:122:16 | <Expr>; |
| Test.kt:119:2:123:12 | <Expr>; | Test.kt:123:8:123:10 | { ... } |
| Test.kt:120:3:123:10 | ... -> ... | Test.kt:121:4:121:9 | ... -> ... |
| Test.kt:120:3:123:10 | ... -> ... | Test.kt:121:9:121:9 | <Expr>; |
| Test.kt:120:3:123:10 | ... -> ... | Test.kt:122:12:122:16 | ... -> ... |
| Test.kt:120:3:123:10 | ... -> ... | Test.kt:122:12:122:16 | <Expr>; |
| Test.kt:120:3:123:10 | ... -> ... | Test.kt:123:8:123:10 | { ... } |
| Test.kt:121:4:121:9 | ... -> ... | Test.kt:121:9:121:9 | <Expr>; |
| Test.kt:121:4:121:9 | ... -> ... | Test.kt:122:12:122:16 | ... -> ... |
| Test.kt:121:4:121:9 | ... -> ... | Test.kt:122:12:122:16 | <Expr>; |
| Test.kt:121:4:121:9 | ... -> ... | Test.kt:123:8:123:10 | { ... } |
| Test.kt:121:9:121:9 | <Expr>; | Test.kt:123:8:123:10 | { ... } |
| Test.kt:122:12:122:16 | ... -> ... | Test.kt:122:12:122:16 | <Expr>; |

Some files were not shown because too many files have changed in this diff Show More