diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index 511b97fd4d03..489d1b857437 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -3395,6 +3395,23 @@ open class KotlinFileExtractor( extractExprContext(it, locId, callable, enclosingStmt) } + private fun escapeCharForQuotedLiteral(c: Char) = + when (c) { + '\r' -> "\\r" + '\n' -> "\\n" + '\t' -> "\\t" + '\\' -> "\\\\" + '"' -> "\\\"" + else -> c.toString() + } + + // Render a string literal as it might occur in Kotlin source. Note this is a reasonable guess; the real source + // could use other escape sequences to describe the same String. Importantly, this is the same guess the Java + // extractor makes regarding string literals occurring within annotations, which we need to coincide with to ensure + // database consistency. + private fun toQuotedLiteral(s: String) = + s.toCharArray().joinToString(separator = "", prefix = "\"", postfix = "\"") { c -> escapeCharForQuotedLiteral(c) } + private fun extractExpression(e: IrExpression, callable: Label, parent: StmtExprParent) { with("expression", e) { when(e) { @@ -3602,7 +3619,7 @@ open class KotlinFileExtractor( tw.writeExprs_stringliteral(id, type.javaResult.id, exprParent.parent, exprParent.idx) tw.writeExprsKotlinType(id, type.kotlinResult.id) extractExprContext(id, locId, callable, exprParent.enclosingStmt) - tw.writeNamestrings(v.toString(), v.toString(), id) + tw.writeNamestrings(toQuotedLiteral(v.toString()), v.toString(), id) } v == null -> { extractNull(e.type, tw.getLocation(e), exprParent.parent, exprParent.idx, callable, exprParent.enclosingStmt) diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/PrintAst.expected b/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/PrintAst.expected index ae23298c033f..4f056c3c4fb0 100644 --- a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/PrintAst.expected +++ b/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/PrintAst.expected @@ -180,15 +180,15 @@ app/src/main/kotlin/testProject/App.kt: # 0| 5: [BlockStmt] { ... } # 0| 0: [ReturnStmt] return ... # 0| 0: [StringTemplateExpr] "..." -# 0| 0: [StringLiteral] Project( -# 0| 1: [StringLiteral] name= +# 0| 0: [StringLiteral] "Project(" +# 0| 1: [StringLiteral] "name=" # 0| 2: [VarAccess] this.name # 0| -1: [ThisAccess] this -# 0| 3: [StringLiteral] , -# 0| 4: [StringLiteral] language= +# 0| 3: [StringLiteral] ", " +# 0| 4: [StringLiteral] "language=" # 0| 5: [VarAccess] this.language # 0| -1: [ThisAccess] this -# 0| 6: [StringLiteral] ) +# 0| 6: [StringLiteral] ")" # 0| 9: [Method] write$Self # 0| 3: [TypeAccess] Unit #-----| 4: (Parameters) @@ -405,19 +405,19 @@ app/src/main/kotlin/testProject/App.kt: # 7| 1: [LocalVariableDeclExpr] tmp0_serialDesc # 7| 0: [ClassInstanceExpr] new PluginGeneratedSerialDescriptor(...) # 7| -3: [TypeAccess] PluginGeneratedSerialDescriptor -# 7| 0: [StringLiteral] testProject.Project +# 7| 0: [StringLiteral] "testProject.Project" # 7| 1: [ThisAccess] $serializer.this # 7| 0: [TypeAccess] $serializer # 7| 2: [IntegerLiteral] 2 # 7| 1: [ExprStmt] ; # 7| 0: [MethodAccess] addElement(...) # 7| -1: [VarAccess] tmp0_serialDesc -# 7| 0: [StringLiteral] name +# 7| 0: [StringLiteral] "name" # 7| 1: [BooleanLiteral] false # 7| 2: [ExprStmt] ; # 7| 0: [MethodAccess] addElement(...) # 7| -1: [VarAccess] tmp0_serialDesc -# 7| 0: [StringLiteral] language +# 7| 0: [StringLiteral] "language" # 7| 1: [BooleanLiteral] false # 7| 3: [ExprStmt] ; # 7| 0: [AssignExpr] ...=... @@ -520,7 +520,7 @@ app/src/main/kotlin/testProject/App.kt: # 14| 0: [VarAccess] X.this.id # 14| -1: [ThisAccess] X.this # 14| 0: [TypeAccess] X -# 16| 1: [StringLiteral] X +# 16| 1: [StringLiteral] "X" # 14| 1: [WhenBranch] ... -> ... # 14| 0: [BooleanLiteral] true # 14| 1: [ExprStmt] ; @@ -556,7 +556,7 @@ app/src/main/kotlin/testProject/App.kt: # 14| 0: [ValueNEExpr] ... (value not-equals) ... # 14| 0: [MethodAccess] getId(...) # 14| -1: [VarAccess] self -# 16| 1: [StringLiteral] X +# 16| 1: [StringLiteral] "X" # 14| 1: [ExprStmt] ; # 14| 0: [MethodAccess] encodeStringElement(...) # 14| -1: [VarAccess] output @@ -720,14 +720,14 @@ app/src/main/kotlin/testProject/App.kt: # 14| 1: [LocalVariableDeclExpr] tmp0_serialDesc # 14| 0: [ClassInstanceExpr] new PluginGeneratedSerialDescriptor(...) # 14| -3: [TypeAccess] PluginGeneratedSerialDescriptor -# 14| 0: [StringLiteral] testProject.X +# 14| 0: [StringLiteral] "testProject.X" # 14| 1: [ThisAccess] $serializer.this # 14| 0: [TypeAccess] $serializer # 14| 2: [IntegerLiteral] 1 # 14| 1: [ExprStmt] ; # 14| 0: [MethodAccess] addElement(...) # 14| -1: [VarAccess] tmp0_serialDesc -# 14| 0: [StringLiteral] id +# 14| 0: [StringLiteral] "id" # 14| 1: [BooleanLiteral] true # 14| 2: [ExprStmt] ; # 14| 0: [AssignExpr] ...=... @@ -764,7 +764,7 @@ app/src/main/kotlin/testProject/App.kt: # 16| 0: [VarAccess] id # 16| 6: [FieldDeclaration] String id; # 16| -1: [TypeAccess] String -# 16| 0: [StringLiteral] X +# 16| 0: [StringLiteral] "X" # 16| 7: [Method] getId # 16| 3: [TypeAccess] String # 16| 5: [BlockStmt] { ... } diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.expected b/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.expected index 3581a1784223..9f16308bdfc6 100644 --- a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.expected +++ b/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.expected @@ -1,26 +1,26 @@ edges | hasFields.kt:5:5:5:34 | constField : String | ReadsFields.java:5:10:5:29 | HasFields.constField | -| hasFields.kt:5:28:5:34 | taint : String | hasFields.kt:5:5:5:34 | constField : String | +| hasFields.kt:5:28:5:34 | "taint" : String | hasFields.kt:5:5:5:34 | constField : String | | hasFields.kt:7:5:7:38 | lateinitField : String | ReadsFields.java:6:10:6:32 | HasFields.lateinitField | | hasFields.kt:7:14:7:38 | : String | hasFields.kt:7:5:7:38 | lateinitField : String | | hasFields.kt:7:14:7:38 | : String | hasFields.kt:7:14:7:38 | : String | | hasFields.kt:9:5:9:50 | jvmFieldAnnotatedField : String | ReadsFields.java:7:10:7:41 | HasFields.jvmFieldAnnotatedField | -| hasFields.kt:9:44:9:50 | taint : String | hasFields.kt:9:5:9:50 | jvmFieldAnnotatedField : String | -| hasFields.kt:14:22:14:26 | taint : String | hasFields.kt:7:14:7:38 | : String | +| hasFields.kt:9:44:9:50 | "taint" : String | hasFields.kt:9:5:9:50 | jvmFieldAnnotatedField : String | +| hasFields.kt:14:22:14:26 | "taint" : String | hasFields.kt:7:14:7:38 | : String | nodes | ReadsFields.java:5:10:5:29 | HasFields.constField | semmle.label | HasFields.constField | | ReadsFields.java:6:10:6:32 | HasFields.lateinitField | semmle.label | HasFields.lateinitField | | ReadsFields.java:7:10:7:41 | HasFields.jvmFieldAnnotatedField | semmle.label | HasFields.jvmFieldAnnotatedField | | hasFields.kt:5:5:5:34 | constField : String | semmle.label | constField : String | -| hasFields.kt:5:28:5:34 | taint : String | semmle.label | taint : String | +| hasFields.kt:5:28:5:34 | "taint" : String | semmle.label | "taint" : String | | hasFields.kt:7:5:7:38 | lateinitField : String | semmle.label | lateinitField : String | | hasFields.kt:7:14:7:38 | : String | semmle.label | : String | | hasFields.kt:7:14:7:38 | : String | semmle.label | : String | | hasFields.kt:9:5:9:50 | jvmFieldAnnotatedField : String | semmle.label | jvmFieldAnnotatedField : String | -| hasFields.kt:9:44:9:50 | taint : String | semmle.label | taint : String | -| hasFields.kt:14:22:14:26 | taint : String | semmle.label | taint : String | +| hasFields.kt:9:44:9:50 | "taint" : String | semmle.label | "taint" : String | +| hasFields.kt:14:22:14:26 | "taint" : String | semmle.label | "taint" : String | subpaths #select -| hasFields.kt:5:28:5:34 | taint : String | hasFields.kt:5:28:5:34 | taint : String | ReadsFields.java:5:10:5:29 | HasFields.constField | flow path | -| hasFields.kt:9:44:9:50 | taint : String | hasFields.kt:9:44:9:50 | taint : String | ReadsFields.java:7:10:7:41 | HasFields.jvmFieldAnnotatedField | flow path | -| hasFields.kt:14:22:14:26 | taint : String | hasFields.kt:14:22:14:26 | taint : String | ReadsFields.java:6:10:6:32 | HasFields.lateinitField | flow path | +| hasFields.kt:5:28:5:34 | "taint" : String | hasFields.kt:5:28:5:34 | "taint" : String | ReadsFields.java:5:10:5:29 | HasFields.constField | flow path | +| hasFields.kt:9:44:9:50 | "taint" : String | hasFields.kt:9:44:9:50 | "taint" : String | ReadsFields.java:7:10:7:41 | HasFields.jvmFieldAnnotatedField | flow path | +| hasFields.kt:14:22:14:26 | "taint" : String | hasFields.kt:14:22:14:26 | "taint" : String | ReadsFields.java:6:10:6:32 | HasFields.lateinitField | flow path | diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.expected b/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.expected index 27db355f8387..94ec21eca1a8 100644 --- a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.expected +++ b/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.expected @@ -76,7 +76,7 @@ callArgs | KotlinUser.kt:10:34:10:65 | new InnerGeneric(...) | KotlinUser.kt:10:14:10:32 | new OuterGeneric(...) | -2 | | KotlinUser.kt:10:34:10:65 | new InnerGeneric(...) | KotlinUser.kt:10:34:10:65 | InnerGeneric | -3 | | KotlinUser.kt:10:34:10:65 | new InnerGeneric(...) | KotlinUser.kt:10:47:10:49 | a | 0 | -| KotlinUser.kt:10:34:10:65 | new InnerGeneric(...) | KotlinUser.kt:10:53:10:63 | hello world | 1 | +| KotlinUser.kt:10:34:10:65 | new InnerGeneric(...) | KotlinUser.kt:10:53:10:63 | "hello world" | 1 | | KotlinUser.kt:11:13:11:31 | new OuterGeneric(...) | KotlinUser.kt:11:13:11:31 | OuterGeneric | -3 | | KotlinUser.kt:11:33:11:49 | new InnerNotGeneric<>(...) | KotlinUser.kt:11:13:11:31 | new OuterGeneric(...) | -2 | | KotlinUser.kt:11:33:11:49 | new InnerNotGeneric<>(...) | KotlinUser.kt:11:33:11:49 | InnerNotGeneric<> | -3 | @@ -88,10 +88,10 @@ callArgs | KotlinUser.kt:13:31:13:52 | new InnerGeneric(...) | KotlinUser.kt:13:31:13:52 | InnerGeneric | -3 | | KotlinUser.kt:14:26:14:63 | new InnerStaticGeneric(...) | KotlinUser.kt:14:26:14:63 | InnerStaticGeneric | -3 | | KotlinUser.kt:14:26:14:63 | new InnerStaticGeneric(...) | KotlinUser.kt:14:45:14:47 | a | 0 | -| KotlinUser.kt:14:26:14:63 | new InnerStaticGeneric(...) | KotlinUser.kt:14:51:14:61 | hello world | 1 | +| KotlinUser.kt:14:26:14:63 | new InnerStaticGeneric(...) | KotlinUser.kt:14:51:14:61 | "hello world" | 1 | | KotlinUser.kt:15:13:15:39 | new OuterManyParams(...) | KotlinUser.kt:15:13:15:39 | OuterManyParams | -3 | | KotlinUser.kt:15:13:15:39 | new OuterManyParams(...) | KotlinUser.kt:15:29:15:29 | 1 | 0 | -| KotlinUser.kt:15:13:15:39 | new OuterManyParams(...) | KotlinUser.kt:15:33:15:37 | hello | 1 | +| KotlinUser.kt:15:13:15:39 | new OuterManyParams(...) | KotlinUser.kt:15:33:15:37 | "hello" | 1 | | KotlinUser.kt:15:41:15:67 | new MiddleManyParams(...) | KotlinUser.kt:15:13:15:39 | new OuterManyParams(...) | -2 | | KotlinUser.kt:15:41:15:67 | new MiddleManyParams(...) | KotlinUser.kt:15:41:15:67 | MiddleManyParams | -3 | | KotlinUser.kt:15:41:15:67 | new MiddleManyParams(...) | KotlinUser.kt:15:58:15:61 | 1.0 | 0 | @@ -103,23 +103,23 @@ callArgs | KotlinUser.kt:15:89:15:99 | shortValue(...) | KotlinUser.kt:15:89:15:89 | 1 | -1 | | KotlinUser.kt:17:19:17:44 | returnsecond(...) | KotlinUser.kt:17:19:17:19 | a | -1 | | KotlinUser.kt:17:19:17:44 | returnsecond(...) | KotlinUser.kt:17:34:17:34 | 0 | 0 | -| KotlinUser.kt:17:19:17:44 | returnsecond(...) | KotlinUser.kt:17:38:17:42 | hello | 1 | +| KotlinUser.kt:17:19:17:44 | returnsecond(...) | KotlinUser.kt:17:38:17:42 | "hello" | 1 | | KotlinUser.kt:18:20:18:50 | returnsecond(...) | KotlinUser.kt:18:20:18:20 | a | -1 | | KotlinUser.kt:18:20:18:50 | returnsecond(...) | KotlinUser.kt:18:20:18:50 | Character | -2 | | KotlinUser.kt:18:20:18:50 | returnsecond(...) | KotlinUser.kt:18:35:18:35 | 0 | 0 | -| KotlinUser.kt:18:20:18:50 | returnsecond(...) | KotlinUser.kt:18:39:18:43 | hello | 1 | +| KotlinUser.kt:18:20:18:50 | returnsecond(...) | KotlinUser.kt:18:39:18:43 | "hello" | 1 | | KotlinUser.kt:18:20:18:50 | returnsecond(...) | KotlinUser.kt:18:47:18:49 | a | 2 | | KotlinUser.kt:19:19:19:31 | identity(...) | KotlinUser.kt:19:19:19:19 | b | -1 | | KotlinUser.kt:19:19:19:31 | identity(...) | KotlinUser.kt:19:30:19:30 | 5 | 0 | | KotlinUser.kt:20:20:20:39 | identity(...) | KotlinUser.kt:20:20:20:21 | b2 | -1 | -| KotlinUser.kt:20:20:20:39 | identity(...) | KotlinUser.kt:20:33:20:37 | hello | 0 | +| KotlinUser.kt:20:20:20:39 | identity(...) | KotlinUser.kt:20:33:20:37 | "hello" | 0 | | KotlinUser.kt:21:19:21:37 | identity(...) | KotlinUser.kt:21:19:21:19 | c | -1 | -| KotlinUser.kt:21:19:21:37 | identity(...) | KotlinUser.kt:21:31:21:35 | world | 0 | +| KotlinUser.kt:21:19:21:37 | identity(...) | KotlinUser.kt:21:31:21:35 | "world" | 0 | | KotlinUser.kt:22:19:22:39 | identity(...) | KotlinUser.kt:22:19:22:19 | d | -1 | -| KotlinUser.kt:22:19:22:39 | identity(...) | KotlinUser.kt:22:31:22:37 | goodbye | 0 | +| KotlinUser.kt:22:19:22:39 | identity(...) | KotlinUser.kt:22:31:22:37 | "goodbye" | 0 | | KotlinUser.kt:23:19:23:71 | returnSixth(...) | KotlinUser.kt:23:19:23:19 | e | -1 | | KotlinUser.kt:23:19:23:71 | returnSixth(...) | KotlinUser.kt:23:33:23:33 | 1 | 0 | -| KotlinUser.kt:23:19:23:71 | returnSixth(...) | KotlinUser.kt:23:37:23:41 | hello | 1 | +| KotlinUser.kt:23:19:23:71 | returnSixth(...) | KotlinUser.kt:23:37:23:41 | "hello" | 1 | | KotlinUser.kt:23:19:23:71 | returnSixth(...) | KotlinUser.kt:23:45:23:48 | 1.0 | 2 | | KotlinUser.kt:23:19:23:71 | returnSixth(...) | KotlinUser.kt:23:51:23:53 | 1.0 | 3 | | KotlinUser.kt:23:19:23:71 | returnSixth(...) | KotlinUser.kt:23:56:23:57 | 1 | 4 | diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/PrintAst.expected b/java/ql/integration-tests/linux-only/kotlin/custom_plugin/PrintAst.expected index 51186ef7b15f..6921b7541ad5 100644 --- a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/PrintAst.expected +++ b/java/ql/integration-tests/linux-only/kotlin/custom_plugin/PrintAst.expected @@ -50,7 +50,7 @@ d.kt: # 1| 1: [Class] D # 0| 2: [FieldDeclaration] String bar; # 0| -1: [TypeAccess] String -# 0| 0: [StringLiteral] Foobar +# 0| 0: [StringLiteral] "Foobar" # 1| 3: [Constructor] D # 1| 5: [BlockStmt] { ... } # 1| 0: [SuperConstructorInvocationStmt] super(...) diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/staticinit.expected b/java/ql/integration-tests/linux-only/kotlin/custom_plugin/staticinit.expected index 606bbd3f3381..092e8241a3d3 100644 --- a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/staticinit.expected +++ b/java/ql/integration-tests/linux-only/kotlin/custom_plugin/staticinit.expected @@ -1 +1 @@ -| d.kt:0:0:0:0 | bar | d.kt:0:0:0:0 | Foobar | +| d.kt:0:0:0:0 | bar | d.kt:0:0:0:0 | "Foobar" | diff --git a/java/ql/test/kotlin/library-tests/classes/PrintAst.expected b/java/ql/test/kotlin/library-tests/classes/PrintAst.expected index 698a4f874c9a..6f19fb37feee 100644 --- a/java/ql/test/kotlin/library-tests/classes/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/classes/PrintAst.expected @@ -138,14 +138,14 @@ classes.kt: # 39| 0: [ExprStmt] ; # 39| 0: [MethodAccess] f(...) # 39| -1: [TypeAccess] ClassesKt -# 39| 0: [StringLiteral] init1 +# 39| 0: [StringLiteral] "init1" # 42| 1: [ExprStmt] ; # 42| 0: [KtInitializerAssignExpr] ...=... # 42| 0: [VarAccess] x # 45| 2: [ExprStmt] ; # 45| 0: [MethodAccess] f(...) # 45| -1: [TypeAccess] ClassesKt -# 45| 0: [StringLiteral] init2 +# 45| 0: [StringLiteral] "init2" # 36| 2: [ExprStmt] ; # 36| 0: [MethodAccess] f(...) # 36| -1: [TypeAccess] ClassesKt @@ -1119,7 +1119,7 @@ local_anonymous.kt: # 40| 1: [BlockStmt] { ... } # 42| 0: [LocalVariableDeclStmt] var ...; # 42| 1: [LocalVariableDeclExpr] answer -# 42| 0: [StringLiteral] 42 +# 42| 0: [StringLiteral] "42" # 40| 1: [ExprStmt] ; # 40| 0: [ClassInstanceExpr] new (...) # 40| -3: [TypeAccess] Interface2 diff --git a/java/ql/test/kotlin/library-tests/collection-literals/PrintAst.expected b/java/ql/test/kotlin/library-tests/collection-literals/PrintAst.expected index 99312685a0ea..5a81043964b5 100644 --- a/java/ql/test/kotlin/library-tests/collection-literals/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/collection-literals/PrintAst.expected @@ -39,8 +39,8 @@ test.kt: # 1| 0: [VarAccess] p0 # 0| 1: [ArrayCreationExpr] new String[] # 0| -2: [ArrayInit] {...} -# 0| 0: [StringLiteral] hello -# 0| 1: [StringLiteral] world +# 0| 0: [StringLiteral] "hello" +# 0| 1: [StringLiteral] "world" # 0| -1: [TypeAccess] String # 0| 0: [IntegerLiteral] 2 # 1| 1: [IfStmt] if (...) diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/bbStmts.expected b/java/ql/test/kotlin/library-tests/controlflow/basic/bbStmts.expected index 4e0724fca1f2..b3f3c19341ff 100644 --- a/java/ql/test/kotlin/library-tests/controlflow/basic/bbStmts.expected +++ b/java/ql/test/kotlin/library-tests/controlflow/basic/bbStmts.expected @@ -155,7 +155,7 @@ | Test.kt:105:5:109:5 | ; | 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 | ; | -| Test.kt:105:20:107:5 | { ... } | 2 | Test.kt:106:18:106:27 | x not null | +| Test.kt:105:20:107:5 | { ... } | 2 | Test.kt:106:18:106:27 | "x not null" | | Test.kt:105:20:107:5 | { ... } | 3 | Test.kt:106:9:106:29 | println(...) | | Test.kt:107:16:109:5 | ... -> ... | 0 | Test.kt:107:16:109:5 | ... -> ... | | Test.kt:107:16:109:5 | ... -> ... | 1 | Test.kt:107:16:107:16 | y | @@ -163,7 +163,7 @@ | Test.kt:107:16:109:5 | ... -> ... | 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 | ; | -| Test.kt:107:27:109:5 | { ... } | 2 | Test.kt:108:18:108:27 | y not null | +| Test.kt:107:27:109:5 | { ... } | 2 | Test.kt:108:18:108:27 | "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 | { ... } | diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/getASuccessor.expected b/java/ql/test/kotlin/library-tests/controlflow/basic/getASuccessor.expected index bba6e9cbae79..ddd54d10b7b2 100644 --- a/java/ql/test/kotlin/library-tests/controlflow/basic/getASuccessor.expected +++ b/java/ql/test/kotlin/library-tests/controlflow/basic/getASuccessor.expected @@ -207,20 +207,20 @@ missingSuccessor | Test.kt:105:9:107:5 | ... -> ... | 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 | ; | ExprStmt | -| Test.kt:106:9:106:29 | ; | ExprStmt | Test.kt:106:18:106:27 | x not null | StringLiteral | +| Test.kt:106:9:106:29 | ; | ExprStmt | Test.kt:106:18:106:27 | "x not null" | StringLiteral | | Test.kt:106:9:106:29 | ConsoleKt | TypeAccess | file://:0:0:0:0 | | | | Test.kt:106:9:106:29 | println(...) | MethodAccess | Test.kt:100:1:110:1 | fn | Method | -| Test.kt:106:18:106:27 | x not null | StringLiteral | Test.kt:106:9:106:29 | println(...) | MethodAccess | +| Test.kt:106:18:106:27 | "x not null" | StringLiteral | Test.kt:106:9:106:29 | println(...) | MethodAccess | | 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:109:5 | ... -> ... | 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 | ; | ExprStmt | -| Test.kt:108:9:108:29 | ; | ExprStmt | Test.kt:108:18:108:27 | y not null | StringLiteral | +| Test.kt:108:9:108:29 | ; | ExprStmt | Test.kt:108:18:108:27 | "y not null" | StringLiteral | | Test.kt:108:9:108:29 | ConsoleKt | TypeAccess | file://:0:0:0:0 | | | | Test.kt:108:9:108:29 | println(...) | MethodAccess | Test.kt:100:1:110:1 | fn | Method | -| Test.kt:108:18:108:27 | y not null | StringLiteral | Test.kt:108:9:108:29 | println(...) | MethodAccess | +| Test.kt:108:18:108:27 | "y not null" | StringLiteral | Test.kt:108:9:108:29 | println(...) | MethodAccess | | Test.kt:112:1:116:1 | Unit | TypeAccess | file://:0:0:0:0 | | | | Test.kt:112:1:116:1 | fn | Method | file://:0:0:0:0 | | | | Test.kt:112:8:112:17 | boolean | TypeAccess | file://:0:0:0:0 | | | diff --git a/java/ql/test/kotlin/library-tests/data-classes/PrintAst.expected b/java/ql/test/kotlin/library-tests/data-classes/PrintAst.expected index d52888544dcb..7ea9b169c7c5 100644 --- a/java/ql/test/kotlin/library-tests/data-classes/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/data-classes/PrintAst.expected @@ -145,19 +145,19 @@ dc.kt: # 0| 5: [BlockStmt] { ... } # 0| 0: [ReturnStmt] return ... # 0| 0: [StringTemplateExpr] "..." -# 0| 0: [StringLiteral] ProtoMapValue( -# 0| 1: [StringLiteral] bytes= +# 0| 0: [StringLiteral] "ProtoMapValue(" +# 0| 1: [StringLiteral] "bytes=" # 0| 2: [MethodAccess] toString(...) # 0| -1: [TypeAccess] Arrays # 0| 0: [VarAccess] this.bytes # 0| -1: [ThisAccess] this -# 0| 3: [StringLiteral] , -# 0| 4: [StringLiteral] strs= +# 0| 3: [StringLiteral] ", " +# 0| 4: [StringLiteral] "strs=" # 0| 5: [MethodAccess] toString(...) # 0| -1: [TypeAccess] Arrays # 0| 0: [VarAccess] this.strs # 0| -1: [ThisAccess] this -# 0| 6: [StringLiteral] ) +# 0| 6: [StringLiteral] ")" # 1| 8: [Constructor] ProtoMapValue #-----| 4: (Parameters) # 1| 0: [Parameter] bytes diff --git a/java/ql/test/kotlin/library-tests/dataflow/foreach/test.expected b/java/ql/test/kotlin/library-tests/dataflow/foreach/test.expected index f204c12ebe28..7c7b382a9ad5 100644 --- a/java/ql/test/kotlin/library-tests/dataflow/foreach/test.expected +++ b/java/ql/test/kotlin/library-tests/dataflow/foreach/test.expected @@ -2,7 +2,7 @@ | C1.java:10:44:10:46 | "a" | C1.java:12:17:12:20 | ...[...] | | C1.java:10:44:10:46 | "a" | C1.java:15:20:15:23 | ...[...] | | C1.java:10:44:10:46 | "a" | C1.java:19:20:19:20 | s | -| C2.kt:8:32:8:32 | a | C2.kt:9:14:9:14 | l | -| C2.kt:8:32:8:32 | a | C2.kt:10:14:10:17 | ...[...] | -| C2.kt:8:32:8:32 | a | C2.kt:12:18:12:21 | ...[...] | -| C2.kt:8:32:8:32 | a | C2.kt:15:18:15:18 | s | +| C2.kt:8:32:8:32 | "a" | C2.kt:9:14:9:14 | l | +| C2.kt:8:32:8:32 | "a" | C2.kt:10:14:10:17 | ...[...] | +| C2.kt:8:32:8:32 | "a" | C2.kt:12:18:12:21 | ...[...] | +| C2.kt:8:32:8:32 | "a" | C2.kt:15:18:15:18 | s | diff --git a/java/ql/test/kotlin/library-tests/exprs/PrintAst.expected b/java/ql/test/kotlin/library-tests/exprs/PrintAst.expected index f821bdadd5bc..78bf583ec0d8 100644 --- a/java/ql/test/kotlin/library-tests/exprs/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/exprs/PrintAst.expected @@ -171,7 +171,7 @@ delegatedProperties.kt: # 7| 0: [ExprStmt] ; # 7| 0: [MethodAccess] println(...) # 7| -1: [TypeAccess] ConsoleKt -# 7| 0: [StringLiteral] init +# 7| 0: [StringLiteral] "init" # 8| 1: [ReturnStmt] return ... # 8| 0: [IntegerLiteral] 5 # 6| -3: [TypeAccess] Function0 @@ -2459,10 +2459,10 @@ exprs.kt: # 123| 0: [CharacterLiteral] x # 124| 106: [LocalVariableDeclStmt] var ...; # 124| 1: [LocalVariableDeclExpr] str -# 124| 0: [StringLiteral] string lit +# 124| 0: [StringLiteral] "string lit" # 125| 107: [LocalVariableDeclStmt] var ...; # 125| 1: [LocalVariableDeclExpr] strWithQuote -# 125| 0: [StringLiteral] string " lit +# 125| 0: [StringLiteral] "string \" lit" # 126| 108: [LocalVariableDeclStmt] var ...; # 126| 1: [LocalVariableDeclExpr] b6 # 126| 0: [InstanceOfExpr] ...instanceof... @@ -2480,34 +2480,34 @@ exprs.kt: # 128| 1: [VarAccess] b7 # 129| 111: [LocalVariableDeclStmt] var ...; # 129| 1: [LocalVariableDeclExpr] str1 -# 129| 0: [StringLiteral] string lit +# 129| 0: [StringLiteral] "string lit" # 130| 112: [LocalVariableDeclStmt] var ...; # 130| 1: [LocalVariableDeclExpr] str2 -# 130| 0: [StringLiteral] string lit +# 130| 0: [StringLiteral] "string lit" # 131| 113: [LocalVariableDeclStmt] var ...; # 131| 1: [LocalVariableDeclExpr] str3 # 131| 0: [NullLiteral] null # 132| 114: [LocalVariableDeclStmt] var ...; # 132| 1: [LocalVariableDeclExpr] str4 # 132| 0: [StringTemplateExpr] "..." -# 132| 0: [StringLiteral] foo +# 132| 0: [StringLiteral] "foo " # 132| 1: [VarAccess] str1 -# 132| 2: [StringLiteral] bar +# 132| 2: [StringLiteral] " bar " # 132| 3: [VarAccess] str2 -# 132| 4: [StringLiteral] baz +# 132| 4: [StringLiteral] " baz" # 133| 115: [LocalVariableDeclStmt] var ...; # 133| 1: [LocalVariableDeclExpr] str5 # 133| 0: [StringTemplateExpr] "..." -# 133| 0: [StringLiteral] foo +# 133| 0: [StringLiteral] "foo " # 133| 1: [AddExpr] ... + ... # 133| 0: [VarAccess] str1 # 133| 1: [VarAccess] str2 -# 133| 2: [StringLiteral] bar +# 133| 2: [StringLiteral] " bar " # 133| 3: [MethodAccess] stringPlus(...) # 133| -1: [TypeAccess] Intrinsics # 133| 0: [VarAccess] str2 # 133| 1: [VarAccess] str1 -# 133| 4: [StringLiteral] baz +# 133| 4: [StringLiteral] " baz" # 134| 116: [LocalVariableDeclStmt] var ...; # 134| 1: [LocalVariableDeclExpr] str6 # 134| 0: [AddExpr] ... + ... @@ -3531,12 +3531,12 @@ exprs.kt: # 215| 1: [LocalVariableDeclExpr] d0 # 215| 0: [MethodAccess] valueOf(...) # 215| -1: [TypeAccess] Color -# 215| 0: [StringLiteral] GREEN +# 215| 0: [StringLiteral] "GREEN" # 216| 8: [LocalVariableDeclStmt] var ...; # 216| 1: [LocalVariableDeclExpr] d1 # 216| 0: [MethodAccess] valueOf(...) # 216| -1: [TypeAccess] Color -# 216| 0: [StringLiteral] GREEN +# 216| 0: [StringLiteral] "GREEN" # 224| 11: [Class] SomeClass1 # 224| 1: [Constructor] SomeClass1 # 224| 5: [BlockStmt] { ... } @@ -4468,7 +4468,7 @@ funcExprs.kt: # 36| 0: [TypeAccess] int # 36| 5: [BlockStmt] { ... } # 36| 0: [ReturnStmt] return ... -# 36| 0: [StringLiteral] +# 36| 0: [StringLiteral] "" # 36| -3: [TypeAccess] FunctionN # 36| 0: [TypeAccess] String # 38| 14: [ExprStmt] ; @@ -5316,7 +5316,7 @@ funcExprs.kt: # 90| 0: [TypeAccess] int # 90| 5: [BlockStmt] { ... } # 90| 0: [ReturnStmt] return ... -# 90| 0: [StringLiteral] +# 90| 0: [StringLiteral] "" # 90| -3: [TypeAccess] FunctionN # 90| 0: [TypeAccess] String # 91| 5: [ExprStmt] ; @@ -5407,7 +5407,7 @@ funcExprs.kt: # 94| 0: [TypeAccess] int # 94| 5: [BlockStmt] { ... } # 94| 0: [ReturnStmt] return ... -# 94| 0: [StringLiteral] +# 94| 0: [StringLiteral] "" # 94| -3: [TypeAccess] Function22 # 94| 0: [TypeAccess] Integer # 94| 1: [TypeAccess] Integer @@ -5599,7 +5599,7 @@ funcExprs.kt: # 70| 0: [TypeAccess] int # 70| 5: [BlockStmt] { ... } # 70| 0: [ReturnStmt] return ... -# 70| 0: [StringLiteral] +# 70| 0: [StringLiteral] "" # 73| 4: [Class] Class3 # 73| 3: [Constructor] Class3 # 73| 5: [BlockStmt] { ... } @@ -5625,7 +5625,7 @@ funcExprs.kt: # 75| 0: [TypeAccess] Integer # 75| 5: [BlockStmt] { ... } # 75| 0: [ReturnStmt] return ... -# 75| 0: [StringLiteral] a +# 75| 0: [StringLiteral] "a" # 75| -3: [TypeAccess] Function1>,String> # 75| 0: [TypeAccess] Generic> # 75| 0: [TypeAccess] Generic @@ -6014,7 +6014,7 @@ samConversion.kt: # 7| 0: [ReturnStmt] return ... # 7| 0: [ValueEQExpr] ... (value equals) ... # 7| 0: [ExtensionReceiverAccess] this -# 7| 1: [StringLiteral] +# 7| 1: [StringLiteral] "" # 7| -3: [TypeAccess] Function2 # 7| 0: [TypeAccess] String # 7| 1: [TypeAccess] Integer @@ -7058,7 +7058,7 @@ whenExpr.kt: # 6| 1: [ThrowStmt] throw ... # 6| 0: [ClassInstanceExpr] new Exception(...) # 6| -3: [TypeAccess] Exception -# 6| 0: [StringLiteral] No threes please +# 6| 0: [StringLiteral] "No threes please" # 7| 4: [WhenBranch] ... -> ... # 7| 0: [BooleanLiteral] true # 7| 1: [ExprStmt] ; diff --git a/java/ql/test/kotlin/library-tests/exprs/binop.expected b/java/ql/test/kotlin/library-tests/exprs/binop.expected index 4c08b123a68e..f69701028d51 100644 --- a/java/ql/test/kotlin/library-tests/exprs/binop.expected +++ b/java/ql/test/kotlin/library-tests/exprs/binop.expected @@ -127,7 +127,7 @@ | localFunctionCalls.kt:5:25:5:29 | ... + ... | localFunctionCalls.kt:5:25:5:25 | i | localFunctionCalls.kt:5:29:5:29 | x | | samConversion.kt:2:33:2:38 | ... % ... | samConversion.kt:2:33:2:34 | it | samConversion.kt:2:38:2:38 | 2 | | samConversion.kt:2:33:2:43 | ... (value equals) ... | samConversion.kt:2:33:2:38 | ... % ... | samConversion.kt:2:43:2:43 | 0 | -| samConversion.kt:7:36:7:45 | ... (value equals) ... | samConversion.kt:7:36:7:39 | this | samConversion.kt:7:44:7:45 | | +| samConversion.kt:7:36:7:45 | ... (value equals) ... | samConversion.kt:7:36:7:39 | this | samConversion.kt:7:44:7:45 | "" | | samConversion.kt:10:18:10:22 | ... % ... | samConversion.kt:10:18:10:18 | j | samConversion.kt:10:22:10:22 | 2 | | samConversion.kt:10:18:10:27 | ... (value equals) ... | samConversion.kt:10:18:10:22 | ... % ... | samConversion.kt:10:27:10:27 | 0 | | samConversion.kt:12:18:12:22 | ... % ... | samConversion.kt:12:18:12:18 | j | samConversion.kt:12:22:12:22 | 2 | diff --git a/java/ql/test/kotlin/library-tests/exprs/exprs.expected b/java/ql/test/kotlin/library-tests/exprs/exprs.expected index 08a9891f64b2..4b8d200a1d72 100644 --- a/java/ql/test/kotlin/library-tests/exprs/exprs.expected +++ b/java/ql/test/kotlin/library-tests/exprs/exprs.expected @@ -51,7 +51,7 @@ | delegatedProperties.kt:6:32:9:9 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:7:13:7:27 | ConsoleKt | delegatedProperties.kt:6:32:9:9 | invoke | TypeAccess | | delegatedProperties.kt:7:13:7:27 | println(...) | delegatedProperties.kt:6:32:9:9 | invoke | MethodAccess | -| delegatedProperties.kt:7:22:7:25 | init | delegatedProperties.kt:6:32:9:9 | invoke | StringLiteral | +| delegatedProperties.kt:7:22:7:25 | "init" | delegatedProperties.kt:6:32:9:9 | invoke | StringLiteral | | delegatedProperties.kt:8:13:8:13 | 5 | delegatedProperties.kt:6:32:9:9 | invoke | IntegerLiteral | | delegatedProperties.kt:10:9:10:22 | ConsoleKt | delegatedProperties.kt:5:5:12:5 | fn | TypeAccess | | delegatedProperties.kt:10:9:10:22 | println(...) | delegatedProperties.kt:5:5:12:5 | fn | MethodAccess | @@ -1337,9 +1337,9 @@ | exprs.kt:123:5:123:15 | c | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | | exprs.kt:123:13:123:15 | x | exprs.kt:4:1:142:1 | topLevelMethod | CharacterLiteral | | exprs.kt:124:5:124:26 | str | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | -| exprs.kt:124:16:124:25 | string lit | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:124:16:124:25 | "string lit" | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:125:5:125:38 | strWithQuote | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | -| exprs.kt:125:25:125:37 | string " lit | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:125:25:125:37 | "string \\" lit" | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:126:5:126:22 | b6 | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | | exprs.kt:126:14:126:15 | i1 | exprs.kt:4:1:142:1 | topLevelMethod | VarAccess | | exprs.kt:126:14:126:22 | ...instanceof... | exprs.kt:4:1:142:1 | topLevelMethod | InstanceOfExpr | @@ -1353,30 +1353,30 @@ | exprs.kt:128:14:128:26 | (...)... | exprs.kt:4:1:142:1 | topLevelMethod | CastExpr | | exprs.kt:128:14:128:26 | boolean | exprs.kt:4:1:142:1 | topLevelMethod | TypeAccess | | exprs.kt:129:5:129:35 | str1 | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | -| exprs.kt:129:25:129:34 | string lit | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:129:25:129:34 | "string lit" | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:130:5:130:36 | str2 | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | -| exprs.kt:130:26:130:35 | string lit | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:130:26:130:35 | "string lit" | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:131:5:131:28 | str3 | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | | exprs.kt:131:25:131:28 | null | exprs.kt:4:1:142:1 | topLevelMethod | NullLiteral | | exprs.kt:132:5:132:48 | str4 | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | | exprs.kt:132:24:132:48 | "..." | exprs.kt:4:1:142:1 | topLevelMethod | StringTemplateExpr | -| exprs.kt:132:25:132:28 | foo | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:132:25:132:28 | "foo " | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:132:30:132:33 | str1 | exprs.kt:4:1:142:1 | topLevelMethod | VarAccess | -| exprs.kt:132:34:132:38 | bar | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:132:34:132:38 | " bar " | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:132:40:132:43 | str2 | exprs.kt:4:1:142:1 | topLevelMethod | VarAccess | -| exprs.kt:132:44:132:47 | baz | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:132:44:132:47 | " baz" | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:133:5:133:66 | str5 | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | | exprs.kt:133:24:133:66 | "..." | exprs.kt:4:1:142:1 | topLevelMethod | StringTemplateExpr | -| exprs.kt:133:25:133:28 | foo | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:133:25:133:28 | "foo " | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:133:31:133:34 | str1 | exprs.kt:4:1:142:1 | topLevelMethod | VarAccess | | exprs.kt:133:31:133:41 | ... + ... | exprs.kt:4:1:142:1 | topLevelMethod | AddExpr | | exprs.kt:133:38:133:41 | str2 | exprs.kt:4:1:142:1 | topLevelMethod | VarAccess | -| exprs.kt:133:43:133:47 | bar | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:133:43:133:47 | " bar " | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:133:50:133:53 | str2 | exprs.kt:4:1:142:1 | topLevelMethod | VarAccess | | exprs.kt:133:50:133:60 | Intrinsics | exprs.kt:4:1:142:1 | topLevelMethod | TypeAccess | | exprs.kt:133:50:133:60 | stringPlus(...) | exprs.kt:4:1:142:1 | topLevelMethod | MethodAccess | | exprs.kt:133:57:133:60 | str1 | exprs.kt:4:1:142:1 | topLevelMethod | VarAccess | -| exprs.kt:133:62:133:65 | baz | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | +| exprs.kt:133:62:133:65 | " baz" | exprs.kt:4:1:142:1 | topLevelMethod | StringLiteral | | exprs.kt:134:5:134:26 | str6 | exprs.kt:4:1:142:1 | topLevelMethod | LocalVariableDeclExpr | | exprs.kt:134:16:134:19 | str1 | exprs.kt:4:1:142:1 | topLevelMethod | VarAccess | | exprs.kt:134:16:134:26 | ... + ... | exprs.kt:4:1:142:1 | topLevelMethod | AddExpr | @@ -1605,11 +1605,11 @@ | exprs.kt:215:9:215:44 | d0 | exprs.kt:206:5:217:5 | x | LocalVariableDeclExpr | | exprs.kt:215:18:215:44 | Color | exprs.kt:206:5:217:5 | x | TypeAccess | | exprs.kt:215:18:215:44 | valueOf(...) | exprs.kt:206:5:217:5 | x | MethodAccess | -| exprs.kt:215:38:215:42 | GREEN | exprs.kt:206:5:217:5 | x | StringLiteral | +| exprs.kt:215:38:215:42 | "GREEN" | exprs.kt:206:5:217:5 | x | StringLiteral | | exprs.kt:216:9:216:39 | d1 | exprs.kt:206:5:217:5 | x | LocalVariableDeclExpr | | exprs.kt:216:24:216:39 | Color | exprs.kt:206:5:217:5 | x | TypeAccess | | exprs.kt:216:24:216:39 | valueOf(...) | exprs.kt:206:5:217:5 | x | MethodAccess | -| exprs.kt:216:33:216:37 | GREEN | exprs.kt:206:5:217:5 | x | StringLiteral | +| exprs.kt:216:33:216:37 | "GREEN" | exprs.kt:206:5:217:5 | x | StringLiteral | | exprs.kt:220:1:222:1 | Unit | file://:0:0:0:0 | | TypeAccess | | exprs.kt:221:5:221:10 | StandardKt | exprs.kt:220:1:222:1 | todo | TypeAccess | | exprs.kt:221:5:221:10 | TODO(...) | exprs.kt:220:1:222:1 | todo | MethodAccess | @@ -2730,7 +2730,7 @@ | funcExprs.kt:36:100:36:102 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:36:104:36:106 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:36:108:36:110 | int | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:36:115:36:116 | | funcExprs.kt:36:29:36:117 | invoke | StringLiteral | +| funcExprs.kt:36:115:36:116 | "" | funcExprs.kt:36:29:36:117 | invoke | StringLiteral | | funcExprs.kt:38:5:38:39 | FuncExprsKt | funcExprs.kt:21:1:52:1 | call | TypeAccess | | funcExprs.kt:38:5:38:39 | functionExpression0a(...) | funcExprs.kt:21:1:52:1 | call | MethodAccess | | funcExprs.kt:38:26:38:34 | FuncRef | funcExprs.kt:21:1:52:1 | call | TypeAccess | @@ -3231,7 +3231,7 @@ | funcExprs.kt:70:102:70:109 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:70:112:70:119 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:70:122:70:129 | int | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:70:134:70:135 | | funcExprs.kt:69:5:70:135 | f23 | StringLiteral | +| funcExprs.kt:70:134:70:135 | "" | funcExprs.kt:69:5:70:135 | f23 | StringLiteral | | funcExprs.kt:74:5:76:5 | Unit | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:75:9:75:22 | fn(...) | funcExprs.kt:74:5:76:5 | call | MethodAccess | | funcExprs.kt:75:9:75:22 | this | funcExprs.kt:74:5:76:5 | call | ThisAccess | @@ -3245,7 +3245,7 @@ | funcExprs.kt:75:14:75:14 | Generic> | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:75:14:75:14 | Generic | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:75:14:75:14 | Integer | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:75:20:75:20 | a | funcExprs.kt:75:12:75:22 | invoke | StringLiteral | +| funcExprs.kt:75:20:75:20 | "a" | funcExprs.kt:75:12:75:22 | invoke | StringLiteral | | funcExprs.kt:77:13:77:60 | Unit | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:77:20:77:55 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | funcExprs.kt:77:20:77:55 | Function1>,String> | file://:0:0:0:0 | | TypeAccess | @@ -3427,7 +3427,7 @@ | funcExprs.kt:90:57:90:57 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:90:59:90:59 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:90:61:90:61 | int | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:90:67:90:68 | | funcExprs.kt:90:15:90:69 | invoke | StringLiteral | +| funcExprs.kt:90:67:90:68 | "" | funcExprs.kt:90:15:90:69 | invoke | StringLiteral | | funcExprs.kt:91:5:91:6 | l3 | funcExprs.kt:82:9:96:1 | fn | VarAccess | | funcExprs.kt:91:5:91:60 | 23 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | | funcExprs.kt:91:5:91:60 | Object | funcExprs.kt:82:9:96:1 | fn | TypeAccess | @@ -3508,7 +3508,7 @@ | funcExprs.kt:94:55:94:55 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:94:57:94:57 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:94:59:94:59 | int | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:94:65:94:66 | | funcExprs.kt:94:15:94:67 | invoke | StringLiteral | +| funcExprs.kt:94:65:94:66 | "" | funcExprs.kt:94:15:94:67 | invoke | StringLiteral | | funcExprs.kt:95:5:95:6 | l4 | funcExprs.kt:82:9:96:1 | fn | VarAccess | | funcExprs.kt:95:5:95:58 | invoke(...) | funcExprs.kt:82:9:96:1 | fn | MethodAccess | | funcExprs.kt:95:8:95:58 | | funcExprs.kt:82:9:96:1 | fn | ImplicitCoercionToUnitExpr | @@ -3724,7 +3724,7 @@ | samConversion.kt:7:31:7:31 | int | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:7:36:7:39 | this | samConversion.kt:7:29:7:46 | invoke | ExtensionReceiverAccess | | samConversion.kt:7:36:7:45 | ... (value equals) ... | samConversion.kt:7:29:7:46 | invoke | ValueEQExpr | -| samConversion.kt:7:44:7:45 | | samConversion.kt:7:29:7:46 | invoke | StringLiteral | +| samConversion.kt:7:44:7:45 | "" | samConversion.kt:7:29:7:46 | invoke | StringLiteral | | samConversion.kt:9:5:13:6 | x | samConversion.kt:1:1:14:1 | main | LocalVariableDeclExpr | | samConversion.kt:9:13:13:6 | (...)... | samConversion.kt:1:1:14:1 | main | CastExpr | | samConversion.kt:9:13:13:6 | ...=... | samConversion.kt:9:13:13:6 | | AssignExpr | @@ -4379,6 +4379,6 @@ | whenExpr.kt:6:5:6:5 | tmp0_subject | whenExpr.kt:1:1:9:1 | testWhen | VarAccess | | whenExpr.kt:6:16:6:44 | Exception | whenExpr.kt:1:1:9:1 | testWhen | TypeAccess | | whenExpr.kt:6:16:6:44 | new Exception(...) | whenExpr.kt:1:1:9:1 | testWhen | ClassInstanceExpr | -| whenExpr.kt:6:27:6:42 | No threes please | whenExpr.kt:1:1:9:1 | testWhen | StringLiteral | +| whenExpr.kt:6:27:6:42 | "No threes please" | whenExpr.kt:1:1:9:1 | testWhen | StringLiteral | | whenExpr.kt:7:13:7:15 | 999 | whenExpr.kt:1:1:9:1 | testWhen | IntegerLiteral | | whenExpr.kt:7:13:7:15 | true | whenExpr.kt:1:1:9:1 | testWhen | BooleanLiteral | diff --git a/java/ql/test/kotlin/library-tests/exprs_typeaccess/PrintAst.expected b/java/ql/test/kotlin/library-tests/exprs_typeaccess/PrintAst.expected index 77b2fbb794e9..5af83a46a01b 100644 --- a/java/ql/test/kotlin/library-tests/exprs_typeaccess/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/exprs_typeaccess/PrintAst.expected @@ -27,7 +27,7 @@ A.kt: # 10| 2: [ExprStmt] ; # 10| 0: [MethodAccess] println(...) # 10| -1: [TypeAccess] ConsoleKt -# 10| 0: [StringLiteral] +# 10| 0: [StringLiteral] "" # 13| 6: [Method] getProp # 13| 3: [TypeAccess] int # 13| 5: [BlockStmt] { ... } diff --git a/java/ql/test/kotlin/library-tests/extensions/methodaccesses.expected b/java/ql/test/kotlin/library-tests/extensions/methodaccesses.expected index 03322ec3313c..4aa35cde90bf 100644 --- a/java/ql/test/kotlin/library-tests/extensions/methodaccesses.expected +++ b/java/ql/test/kotlin/library-tests/extensions/methodaccesses.expected @@ -1,20 +1,20 @@ | A.java:3:9:3:49 | someFun(...) | A.java:3:9:3:20 | ExtensionsKt | A.java:3:30:3:44 | new SomeClass(...) | | A.java:3:9:3:49 | someFun(...) | A.java:3:9:3:20 | ExtensionsKt | A.java:3:47:3:48 | "" | -| extensions.kt:21:5:21:38 | someClassMethod(...) | extensions.kt:21:5:21:15 | new SomeClass(...) | extensions.kt:21:34:21:36 | foo | +| extensions.kt:21:5:21:38 | someClassMethod(...) | extensions.kt:21:5:21:15 | new SomeClass(...) | extensions.kt:21:34:21:36 | "foo" | | extensions.kt:22:5:22:30 | someFun(...) | extensions.kt:22:5:22:30 | ExtensionsKt | extensions.kt:22:5:22:15 | new SomeClass(...) | -| extensions.kt:22:5:22:30 | someFun(...) | extensions.kt:22:5:22:30 | ExtensionsKt | extensions.kt:22:26:22:28 | foo | +| extensions.kt:22:5:22:30 | someFun(...) | extensions.kt:22:5:22:30 | ExtensionsKt | extensions.kt:22:26:22:28 | "foo" | | extensions.kt:23:5:23:30 | bothFun(...) | extensions.kt:23:5:23:30 | ExtensionsKt | extensions.kt:23:5:23:15 | new SomeClass(...) | -| extensions.kt:23:5:23:30 | bothFun(...) | extensions.kt:23:5:23:30 | ExtensionsKt | extensions.kt:23:26:23:28 | foo | +| extensions.kt:23:5:23:30 | bothFun(...) | extensions.kt:23:5:23:30 | ExtensionsKt | extensions.kt:23:26:23:28 | "foo" | | extensions.kt:24:5:24:35 | bothFunDiffTypes(...) | extensions.kt:24:5:24:35 | ExtensionsKt | extensions.kt:24:5:24:15 | new SomeClass(...) | | extensions.kt:24:5:24:35 | bothFunDiffTypes(...) | extensions.kt:24:5:24:35 | ExtensionsKt | extensions.kt:24:34:24:34 | 1 | -| extensions.kt:25:5:25:44 | anotherClassMethod(...) | extensions.kt:25:5:25:18 | new AnotherClass(...) | extensions.kt:25:40:25:42 | foo | +| extensions.kt:25:5:25:44 | anotherClassMethod(...) | extensions.kt:25:5:25:18 | new AnotherClass(...) | extensions.kt:25:40:25:42 | "foo" | | extensions.kt:26:5:26:36 | anotherFun(...) | extensions.kt:26:5:26:36 | ExtensionsKt | extensions.kt:26:5:26:18 | new AnotherClass(...) | -| extensions.kt:26:5:26:36 | anotherFun(...) | extensions.kt:26:5:26:36 | ExtensionsKt | extensions.kt:26:32:26:34 | foo | +| extensions.kt:26:5:26:36 | anotherFun(...) | extensions.kt:26:5:26:36 | ExtensionsKt | extensions.kt:26:32:26:34 | "foo" | | extensions.kt:27:5:27:33 | bothFun(...) | extensions.kt:27:5:27:33 | ExtensionsKt | extensions.kt:27:5:27:18 | new AnotherClass(...) | -| extensions.kt:27:5:27:33 | bothFun(...) | extensions.kt:27:5:27:33 | ExtensionsKt | extensions.kt:27:29:27:31 | foo | +| extensions.kt:27:5:27:33 | bothFun(...) | extensions.kt:27:5:27:33 | ExtensionsKt | extensions.kt:27:29:27:31 | "foo" | | extensions.kt:28:5:28:42 | bothFunDiffTypes(...) | extensions.kt:28:5:28:42 | ExtensionsKt | extensions.kt:28:5:28:18 | new AnotherClass(...) | -| extensions.kt:28:5:28:42 | bothFunDiffTypes(...) | extensions.kt:28:5:28:42 | ExtensionsKt | extensions.kt:28:38:28:40 | foo | -| extensions.kt:29:6:29:27 | bar(...) | extensions.kt:29:6:29:27 | ExtensionsKt | extensions.kt:29:6:29:15 | someString | -| extensions.kt:29:6:29:27 | bar(...) | extensions.kt:29:6:29:27 | ExtensionsKt | extensions.kt:29:23:29:25 | foo | -| extensions.kt:31:6:31:32 | baz(...) | extensions.kt:31:6:31:32 | new (...) | extensions.kt:31:6:31:15 | someString | -| extensions.kt:31:6:31:32 | baz(...) | extensions.kt:31:6:31:32 | new (...) | extensions.kt:31:23:31:30 | bazParam | +| extensions.kt:28:5:28:42 | bothFunDiffTypes(...) | extensions.kt:28:5:28:42 | ExtensionsKt | extensions.kt:28:38:28:40 | "foo" | +| extensions.kt:29:6:29:27 | bar(...) | extensions.kt:29:6:29:27 | ExtensionsKt | extensions.kt:29:6:29:15 | "someString" | +| extensions.kt:29:6:29:27 | bar(...) | extensions.kt:29:6:29:27 | ExtensionsKt | extensions.kt:29:23:29:25 | "foo" | +| extensions.kt:31:6:31:32 | baz(...) | extensions.kt:31:6:31:32 | new (...) | extensions.kt:31:6:31:15 | "someString" | +| extensions.kt:31:6:31:32 | baz(...) | extensions.kt:31:6:31:32 | new (...) | extensions.kt:31:23:31:30 | "bazParam" | diff --git a/java/ql/test/kotlin/library-tests/extensions/parameters.expected b/java/ql/test/kotlin/library-tests/extensions/parameters.expected index 5cb7e0986d34..65906e57dd2b 100644 --- a/java/ql/test/kotlin/library-tests/extensions/parameters.expected +++ b/java/ql/test/kotlin/library-tests/extensions/parameters.expected @@ -1,24 +1,24 @@ parametersWithArgs -| extensions.kt:3:25:3:34 | p1 | 0 | extensions.kt:21:34:21:36 | foo | -| extensions.kt:6:28:6:37 | p1 | 0 | extensions.kt:25:40:25:42 | foo | +| extensions.kt:3:25:3:34 | p1 | 0 | extensions.kt:21:34:21:36 | "foo" | +| extensions.kt:6:28:6:37 | p1 | 0 | extensions.kt:25:40:25:42 | "foo" | | extensions.kt:9:5:9:13 | | 0 | A.java:3:30:3:44 | new SomeClass(...) | | extensions.kt:9:5:9:13 | | 0 | extensions.kt:22:5:22:15 | new SomeClass(...) | | extensions.kt:9:23:9:32 | p1 | 1 | A.java:3:47:3:48 | "" | -| extensions.kt:9:23:9:32 | p1 | 1 | extensions.kt:22:26:22:28 | foo | +| extensions.kt:9:23:9:32 | p1 | 1 | extensions.kt:22:26:22:28 | "foo" | | extensions.kt:10:5:10:16 | | 0 | extensions.kt:26:5:26:18 | new AnotherClass(...) | -| extensions.kt:10:29:10:38 | p1 | 1 | extensions.kt:26:32:26:34 | foo | +| extensions.kt:10:29:10:38 | p1 | 1 | extensions.kt:26:32:26:34 | "foo" | | extensions.kt:12:5:12:13 | | 0 | extensions.kt:23:5:23:15 | new SomeClass(...) | -| extensions.kt:12:23:12:32 | p1 | 1 | extensions.kt:23:26:23:28 | foo | +| extensions.kt:12:23:12:32 | p1 | 1 | extensions.kt:23:26:23:28 | "foo" | | extensions.kt:13:5:13:16 | | 0 | extensions.kt:27:5:27:18 | new AnotherClass(...) | -| extensions.kt:13:26:13:35 | p1 | 1 | extensions.kt:27:29:27:31 | foo | +| extensions.kt:13:26:13:35 | p1 | 1 | extensions.kt:27:29:27:31 | "foo" | | extensions.kt:15:5:15:13 | | 0 | extensions.kt:24:5:24:15 | new SomeClass(...) | | extensions.kt:15:32:15:38 | p1 | 1 | extensions.kt:24:34:24:34 | 1 | | extensions.kt:16:5:16:16 | | 0 | extensions.kt:28:5:28:18 | new AnotherClass(...) | -| extensions.kt:16:35:16:44 | p1 | 1 | extensions.kt:28:38:28:40 | foo | -| extensions.kt:18:5:18:10 | | 0 | extensions.kt:29:6:29:15 | someString | -| extensions.kt:18:16:18:25 | p1 | 1 | extensions.kt:29:23:29:25 | foo | -| extensions.kt:30:9:30:14 | | 0 | extensions.kt:31:6:31:15 | someString | -| extensions.kt:30:20:30:29 | p1 | 1 | extensions.kt:31:23:31:30 | bazParam | +| extensions.kt:16:35:16:44 | p1 | 1 | extensions.kt:28:38:28:40 | "foo" | +| extensions.kt:18:5:18:10 | | 0 | extensions.kt:29:6:29:15 | "someString" | +| extensions.kt:18:16:18:25 | p1 | 1 | extensions.kt:29:23:29:25 | "foo" | +| extensions.kt:30:9:30:14 | | 0 | extensions.kt:31:6:31:15 | "someString" | +| extensions.kt:30:20:30:29 | p1 | 1 | extensions.kt:31:23:31:30 | "bazParam" | extensionParameter | extensions.kt:9:5:9:13 | | | extensions.kt:10:5:10:16 | | diff --git a/java/ql/test/kotlin/library-tests/generic-inner-classes/test.expected b/java/ql/test/kotlin/library-tests/generic-inner-classes/test.expected index deed53a7269c..8b6a502898e9 100644 --- a/java/ql/test/kotlin/library-tests/generic-inner-classes/test.expected +++ b/java/ql/test/kotlin/library-tests/generic-inner-classes/test.expected @@ -2,11 +2,11 @@ callArgs | KotlinUser.kt:7:13:7:31 | new OuterGeneric(...) | KotlinUser.kt:7:13:7:31 | OuterGeneric | -3 | | KotlinUser.kt:7:33:7:61 | new InnerGeneric(...) | KotlinUser.kt:7:13:7:31 | new OuterGeneric(...) | -2 | | KotlinUser.kt:7:33:7:61 | new InnerGeneric(...) | KotlinUser.kt:7:33:7:61 | InnerGeneric | -3 | -| KotlinUser.kt:7:33:7:61 | new InnerGeneric(...) | KotlinUser.kt:7:55:7:59 | hello | 0 | +| KotlinUser.kt:7:33:7:61 | new InnerGeneric(...) | KotlinUser.kt:7:55:7:59 | "hello" | 0 | | KotlinUser.kt:8:14:8:32 | new OuterGeneric(...) | KotlinUser.kt:8:14:8:32 | OuterGeneric | -3 | | KotlinUser.kt:8:34:8:54 | new InnerGeneric(...) | KotlinUser.kt:8:14:8:32 | new OuterGeneric(...) | -2 | | KotlinUser.kt:8:34:8:54 | new InnerGeneric(...) | KotlinUser.kt:8:34:8:54 | InnerGeneric | -3 | -| KotlinUser.kt:8:34:8:54 | new InnerGeneric(...) | KotlinUser.kt:8:48:8:52 | hello | 0 | +| KotlinUser.kt:8:34:8:54 | new InnerGeneric(...) | KotlinUser.kt:8:48:8:52 | "hello" | 0 | | KotlinUser.kt:9:13:9:31 | new OuterGeneric(...) | KotlinUser.kt:9:13:9:31 | OuterGeneric | -3 | | KotlinUser.kt:9:33:9:49 | new InnerNotGeneric<>(...) | KotlinUser.kt:9:13:9:31 | new OuterGeneric(...) | -2 | | KotlinUser.kt:9:33:9:49 | new InnerNotGeneric<>(...) | KotlinUser.kt:9:33:9:49 | InnerNotGeneric<> | -3 | @@ -15,11 +15,11 @@ callArgs | KotlinUser.kt:10:31:10:52 | new InnerGeneric(...) | KotlinUser.kt:10:31:10:52 | InnerGeneric | -3 | | KotlinUser.kt:12:19:12:44 | returnsecond(...) | KotlinUser.kt:12:19:12:19 | a | -1 | | KotlinUser.kt:12:19:12:44 | returnsecond(...) | KotlinUser.kt:12:34:12:34 | 0 | 0 | -| KotlinUser.kt:12:19:12:44 | returnsecond(...) | KotlinUser.kt:12:38:12:42 | hello | 1 | +| KotlinUser.kt:12:19:12:44 | returnsecond(...) | KotlinUser.kt:12:38:12:42 | "hello" | 1 | | KotlinUser.kt:13:19:13:31 | identity(...) | KotlinUser.kt:13:19:13:19 | b | -1 | | KotlinUser.kt:13:19:13:31 | identity(...) | KotlinUser.kt:13:30:13:30 | 5 | 0 | | KotlinUser.kt:14:19:14:37 | identity(...) | KotlinUser.kt:14:19:14:19 | c | -1 | -| KotlinUser.kt:14:19:14:37 | identity(...) | KotlinUser.kt:14:31:14:35 | world | 0 | +| KotlinUser.kt:14:19:14:37 | identity(...) | KotlinUser.kt:14:31:14:35 | "world" | 0 | genericTypes | OuterGeneric.kt:3:1:21:1 | OuterGeneric | OuterGeneric.kt:3:27:3:27 | T | | OuterGeneric.kt:11:3:19:3 | InnerGeneric | OuterGeneric.kt:11:35:11:35 | S | diff --git a/java/ql/test/kotlin/library-tests/generics/PrintAst.expected b/java/ql/test/kotlin/library-tests/generics/PrintAst.expected index 619ba5f3bccd..2c3b395f4f1f 100644 --- a/java/ql/test/kotlin/library-tests/generics/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/generics/PrintAst.expected @@ -45,18 +45,18 @@ generics.kt: # 27| 0: [MethodAccess] f2(...) # 27| -2: [TypeAccess] String # 27| -1: [VarAccess] c1 -# 27| 0: [StringLiteral] +# 27| 0: [StringLiteral] "" # 28| 3: [LocalVariableDeclStmt] var ...; # 28| 1: [LocalVariableDeclExpr] c2 # 28| 0: [ClassInstanceExpr] new C1(...) # 28| -3: [TypeAccess] C1 # 28| 0: [TypeAccess] String # 28| 1: [TypeAccess] Integer -# 28| 0: [StringLiteral] +# 28| 0: [StringLiteral] "" # 29| 4: [ExprStmt] ; # 29| 0: [MethodAccess] f1(...) # 29| -1: [VarAccess] c2 -# 29| 0: [StringLiteral] a +# 29| 0: [StringLiteral] "a" # 30| 5: [LocalVariableDeclStmt] var ...; # 30| 1: [LocalVariableDeclExpr] x2 # 30| 0: [MethodAccess] f2(...) @@ -256,4 +256,4 @@ generics.kt: # 61| -3: [TypeAccess] Local # 61| 0: [TypeAccess] Integer # 61| 0: [VarAccess] t -# 61| 1: [StringLiteral] +# 61| 1: [StringLiteral] "" diff --git a/java/ql/test/kotlin/library-tests/java-map-methods/PrintAst.expected b/java/ql/test/kotlin/library-tests/java-map-methods/PrintAst.expected index 978c4777b096..e356679e208a 100644 --- a/java/ql/test/kotlin/library-tests/java-map-methods/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/java-map-methods/PrintAst.expected @@ -45,7 +45,7 @@ test.kt: # 9| 0: [ReturnStmt] return ... # 9| 0: [AddExpr] ... + ... # 9| 0: [VarAccess] s -# 9| 1: [StringLiteral] +# 9| 1: [StringLiteral] "" # 10| 5: [Method] fn2 # 10| 3: [TypeAccess] String #-----| 4: (Parameters) @@ -55,7 +55,7 @@ test.kt: # 10| 0: [ReturnStmt] return ... # 10| 0: [AddExpr] ... + ... # 10| 0: [VarAccess] s -# 10| 1: [StringLiteral] +# 10| 1: [StringLiteral] "" # 12| 6: [Method] fn1 # 12| 3: [TypeAccess] int #-----| 4: (Parameters) diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads-annotation/PrintAst.expected b/java/ql/test/kotlin/library-tests/jvmoverloads-annotation/PrintAst.expected index 6dfd45e83f4f..a1d0808d7a9d 100644 --- a/java/ql/test/kotlin/library-tests/jvmoverloads-annotation/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/jvmoverloads-annotation/PrintAst.expected @@ -5,7 +5,7 @@ test.kt: # 1| 3: [TypeAccess] String # 1| 5: [BlockStmt] { ... } # 1| 0: [ReturnStmt] return ... -# 1| 0: [StringLiteral] Hello world +# 1| 0: [StringLiteral] "Hello world" # 45| 2: [ExtensionMethod] testExtensionFunction # 45| 3: [TypeAccess] int #-----| 4: (Parameters) @@ -929,7 +929,7 @@ test.kt: # 30| 1: [ExprStmt] ; # 30| 0: [AssignExpr] ...=... # 30| 0: [VarAccess] p2 -# 30| 1: [StringLiteral] Hello world +# 30| 1: [StringLiteral] "Hello world" # 30| 2: [ThisConstructorInvocationStmt] this(...) # 30| 0: [VarAccess] p0 # 30| 1: [VarAccess] p1 @@ -1024,7 +1024,7 @@ test.kt: # 33| 1: [ExprStmt] ; # 33| 0: [AssignExpr] ...=... # 33| 0: [VarAccess] p3 -# 33| 1: [StringLiteral] Hello world +# 33| 1: [StringLiteral] "Hello world" # 33| 2: [ReturnStmt] return ... # 33| 0: [MethodAccess] testMemberFunction(...) # 33| -1: [VarAccess] p0 @@ -1049,7 +1049,7 @@ test.kt: # 37| -1: [VarAccess] spec1 # 37| 0: [IntegerLiteral] 1 # 37| 1: [FloatLiteral] 1.0 -# 37| 2: [StringLiteral] Hello world +# 37| 2: [StringLiteral] "Hello world" # 37| 3: [FloatLiteral] 2.0 # 38| 1: [ExprStmt] ; # 38| 0: [ImplicitCoercionToUnitExpr] @@ -1058,5 +1058,5 @@ test.kt: # 38| -1: [VarAccess] spec2 # 38| 0: [IntegerLiteral] 1 # 38| 1: [DoubleLiteral] 1.0 -# 38| 2: [StringLiteral] Hello world +# 38| 2: [StringLiteral] "Hello world" # 38| 3: [DoubleLiteral] 2.0 diff --git a/java/ql/test/kotlin/library-tests/jvmstatic-annotation/PrintAst.expected b/java/ql/test/kotlin/library-tests/jvmstatic-annotation/PrintAst.expected index 6386ec036fbc..1db0b09adc0b 100644 --- a/java/ql/test/kotlin/library-tests/jvmstatic-annotation/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/jvmstatic-annotation/PrintAst.expected @@ -81,13 +81,13 @@ test.kt: # 52| 0: [TypeAccess] Unit # 52| 1: [MethodAccess] staticMethod(...) # 52| -1: [VarAccess] Companion -# 52| 0: [StringLiteral] 1 +# 52| 0: [StringLiteral] "1" # 53| 1: [ExprStmt] ; # 53| 0: [ImplicitCoercionToUnitExpr] # 53| 0: [TypeAccess] Unit # 53| 1: [MethodAccess] nonStaticMethod(...) # 53| -1: [VarAccess] Companion -# 53| 0: [StringLiteral] 2 +# 53| 0: [StringLiteral] "2" # 54| 2: [ExprStmt] ; # 54| 0: [MethodAccess] setStaticProp(...) # 54| -1: [VarAccess] Companion @@ -113,13 +113,13 @@ test.kt: # 60| 0: [TypeAccess] Unit # 60| 1: [MethodAccess] staticMethod(...) # 60| -1: [TypeAccess] NonCompanion -# 60| 0: [StringLiteral] 1 +# 60| 0: [StringLiteral] "1" # 61| 7: [ExprStmt] ; # 61| 0: [ImplicitCoercionToUnitExpr] # 61| 0: [TypeAccess] Unit # 61| 1: [MethodAccess] nonStaticMethod(...) # 61| -1: [VarAccess] INSTANCE -# 61| 0: [StringLiteral] 2 +# 61| 0: [StringLiteral] "2" # 62| 8: [ExprStmt] ; # 62| 0: [MethodAccess] setStaticProp(...) # 62| -1: [TypeAccess] NonCompanion @@ -182,7 +182,7 @@ test.kt: # 14| 0: [VarAccess] s # 16| 4: [FieldDeclaration] String staticProp; # 16| -1: [TypeAccess] String -# 16| 0: [StringLiteral] a +# 16| 0: [StringLiteral] "a" # 16| 5: [Method] getStaticProp #-----| 1: (Annotations) # 16| 3: [TypeAccess] String @@ -204,7 +204,7 @@ test.kt: # 16| 1: [VarAccess] # 17| 7: [FieldDeclaration] String nonStaticProp; # 17| -1: [TypeAccess] String -# 17| 0: [StringLiteral] b +# 17| 0: [StringLiteral] "b" # 17| 8: [Method] getNonStaticProp #-----| 1: (Annotations) # 17| 3: [TypeAccess] String @@ -353,7 +353,7 @@ test.kt: # 34| 0: [VarAccess] s # 36| 5: [FieldDeclaration] String staticProp; # 36| -1: [TypeAccess] String -# 36| 0: [StringLiteral] a +# 36| 0: [StringLiteral] "a" # 36| 6: [Method] getStaticProp #-----| 1: (Annotations) # 36| 3: [TypeAccess] String @@ -377,7 +377,7 @@ test.kt: # 36| 1: [VarAccess] # 37| 8: [FieldDeclaration] String nonStaticProp; # 37| -1: [TypeAccess] String -# 37| 0: [StringLiteral] b +# 37| 0: [StringLiteral] "b" # 37| 9: [Method] getNonStaticProp #-----| 1: (Annotations) # 37| 3: [TypeAccess] String diff --git a/java/ql/test/kotlin/library-tests/lateinit/PrintAst.expected b/java/ql/test/kotlin/library-tests/lateinit/PrintAst.expected index c2119ec61233..9f482ab3b713 100644 --- a/java/ql/test/kotlin/library-tests/lateinit/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/lateinit/PrintAst.expected @@ -30,7 +30,7 @@ test.kt: # 4| 0: [ReturnStmt] return ... # 4| 0: [MethodAccess] println(...) # 4| -1: [TypeAccess] ConsoleKt -# 4| 0: [StringLiteral] a +# 4| 0: [StringLiteral] "a" # 6| 6: [Method] init # 6| 3: [TypeAccess] LateInit # 6| 5: [BlockStmt] { ... } diff --git a/java/ql/test/kotlin/library-tests/literals/literals.expected b/java/ql/test/kotlin/library-tests/literals/literals.expected index 86d23aa0d057..a22709ce194a 100644 --- a/java/ql/test/kotlin/library-tests/literals/literals.expected +++ b/java/ql/test/kotlin/library-tests/literals/literals.expected @@ -23,7 +23,7 @@ | literals.kt:25:34:25:39 | -123.4 | DoubleLiteral | | literals.kt:26:30:26:32 | c | CharacterLiteral | | literals.kt:27:30:27:33 | \n | CharacterLiteral | -| literals.kt:28:34:28:35 | | StringLiteral | -| literals.kt:29:35:29:45 | Some string | StringLiteral | -| literals.kt:30:35:30:46 | Some\nstring | StringLiteral | +| literals.kt:28:34:28:35 | "" | StringLiteral | +| literals.kt:29:35:29:45 | "Some string" | StringLiteral | +| literals.kt:30:35:30:46 | "Some\\nstring" | StringLiteral | | literals.kt:31:30:31:33 | null | NullLiteral | diff --git a/java/ql/test/kotlin/library-tests/methods/exprs.expected b/java/ql/test/kotlin/library-tests/methods/exprs.expected index 76a48c189c44..6d2221b5baed 100644 --- a/java/ql/test/kotlin/library-tests/methods/exprs.expected +++ b/java/ql/test/kotlin/library-tests/methods/exprs.expected @@ -17,10 +17,13 @@ | dataClass.kt:0:0:0:0 | 1 | IntegerLiteral | | dataClass.kt:0:0:0:0 | 2 | IntegerLiteral | | dataClass.kt:0:0:0:0 | 31 | IntegerLiteral | +| dataClass.kt:0:0:0:0 | ")" | StringLiteral | +| dataClass.kt:0:0:0:0 | ", " | StringLiteral | | dataClass.kt:0:0:0:0 | "..." | StringTemplateExpr | +| dataClass.kt:0:0:0:0 | "DataClass(" | StringLiteral | +| dataClass.kt:0:0:0:0 | "x=" | StringLiteral | +| dataClass.kt:0:0:0:0 | "y=" | StringLiteral | | dataClass.kt:0:0:0:0 | (...)... | CastExpr | -| dataClass.kt:0:0:0:0 | ) | StringLiteral | -| dataClass.kt:0:0:0:0 | , | StringLiteral | | dataClass.kt:0:0:0:0 | ... !is ... | NotInstanceOfExpr | | dataClass.kt:0:0:0:0 | ... & ... | AndBitwiseExpr | | dataClass.kt:0:0:0:0 | ... & ... | AndBitwiseExpr | @@ -40,7 +43,6 @@ | dataClass.kt:0:0:0:0 | DataClass | TypeAccess | | dataClass.kt:0:0:0:0 | DataClass | TypeAccess | | dataClass.kt:0:0:0:0 | DataClass | TypeAccess | -| dataClass.kt:0:0:0:0 | DataClass( | StringLiteral | | dataClass.kt:0:0:0:0 | Object | TypeAccess | | dataClass.kt:0:0:0:0 | Object | TypeAccess | | dataClass.kt:0:0:0:0 | String | TypeAccess | @@ -105,9 +107,7 @@ | dataClass.kt:0:0:0:0 | when ... | WhenExpr | | dataClass.kt:0:0:0:0 | when ... | WhenExpr | | dataClass.kt:0:0:0:0 | x | VarAccess | -| dataClass.kt:0:0:0:0 | x= | StringLiteral | | dataClass.kt:0:0:0:0 | y | VarAccess | -| dataClass.kt:0:0:0:0 | y= | StringLiteral | | dataClass.kt:1:22:1:31 | ...=... | KtInitializerAssignExpr | | dataClass.kt:1:22:1:31 | int | TypeAccess | | dataClass.kt:1:22:1:31 | int | TypeAccess | @@ -204,7 +204,7 @@ | delegates.kt:8:35:11:5 | | VarAccess | | delegates.kt:8:35:11:5 | String | TypeAccess | | delegates.kt:8:35:11:5 | observable(...) | MethodAccess | -| delegates.kt:8:57:8:62 | | StringLiteral | +| delegates.kt:8:57:8:62 | "" | StringLiteral | | delegates.kt:8:66:11:5 | ...->... | LambdaExpr | | delegates.kt:8:66:11:5 | Function3,String,String,Unit> | TypeAccess | | delegates.kt:8:66:11:5 | KProperty | TypeAccess | @@ -219,9 +219,9 @@ | delegates.kt:10:9:10:37 | ConsoleKt | TypeAccess | | delegates.kt:10:9:10:37 | println(...) | MethodAccess | | delegates.kt:10:17:10:36 | "..." | StringTemplateExpr | -| delegates.kt:10:18:10:21 | Was | StringLiteral | +| delegates.kt:10:18:10:21 | "Was " | StringLiteral | | delegates.kt:10:23:10:25 | old | VarAccess | -| delegates.kt:10:26:10:31 | , now | StringLiteral | +| delegates.kt:10:26:10:31 | ", now " | StringLiteral | | delegates.kt:10:33:10:35 | new | VarAccess | | enumClass.kt:0:0:0:0 | EnumClass | TypeAccess | | enumClass.kt:0:0:0:0 | EnumClass | TypeAccess | diff --git a/java/ql/test/kotlin/library-tests/operator-overloads/PrintAst.expected b/java/ql/test/kotlin/library-tests/operator-overloads/PrintAst.expected index af62c3e412e5..46fd70318ad9 100644 --- a/java/ql/test/kotlin/library-tests/operator-overloads/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/operator-overloads/PrintAst.expected @@ -59,7 +59,7 @@ test.kt: # 10| 0: [TypeAccess] int # 10| 5: [BlockStmt] { ... } # 10| 0: [ReturnStmt] return ... -# 10| 0: [StringLiteral] +# 10| 0: [StringLiteral] "" # 11| 3: [ExtensionMethod] set # 11| 3: [TypeAccess] String #-----| 4: (Parameters) @@ -73,7 +73,7 @@ test.kt: # 11| 0: [TypeAccess] int # 11| 5: [BlockStmt] { ... } # 11| 0: [ReturnStmt] return ... -# 11| 0: [StringLiteral] +# 11| 0: [StringLiteral] "" # 12| 4: [ExtensionMethod] set # 12| 3: [TypeAccess] String #-----| 4: (Parameters) @@ -85,7 +85,7 @@ test.kt: # 12| 0: [TypeAccess] C # 12| 5: [BlockStmt] { ... } # 12| 0: [ReturnStmt] return ... -# 12| 0: [StringLiteral] +# 12| 0: [StringLiteral] "" # 15| 2: [Class] C # 15| 1: [Constructor] C # 15| 5: [BlockStmt] { ... } @@ -100,4 +100,4 @@ test.kt: # 16| 0: [TypeAccess] int # 16| 5: [BlockStmt] { ... } # 16| 0: [ReturnStmt] return ... -# 16| 0: [StringLiteral] +# 16| 0: [StringLiteral] "" diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/PrintAst.expected b/java/ql/test/kotlin/library-tests/parameter-defaults/PrintAst.expected index a769bc397ee3..972e826cdca9 100644 --- a/java/ql/test/kotlin/library-tests/parameter-defaults/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/parameter-defaults/PrintAst.expected @@ -56,7 +56,7 @@ test.kt: # 184| 1: [ExprStmt] ; # 184| 0: [AssignExpr] ...=... # 184| 0: [VarAccess] p0 -# 184| 1: [StringLiteral] before-vararg-default sunk +# 184| 1: [StringLiteral] "before-vararg-default sunk" # 184| 1: [IfStmt] if (...) # 184| 0: [EQExpr] ... == ... # 184| 0: [AndBitwiseExpr] ... & ... @@ -68,8 +68,8 @@ test.kt: # 184| 0: [VarAccess] p1 # 184| 1: [ArrayCreationExpr] new String[] # 184| -2: [ArrayInit] {...} -# 184| 0: [StringLiteral] first-vararg-default sunk -# 184| 1: [StringLiteral] second-vararg-default sunk +# 184| 0: [StringLiteral] "first-vararg-default sunk" +# 184| 1: [StringLiteral] "second-vararg-default sunk" # 184| -1: [TypeAccess] String # 184| 0: [IntegerLiteral] 2 # 184| 2: [IfStmt] if (...) @@ -81,7 +81,7 @@ test.kt: # 184| 1: [ExprStmt] ; # 184| 0: [AssignExpr] ...=... # 184| 0: [VarAccess] p2 -# 184| 1: [StringLiteral] after-vararg-default sunk +# 184| 1: [StringLiteral] "after-vararg-default sunk" # 184| 3: [ReturnStmt] return ... # 184| 0: [MethodAccess] varargsTest(...) # 184| -1: [TypeAccess] TestKt @@ -102,7 +102,7 @@ test.kt: # 192| 1: [ExprStmt] ; # 192| 0: [MethodAccess] varargsTest$default(...) # 192| -1: [TypeAccess] TestKt -# 192| 0: [StringLiteral] no-varargs-before, no-z-parameter sunk +# 192| 0: [StringLiteral] "no-varargs-before, no-z-parameter sunk" # 1| 1: [NullLiteral] null # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 1 @@ -110,32 +110,32 @@ test.kt: # 193| 2: [ExprStmt] ; # 193| 0: [MethodAccess] varargsTest$default(...) # 193| -1: [TypeAccess] TestKt -# 193| 0: [StringLiteral] no-varargs-before sunk +# 193| 0: [StringLiteral] "no-varargs-before sunk" # 1| 1: [NullLiteral] null -# 193| 2: [StringLiteral] no-varargs-after sunk +# 193| 2: [StringLiteral] "no-varargs-after sunk" # 1| 3: [IntegerLiteral] 5 # 1| 4: [NullLiteral] null # 194| 3: [ExprStmt] ; # 194| 0: [MethodAccess] varargsTest(...) # 194| -1: [TypeAccess] TestKt -# 194| 0: [StringLiteral] one-vararg-before sunk -# 194| 1: [StringLiteral] one-vararg sunk -# 194| 2: [StringLiteral] one-vararg-after sunk +# 194| 0: [StringLiteral] "one-vararg-before sunk" +# 194| 1: [StringLiteral] "one-vararg sunk" +# 194| 2: [StringLiteral] "one-vararg-after sunk" # 195| 4: [ExprStmt] ; # 195| 0: [MethodAccess] varargsTest(...) # 195| -1: [TypeAccess] TestKt -# 195| 0: [StringLiteral] two-varargs-before sunk -# 195| 1: [StringLiteral] two-vararg-first sunk -# 195| 2: [StringLiteral] two-vararg-second sunk -# 195| 3: [StringLiteral] two-varargs-after sunk +# 195| 0: [StringLiteral] "two-varargs-before sunk" +# 195| 1: [StringLiteral] "two-vararg-first sunk" +# 195| 2: [StringLiteral] "two-vararg-second sunk" +# 195| 3: [StringLiteral] "two-varargs-after sunk" # 196| 5: [ExprStmt] ; # 196| 0: [MethodAccess] varargsTest$default(...) # 196| -1: [TypeAccess] TestKt -# 196| 0: [StringLiteral] no-z-parmeter sunk +# 196| 0: [StringLiteral] "no-z-parmeter sunk" # 196| 1: [ArrayCreationExpr] new String[] # 196| -2: [ArrayInit] {...} -# 196| 0: [StringLiteral] no-z-parameter first vararg sunk -# 196| 1: [StringLiteral] no-z-parameter second vararg sunk +# 196| 0: [StringLiteral] "no-z-parameter first vararg sunk" +# 196| 1: [StringLiteral] "no-z-parameter second vararg sunk" # 196| -1: [TypeAccess] String # 196| 0: [IntegerLiteral] 2 # 1| 2: [NullLiteral] null @@ -182,7 +182,7 @@ test.kt: # 199| 1: [ExprStmt] ; # 199| 0: [AssignExpr] ...=... # 199| 0: [VarAccess] p0 -# 199| 1: [StringLiteral] before-vararg-default not sunk 2 +# 199| 1: [StringLiteral] "before-vararg-default not sunk 2" # 199| 1: [IfStmt] if (...) # 199| 0: [EQExpr] ... == ... # 199| 0: [AndBitwiseExpr] ... & ... @@ -194,8 +194,8 @@ test.kt: # 199| 0: [VarAccess] p1 # 199| 1: [ArrayCreationExpr] new String[] # 199| -2: [ArrayInit] {...} -# 199| 0: [StringLiteral] first-vararg-default sunk 2 -# 199| 1: [StringLiteral] second-vararg-default sunk 2 +# 199| 0: [StringLiteral] "first-vararg-default sunk 2" +# 199| 1: [StringLiteral] "second-vararg-default sunk 2" # 199| -1: [TypeAccess] String # 199| 0: [IntegerLiteral] 2 # 199| 2: [IfStmt] if (...) @@ -207,7 +207,7 @@ test.kt: # 199| 1: [ExprStmt] ; # 199| 0: [AssignExpr] ...=... # 199| 0: [VarAccess] p2 -# 199| 1: [StringLiteral] after-vararg-default not sunk 2 +# 199| 1: [StringLiteral] "after-vararg-default not sunk 2" # 199| 3: [ReturnStmt] return ... # 199| 0: [MethodAccess] varargsTestOnlySinkVarargs(...) # 199| -1: [TypeAccess] TestKt @@ -228,7 +228,7 @@ test.kt: # 205| 1: [ExprStmt] ; # 205| 0: [MethodAccess] varargsTestOnlySinkVarargs$default(...) # 205| -1: [TypeAccess] TestKt -# 205| 0: [StringLiteral] no-varargs-before, no-z-parameter not sunk 2 +# 205| 0: [StringLiteral] "no-varargs-before, no-z-parameter not sunk 2" # 1| 1: [NullLiteral] null # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 1 @@ -236,32 +236,32 @@ test.kt: # 206| 2: [ExprStmt] ; # 206| 0: [MethodAccess] varargsTestOnlySinkVarargs$default(...) # 206| -1: [TypeAccess] TestKt -# 206| 0: [StringLiteral] no-varargs-before not sunk 2 +# 206| 0: [StringLiteral] "no-varargs-before not sunk 2" # 1| 1: [NullLiteral] null -# 206| 2: [StringLiteral] no-varargs-after not sunk 2 +# 206| 2: [StringLiteral] "no-varargs-after not sunk 2" # 1| 3: [IntegerLiteral] 5 # 1| 4: [NullLiteral] null # 207| 3: [ExprStmt] ; # 207| 0: [MethodAccess] varargsTestOnlySinkVarargs(...) # 207| -1: [TypeAccess] TestKt -# 207| 0: [StringLiteral] one-vararg-before not sunk 2 -# 207| 1: [StringLiteral] one-vararg sunk 2 -# 207| 2: [StringLiteral] one-vararg-after not sunk 2 +# 207| 0: [StringLiteral] "one-vararg-before not sunk 2" +# 207| 1: [StringLiteral] "one-vararg sunk 2" +# 207| 2: [StringLiteral] "one-vararg-after not sunk 2" # 208| 4: [ExprStmt] ; # 208| 0: [MethodAccess] varargsTestOnlySinkVarargs(...) # 208| -1: [TypeAccess] TestKt -# 208| 0: [StringLiteral] two-varargs-before not sunk 2 -# 208| 1: [StringLiteral] two-vararg-first sunk 2 -# 208| 2: [StringLiteral] two-vararg-second sunk 2 -# 208| 3: [StringLiteral] two-varargs-after not sunk 2 +# 208| 0: [StringLiteral] "two-varargs-before not sunk 2" +# 208| 1: [StringLiteral] "two-vararg-first sunk 2" +# 208| 2: [StringLiteral] "two-vararg-second sunk 2" +# 208| 3: [StringLiteral] "two-varargs-after not sunk 2" # 209| 5: [ExprStmt] ; # 209| 0: [MethodAccess] varargsTestOnlySinkVarargs$default(...) # 209| -1: [TypeAccess] TestKt -# 209| 0: [StringLiteral] no-z-parmeter not sunk 2 +# 209| 0: [StringLiteral] "no-z-parmeter not sunk 2" # 209| 1: [ArrayCreationExpr] new String[] # 209| -2: [ArrayInit] {...} -# 209| 0: [StringLiteral] no-z-parameter first vararg sunk 2 -# 209| 1: [StringLiteral] no-z-parameter second vararg sunk 2 +# 209| 0: [StringLiteral] "no-z-parameter first vararg sunk 2" +# 209| 1: [StringLiteral] "no-z-parameter second vararg sunk 2" # 209| -1: [TypeAccess] String # 209| 0: [IntegerLiteral] 2 # 1| 2: [NullLiteral] null @@ -310,7 +310,7 @@ test.kt: # 212| 1: [ExprStmt] ; # 212| 0: [AssignExpr] ...=... # 212| 0: [VarAccess] p0 -# 212| 1: [StringLiteral] before-vararg-default sunk 3 +# 212| 1: [StringLiteral] "before-vararg-default sunk 3" # 212| 1: [IfStmt] if (...) # 212| 0: [EQExpr] ... == ... # 212| 0: [AndBitwiseExpr] ... & ... @@ -322,8 +322,8 @@ test.kt: # 212| 0: [VarAccess] p1 # 212| 1: [ArrayCreationExpr] new String[] # 212| -2: [ArrayInit] {...} -# 212| 0: [StringLiteral] first-vararg-default not sunk 3 -# 212| 1: [StringLiteral] second-vararg-default not sunk 3 +# 212| 0: [StringLiteral] "first-vararg-default not sunk 3" +# 212| 1: [StringLiteral] "second-vararg-default not sunk 3" # 212| -1: [TypeAccess] String # 212| 0: [IntegerLiteral] 2 # 212| 2: [IfStmt] if (...) @@ -335,7 +335,7 @@ test.kt: # 212| 1: [ExprStmt] ; # 212| 0: [AssignExpr] ...=... # 212| 0: [VarAccess] p2 -# 212| 1: [StringLiteral] after-vararg-default sunk 3 +# 212| 1: [StringLiteral] "after-vararg-default sunk 3" # 212| 3: [ReturnStmt] return ... # 212| 0: [MethodAccess] varargsTestOnlySinkRegularArgs(...) # 212| -1: [TypeAccess] TestKt @@ -356,7 +356,7 @@ test.kt: # 219| 1: [ExprStmt] ; # 219| 0: [MethodAccess] varargsTestOnlySinkRegularArgs$default(...) # 219| -1: [TypeAccess] TestKt -# 219| 0: [StringLiteral] no-varargs-before, no-z-parameter sunk 3 +# 219| 0: [StringLiteral] "no-varargs-before, no-z-parameter sunk 3" # 1| 1: [NullLiteral] null # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 1 @@ -364,32 +364,32 @@ test.kt: # 220| 2: [ExprStmt] ; # 220| 0: [MethodAccess] varargsTestOnlySinkRegularArgs$default(...) # 220| -1: [TypeAccess] TestKt -# 220| 0: [StringLiteral] no-varargs-before sunk 3 +# 220| 0: [StringLiteral] "no-varargs-before sunk 3" # 1| 1: [NullLiteral] null -# 220| 2: [StringLiteral] no-varargs-after sunk 3 +# 220| 2: [StringLiteral] "no-varargs-after sunk 3" # 1| 3: [IntegerLiteral] 5 # 1| 4: [NullLiteral] null # 221| 3: [ExprStmt] ; # 221| 0: [MethodAccess] varargsTestOnlySinkRegularArgs(...) # 221| -1: [TypeAccess] TestKt -# 221| 0: [StringLiteral] one-vararg-before sunk 3 -# 221| 1: [StringLiteral] one-vararg not sunk 3 -# 221| 2: [StringLiteral] one-vararg-after sunk 3 +# 221| 0: [StringLiteral] "one-vararg-before sunk 3" +# 221| 1: [StringLiteral] "one-vararg not sunk 3" +# 221| 2: [StringLiteral] "one-vararg-after sunk 3" # 222| 4: [ExprStmt] ; # 222| 0: [MethodAccess] varargsTestOnlySinkRegularArgs(...) # 222| -1: [TypeAccess] TestKt -# 222| 0: [StringLiteral] two-varargs-before sunk 3 -# 222| 1: [StringLiteral] two-vararg-first not sunk 3 -# 222| 2: [StringLiteral] two-vararg-second not sunk 3 -# 222| 3: [StringLiteral] two-varargs-after sunk 3 +# 222| 0: [StringLiteral] "two-varargs-before sunk 3" +# 222| 1: [StringLiteral] "two-vararg-first not sunk 3" +# 222| 2: [StringLiteral] "two-vararg-second not sunk 3" +# 222| 3: [StringLiteral] "two-varargs-after sunk 3" # 223| 5: [ExprStmt] ; # 223| 0: [MethodAccess] varargsTestOnlySinkRegularArgs$default(...) # 223| -1: [TypeAccess] TestKt -# 223| 0: [StringLiteral] no-z-parmeter sunk 3 +# 223| 0: [StringLiteral] "no-z-parmeter sunk 3" # 223| 1: [ArrayCreationExpr] new String[] # 223| -2: [ArrayInit] {...} -# 223| 0: [StringLiteral] no-z-parameter first vararg not sunk 3 -# 223| 1: [StringLiteral] no-z-parameter second vararg not sunk 3 +# 223| 0: [StringLiteral] "no-z-parameter first vararg not sunk 3" +# 223| 1: [StringLiteral] "no-z-parameter second vararg not sunk 3" # 223| -1: [TypeAccess] String # 223| 0: [IntegerLiteral] 2 # 1| 2: [NullLiteral] null @@ -403,15 +403,15 @@ test.kt: # 233| 0: [TypeAccess] Unit # 233| 1: [ClassInstanceExpr] new VarargsConstructorTest(...) # 233| -3: [TypeAccess] VarargsConstructorTest -# 233| 0: [StringLiteral] varargs constructor test sunk +# 233| 0: [StringLiteral] "varargs constructor test sunk" # 234| 1: [ExprStmt] ; # 234| 0: [ImplicitCoercionToUnitExpr] # 234| 0: [TypeAccess] Unit # 234| 1: [ClassInstanceExpr] new VarargsConstructorTest(...) # 234| -3: [TypeAccess] VarargsConstructorTest -# 234| 0: [StringLiteral] varargs constructor test sunk 2 -# 234| 1: [StringLiteral] varargs constructor test not sunk 1 -# 234| 2: [StringLiteral] varargs constructor test not sunk 2 +# 234| 0: [StringLiteral] "varargs constructor test sunk 2" +# 234| 1: [StringLiteral] "varargs constructor test not sunk 1" +# 234| 2: [StringLiteral] "varargs constructor test not sunk 2" # 3| 2: [Class] TestMember # 3| 1: [Constructor] TestMember # 3| 5: [BlockStmt] { ... } @@ -466,7 +466,7 @@ test.kt: # 5| 1: [ExprStmt] ; # 5| 0: [AssignExpr] ...=... # 5| 0: [VarAccess] p3 -# 5| 1: [StringLiteral] hello world +# 5| 1: [StringLiteral] "hello world" # 5| 2: [ReturnStmt] return ... # 5| 0: [MethodAccess] f(...) # 5| -1: [VarAccess] p0 @@ -480,7 +480,7 @@ test.kt: # 10| 0: [MethodAccess] f$default(...) # 10| -1: [TypeAccess] TestMember # 10| 0: [ThisAccess] this -# 10| 1: [StringLiteral] member sunk +# 10| 1: [StringLiteral] "member sunk" # 1| 2: [NullLiteral] null # 1| 3: [NullLiteral] null # 1| 4: [IntegerLiteral] 1 @@ -489,17 +489,17 @@ test.kt: # 11| 0: [MethodAccess] f$default(...) # 11| -1: [TypeAccess] TestMember # 11| 0: [ThisAccess] this -# 11| 1: [StringLiteral] member sunk fp -# 11| 2: [StringLiteral] member sunk 2 +# 11| 1: [StringLiteral] "member sunk fp" +# 11| 2: [StringLiteral] "member sunk 2" # 1| 3: [NullLiteral] null # 1| 4: [IntegerLiteral] 3 # 1| 5: [NullLiteral] null # 12| 2: [ExprStmt] ; # 12| 0: [MethodAccess] f(...) # 12| -1: [ThisAccess] this -# 12| 0: [StringLiteral] not sunk -# 12| 1: [StringLiteral] member sunk 3 -# 12| 2: [StringLiteral] not sunk +# 12| 0: [StringLiteral] "not sunk" +# 12| 1: [StringLiteral] "member sunk 3" +# 12| 2: [StringLiteral] "not sunk" # 17| 3: [Class] TestExtensionMember # 17| 1: [Constructor] TestExtensionMember # 17| 5: [BlockStmt] { ... } @@ -562,7 +562,7 @@ test.kt: # 19| 1: [ExprStmt] ; # 19| 0: [AssignExpr] ...=... # 19| 0: [VarAccess] p4 -# 19| 1: [StringLiteral] hello world +# 19| 1: [StringLiteral] "hello world" # 19| 2: [ReturnStmt] return ... # 19| 0: [MethodAccess] f(...) # 19| -1: [VarAccess] p1 @@ -581,7 +581,7 @@ test.kt: # 25| -1: [TypeAccess] TestExtensionMember # 25| 0: [VarAccess] sunk # 25| 1: [ThisAccess] this -# 25| 2: [StringLiteral] extension sunk +# 25| 2: [StringLiteral] "extension sunk" # 1| 3: [NullLiteral] null # 1| 4: [NullLiteral] null # 1| 5: [IntegerLiteral] 1 @@ -591,8 +591,8 @@ test.kt: # 26| -1: [TypeAccess] TestExtensionMember # 26| 0: [VarAccess] sunk # 26| 1: [ThisAccess] this -# 26| 2: [StringLiteral] extension sunk fp -# 26| 3: [StringLiteral] extension sunk 2 +# 26| 2: [StringLiteral] "extension sunk fp" +# 26| 3: [StringLiteral] "extension sunk 2" # 1| 4: [NullLiteral] null # 1| 5: [IntegerLiteral] 3 # 1| 6: [NullLiteral] null @@ -600,9 +600,9 @@ test.kt: # 27| 0: [MethodAccess] f(...) # 27| -1: [ThisAccess] this # 27| 0: [VarAccess] sunk -# 27| 1: [StringLiteral] not sunk -# 27| 2: [StringLiteral] extension sunk 3 -# 27| 3: [StringLiteral] not sunk +# 27| 1: [StringLiteral] "not sunk" +# 27| 2: [StringLiteral] "extension sunk 3" +# 27| 3: [StringLiteral] "not sunk" # 32| 4: [Class] TestStaticMember # 32| 1: [Constructor] TestStaticMember # 32| 5: [BlockStmt] { ... } @@ -655,7 +655,7 @@ test.kt: # 34| 1: [ExprStmt] ; # 34| 0: [AssignExpr] ...=... # 34| 0: [VarAccess] p2 -# 34| 1: [StringLiteral] hello world +# 34| 1: [StringLiteral] "hello world" # 34| 2: [ReturnStmt] return ... # 34| 0: [MethodAccess] f(...) # 34| -1: [TypeAccess] TestStaticMember @@ -668,7 +668,7 @@ test.kt: # 39| 0: [ExprStmt] ; # 39| 0: [MethodAccess] f$default(...) # 39| -1: [TypeAccess] TestStaticMember -# 39| 0: [StringLiteral] static sunk +# 39| 0: [StringLiteral] "static sunk" # 1| 1: [NullLiteral] null # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 1 @@ -676,17 +676,17 @@ test.kt: # 40| 1: [ExprStmt] ; # 40| 0: [MethodAccess] f$default(...) # 40| -1: [TypeAccess] TestStaticMember -# 40| 0: [StringLiteral] static sunk fp -# 40| 1: [StringLiteral] static sunk 2 +# 40| 0: [StringLiteral] "static sunk fp" +# 40| 1: [StringLiteral] "static sunk 2" # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 3 # 1| 4: [NullLiteral] null # 41| 2: [ExprStmt] ; # 41| 0: [MethodAccess] f(...) # 41| -1: [TypeAccess] TestStaticMember -# 41| 0: [StringLiteral] not sunk -# 41| 1: [StringLiteral] static sunk 3 -# 41| 2: [StringLiteral] not sunk +# 41| 0: [StringLiteral] "not sunk" +# 41| 1: [StringLiteral] "static sunk 3" +# 41| 2: [StringLiteral] "not sunk" # 46| 5: [Class] ExtendMe # 46| 1: [Constructor] ExtendMe # 46| 5: [BlockStmt] { ... } @@ -770,7 +770,7 @@ test.kt: # 56| 1: [ExprStmt] ; # 56| 0: [AssignExpr] ...=... # 56| 0: [VarAccess] p4 -# 56| 1: [StringLiteral] hello world +# 56| 1: [StringLiteral] "hello world" # 56| 2: [ReturnStmt] return ... # 56| 0: [MethodAccess] test(...) # 56| -1: [VarAccess] p1 @@ -789,7 +789,7 @@ test.kt: # 61| -1: [TypeAccess] TestReceiverReferences # 61| 0: [VarAccess] t # 61| 1: [ThisAccess] this -# 61| 2: [StringLiteral] receiver refs sunk +# 61| 2: [StringLiteral] "receiver refs sunk" # 1| 3: [NullLiteral] null # 1| 4: [NullLiteral] null # 1| 5: [IntegerLiteral] 1 @@ -799,8 +799,8 @@ test.kt: # 62| -1: [TypeAccess] TestReceiverReferences # 62| 0: [VarAccess] t # 62| 1: [ThisAccess] this -# 62| 2: [StringLiteral] receiver refs sunk fp -# 62| 3: [StringLiteral] receiver refs sunk 2 +# 62| 2: [StringLiteral] "receiver refs sunk fp" +# 62| 3: [StringLiteral] "receiver refs sunk 2" # 1| 4: [NullLiteral] null # 1| 5: [IntegerLiteral] 3 # 1| 6: [NullLiteral] null @@ -808,9 +808,9 @@ test.kt: # 63| 0: [MethodAccess] test(...) # 63| -1: [ThisAccess] this # 63| 0: [VarAccess] t -# 63| 1: [StringLiteral] not sunk -# 63| 2: [StringLiteral] receiver refs sunk 3 -# 63| 3: [StringLiteral] not sunk +# 63| 1: [StringLiteral] "not sunk" +# 63| 2: [StringLiteral] "receiver refs sunk 3" +# 63| 3: [StringLiteral] "not sunk" # 68| 7: [Class] TestConstructor # 68| 1: [Constructor] TestConstructor #-----| 4: (Parameters) @@ -859,7 +859,7 @@ test.kt: # 68| 1: [ExprStmt] ; # 68| 0: [AssignExpr] ...=... # 68| 0: [VarAccess] p2 -# 68| 1: [StringLiteral] hello world +# 68| 1: [StringLiteral] "hello world" # 68| 2: [ThisConstructorInvocationStmt] this(...) # 68| 0: [VarAccess] p0 # 68| 1: [VarAccess] p1 @@ -872,7 +872,7 @@ test.kt: # 75| 0: [TypeAccess] Unit # 75| 1: [ClassInstanceExpr] new TestConstructor(...) # 75| -3: [TypeAccess] TestConstructor -# 75| 0: [StringLiteral] constructor sunk +# 75| 0: [StringLiteral] "constructor sunk" # 1| 1: [NullLiteral] null # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 1 @@ -882,8 +882,8 @@ test.kt: # 76| 0: [TypeAccess] Unit # 76| 1: [ClassInstanceExpr] new TestConstructor(...) # 76| -3: [TypeAccess] TestConstructor -# 76| 0: [StringLiteral] constructor sunk fp -# 76| 1: [StringLiteral] constructor sunk 2 +# 76| 0: [StringLiteral] "constructor sunk fp" +# 76| 1: [StringLiteral] "constructor sunk 2" # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 3 # 1| 4: [NullLiteral] null @@ -892,9 +892,9 @@ test.kt: # 77| 0: [TypeAccess] Unit # 77| 1: [ClassInstanceExpr] new TestConstructor(...) # 77| -3: [TypeAccess] TestConstructor -# 77| 0: [StringLiteral] not sunk -# 77| 1: [StringLiteral] constructor sunk 3 -# 77| 2: [StringLiteral] not sunk +# 77| 0: [StringLiteral] "not sunk" +# 77| 1: [StringLiteral] "constructor sunk 3" +# 77| 2: [StringLiteral] "not sunk" # 82| 8: [Class] TestLocal # 82| 1: [Constructor] TestLocal # 82| 5: [BlockStmt] { ... } @@ -955,7 +955,7 @@ test.kt: # 86| 1: [ExprStmt] ; # 86| 0: [AssignExpr] ...=... # 86| 0: [VarAccess] p2 -# 86| 1: [StringLiteral] hello world +# 86| 1: [StringLiteral] "hello world" # 86| 2: [ReturnStmt] return ... # 86| 0: [MethodAccess] f(...) # 86| -1: [ClassInstanceExpr] new (...) @@ -974,7 +974,7 @@ test.kt: # 91| 0: [ExprStmt] ; # 91| 0: [MethodAccess] f$default(...) # 91| -1: [TypeAccess] -# 91| 0: [StringLiteral] local sunk +# 91| 0: [StringLiteral] "local sunk" # 1| 1: [NullLiteral] null # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 1 @@ -982,8 +982,8 @@ test.kt: # 92| 1: [ExprStmt] ; # 92| 0: [MethodAccess] f$default(...) # 92| -1: [TypeAccess] -# 92| 0: [StringLiteral] local sunk fp -# 92| 1: [StringLiteral] local sunk 2 +# 92| 0: [StringLiteral] "local sunk fp" +# 92| 1: [StringLiteral] "local sunk 2" # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 3 # 1| 4: [NullLiteral] null @@ -991,9 +991,9 @@ test.kt: # 93| 0: [MethodAccess] f(...) # 93| -1: [ClassInstanceExpr] new (...) # 93| -3: [TypeAccess] Object -# 93| 0: [StringLiteral] not sunk -# 93| 1: [StringLiteral] local sunk 3 -# 93| 2: [StringLiteral] not sunk +# 93| 0: [StringLiteral] "not sunk" +# 93| 1: [StringLiteral] "local sunk 3" +# 93| 2: [StringLiteral] "not sunk" # 100| 9: [Class] TestLocalClass # 100| 1: [Constructor] TestLocalClass # 100| 5: [BlockStmt] { ... } @@ -1057,7 +1057,7 @@ test.kt: # 106| 1: [ExprStmt] ; # 106| 0: [AssignExpr] ...=... # 106| 0: [VarAccess] p3 -# 106| 1: [StringLiteral] hello world +# 106| 1: [StringLiteral] "hello world" # 106| 2: [ReturnStmt] return ... # 106| 0: [MethodAccess] f(...) # 106| -1: [VarAccess] p0 @@ -1071,7 +1071,7 @@ test.kt: # 111| 0: [MethodAccess] f$default(...) # 111| -1: [TypeAccess] EnclosingLocalClass # 111| 0: [ThisAccess] this -# 111| 1: [StringLiteral] local sunk +# 111| 1: [StringLiteral] "local sunk" # 1| 2: [NullLiteral] null # 1| 3: [NullLiteral] null # 1| 4: [IntegerLiteral] 1 @@ -1080,17 +1080,17 @@ test.kt: # 112| 0: [MethodAccess] f$default(...) # 112| -1: [TypeAccess] EnclosingLocalClass # 112| 0: [ThisAccess] this -# 112| 1: [StringLiteral] local sunk fp -# 112| 2: [StringLiteral] local sunk 2 +# 112| 1: [StringLiteral] "local sunk fp" +# 112| 2: [StringLiteral] "local sunk 2" # 1| 3: [NullLiteral] null # 1| 4: [IntegerLiteral] 3 # 1| 5: [NullLiteral] null # 113| 2: [ExprStmt] ; # 113| 0: [MethodAccess] f(...) # 113| -1: [ThisAccess] this -# 113| 0: [StringLiteral] not sunk -# 113| 1: [StringLiteral] local sunk 3 -# 113| 2: [StringLiteral] not sunk +# 113| 0: [StringLiteral] "not sunk" +# 113| 1: [StringLiteral] "local sunk 3" +# 113| 2: [StringLiteral] "not sunk" # 122| 10: [Class,GenericType,ParameterizedType] TestGeneric #-----| -2: (Generic Parameters) # 122| 0: [TypeVariable] T @@ -1168,7 +1168,7 @@ test.kt: # 129| 0: [MethodAccess] f$default(...) # 129| -1: [TypeAccess] TestGeneric<> # 129| 0: [VarAccess] tgs -# 129| 1: [StringLiteral] generic sunk +# 129| 1: [StringLiteral] "generic sunk" # 1| 2: [NullLiteral] null # 1| 3: [NullLiteral] null # 1| 4: [IntegerLiteral] 1 @@ -1177,23 +1177,23 @@ test.kt: # 130| 0: [MethodAccess] f$default(...) # 130| -1: [TypeAccess] TestGeneric<> # 130| 0: [VarAccess] tcs -# 130| 1: [StringLiteral] generic sunk fp -# 130| 2: [StringLiteral] generic sunk 2 +# 130| 1: [StringLiteral] "generic sunk fp" +# 130| 2: [StringLiteral] "generic sunk 2" # 1| 3: [NullLiteral] null # 1| 4: [IntegerLiteral] 3 # 1| 5: [NullLiteral] null # 131| 2: [ExprStmt] ; # 131| 0: [MethodAccess] f(...) # 131| -1: [VarAccess] tgs -# 131| 0: [StringLiteral] not sunk -# 131| 1: [StringLiteral] generic sunk 3 -# 131| 2: [StringLiteral] not sunk +# 131| 0: [StringLiteral] "not sunk" +# 131| 1: [StringLiteral] "generic sunk 3" +# 131| 2: [StringLiteral] "not sunk" # 132| 3: [ExprStmt] ; # 132| 0: [MethodAccess] f(...) # 132| -1: [VarAccess] tcs -# 132| 0: [StringLiteral] not sunk -# 132| 1: [StringLiteral] generic sunk 3 -# 132| 2: [StringLiteral] not sunk +# 132| 0: [StringLiteral] "not sunk" +# 132| 1: [StringLiteral] "generic sunk 3" +# 132| 2: [StringLiteral] "not sunk" # 135| 5: [Method] testReturn # 135| 3: [TypeAccess] T #-----| 4: (Parameters) @@ -1246,7 +1246,7 @@ test.kt: # 138| 0: [MethodAccess] testReturn$default(...) # 138| -1: [TypeAccess] TestGeneric<> # 138| 0: [VarAccess] tgs -# 138| 1: [StringLiteral] sunk return value +# 138| 1: [StringLiteral] "sunk return value" # 1| 2: [NullLiteral] null # 1| 3: [IntegerLiteral] 1 # 1| 4: [NullLiteral] null @@ -1381,7 +1381,7 @@ test.kt: # 150| 0: [MethodAccess] f$default(...) # 150| -1: [TypeAccess] TestGenericFunction<> # 150| 0: [VarAccess] inst -# 150| 1: [StringLiteral] generic function sunk +# 150| 1: [StringLiteral] "generic function sunk" # 1| 2: [NullLiteral] null # 1| 3: [NullLiteral] null # 1| 4: [NullLiteral] null @@ -1393,8 +1393,8 @@ test.kt: # 151| 0: [MethodAccess] f$default(...) # 151| -1: [TypeAccess] TestGenericFunction<> # 151| 0: [VarAccess] inst -# 151| 1: [StringLiteral] generic function sunk fp -# 151| 2: [StringLiteral] generic function sunk 2 +# 151| 1: [StringLiteral] "generic function sunk fp" +# 151| 2: [StringLiteral] "generic function sunk 2" # 1| 3: [NullLiteral] null # 1| 4: [NullLiteral] null # 1| 5: [NullLiteral] null @@ -1612,7 +1612,7 @@ test.kt: # 171| -1: [ClassInstanceExpr] new TestGenericUsedWithinDefaultValue(...) # 171| -3: [TypeAccess] TestGenericUsedWithinDefaultValue # 171| 0: [TypeAccess] String -# 171| 0: [StringLiteral] Hello world +# 171| 0: [StringLiteral] "Hello world" # 171| 1: [ReturnStmt] return ... # 171| 0: [MethodAccess] f(...) # 171| -1: [VarAccess] p0 @@ -1662,7 +1662,7 @@ test.kt: # 179| 1: [ExprStmt] ; # 179| 0: [AssignExpr] ...=... # 179| 0: [VarAccess] p2 -# 179| 1: [StringLiteral] Hello world +# 179| 1: [StringLiteral] "Hello world" # 179| 1: [ReturnStmt] return ... # 179| 0: [MethodAccess] f(...) # 179| -1: [VarAccess] p0 diff --git a/java/ql/test/kotlin/library-tests/reflection/PrintAst.expected b/java/ql/test/kotlin/library-tests/reflection/PrintAst.expected index 64fffd475868..c46be5c79005 100644 --- a/java/ql/test/kotlin/library-tests/reflection/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/reflection/PrintAst.expected @@ -45,7 +45,7 @@ reflection.kt: # 50| -3: [TypeAccess] KProperty1 # 50| 0: [TypeAccess] String # 50| 1: [TypeAccess] Character -# 50| 0: [StringLiteral] abc +# 50| 0: [StringLiteral] "abc" # 51| 1: [ExprStmt] ; # 51| 0: [MethodAccess] println(...) # 51| -1: [TypeAccess] ConsoleKt @@ -78,7 +78,7 @@ reflection.kt: # 51| -1: [ThisAccess] this # 51| -3: [TypeAccess] KProperty0 # 51| 0: [TypeAccess] Character -# 51| 0: [StringLiteral] abcd +# 51| 0: [StringLiteral] "abcd" # 54| 3: [ExtensionMethod] ext1 #-----| 2: (Generic Parameters) # 54| 0: [TypeVariable] T2 @@ -118,7 +118,7 @@ reflection.kt: # 97| 0: [TypeAccess] String # 97| -2: [TypeAccess] String # 97| -1: [TypeAccess] ReflectionKt -# 97| 0: [StringLiteral] +# 97| 0: [StringLiteral] "" # 97| 1: [MemberRefExpr] ...::... # 97| -4: [AnonymousClass] new Function1>(...) { ... } # 97| 1: [Constructor] @@ -143,7 +143,7 @@ reflection.kt: # 98| -3: [TypeAccess] Unit # 98| -2: [TypeAccess] String # 98| -1: [TypeAccess] ReflectionKt -# 98| 0: [StringLiteral] +# 98| 0: [StringLiteral] "" # 98| 1: [MemberRefExpr] ...::... # 98| -4: [AnonymousClass] new Function1(...) { ... } # 98| 1: [Constructor] @@ -169,7 +169,7 @@ reflection.kt: # 99| 1: [TypeAccess] Integer # 99| -2: [TypeAccess] String # 99| -1: [TypeAccess] ReflectionKt -# 99| 0: [StringLiteral] +# 99| 0: [StringLiteral] "" # 99| 1: [MemberRefExpr] ...::... # 99| -4: [AnonymousClass] new Function1>(...) { ... } # 99| 1: [Constructor] @@ -1026,7 +1026,7 @@ reflection.kt: # 24| 0: [ValueEQExpr] ... (value equals) ... # 24| 0: [MethodAccess] getName(...) # 24| -1: [VarAccess] it -# 24| 1: [StringLiteral] p3 +# 24| 1: [StringLiteral] "p3" # 24| -3: [TypeAccess] Function1,Boolean> # 24| 0: [TypeAccess] KCallable # 24| 1: [TypeAccess] Boolean @@ -1534,7 +1534,7 @@ reflection.kt: # 90| 1: [TypeAccess] T # 90| -2: [TypeAccess] String # 90| -1: [TypeAccess] ReflectionKt -# 90| 0: [StringLiteral] +# 90| 0: [StringLiteral] "" # 90| 1: [MemberRefExpr] ...::... # 90| -4: [AnonymousClass] new Function1>(...) { ... } # 90| 1: [Constructor] diff --git a/java/ql/test/kotlin/library-tests/stmts/PrintAst.expected b/java/ql/test/kotlin/library-tests/stmts/PrintAst.expected index 2edcd3755b68..7ab29615bd34 100644 --- a/java/ql/test/kotlin/library-tests/stmts/PrintAst.expected +++ b/java/ql/test/kotlin/library-tests/stmts/PrintAst.expected @@ -188,7 +188,7 @@ stmts.kt: # 48| 0: [ThrowStmt] throw ... # 48| 0: [ClassInstanceExpr] new Exception(...) # 48| -3: [TypeAccess] Exception -# 48| 0: [StringLiteral] Foo +# 48| 0: [StringLiteral] "Foo" # 50| 0: [CatchClause] catch (...) #-----| 0: (Single Local Variable Declaration) # 50| 0: [TypeAccess] Exception diff --git a/java/ql/test/kotlin/library-tests/stmts/exprs.expected b/java/ql/test/kotlin/library-tests/stmts/exprs.expected index 01631139da30..9193248487f4 100644 --- a/java/ql/test/kotlin/library-tests/stmts/exprs.expected +++ b/java/ql/test/kotlin/library-tests/stmts/exprs.expected @@ -101,7 +101,7 @@ | stmts.kt:46:1:56:1 | int | TypeAccess | | stmts.kt:48:15:48:30 | Exception | TypeAccess | | stmts.kt:48:15:48:30 | new Exception(...) | ClassInstanceExpr | -| stmts.kt:48:26:48:28 | Foo | StringLiteral | +| stmts.kt:48:26:48:28 | "Foo" | StringLiteral | | stmts.kt:50:12:50:23 | Exception | TypeAccess | | stmts.kt:50:12:50:23 | e | LocalVariableDeclExpr | | stmts.kt:51:16:51:16 | 1 | IntegerLiteral | diff --git a/java/ql/test/kotlin/library-tests/trap/diags.expected b/java/ql/test/kotlin/library-tests/trap/diags.expected index 377b7fd0a999..6e145a5e4e07 100644 --- a/java/ql/test/kotlin/library-tests/trap/diags.expected +++ b/java/ql/test/kotlin/library-tests/trap/diags.expected @@ -1,9 +1,11 @@ -| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting '//A03BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:22:0\n | +| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting '"ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBC"' ...while extracting a expression () at long_string.kt:14:31:14:1048605\n ...while extracting a variable expr (longStringLiteral1) at long_string.kt:14:5:14:1048606\n ...while extracting a variable (longStringLiteral1) at long_string.kt:14:5:14:1048606\n ...while extracting a statement (longStringLiteral1) at long_string.kt:14:5:14:1048606\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | +| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting '//A03BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:24:0\n | | file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a expression () at long_string.kt:16:31:16:1048607\n ...while extracting a variable expr (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a variable (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a statement (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | -| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a expression () at long_string.kt:16:31:16:1048607\n ...while extracting a variable expr (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a variable (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a statement (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | -| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting '//A04BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDEF' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:22:0\n | -| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting '//A05"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:22:0\n | -| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'A"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a expression () at long_string.kt:18:31:18:2097181\n ...while extracting a variable expr (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a variable (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a statement (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | +| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting '"ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCD"' ...while extracting a expression () at long_string.kt:15:31:15:1048606\n ...while extracting a variable expr (longStringLiteral2) at long_string.kt:15:5:15:1048607\n ...while extracting a variable (longStringLiteral2) at long_string.kt:15:5:15:1048607\n ...while extracting a statement (longStringLiteral2) at long_string.kt:15:5:15:1048607\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | +| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting '//A04BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDEF' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:24:0\n | +| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting '//A05"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:24:0\n | | file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'A"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a expression () at long_string.kt:18:31:18:2097181\n ...while extracting a variable expr (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a variable (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a statement (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | | file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDEF' ...while extracting a expression () at long_string.kt:17:31:17:1048608\n ...while extracting a variable expr (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a variable (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a statement (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | -| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDEF' ...while extracting a expression () at long_string.kt:17:31:17:1048608\n ...while extracting a variable expr (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a variable (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a statement (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | +| file://:0:0:0:0 | Truncated string of length 1048579 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048579 | DATE TIME Truncated string of length 1048579\nTruncated string of length 1048579, starting '"ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE"' ...while extracting a expression () at long_string.kt:16:31:16:1048607\n ...while extracting a variable expr (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a variable (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a statement (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | +| file://:0:0:0:0 | Truncated string of length 1048580 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048580 | DATE TIME Truncated string of length 1048580\nTruncated string of length 1048580, starting '"ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDEF"' ...while extracting a expression () at long_string.kt:17:31:17:1048608\n ...while extracting a variable expr (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a variable (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a statement (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | +| file://:0:0:0:0 | Truncated string of length 2097153 | CodeQL Kotlin extractor | 2 | | Truncated string of length 2097153 | DATE TIME Truncated string of length 2097153\nTruncated string of length 2097153, starting '"A\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"', ending '"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"CDEF"' ...while extracting a expression () at long_string.kt:18:31:18:2097181\n ...while extracting a variable expr (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a variable (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a statement (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a block body () at long_string.kt:13:22:19:1\n ...while extracting a body () at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n | diff --git a/java/ql/test/kotlin/library-tests/trap/literals.ql b/java/ql/test/kotlin/library-tests/trap/literals.ql index 1490a21b4587..b6dc1dcff6f5 100644 --- a/java/ql/test/kotlin/library-tests/trap/literals.ql +++ b/java/ql/test/kotlin/library-tests/trap/literals.ql @@ -1,6 +1,6 @@ import java from Literal l, int len -where len = l.getValue().length() +where len = l.getValue().length() and l.getFile().isSourceFile() select l.getLocation(), len, l.getValue().prefix(5) + "..." + l.getValue().suffix(len - 5), l.getPrimaryQlClasses() diff --git a/java/ql/test/kotlin/library-tests/trap/long_comments.kt b/java/ql/test/kotlin/library-tests/trap/long_comments.kt index 3c5cb1d3764c..55db7520f215 100644 --- a/java/ql/test/kotlin/library-tests/trap/long_comments.kt +++ b/java/ql/test/kotlin/library-tests/trap/long_comments.kt @@ -18,4 +18,6 @@ // Diagnostic Matches: %Truncated string of length 1048577% // Diagnostic Matches: %Truncated string of length 1048578% - +// Diagnostic Matches: %Truncated string of length 1048579% +// Diagnostic Matches: %Truncated string of length 1048580% +// Diagnostic Matches: %Truncated string of length 2097153% diff --git a/java/ql/test/kotlin/library-tests/vararg/args.expected b/java/ql/test/kotlin/library-tests/vararg/args.expected index 1e5a60a35453..6f5e0fbc035e 100644 --- a/java/ql/test/kotlin/library-tests/vararg/args.expected +++ b/java/ql/test/kotlin/library-tests/vararg/args.expected @@ -53,33 +53,33 @@ implicitVarargsArguments | test.kt:35:5:35:34 | funWithOnlyVarArgs(...) | 0 | test.kt:35:24:35:25 | 20 | | test.kt:35:5:35:34 | funWithOnlyVarArgs(...) | 1 | test.kt:35:28:35:29 | 21 | | test.kt:35:5:35:34 | funWithOnlyVarArgs(...) | 2 | test.kt:35:32:35:33 | 22 | -| test.kt:36:5:36:50 | funWithArgsAndVarArgs(...) | 0 | test.kt:36:28:36:30 | foo | +| test.kt:36:5:36:50 | funWithArgsAndVarArgs(...) | 0 | test.kt:36:28:36:30 | "foo" | | test.kt:36:5:36:50 | funWithArgsAndVarArgs(...) | 1 | test.kt:36:34:36:37 | true | | test.kt:36:5:36:50 | funWithArgsAndVarArgs(...) | 2 | test.kt:36:40:36:41 | 30 | | test.kt:36:5:36:50 | funWithArgsAndVarArgs(...) | 3 | test.kt:36:44:36:45 | 31 | | test.kt:36:5:36:50 | funWithArgsAndVarArgs(...) | 4 | test.kt:36:48:36:49 | 32 | -| test.kt:37:5:37:53 | funWithMiddleVarArgs(...) | 0 | test.kt:37:27:37:29 | foo | +| test.kt:37:5:37:53 | funWithMiddleVarArgs(...) | 0 | test.kt:37:27:37:29 | "foo" | | test.kt:37:5:37:53 | funWithMiddleVarArgs(...) | 1 | test.kt:37:33:37:34 | 41 | | test.kt:37:5:37:53 | funWithMiddleVarArgs(...) | 2 | test.kt:37:37:37:38 | 42 | | test.kt:37:5:37:53 | funWithMiddleVarArgs(...) | 3 | test.kt:37:41:37:42 | 43 | | test.kt:37:5:37:53 | funWithMiddleVarArgs(...) | 4 | test.kt:37:49:37:52 | true | | test.kt:38:5:38:30 | funWithOnlyVarArgs(...) | 0 | test.kt:38:25:38:29 | array | -| test.kt:39:5:39:46 | funWithArgsAndVarArgs(...) | 0 | test.kt:39:28:39:30 | foo | +| test.kt:39:5:39:46 | funWithArgsAndVarArgs(...) | 0 | test.kt:39:28:39:30 | "foo" | | test.kt:39:5:39:46 | funWithArgsAndVarArgs(...) | 1 | test.kt:39:34:39:37 | true | | test.kt:39:5:39:46 | funWithArgsAndVarArgs(...) | 2 | test.kt:39:41:39:45 | array | -| test.kt:40:5:40:49 | funWithMiddleVarArgs(...) | 0 | test.kt:40:27:40:29 | foo | +| test.kt:40:5:40:49 | funWithMiddleVarArgs(...) | 0 | test.kt:40:27:40:29 | "foo" | | test.kt:40:5:40:49 | funWithMiddleVarArgs(...) | 1 | test.kt:40:34:40:38 | array | | test.kt:40:5:40:49 | funWithMiddleVarArgs(...) | 2 | test.kt:40:45:40:48 | true | | test.kt:41:5:41:36 | new HasVarargConstructor(...) | 0 | test.kt:41:26:41:27 | 51 | | test.kt:41:5:41:36 | new HasVarargConstructor(...) | 1 | test.kt:41:30:41:31 | 52 | | test.kt:41:5:41:36 | new HasVarargConstructor(...) | 2 | test.kt:41:34:41:35 | 53 | -| test.kt:42:5:42:43 | new HasVarargConstructor(...) | 0 | test.kt:42:27:42:29 | foo | +| test.kt:42:5:42:43 | new HasVarargConstructor(...) | 0 | test.kt:42:27:42:29 | "foo" | | test.kt:42:5:42:43 | new HasVarargConstructor(...) | 1 | test.kt:42:33:42:34 | 61 | | test.kt:42:5:42:43 | new HasVarargConstructor(...) | 2 | test.kt:42:37:42:38 | 62 | | test.kt:42:5:42:43 | new HasVarargConstructor(...) | 3 | test.kt:42:41:42:42 | 63 | | test.kt:43:5:43:38 | new SuperclassHasVarargConstructor(...) | 0 | test.kt:43:36:43:37 | 91 | | test.kt:44:5:44:32 | new HasVarargConstructor(...) | 0 | test.kt:44:27:44:31 | array | -| test.kt:45:5:45:39 | new HasVarargConstructor(...) | 0 | test.kt:45:27:45:29 | foo | +| test.kt:45:5:45:39 | new HasVarargConstructor(...) | 0 | test.kt:45:27:45:29 | "foo" | | test.kt:45:5:45:39 | new HasVarargConstructor(...) | 1 | test.kt:45:34:45:38 | array | | test.kt:55:13:55:43 | new X(...) | 0 | test.kt:55:42:55:42 | 1 | | test.kt:55:13:55:43 | new X(...) | 1 | test.kt:55:15:55:35 | tmp0_s |