From 967f45d133c89b3280a00d21d4f57eca571dade0 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 4 Dec 2025 15:56:48 +0100 Subject: [PATCH 01/24] Kotlin: Update kotlin_rules to 2.2.0 and remove support for Kotlin 1.6 and 1.7 --- MODULE.bazel | 14 +----------- .../deps/kotlin-compiler-1.6.0.jar | 3 --- .../deps/kotlin-compiler-1.6.20.jar | 3 --- .../deps/kotlin-compiler-1.7.0.jar | 3 --- .../deps/kotlin-compiler-1.7.20.jar | 3 --- .../deps/kotlin-compiler-embeddable-1.6.0.jar | 3 --- .../kotlin-compiler-embeddable-1.6.20.jar | 3 --- .../deps/kotlin-compiler-embeddable-1.7.0.jar | 3 --- .../kotlin-compiler-embeddable-1.7.20.jar | 3 --- .../deps/kotlin-stdlib-1.6.0.jar | 3 --- .../deps/kotlin-stdlib-1.6.20.jar | 3 --- .../deps/kotlin-stdlib-1.7.0.jar | 3 --- .../deps/kotlin-stdlib-1.7.20.jar | 3 --- java/kotlin-extractor/versions.bzl | 4 ---- .../rules_kotlin/2.1.3-codeql.1/source.json | 9 -------- .../MODULE.bazel | 22 ++++++++++--------- .../codeql_add_language_version_option.patch | 18 +++++++-------- .../patches/codeql_do_not_emit_jdeps.patch | 6 ++--- .../rules_kotlin/2.2.0-codeql.1/source.json | 9 ++++++++ .../modules/rules_kotlin/metadata.json | 2 +- 20 files changed, 33 insertions(+), 87 deletions(-) delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-1.6.0.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-1.6.20.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-1.7.0.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-1.7.20.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.6.0.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.6.20.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.7.0.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.7.20.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-stdlib-1.6.0.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-stdlib-1.6.20.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-stdlib-1.7.0.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-stdlib-1.7.20.jar delete mode 100644 misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/source.json rename misc/bazel/registry/modules/rules_kotlin/{2.1.3-codeql.1 => 2.2.0-codeql.1}/MODULE.bazel (52%) rename misc/bazel/registry/modules/rules_kotlin/{2.1.3-codeql.1 => 2.2.0-codeql.1}/patches/codeql_add_language_version_option.patch (58%) rename misc/bazel/registry/modules/rules_kotlin/{2.1.3-codeql.1 => 2.2.0-codeql.1}/patches/codeql_do_not_emit_jdeps.patch (81%) create mode 100644 misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/source.json diff --git a/MODULE.bazel b/MODULE.bazel index 8ba6c2fcd8c8..3e261fac8f66 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -24,7 +24,7 @@ bazel_dep(name = "bazel_skylib", version = "1.8.1") bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "absl") bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json") bazel_dep(name = "fmt", version = "12.1.0-codeql.1") -bazel_dep(name = "rules_kotlin", version = "2.1.3-codeql.1") +bazel_dep(name = "rules_kotlin", version = "2.2.0-codeql.1") bazel_dep(name = "gazelle", version = "0.40.0") bazel_dep(name = "rules_dotnet", version = "0.21.5-codeql.1") bazel_dep(name = "googletest", version = "1.14.0.bcr.1") @@ -221,10 +221,6 @@ use_repo( kotlin_extractor_deps, "codeql_kotlin_defaults", "codeql_kotlin_embeddable", - "kotlin-compiler-1.6.0", - "kotlin-compiler-1.6.20", - "kotlin-compiler-1.7.0", - "kotlin-compiler-1.7.20", "kotlin-compiler-1.8.0", "kotlin-compiler-1.9.0-Beta", "kotlin-compiler-1.9.20-Beta", @@ -234,10 +230,6 @@ use_repo( "kotlin-compiler-2.1.20-Beta1", "kotlin-compiler-2.2.0-Beta1", "kotlin-compiler-2.2.20-Beta2", - "kotlin-compiler-embeddable-1.6.0", - "kotlin-compiler-embeddable-1.6.20", - "kotlin-compiler-embeddable-1.7.0", - "kotlin-compiler-embeddable-1.7.20", "kotlin-compiler-embeddable-1.8.0", "kotlin-compiler-embeddable-1.9.0-Beta", "kotlin-compiler-embeddable-1.9.20-Beta", @@ -247,10 +239,6 @@ use_repo( "kotlin-compiler-embeddable-2.1.20-Beta1", "kotlin-compiler-embeddable-2.2.0-Beta1", "kotlin-compiler-embeddable-2.2.20-Beta2", - "kotlin-stdlib-1.6.0", - "kotlin-stdlib-1.6.20", - "kotlin-stdlib-1.7.0", - "kotlin-stdlib-1.7.20", "kotlin-stdlib-1.8.0", "kotlin-stdlib-1.9.0-Beta", "kotlin-stdlib-1.9.20-Beta", diff --git a/java/kotlin-extractor/deps/kotlin-compiler-1.6.0.jar b/java/kotlin-extractor/deps/kotlin-compiler-1.6.0.jar deleted file mode 100644 index 4a98879e43e6..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-1.6.0.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4bd7a92568fd89c23b7f9f36d4380886beed18d3d54ea6adf49bebae627db805 -size 51408858 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-1.6.20.jar b/java/kotlin-extractor/deps/kotlin-compiler-1.6.20.jar deleted file mode 100644 index 5a467a5af518..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-1.6.20.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:90567c5cf297985d028fa39aa3a7904dc8096173e1c7f3d3f35fe7074581098e -size 53370229 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-1.7.0.jar b/java/kotlin-extractor/deps/kotlin-compiler-1.7.0.jar deleted file mode 100644 index ef54ce1e6532..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-1.7.0.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce85fafb3e24712d62a0d02d277c2d56197d74afdd4f5ca995eaf33d2c504663 -size 53906809 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-1.7.20.jar b/java/kotlin-extractor/deps/kotlin-compiler-1.7.20.jar deleted file mode 100644 index 442aea3e3425..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-1.7.20.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e36d98c56f7c9685ab9d9e1fac9be36a5214939adb3f905b93c62de76023618 -size 54773087 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.6.0.jar b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.6.0.jar deleted file mode 100644 index eafb6508d449..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.6.0.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0366843cd2defdd583c6b16b10bc32b85f28c5bf9510f10e44c886f5bd24c388 -size 49978431 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.6.20.jar b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.6.20.jar deleted file mode 100644 index f426dae65b1e..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.6.20.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be634faaafb56816b6ef6d583e57ab33e4d6e5180cde2f505ccf7d45dc738ef8 -size 51976423 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.7.0.jar b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.7.0.jar deleted file mode 100644 index 0857bed8c9e1..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.7.0.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:573935b492e65b93a792eaa6270295532f580cd4f26f9f6eb105ecbafcd182d4 -size 52514265 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.7.20.jar b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.7.20.jar deleted file mode 100644 index b95097b6935e..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-1.7.20.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5ec2be1872dc47b9dcb466f1781eded6c59d9eee18657d4b0f1148e619caea36 -size 53395419 diff --git a/java/kotlin-extractor/deps/kotlin-stdlib-1.6.0.jar b/java/kotlin-extractor/deps/kotlin-stdlib-1.6.0.jar deleted file mode 100644 index 3ad56eecdc2d..000000000000 --- a/java/kotlin-extractor/deps/kotlin-stdlib-1.6.0.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:115daea30b0d484afcf2360237b9d9537f48a4a2f03f3cc2a16577dfc6e90342 -size 1508076 diff --git a/java/kotlin-extractor/deps/kotlin-stdlib-1.6.20.jar b/java/kotlin-extractor/deps/kotlin-stdlib-1.6.20.jar deleted file mode 100644 index b170c1da738b..000000000000 --- a/java/kotlin-extractor/deps/kotlin-stdlib-1.6.20.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eeb51c2b67b26233fd81d0bc4f8044ec849718890905763ceffd84a31e2cb799 -size 1509405 diff --git a/java/kotlin-extractor/deps/kotlin-stdlib-1.7.0.jar b/java/kotlin-extractor/deps/kotlin-stdlib-1.7.0.jar deleted file mode 100644 index bed18f8429b7..000000000000 --- a/java/kotlin-extractor/deps/kotlin-stdlib-1.7.0.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa88e9625577957f3249a46cb6e166ee09b369e600f7a11d148d16b0a6d87f05 -size 1524619 diff --git a/java/kotlin-extractor/deps/kotlin-stdlib-1.7.20.jar b/java/kotlin-extractor/deps/kotlin-stdlib-1.7.20.jar deleted file mode 100644 index 9998f1e65920..000000000000 --- a/java/kotlin-extractor/deps/kotlin-stdlib-1.7.20.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7779ec96b9acbf92ca023858ac04543f9d2c3bdf1722425fff42f25ff3acfc9b -size 1537347 diff --git a/java/kotlin-extractor/versions.bzl b/java/kotlin-extractor/versions.bzl index 95897f49cc81..f540e99db90a 100644 --- a/java/kotlin-extractor/versions.bzl +++ b/java/kotlin-extractor/versions.bzl @@ -1,9 +1,5 @@ # when updating this list, `bazel mod tidy` should be run from `codeql` to update `MODULE.bazel` VERSIONS = [ - "1.6.0", - "1.6.20", - "1.7.0", - "1.7.20", "1.8.0", "1.9.0-Beta", "1.9.20-Beta", diff --git a/misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/source.json b/misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/source.json deleted file mode 100644 index 8abac8eb4bd1..000000000000 --- a/misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/source.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "integrity": "sha256-4USKVrJGJAeyaI3qht9cN1s2oJkb1HjC3dlMlxaBJeI=", - "url": "https://github.com/bazelbuild/rules_kotlin/releases/download/v2.1.3/rules_kotlin-v2.1.3.tar.gz", - "patches": { - "codeql_do_not_emit_jdeps.patch": "sha256-1ir4Aio1SICxnj1wafQ0GefT/m7bwn2n+SQwq19V3A8=", - "codeql_add_language_version_option.patch": "sha256-F7RthnrO6kJlCNcQ76L1Utqll2OwyeFZ/HmT82NwgB4=" - }, - "patch_strip": 1 -} diff --git a/misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/MODULE.bazel b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel similarity index 52% rename from misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/MODULE.bazel rename to misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel index 41bef52cf9f6..f0876478fe97 100644 --- a/misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/MODULE.bazel +++ b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel @@ -1,16 +1,23 @@ module( name = "rules_kotlin", - version = "2.1.3-codeql.1", + version = "2.2.0-codeql.1", compatibility_level = 1, repo_name = "rules_kotlin", ) bazel_dep(name = "platforms", version = "0.0.11") bazel_dep(name = "bazel_skylib", version = "1.7.1") +# bazel_dep(name = "rules_java", version = "7.2.0") bazel_dep(name = "rules_java", version = "7.2.0") -bazel_dep(name = "rules_python", version = "0.23.1") -bazel_dep(name = "rules_cc", version = "0.0.8") -bazel_dep(name = "rules_android", version = "0.1.1") +bazel_dep(name = "rules_android", version = "0.6.4") +bazel_dep(name = "bazel_features", version = "1.25.0") +bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf") +bazel_dep(name = "rules_proto", version = "6.0.2", repo_name = "rules_proto") +bazel_dep(name = "abseil-py", version = "2.1.0", repo_name = "py_absl") +bazel_dep(name = "rules_cc", version = "0.0.16") + +rules_java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains") +use_repo(rules_java_toolchains, "remote_java_tools") rules_kotlin_extensions = use_extension( "//src/main/starlark/core/repositories:bzlmod_setup.bzl", @@ -24,12 +31,7 @@ use_repo( "kotlinx_serialization_core_jvm", "kotlinx_serialization_json", "kotlinx_serialization_json_jvm", + "kotlin_build_tools_impl", ) register_toolchains("//kotlin/internal:default_toolchain") - -# TODO(bencodes) We should be able to remove this once rules_android has rolled out official Bzlmod support -remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions") -use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools") - -bazel_dep(name = "rules_proto", version = "5.3.0-21.7") diff --git a/misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/patches/codeql_add_language_version_option.patch b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/patches/codeql_add_language_version_option.patch similarity index 58% rename from misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/patches/codeql_add_language_version_option.patch rename to misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/patches/codeql_add_language_version_option.patch index b0bf85d4faef..795d1f88f387 100644 --- a/misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/patches/codeql_add_language_version_option.patch +++ b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/patches/codeql_add_language_version_option.patch @@ -1,22 +1,20 @@ -diff --git a/src/main/starlark/core/options/opts.kotlinc.bzl b/src/main/starlark/core/options/opts.kotlinc.bzl -index 76df826..ef2d6ca 100644 ---- a/src/main/starlark/core/options/opts.kotlinc.bzl -+++ b/src/main/starlark/core/options/opts.kotlinc.bzl -@@ -33,6 +33,11 @@ def _map_jdk_release_to_flag(version): +--- a/src/main/starlark/core/options/opts.kotlinc.bzl 2000-01-01 01:00:00.000000000 +0100 ++++ b/src/main/starlark/core/options/opts.kotlinc.bzl 2025-11-17 16:51:01.012063056 +0100 +@@ -51,6 +51,11 @@ return None return ["-Xjdk-release=%s" % version] - + +def _map_language_version_to_flag(version): + if not version: + return None + return ["-language-version=%s" % version, "-api-version=%s" % version] + _KOPTS_ALL = { - "warn": struct( + "include_stdlibs": struct( args = dict( -@@ -429,6 +434,15 @@ _KOPTS_ALL = { +@@ -495,6 +500,15 @@ value_to_flag = None, - map_value_to_flag = _map_jdk_release_to_flag, + map_value_to_flag = _map_warning_level, ), + "language_version": struct( + args = dict( @@ -28,5 +26,5 @@ index 76df826..ef2d6ca 100644 + map_value_to_flag = _map_language_version_to_flag, + ), } - + def _merge(key, rule_defined): diff --git a/misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/patches/codeql_do_not_emit_jdeps.patch b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/patches/codeql_do_not_emit_jdeps.patch similarity index 81% rename from misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/patches/codeql_do_not_emit_jdeps.patch rename to misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/patches/codeql_do_not_emit_jdeps.patch index 380c837d06a4..e6b71ab0c4f5 100644 --- a/misc/bazel/registry/modules/rules_kotlin/2.1.3-codeql.1/patches/codeql_do_not_emit_jdeps.patch +++ b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/patches/codeql_do_not_emit_jdeps.patch @@ -1,11 +1,9 @@ Emitting jdeps is broken for the 2.0.0 kotlin extractor, and we don't need those files. Patching it here rather than passing `--@rules_kotlin//kotlin/settings:jvm_emit_jdeps=false` allows us to not have to specify that option (and therefore pull in `rules_kotlin`) in `semmle-code`. -diff --git a/kotlin/settings/BUILD.bazel b/kotlin/settings/BUILD.bazel -index 2c93c11..f352b80 100644 --- a/kotlin/settings/BUILD.bazel +++ b/kotlin/settings/BUILD.bazel -@@ -25,7 +25,7 @@ release_archive( +@@ -16,6 +16,6 @@ release_archive( # Flag that controls the emission of jdeps files during kotlin jvm compilation. bool_flag( name = "jvm_emit_jdeps", @@ -13,4 +11,4 @@ index 2c93c11..f352b80 100644 + build_setting_default = False, visibility = ["//visibility:public"], ) - + diff --git a/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/source.json b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/source.json new file mode 100644 index 000000000000..bfa243b5a22e --- /dev/null +++ b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/source.json @@ -0,0 +1,9 @@ +{ + "integrity": "sha256-4STROYYIW8ChW+LIXBQVurVwhEK3jSSf4iv430OlNA0=", + "url": "https://github.com/bazelbuild/rules_kotlin/releases/download/v2.2.0/rules_kotlin-v2.2.0.tar.gz", + "patches": { + "codeql_do_not_emit_jdeps.patch": "sha256-gIlhXEY71vlCkpr5wj2vm3yv6RwcuKLhgbTGqdVvQfU=", + "codeql_add_language_version_option.patch": "sha256-HoH8NWXxmYHmm/SxaugRdXgMntvcQx5gRLW2yQIvWhM=" + }, + "patch_strip": 1 +} diff --git a/misc/bazel/registry/modules/rules_kotlin/metadata.json b/misc/bazel/registry/modules/rules_kotlin/metadata.json index dace87c72d1c..3609865f4d5b 100644 --- a/misc/bazel/registry/modules/rules_kotlin/metadata.json +++ b/misc/bazel/registry/modules/rules_kotlin/metadata.json @@ -21,7 +21,7 @@ "github:bazelbuild/rules_kotlin" ], "versions": [ - "2.1.3-codeql.1" + "2.2.0-codeql.1", ], "yanked_versions": {} } From 7597ef2d81761f3317f947431db66e45286c9cf5 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 4 Dec 2025 16:01:50 +0100 Subject: [PATCH 02/24] Kotlin: Remove resource_strip_prefix for kotlin extraction --- java/kotlin-extractor/BUILD.bazel | 5 ----- 1 file changed, 5 deletions(-) diff --git a/java/kotlin-extractor/BUILD.bazel b/java/kotlin-extractor/BUILD.bazel index a714e06d4111..ab265dd946e2 100644 --- a/java/kotlin-extractor/BUILD.bazel +++ b/java/kotlin-extractor/BUILD.bazel @@ -126,11 +126,6 @@ kt_javac_options( module_name = "codeql-kotlin-extractor", # resource_strip_prefix is very nit-picky: the following makes it work from # `codeql`, `@codeql_kotlin_embeddable` and `semmle-code` - resource_strip_prefix = ( - ("../%s/" % repo_name() if repo_name() else "") + - ("%s/" % package_name() if package_name() else "") + - v - ), resources = [ ":resources-%s" % v, ], From 462f6a8f50cd95dbff3b8e460a9b363c0ba81002 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 4 Dec 2025 16:12:24 +0100 Subject: [PATCH 03/24] Kotlin: Silence compilation warnings --- java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt | 2 ++ java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt | 1 + .../kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt | 3 +++ 3 files changed, 6 insertions(+) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index 72c766bb0828..cb1ce8ed253e 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -415,6 +415,7 @@ open class KotlinFileExtractor( private fun extractClassModifiers(c: IrClass, id: Label) { with("class modifiers", c) { + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (c.modality) { Modality.FINAL -> addModifiers(id, "final") Modality.SEALED -> addModifiers(id, "sealed") @@ -2801,6 +2802,7 @@ open class KotlinFileExtractor( private fun extractBody(b: IrBody, callable: Label) { with("body", b) { + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (b) { is IrBlockBody -> extractBlockBody(b, callable) is IrSyntheticBody -> extractSyntheticBody(b, callable) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index 83cbec771fc5..bb664e711a3e 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -1836,6 +1836,7 @@ open class KotlinUsesExtractor( // Note this function doesn't return a signature because type arguments are never // incorporated into function signatures. + @Suppress("REDUNDANT_ELSE_IN_WHEN") return when (arg) { is IrStarProjection -> { val anyTypeLabel = diff --git a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt index fb39b6675759..f4eac03df9d0 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt @@ -111,6 +111,7 @@ private fun subProjectedType( } ?: makeTypeProjection(t.substituteTypeArguments(substitutionMap), outerVariance) private fun IrTypeArgument.upperBound(context: IrPluginContext) = + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (this) { is IrStarProjection -> context.irBuiltIns.anyNType is IrTypeProjection -> @@ -125,6 +126,7 @@ private fun IrTypeArgument.upperBound(context: IrPluginContext) = } private fun IrTypeArgument.lowerBound(context: IrPluginContext) = + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (this) { is IrStarProjection -> context.irBuiltIns.nothingType is IrTypeProjection -> @@ -209,6 +211,7 @@ fun IrClass.toRawType(): IrType { } fun IrTypeArgument.withQuestionMark(b: Boolean): IrTypeArgument = + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (this) { is IrStarProjection -> this is IrTypeProjection -> From 50a949e74a0f5cfaff5d8eb7bf9f03ab1e798f57 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 4 Dec 2025 16:14:13 +0100 Subject: [PATCH 04/24] Kotlin: Add support for Kotlin 2.3.0-Beta2 --- MODULE.bazel | 3 +++ .../deps/kotlin-compiler-2.3.0-Beta2.jar | 3 +++ .../kotlin-compiler-embeddable-2.3.0-Beta2.jar | 3 +++ .../deps/kotlin-stdlib-2.3.0-Beta2.jar | 3 +++ .../src/main/kotlin/KotlinFileExtractor.kt | 16 +++++++++++++--- .../src/main/kotlin/KotlinUsesExtractor.kt | 3 --- java/kotlin-extractor/versions.bzl | 1 + 7 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar create mode 100644 java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0-Beta2.jar create mode 100644 java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar diff --git a/MODULE.bazel b/MODULE.bazel index 3e261fac8f66..8396af644c7b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -230,6 +230,7 @@ use_repo( "kotlin-compiler-2.1.20-Beta1", "kotlin-compiler-2.2.0-Beta1", "kotlin-compiler-2.2.20-Beta2", + "kotlin-compiler-2.3.0-Beta2", "kotlin-compiler-embeddable-1.8.0", "kotlin-compiler-embeddable-1.9.0-Beta", "kotlin-compiler-embeddable-1.9.20-Beta", @@ -239,6 +240,7 @@ use_repo( "kotlin-compiler-embeddable-2.1.20-Beta1", "kotlin-compiler-embeddable-2.2.0-Beta1", "kotlin-compiler-embeddable-2.2.20-Beta2", + "kotlin-compiler-embeddable-2.3.0-Beta2", "kotlin-stdlib-1.8.0", "kotlin-stdlib-1.9.0-Beta", "kotlin-stdlib-1.9.20-Beta", @@ -248,6 +250,7 @@ use_repo( "kotlin-stdlib-2.1.20-Beta1", "kotlin-stdlib-2.2.0-Beta1", "kotlin-stdlib-2.2.20-Beta2", + "kotlin-stdlib-2.3.0-Beta2", ) go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") diff --git a/java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar b/java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar new file mode 100644 index 000000000000..81c85be01074 --- /dev/null +++ b/java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ed7d52fa82ae3837e63b6f110a8e25ef807c773c1597f93fb3a1e509e2624c6 +size 59087152 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0-Beta2.jar b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0-Beta2.jar new file mode 100644 index 000000000000..aa1aed82c11f --- /dev/null +++ b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0-Beta2.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d66c146d383a7b8463cb1a0fc9bbff9b0db0b136a465730a338f1fc2bf160f1c +size 57665679 diff --git a/java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar b/java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar new file mode 100644 index 000000000000..e0151662ad5b --- /dev/null +++ b/java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb35d6a1bf6df0a5a4e78307c92885f63878a53499cc2800f0ba706e527ab615 +size 1796815 diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index cb1ce8ed253e..fc22eda04d47 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -1645,7 +1645,7 @@ open class KotlinFileExtractor( extractMethodAndParameterTypeAccesses: Boolean, typeSubstitution: TypeSubstitution?, classTypeArgsIncludingOuterClasses: List? - ) = + ) : Label = forceExtractFunction( f, parentId, @@ -2975,12 +2975,22 @@ open class KotlinFileExtractor( val locId = tw.getLocation(s) tw.writeStmts_block(blockId, parent, idx, callable) tw.writeHasLocation(blockId, locId) - extractVariable(s.delegate, callable, blockId, 0) + // For Kotlin < 2.3, s.deligate is not-nullable. Cast to a be nullable, + // as a workaround to silence warnings for kotlin < 2.3 about the elvis + // operator being redundant. + // For Kotlin >= 2.3, the cast is redundant, so we need to silence that warning + + @Suppress("USELESS_CAST") + val delegate = (s.delegate as IrVariable?) ?: run { + logger.errorElement("Local delegated property is missing delegate", s) + return + } + extractVariable(delegate, callable, blockId, 0) val propId = tw.getFreshIdLabel() tw.writeKtProperties(propId, s.name.asString()) tw.writeHasLocation(propId, locId) - tw.writeKtPropertyDelegates(propId, useVariable(s.delegate)) + tw.writeKtPropertyDelegates(propId, useVariable(delegate)) // Getter: extractStatement(s.getter, callable, blockId, 1) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index bb664e711a3e..ba38ac1da373 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -849,9 +849,6 @@ open class KotlinUsesExtractor( } private fun useSimpleType(s: IrSimpleType, context: TypeContext): TypeResults { - if (s.abbreviation != null) { - // TODO: Extract this information - } // We use this when we don't actually have an IrClass for a class // we want to refer to // TODO: Eliminate the need for this if possible diff --git a/java/kotlin-extractor/versions.bzl b/java/kotlin-extractor/versions.bzl index f540e99db90a..b7ae04934e17 100644 --- a/java/kotlin-extractor/versions.bzl +++ b/java/kotlin-extractor/versions.bzl @@ -9,6 +9,7 @@ VERSIONS = [ "2.1.20-Beta1", "2.2.0-Beta1", "2.2.20-Beta2", + "2.3.0-Beta2", ] def _version_to_tuple(v): From 4b84decdcffc9abe37f1d9aacdfc0ed5d38a0d79 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 4 Dec 2025 17:05:58 +0100 Subject: [PATCH 05/24] Kotlin: Update compiler plugin for Kotlin 2.3.0-Beta2 --- .../Kotlin2ComponentRegistrar.kt | 13 ++++++++ ...tJvmModuleNameForDeserializedDescriptor.kt | 31 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/Kotlin2ComponentRegistrar.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/getJvmModuleNameForDeserializedDescriptor.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/Kotlin2ComponentRegistrar.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/Kotlin2ComponentRegistrar.kt new file mode 100644 index 000000000000..e20c45ddc4d4 --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/Kotlin2ComponentRegistrar.kt @@ -0,0 +1,13 @@ +// For ComponentRegistrar +@file:Suppress("DEPRECATION", "DEPRECATION_ERROR") + +package com.github.codeql + +import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar +import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi + +@OptIn(ExperimentalCompilerApi::class) +abstract class Kotlin2ComponentRegistrar : ComponentRegistrar { + override val supportsK2: Boolean + get() = true +} diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/getJvmModuleNameForDeserializedDescriptor.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/getJvmModuleNameForDeserializedDescriptor.kt new file mode 100644 index 000000000000..21da983e40ed --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/getJvmModuleNameForDeserializedDescriptor.kt @@ -0,0 +1,31 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.descriptors.* +import org.jetbrains.kotlin.load.kotlin.JvmPackagePartSource +import org.jetbrains.kotlin.metadata.deserialization.* +import org.jetbrains.kotlin.metadata.jvm.deserialization.* +import org.jetbrains.kotlin.metadata.jvm.JvmProtoBuf +import org.jetbrains.kotlin.resolve.DescriptorUtils.* +import org.jetbrains.kotlin.serialization.deserialization.descriptors.* + +fun getJvmModuleNameForDeserializedDescriptor(descriptor: CallableMemberDescriptor): String? { + val parent = getParentOfType(descriptor, ClassOrPackageFragmentDescriptor::class.java, false) + + when { + parent is DeserializedClassDescriptor -> { + val classProto = parent.classProto + val nameResolver = parent.c.nameResolver + return classProto.getExtensionOrNull(JvmProtoBuf.classModuleName) + ?.let(nameResolver::getString) + ?: JvmProtoBufUtil.DEFAULT_MODULE_NAME + } + descriptor is DeserializedMemberDescriptor -> { + val source = descriptor.containerSource + if (source is JvmPackagePartSource) { + return source.moduleName + } + } + } + + return null +} From 3ec8b99d416ac1b8ecd6270a03a591da65c183cc Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Fri, 5 Dec 2025 09:21:39 +0100 Subject: [PATCH 06/24] Kotlin: Fix bazel format and address copilot review comments --- java/kotlin-extractor/BUILD.bazel | 2 -- java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt | 2 +- .../registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/java/kotlin-extractor/BUILD.bazel b/java/kotlin-extractor/BUILD.bazel index ab265dd946e2..665155d49f2e 100644 --- a/java/kotlin-extractor/BUILD.bazel +++ b/java/kotlin-extractor/BUILD.bazel @@ -124,8 +124,6 @@ kt_javac_options( javac_opts = ":javac-options", kotlinc_opts = ":kotlinc-options-%s" % v, module_name = "codeql-kotlin-extractor", - # resource_strip_prefix is very nit-picky: the following makes it work from - # `codeql`, `@codeql_kotlin_embeddable` and `semmle-code` resources = [ ":resources-%s" % v, ], diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index fc22eda04d47..af8015fa4573 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -2975,7 +2975,7 @@ open class KotlinFileExtractor( val locId = tw.getLocation(s) tw.writeStmts_block(blockId, parent, idx, callable) tw.writeHasLocation(blockId, locId) - // For Kotlin < 2.3, s.deligate is not-nullable. Cast to a be nullable, + // For Kotlin < 2.3, s.delegate is not-nullable. Cast to a be nullable, // as a workaround to silence warnings for kotlin < 2.3 about the elvis // operator being redundant. // For Kotlin >= 2.3, the cast is redundant, so we need to silence that warning diff --git a/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel index f0876478fe97..df66ce2051ab 100644 --- a/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel +++ b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel @@ -7,7 +7,6 @@ module( bazel_dep(name = "platforms", version = "0.0.11") bazel_dep(name = "bazel_skylib", version = "1.7.1") -# bazel_dep(name = "rules_java", version = "7.2.0") bazel_dep(name = "rules_java", version = "7.2.0") bazel_dep(name = "rules_android", version = "0.6.4") bazel_dep(name = "bazel_features", version = "1.25.0") @@ -28,10 +27,10 @@ use_repo( "com_github_google_ksp", "com_github_jetbrains_kotlin", "com_github_pinterest_ktlint", + "kotlin_build_tools_impl", "kotlinx_serialization_core_jvm", "kotlinx_serialization_json", "kotlinx_serialization_json_jvm", - "kotlin_build_tools_impl", ) register_toolchains("//kotlin/internal:default_toolchain") From 198cb8eb8b682d2f2bdb2ae1c525b69a32667613 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Sat, 20 Dec 2025 11:18:11 +0100 Subject: [PATCH 07/24] Kotlin: Strip prefix when building plugin --- java/kotlin-extractor/BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/java/kotlin-extractor/BUILD.bazel b/java/kotlin-extractor/BUILD.bazel index 665155d49f2e..a4356af1835b 100644 --- a/java/kotlin-extractor/BUILD.bazel +++ b/java/kotlin-extractor/BUILD.bazel @@ -124,6 +124,7 @@ kt_javac_options( javac_opts = ":javac-options", kotlinc_opts = ":kotlinc-options-%s" % v, module_name = "codeql-kotlin-extractor", + resource_strip_prefix = v, resources = [ ":resources-%s" % v, ], From 26613f3d5f63eb907f74a3d22481aee32e825835 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Mon, 5 Jan 2026 08:50:38 +0100 Subject: [PATCH 08/24] Kotlin: Create IrSimpleType factory function to support constructor changes introduced in Kotlin 2.3 --- .../src/main/kotlin/KotlinUsesExtractor.kt | 2 +- .../src/main/kotlin/utils/TypeSubstitution.kt | 3 +-- .../v_1_6_0/IrSimpleTypeImplCompat.kt | 19 +++++++++++++++++ .../v_2_3_0-Beta2/IrSimpleTypeImplCompat.kt | 21 +++++++++++++++++++ 4 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrSimpleTypeImplCompat.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/IrSimpleTypeImplCompat.kt diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index ba38ac1da373..eec0103723d8 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -725,7 +725,7 @@ open class KotlinUsesExtractor( componentType.isNullableCodeQL() if (unchanged) arrayType else - IrSimpleTypeImpl( + codeqlIrSimpleTypeImpl( arrayType.classifier, true, listOf(makeTypeProjection(componentTypeBroadened, Variance.INVARIANT)), diff --git a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt index f4eac03df9d0..76cbba5576a8 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt @@ -27,7 +27,6 @@ import org.jetbrains.kotlin.ir.types.IrStarProjection import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrTypeArgument import org.jetbrains.kotlin.ir.types.IrTypeProjection -import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl import org.jetbrains.kotlin.ir.types.impl.IrStarProjectionImpl import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection import org.jetbrains.kotlin.ir.util.* @@ -61,7 +60,7 @@ private fun IrSimpleType.substituteTypeArguments( } } - return IrSimpleTypeImpl(classifier, isNullableCodeQL(), newArguments, annotations) + return codeqlIrSimpleTypeImpl(classifier, isNullableCodeQL(), newArguments, annotations) } /** diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrSimpleTypeImplCompat.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrSimpleTypeImplCompat.kt new file mode 100644 index 000000000000..ed0ad405e294 --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrSimpleTypeImplCompat.kt @@ -0,0 +1,19 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall +import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol +import org.jetbrains.kotlin.ir.types.IrSimpleType +import org.jetbrains.kotlin.ir.types.IrTypeArgument +import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl + +fun codeqlIrSimpleTypeImpl( + classifier: IrClassifierSymbol, + isNullable: Boolean, + arguments: List, + annotations: List +): IrSimpleType = IrSimpleTypeImpl( + classifier, + isNullable, + arguments, + annotations +) diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/IrSimpleTypeImplCompat.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/IrSimpleTypeImplCompat.kt new file mode 100644 index 000000000000..b2b4e14731c9 --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/IrSimpleTypeImplCompat.kt @@ -0,0 +1,21 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall +import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol +import org.jetbrains.kotlin.ir.types.IrSimpleType +import org.jetbrains.kotlin.ir.types.IrTypeArgument +import org.jetbrains.kotlin.ir.types.SimpleTypeNullability +import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl + +fun codeqlIrSimpleTypeImpl( + classifier: IrClassifierSymbol, + isNullable: Boolean, + arguments: List, + annotations: List +): IrSimpleType = IrSimpleTypeImpl( + classifier, + SimpleTypeNullability.fromHasQuestionMark(isNullable), + arguments, + annotations, + null // originalKotlinType - explicitly pass null to avoid default parameter issues +) From be98773779f00c812c08e42cc660bfc8a4acc4b4 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Mon, 5 Jan 2026 14:20:27 +0100 Subject: [PATCH 09/24] Kotlin: Fix spelling --- java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index af8015fa4573..185749759479 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -2975,7 +2975,7 @@ open class KotlinFileExtractor( val locId = tw.getLocation(s) tw.writeStmts_block(blockId, parent, idx, callable) tw.writeHasLocation(blockId, locId) - // For Kotlin < 2.3, s.delegate is not-nullable. Cast to a be nullable, + // For Kotlin < 2.3, s.delegate is not-nullable. Cast to be nullable, // as a workaround to silence warnings for kotlin < 2.3 about the elvis // operator being redundant. // For Kotlin >= 2.3, the cast is redundant, so we need to silence that warning From ef304b2f4c05c8608afe1c2c0e7ea69da4547ef5 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Mon, 5 Jan 2026 14:20:49 +0100 Subject: [PATCH 10/24] Kotlin: Remove obsolete file --- ...tJvmModuleNameForDeserializedDescriptor.kt | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/getJvmModuleNameForDeserializedDescriptor.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/getJvmModuleNameForDeserializedDescriptor.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/getJvmModuleNameForDeserializedDescriptor.kt deleted file mode 100644 index 21da983e40ed..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/getJvmModuleNameForDeserializedDescriptor.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.load.kotlin.JvmPackagePartSource -import org.jetbrains.kotlin.metadata.deserialization.* -import org.jetbrains.kotlin.metadata.jvm.deserialization.* -import org.jetbrains.kotlin.metadata.jvm.JvmProtoBuf -import org.jetbrains.kotlin.resolve.DescriptorUtils.* -import org.jetbrains.kotlin.serialization.deserialization.descriptors.* - -fun getJvmModuleNameForDeserializedDescriptor(descriptor: CallableMemberDescriptor): String? { - val parent = getParentOfType(descriptor, ClassOrPackageFragmentDescriptor::class.java, false) - - when { - parent is DeserializedClassDescriptor -> { - val classProto = parent.classProto - val nameResolver = parent.c.nameResolver - return classProto.getExtensionOrNull(JvmProtoBuf.classModuleName) - ?.let(nameResolver::getString) - ?: JvmProtoBufUtil.DEFAULT_MODULE_NAME - } - descriptor is DeserializedMemberDescriptor -> { - val source = descriptor.containerSource - if (source is JvmPackagePartSource) { - return source.moduleName - } - } - } - - return null -} From d70f0c65ad5d5f3f1cf6194ae8732af476ed8095 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Mon, 5 Jan 2026 17:00:42 +0100 Subject: [PATCH 11/24] Kotlin: Remove support for Kotlin versions 1.6 and 1.7 This change rolls up all files from v1_6_0, v1_6_20, v1_7_0 and v_1_7_20. In addition, versioned files that are not overridden by any later Kotlin versions (i.e. files that only have one copy under utils/versions) are inlined and removed to simplify list of changes. List of removed/inlined files: allOverriddenIncludingSelf.kt copyTo.kt ExperimentalCompilerApi.kt getFileClassFqName.kt IsUnderscoreParameter.kt ReferenceEntity.kt SyntheticBodyKind.kt Types.kt withHasQuestionMark.kt --- .../src/main/kotlin/KotlinFileExtractor.kt | 6 +-- .../src/main/kotlin/KotlinUsesExtractor.kt | 2 +- .../src/main/kotlin/MetaAnnotationSupport.kt | 6 ++- .../src/main/kotlin/utils/ClassNames.kt | 36 ++++++++++++++++ .../src/main/kotlin/utils/GetByFqName.kt | 29 +++++++++++++ .../src/main/kotlin/utils/JvmNames.kt | 4 +- .../src/main/kotlin/utils/TypeSubstitution.kt | 11 ++++- .../v_1_6_0/ExperimentalCompilerApi.kt | 4 -- .../versions/v_1_6_0/IsUnderscoreParameter.kt | 21 ---------- .../utils/versions/v_1_6_0/ReferenceEntity.kt | 33 --------------- .../versions/v_1_6_0/SyntheticBodyKind.kt | 5 --- .../kotlin/utils/versions/v_1_6_0/Types.kt | 6 --- .../v_1_6_0/allOverriddenIncludingSelf.kt | 6 --- .../kotlin/utils/versions/v_1_6_0/copyTo.kt | 7 ---- ...rameterDeclarationWithWrappedDescriptor.kt | 7 ---- .../versions/v_1_6_0/getFileClassFqName.kt | 8 ---- .../utils/versions/v_1_6_0/getKotlinType.kt | 6 --- .../versions/v_1_6_0/withHasQuestionMark.kt | 8 ---- .../v_1_6_20/IsUnderscoreParameter.kt | 7 ---- .../kotlin/utils/versions/v_1_6_20/Types.kt | 6 --- .../versions/v_1_7_0/getFileClassFqName.kt | 41 ------------------- .../versions/v_1_7_0/withHasQuestionMark.kt | 13 ------ .../v_1_7_20/allOverriddenIncludingSelf.kt | 6 --- .../kotlin/utils/versions/v_1_7_20/copyTo.kt | 7 ---- .../{v_1_6_0 => v_1_8_0}/CodeQLIrConst.kt | 0 .../{v_1_6_0 => v_1_8_0}/CodeQLIsRoot.kt | 0 .../CommentExtractorLighterAST.kt | 0 .../v_1_8_0/ExperimentalCompilerApi.kt | 4 -- .../FirMetadataSourceFirFile.kt | 0 .../{v_1_6_0 => v_1_8_0}/IrLazyFunction.kt | 0 .../IrSimpleTypeImplCompat.kt | 0 .../{v_1_6_0 => v_1_8_0}/IrSymbolInternals.kt | 0 .../{v_1_6_0 => v_1_8_0}/IrVisitor.kt | 0 .../JvmDefaultModeIsNoCompatibility.kt | 0 .../Kotlin2ComponentRegistrar.kt | 0 .../LinesOfCodeLighterAST.kt | 0 .../versions/{v_1_6_0 => v_1_8_0}/Psi2Ir.kt | 0 .../utils/versions/v_1_8_0/ReferenceEntity.kt | 35 ---------------- .../versions/v_1_8_0/SyntheticBodyKind.kt | 5 --- .../versions/{v_1_6_0 => v_1_8_0}/UsesK2.kt | 0 .../VirtualFileBasedSourceElement.kt | 0 ...rameterDeclarationWithWrappedDescriptor.kt | 0 .../{v_1_6_0 => v_1_8_0}/getJvmDefaultMode.kt | 0 ...tJvmModuleNameForDeserializedDescriptor.kt | 0 .../{v_1_7_0 => v_1_8_0}/getKotlinType.kt | 0 .../isDispatchReceiver.kt | 0 .../{v_1_6_0 => v_1_8_0}/packageFqName.kt | 0 .../parameterIndexExcludingReceivers.kt | 0 .../versions/{v_1_6_0 => v_1_8_0}/parents.kt | 0 .../{v_1_6_0 => v_1_8_0}/typeUtils.kt | 0 50 files changed, 85 insertions(+), 244 deletions(-) delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/ExperimentalCompilerApi.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IsUnderscoreParameter.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/ReferenceEntity.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/SyntheticBodyKind.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/Types.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/allOverriddenIncludingSelf.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/copyTo.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/createImplicitParameterDeclarationWithWrappedDescriptor.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getFileClassFqName.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getKotlinType.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/withHasQuestionMark.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/IsUnderscoreParameter.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/Types.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/getFileClassFqName.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/withHasQuestionMark.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/allOverriddenIncludingSelf.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/copyTo.kt rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/CodeQLIrConst.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/CodeQLIsRoot.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/CommentExtractorLighterAST.kt (100%) delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/ExperimentalCompilerApi.kt rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/FirMetadataSourceFirFile.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/IrLazyFunction.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/IrSimpleTypeImplCompat.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/IrSymbolInternals.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/IrVisitor.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/JvmDefaultModeIsNoCompatibility.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/Kotlin2ComponentRegistrar.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/LinesOfCodeLighterAST.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/Psi2Ir.kt (100%) delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/ReferenceEntity.kt delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/SyntheticBodyKind.kt rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/UsesK2.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/VirtualFileBasedSourceElement.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_7_20 => v_1_8_0}/createImplicitParameterDeclarationWithWrappedDescriptor.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/getJvmDefaultMode.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/getJvmModuleNameForDeserializedDescriptor.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_7_0 => v_1_8_0}/getKotlinType.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/isDispatchReceiver.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/packageFqName.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/parameterIndexExcludingReceivers.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/parents.kt (100%) rename java/kotlin-extractor/src/main/kotlin/utils/versions/{v_1_6_0 => v_1_8_0}/typeUtils.kt (100%) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index 185749759479..baf0a8382161 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -1343,7 +1343,7 @@ open class KotlinFileExtractor( extractTypeAccessRecursive(substitutedType, location, id, -1) } val syntheticParameterNames = - isUnderscoreParameter(vp) || + vp.origin == IrDeclarationOrigin.UNDERSCORE_PARAMETER || ((vp.parent as? IrFunction)?.let { hasSynthesizedParameterNames(it) } ?: true) val javaParameter = when (val callable = (vp.parent as? IrFunction)?.let { getJavaCallable(it) }) { @@ -2836,7 +2836,7 @@ open class KotlinFileExtractor( when { kind == IrSyntheticBodyKind.ENUM_VALUES -> tw.writeKtSyntheticBody(callable, 1) kind == IrSyntheticBodyKind.ENUM_VALUEOF -> tw.writeKtSyntheticBody(callable, 2) - kind == kind_ENUM_ENTRIES -> tw.writeKtSyntheticBody(callable, 3) + kind == IrSyntheticBodyKind.ENUM_ENTRIES -> tw.writeKtSyntheticBody(callable, 3) else -> { logger.errorElement("Unhandled synthetic body kind " + kind, b) } @@ -3344,7 +3344,7 @@ open class KotlinFileExtractor( // that specified the default values, which will in turn dynamically dispatch back to the // relevant override. val overriddenCallTarget = - (callTarget as? IrSimpleFunction)?.allOverriddenIncludingSelf()?.firstOrNull { + (callTarget as? IrSimpleFunction)?.allOverridden(includeSelf = true)?.firstOrNull { it.overriddenSymbols.isEmpty() && it.valueParameters.any { p -> p.defaultValue != null } } ?: callTarget diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index eec0103723d8..3994850fc756 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -936,7 +936,7 @@ open class KotlinUsesExtractor( return arrayInfo.componentTypeResults } owner is IrClass -> { - val args = if (s.codeQlIsRawType()) null else s.arguments + val args = if (s.isRawType()) null else s.arguments return useSimpleTypeClass(owner, args, s.isNullableCodeQL()) } diff --git a/java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt b/java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt index 368600267c11..96d5dd8bbbdd 100644 --- a/java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt +++ b/java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt @@ -1,6 +1,5 @@ package com.github.codeql -import com.github.codeql.utils.versions.copyParameterToFunction import com.github.codeql.utils.versions.createImplicitParameterDeclarationWithWrappedDescriptor import java.lang.annotation.ElementType import java.util.HashSet @@ -21,7 +20,9 @@ import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrConstructor import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.IrEnumEntry +import org.jetbrains.kotlin.ir.declarations.IrFunction import org.jetbrains.kotlin.ir.declarations.IrProperty +import org.jetbrains.kotlin.ir.declarations.IrValueParameter import org.jetbrains.kotlin.ir.expressions.IrClassReference import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.expressions.IrGetEnumValue @@ -31,6 +32,7 @@ import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.types.typeWith import org.jetbrains.kotlin.ir.util.constructedClass import org.jetbrains.kotlin.ir.util.constructors +import org.jetbrains.kotlin.ir.util.copyTo import org.jetbrains.kotlin.ir.util.deepCopyWithSymbols import org.jetbrains.kotlin.ir.util.defaultType import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable @@ -330,7 +332,7 @@ class MetaAnnotationSupport( ) return } - val newParam = copyParameterToFunction(thisReceiever, this) + val newParam = thisReceiever.copyTo(this) dispatchReceiverParameter = newParam body = factory diff --git a/java/kotlin-extractor/src/main/kotlin/utils/ClassNames.kt b/java/kotlin-extractor/src/main/kotlin/utils/ClassNames.kt index a18dd06247f7..97eb6d0bca46 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/ClassNames.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/ClassNames.kt @@ -12,9 +12,11 @@ import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable import org.jetbrains.kotlin.ir.util.parentClassOrNull import org.jetbrains.kotlin.load.java.sources.JavaSourceElement import org.jetbrains.kotlin.load.java.structure.impl.classFiles.BinaryJavaClass +import org.jetbrains.kotlin.load.kotlin.FacadeClassSource import org.jetbrains.kotlin.load.kotlin.JvmPackagePartSource import org.jetbrains.kotlin.load.kotlin.KotlinJvmBinarySourceElement import org.jetbrains.kotlin.load.kotlin.VirtualFileKotlinClass +import org.jetbrains.kotlin.name.FqName // Adapted from Kotlin's interpreter/Utils.kt function 'internalName' // Translates class names into their JLS section 13.1 binary name, @@ -31,6 +33,40 @@ fun getFileClassName(f: IrFile) = .replaceFirst(Regex("""\.kt$"""), "") .replaceFirstChar { it.uppercase() }) + "Kt") +fun getFileClassFqName(d: IrDeclaration): FqName? { + // d is in a file class. + // Get the name in a similar way to the compiler's ExternalPackageParentPatcherLowering + // visitMemberAccess/generateOrGetFacadeClass. + + // But first, fields aren't IrMemberWithContainerSource, so we need + // to get back to the property (if there is one) + if (d is IrField) { + val propSym = d.correspondingPropertySymbol + if (propSym != null) { + return getFileClassFqName(propSym.owner) + } + } + + // Now the main code + if (d is IrMemberWithContainerSource) { + val containerSource = d.containerSource + if (containerSource is FacadeClassSource) { + val facadeClassName = containerSource.facadeClassName + if (facadeClassName != null) { + // TODO: This is really a multifile-class rather than a file-class, + // but for now we treat them the same. + return facadeClassName.fqNameForTopLevelClassMaybeWithDollars + } else { + return containerSource.className.fqNameForTopLevelClassMaybeWithDollars + } + } else { + return null + } + } else { + return null + } +} + fun getIrElementBinaryName(that: IrElement): String { if (that is IrFile) { val shortName = getFileClassName(that) diff --git a/java/kotlin-extractor/src/main/kotlin/utils/GetByFqName.kt b/java/kotlin-extractor/src/main/kotlin/utils/GetByFqName.kt index a3f5bb80a48e..8fff87475948 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/GetByFqName.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/GetByFqName.kt @@ -2,9 +2,38 @@ package com.github.codeql.utils import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext import org.jetbrains.kotlin.ir.symbols.* +import org.jetbrains.kotlin.name.CallableId +import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name +fun getClassByFqName(pluginContext: IrPluginContext, fqName: FqName): IrClassSymbol? { + val id = ClassId.topLevel(fqName) + return getClassByClassId(pluginContext, id) +} + +fun getClassByClassId(pluginContext: IrPluginContext, id: ClassId): IrClassSymbol? { + return pluginContext.referenceClass(id) +} + +fun getFunctionsByFqName( + pluginContext: IrPluginContext, + pkgName: FqName, + name: Name +): Collection { + val id = CallableId(pkgName, name) + return pluginContext.referenceFunctions(id) +} + +fun getPropertiesByFqName( + pluginContext: IrPluginContext, + pkgName: FqName, + name: Name +): Collection { + val id = CallableId(pkgName, name) + return pluginContext.referenceProperties(id) +} + fun getClassByFqName(pluginContext: IrPluginContext, fqName: String): IrClassSymbol? { return getClassByFqName(pluginContext, FqName(fqName)) } diff --git a/java/kotlin-extractor/src/main/kotlin/utils/JvmNames.kt b/java/kotlin-extractor/src/main/kotlin/utils/JvmNames.kt index ec7c17b39fc6..02059b3db649 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/JvmNames.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/JvmNames.kt @@ -1,6 +1,5 @@ package com.github.codeql.utils -import com.github.codeql.utils.versions.allOverriddenIncludingSelf import com.github.codeql.utils.versions.CodeQLIrConst import org.jetbrains.kotlin.builtins.StandardNames import org.jetbrains.kotlin.ir.declarations.IrAnnotationContainer @@ -9,6 +8,7 @@ import org.jetbrains.kotlin.ir.declarations.IrFunction import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.types.IrSimpleType +import org.jetbrains.kotlin.ir.util.allOverridden import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable import org.jetbrains.kotlin.ir.util.packageFqName import org.jetbrains.kotlin.ir.util.parentClassOrNull @@ -62,7 +62,7 @@ private val specialFunctionShortNames = specialFunctions.keys.map { it.functionN private fun getSpecialJvmName(f: IrFunction): String? { if (specialFunctionShortNames.contains(f.name) && f is IrSimpleFunction) { - f.allOverriddenIncludingSelf().forEach { overriddenFunc -> + f.allOverridden(includeSelf = true).forEach { overriddenFunc -> overriddenFunc.parentClassOrNull?.fqNameWhenAvailable?.let { parentFqName -> specialFunctions[MethodKey(parentFqName, f.name)]?.let { return it diff --git a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt index 76cbba5576a8..ba9b21ab3b86 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt @@ -3,7 +3,6 @@ package com.github.codeql.utils import com.github.codeql.KotlinUsesExtractor import com.github.codeql.Logger import com.github.codeql.getJavaEquivalentClassId -import com.github.codeql.utils.versions.codeQlWithHasQuestionMark import com.github.codeql.utils.versions.createImplicitParameterDeclarationWithWrappedDescriptor import com.github.codeql.utils.versions.* import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext @@ -21,6 +20,8 @@ import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol import org.jetbrains.kotlin.ir.symbols.impl.DescriptorlessExternalPackageFragmentSymbol import org.jetbrains.kotlin.ir.types.addAnnotations import org.jetbrains.kotlin.ir.types.classifierOrNull +import org.jetbrains.kotlin.ir.types.makeNotNull +import org.jetbrains.kotlin.ir.types.makeNullable import org.jetbrains.kotlin.ir.types.typeWith import org.jetbrains.kotlin.ir.types.IrSimpleType import org.jetbrains.kotlin.ir.types.IrStarProjection @@ -35,6 +36,14 @@ import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull +fun IrType.codeQlWithHasQuestionMark(b: Boolean): IrType { + if (b) { + return this.makeNullable() + } else { + return this.makeNotNull() + } +} + fun IrType.substituteTypeArguments(params: List, arguments: List) = when (this) { is IrSimpleType -> substituteTypeArguments(params.map { it.symbol }.zip(arguments).toMap()) diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/ExperimentalCompilerApi.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/ExperimentalCompilerApi.kt deleted file mode 100644 index 9b40a26bc511..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/ExperimentalCompilerApi.kt +++ /dev/null @@ -1,4 +0,0 @@ -package org.jetbrains.kotlin.compiler.plugin - -@RequiresOptIn("This API is experimental. There are no stability guarantees for it") -annotation class ExperimentalCompilerApi diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IsUnderscoreParameter.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IsUnderscoreParameter.kt deleted file mode 100644 index cb0fae2555b6..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IsUnderscoreParameter.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrValueParameter -import org.jetbrains.kotlin.psi.KtParameter -import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils -import org.jetbrains.kotlin.resolve.calls.util.isSingleUnderscore -import org.jetbrains.kotlin.utils.addToStdlib.safeAs - -@OptIn(ObsoleteDescriptorBasedAPI::class) -fun isUnderscoreParameter(vp: IrValueParameter) = - try { - DescriptorToSourceUtils.getSourceFromDescriptor(vp.descriptor) - ?.safeAs() - ?.isSingleUnderscore == true - } catch (e: NotImplementedError) { - // Some kinds of descriptor throw in `getSourceFromDescriptor` as that method is not - // normally expected to - // be applied to synthetic functions. - false - } diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/ReferenceEntity.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/ReferenceEntity.kt deleted file mode 100644 index 22e49c974443..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/ReferenceEntity.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.github.codeql.utils - -import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext -import org.jetbrains.kotlin.ir.symbols.* -import org.jetbrains.kotlin.name.ClassId -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.name.Name - -fun getClassByFqName(pluginContext: IrPluginContext, fqName: FqName): IrClassSymbol? { - return pluginContext.referenceClass(fqName) -} - -fun getClassByClassId(pluginContext: IrPluginContext, id: ClassId): IrClassSymbol? { - return getClassByFqName(pluginContext, id.asSingleFqName()) -} - -fun getFunctionsByFqName( - pluginContext: IrPluginContext, - pkgName: FqName, - name: Name -): Collection { - val fqName = pkgName.child(name) - return pluginContext.referenceFunctions(fqName) -} - -fun getPropertiesByFqName( - pluginContext: IrPluginContext, - pkgName: FqName, - name: Name -): Collection { - val fqName = pkgName.child(name) - return pluginContext.referenceProperties(fqName) -} diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/SyntheticBodyKind.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/SyntheticBodyKind.kt deleted file mode 100644 index 2d71b430c9f3..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/SyntheticBodyKind.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.expressions.IrSyntheticBodyKind - -val kind_ENUM_ENTRIES: IrSyntheticBodyKind? = null diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/Types.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/Types.kt deleted file mode 100644 index 61a580e2a279..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/Types.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.backend.jvm.codegen.isRawType -import org.jetbrains.kotlin.ir.types.IrSimpleType - -fun IrSimpleType.codeQlIsRawType() = this.isRawType() diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/allOverriddenIncludingSelf.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/allOverriddenIncludingSelf.kt deleted file mode 100644 index 24ac7e40f481..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/allOverriddenIncludingSelf.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.backend.common.ir.allOverridden -import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction - -fun IrSimpleFunction.allOverriddenIncludingSelf() = this.allOverridden(includeSelf = true) diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/copyTo.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/copyTo.kt deleted file mode 100644 index a0d46acc56e8..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/copyTo.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.backend.common.ir.copyTo -import org.jetbrains.kotlin.ir.declarations.IrFunction -import org.jetbrains.kotlin.ir.declarations.IrValueParameter - -fun copyParameterToFunction(p: IrValueParameter, f: IrFunction) = p.copyTo(f) diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/createImplicitParameterDeclarationWithWrappedDescriptor.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/createImplicitParameterDeclarationWithWrappedDescriptor.kt deleted file mode 100644 index 36016980af19..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/createImplicitParameterDeclarationWithWrappedDescriptor.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.backend.common.ir.createImplicitParameterDeclarationWithWrappedDescriptor -import org.jetbrains.kotlin.ir.declarations.IrClass - -fun IrClass.createImplicitParameterDeclarationWithWrappedDescriptor() = - this.createImplicitParameterDeclarationWithWrappedDescriptor() diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getFileClassFqName.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getFileClassFqName.kt deleted file mode 100644 index 4400589ae343..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getFileClassFqName.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.name.FqName - -fun getFileClassFqName(@Suppress("UNUSED_PARAMETER") d: IrDeclaration): FqName? { - return null -} diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getKotlinType.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getKotlinType.kt deleted file mode 100644 index 3f21550f13f6..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getKotlinType.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.types.IrSimpleType -import org.jetbrains.kotlin.ir.types.impl.IrTypeBase - -fun getKotlinType(s: IrSimpleType) = (s as? IrTypeBase)?.kotlinType diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/withHasQuestionMark.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/withHasQuestionMark.kt deleted file mode 100644 index 114391ae6bfe..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/withHasQuestionMark.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.types.withHasQuestionMark - -fun IrType.codeQlWithHasQuestionMark(b: Boolean): IrType { - return this.withHasQuestionMark(b) -} diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/IsUnderscoreParameter.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/IsUnderscoreParameter.kt deleted file mode 100644 index d727126ffc4a..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/IsUnderscoreParameter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrValueParameter - -fun isUnderscoreParameter(vp: IrValueParameter) = - vp.origin == IrDeclarationOrigin.UNDERSCORE_PARAMETER diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/Types.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/Types.kt deleted file mode 100644 index 7db5d520b29f..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/Types.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.backend.jvm.ir.isRawType -import org.jetbrains.kotlin.ir.types.IrSimpleType - -fun IrSimpleType.codeQlIsRawType() = this.isRawType() diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/getFileClassFqName.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/getFileClassFqName.kt deleted file mode 100644 index 82275ba0342d..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/getFileClassFqName.kt +++ /dev/null @@ -1,41 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.declarations.IrField -import org.jetbrains.kotlin.ir.declarations.IrMemberWithContainerSource -import org.jetbrains.kotlin.load.kotlin.FacadeClassSource -import org.jetbrains.kotlin.name.FqName - -fun getFileClassFqName(d: IrDeclaration): FqName? { - // d is in a file class. - // Get the name in a similar way to the compiler's ExternalPackageParentPatcherLowering - // visitMemberAccess/generateOrGetFacadeClass. - - // But first, fields aren't IrMemberWithContainerSource, so we need - // to get back to the property (if there is one) - if (d is IrField) { - val propSym = d.correspondingPropertySymbol - if (propSym != null) { - return getFileClassFqName(propSym.owner) - } - } - - // Now the main code - if (d is IrMemberWithContainerSource) { - val containerSource = d.containerSource - if (containerSource is FacadeClassSource) { - val facadeClassName = containerSource.facadeClassName - if (facadeClassName != null) { - // TODO: This is really a multifile-class rather than a file-class, - // but for now we treat them the same. - return facadeClassName.fqNameForTopLevelClassMaybeWithDollars - } else { - return containerSource.className.fqNameForTopLevelClassMaybeWithDollars - } - } else { - return null - } - } else { - return null - } -} diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/withHasQuestionMark.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/withHasQuestionMark.kt deleted file mode 100644 index f4e171f8fb2a..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/withHasQuestionMark.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.types.makeNotNull -import org.jetbrains.kotlin.ir.types.makeNullable - -fun IrType.codeQlWithHasQuestionMark(b: Boolean): IrType { - if (b) { - return this.makeNullable() - } else { - return this.makeNotNull() - } -} diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/allOverriddenIncludingSelf.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/allOverriddenIncludingSelf.kt deleted file mode 100644 index 2d33930ecbcf..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/allOverriddenIncludingSelf.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction -import org.jetbrains.kotlin.ir.util.allOverridden - -fun IrSimpleFunction.allOverriddenIncludingSelf() = this.allOverridden(includeSelf = true) diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/copyTo.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/copyTo.kt deleted file mode 100644 index a68e93432470..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/copyTo.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.declarations.IrFunction -import org.jetbrains.kotlin.ir.declarations.IrValueParameter -import org.jetbrains.kotlin.ir.util.copyTo - -fun copyParameterToFunction(p: IrValueParameter, f: IrFunction) = p.copyTo(f) diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/CodeQLIrConst.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/CodeQLIrConst.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/CodeQLIrConst.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/CodeQLIrConst.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/CodeQLIsRoot.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/CodeQLIsRoot.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/CodeQLIsRoot.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/CodeQLIsRoot.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/CommentExtractorLighterAST.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/CommentExtractorLighterAST.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/CommentExtractorLighterAST.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/CommentExtractorLighterAST.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/ExperimentalCompilerApi.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/ExperimentalCompilerApi.kt deleted file mode 100644 index 48829cc30c5f..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/ExperimentalCompilerApi.kt +++ /dev/null @@ -1,4 +0,0 @@ -package com.github.codeql - -// The compiler provides the annotation class, so we don't need to do -// anything diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/FirMetadataSourceFirFile.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/FirMetadataSourceFirFile.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/FirMetadataSourceFirFile.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/FirMetadataSourceFirFile.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrLazyFunction.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/IrLazyFunction.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrLazyFunction.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/IrLazyFunction.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrSimpleTypeImplCompat.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/IrSimpleTypeImplCompat.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrSimpleTypeImplCompat.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/IrSimpleTypeImplCompat.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrSymbolInternals.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/IrSymbolInternals.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrSymbolInternals.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/IrSymbolInternals.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrVisitor.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/IrVisitor.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/IrVisitor.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/IrVisitor.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/JvmDefaultModeIsNoCompatibility.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/JvmDefaultModeIsNoCompatibility.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/JvmDefaultModeIsNoCompatibility.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/JvmDefaultModeIsNoCompatibility.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/Kotlin2ComponentRegistrar.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/Kotlin2ComponentRegistrar.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/Kotlin2ComponentRegistrar.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/Kotlin2ComponentRegistrar.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/LinesOfCodeLighterAST.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/LinesOfCodeLighterAST.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/LinesOfCodeLighterAST.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/LinesOfCodeLighterAST.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/Psi2Ir.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/Psi2Ir.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/Psi2Ir.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/Psi2Ir.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/ReferenceEntity.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/ReferenceEntity.kt deleted file mode 100644 index 666e4e38386a..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/ReferenceEntity.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.github.codeql.utils - -import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext -import org.jetbrains.kotlin.ir.symbols.* -import org.jetbrains.kotlin.name.CallableId -import org.jetbrains.kotlin.name.ClassId -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.name.Name - -fun getClassByFqName(pluginContext: IrPluginContext, fqName: FqName): IrClassSymbol? { - val id = ClassId.topLevel(fqName) - return getClassByClassId(pluginContext, id) -} - -fun getClassByClassId(pluginContext: IrPluginContext, id: ClassId): IrClassSymbol? { - return pluginContext.referenceClass(id) -} - -fun getFunctionsByFqName( - pluginContext: IrPluginContext, - pkgName: FqName, - name: Name -): Collection { - val id = CallableId(pkgName, name) - return pluginContext.referenceFunctions(id) -} - -fun getPropertiesByFqName( - pluginContext: IrPluginContext, - pkgName: FqName, - name: Name -): Collection { - val id = CallableId(pkgName, name) - return pluginContext.referenceProperties(id) -} diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/SyntheticBodyKind.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/SyntheticBodyKind.kt deleted file mode 100644 index 4c654282ca78..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/SyntheticBodyKind.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.github.codeql.utils.versions - -import org.jetbrains.kotlin.ir.expressions.IrSyntheticBodyKind - -val kind_ENUM_ENTRIES: IrSyntheticBodyKind? = IrSyntheticBodyKind.ENUM_ENTRIES diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/UsesK2.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/UsesK2.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/UsesK2.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/UsesK2.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/VirtualFileBasedSourceElement.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/VirtualFileBasedSourceElement.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/VirtualFileBasedSourceElement.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/VirtualFileBasedSourceElement.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/createImplicitParameterDeclarationWithWrappedDescriptor.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/createImplicitParameterDeclarationWithWrappedDescriptor.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_20/createImplicitParameterDeclarationWithWrappedDescriptor.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/createImplicitParameterDeclarationWithWrappedDescriptor.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getJvmDefaultMode.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/getJvmDefaultMode.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getJvmDefaultMode.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/getJvmDefaultMode.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getJvmModuleNameForDeserializedDescriptor.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/getJvmModuleNameForDeserializedDescriptor.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/getJvmModuleNameForDeserializedDescriptor.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/getJvmModuleNameForDeserializedDescriptor.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/getKotlinType.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/getKotlinType.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_7_0/getKotlinType.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/getKotlinType.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/isDispatchReceiver.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/isDispatchReceiver.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/isDispatchReceiver.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/isDispatchReceiver.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/packageFqName.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/packageFqName.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/packageFqName.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/packageFqName.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/parameterIndexExcludingReceivers.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/parameterIndexExcludingReceivers.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/parameterIndexExcludingReceivers.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/parameterIndexExcludingReceivers.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/parents.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/parents.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/parents.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/parents.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/typeUtils.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/typeUtils.kt similarity index 100% rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_0/typeUtils.kt rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_8_0/typeUtils.kt From ae05362a02319777a6b9d93ce4b009155b9ce574 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Mon, 5 Jan 2026 17:15:16 +0100 Subject: [PATCH 12/24] Kotlin: Add additional warning suppresion to v1_9_0 and remove copy in v2_3_0 --- .../v_1_9_0-Beta/Kotlin2ComponentRegistrar.kt | 2 +- .../v_2_3_0-Beta2/Kotlin2ComponentRegistrar.kt | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/Kotlin2ComponentRegistrar.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_9_0-Beta/Kotlin2ComponentRegistrar.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_9_0-Beta/Kotlin2ComponentRegistrar.kt index 323d8e2c2836..e20c45ddc4d4 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_9_0-Beta/Kotlin2ComponentRegistrar.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_9_0-Beta/Kotlin2ComponentRegistrar.kt @@ -1,5 +1,5 @@ // For ComponentRegistrar -@file:Suppress("DEPRECATION") +@file:Suppress("DEPRECATION", "DEPRECATION_ERROR") package com.github.codeql diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/Kotlin2ComponentRegistrar.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/Kotlin2ComponentRegistrar.kt deleted file mode 100644 index e20c45ddc4d4..000000000000 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_3_0-Beta2/Kotlin2ComponentRegistrar.kt +++ /dev/null @@ -1,13 +0,0 @@ -// For ComponentRegistrar -@file:Suppress("DEPRECATION", "DEPRECATION_ERROR") - -package com.github.codeql - -import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar -import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi - -@OptIn(ExperimentalCompilerApi::class) -abstract class Kotlin2ComponentRegistrar : ComponentRegistrar { - override val supportsK2: Boolean - get() = true -} From bf6e3c582f0c43f7c833c0163ca4a5f5b13f892c Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Tue, 6 Jan 2026 13:55:48 +0100 Subject: [PATCH 13/24] Kotlin: Do not skip writing of getter and setters if the local deligate is null --- .../src/main/kotlin/KotlinFileExtractor.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index baf0a8382161..f83d887eb56f 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -2979,19 +2979,19 @@ open class KotlinFileExtractor( // as a workaround to silence warnings for kotlin < 2.3 about the elvis // operator being redundant. // For Kotlin >= 2.3, the cast is redundant, so we need to silence that warning - @Suppress("USELESS_CAST") - val delegate = (s.delegate as IrVariable?) ?: run { - logger.errorElement("Local delegated property is missing delegate", s) - return - } - extractVariable(delegate, callable, blockId, 0) - + val delegate = s.delegate as IrVariable? val propId = tw.getFreshIdLabel() - tw.writeKtProperties(propId, s.name.asString()) - tw.writeHasLocation(propId, locId) - tw.writeKtPropertyDelegates(propId, useVariable(delegate)) + if (delegate == null) { + // This is not expected to happen, as the plugin hooks into the pipeline before IR lowering. + logger.errorElement("Local delegated property is missing delegate", s) + } else { + extractVariable(delegate, callable, blockId, 0) + tw.writeKtProperties(propId, s.name.asString()) + tw.writeHasLocation(propId, locId) + tw.writeKtPropertyDelegates(propId, useVariable(delegate)) + } // Getter: extractStatement(s.getter, callable, blockId, 1) val getterLabel = getLocallyVisibleFunctionLabels(s.getter).function From 0d3a3a85e14a81d65d76edc929fd619741d367f8 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 8 Jan 2026 10:04:37 +0100 Subject: [PATCH 14/24] Kotlin: Add changenotes for Kotlin 2.3 support and removal of support for Kotlin 1.6 and 1.7 --- java/ql/lib/change-notes/2026-01-07-kotlin-2_3.md | 4 ++++ .../2026-01-07-kotlin-mimimum_suppoted_version.md | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 java/ql/lib/change-notes/2026-01-07-kotlin-2_3.md create mode 100644 java/ql/lib/change-notes/2026-01-07-kotlin-mimimum_suppoted_version.md diff --git a/java/ql/lib/change-notes/2026-01-07-kotlin-2_3.md b/java/ql/lib/change-notes/2026-01-07-kotlin-2_3.md new file mode 100644 index 000000000000..82253f0e5e8c --- /dev/null +++ b/java/ql/lib/change-notes/2026-01-07-kotlin-2_3.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Kotlin versions up to 2.3.0\ *x* are now supported. diff --git a/java/ql/lib/change-notes/2026-01-07-kotlin-mimimum_suppoted_version.md b/java/ql/lib/change-notes/2026-01-07-kotlin-mimimum_suppoted_version.md new file mode 100644 index 000000000000..6877579f6c67 --- /dev/null +++ b/java/ql/lib/change-notes/2026-01-07-kotlin-mimimum_suppoted_version.md @@ -0,0 +1,4 @@ +--- +category: breaking +--- +* Support for Kotlin 1.6.x and 1.7.x series has been dropped From 6aabadda646c9016baf395d02cd4a8b966621e20 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Wed, 7 Jan 2026 10:16:31 +0100 Subject: [PATCH 15/24] Kotlin: Bump versions in documentation --- docs/codeql/reusables/supported-versions-compilers.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/codeql/reusables/supported-versions-compilers.rst b/docs/codeql/reusables/supported-versions-compilers.rst index c03713bdce25..fd937fe4ac02 100644 --- a/docs/codeql/reusables/supported-versions-compilers.rst +++ b/docs/codeql/reusables/supported-versions-compilers.rst @@ -21,7 +21,7 @@ Java,"Java 7 to 25 [6]_","javac (OpenJDK and Oracle JDK), Eclipse compiler for Java (ECJ) [7]_",``.java`` - Kotlin,"Kotlin 1.6.0 [15]_ to 2.2.2\ *x*","kotlinc",``.kt`` + Kotlin,"Kotlin 1.8.0 to 2.3.0\ *x*","kotlinc",``.kt`` JavaScript,ECMAScript 2022 or lower,Not applicable,"``.js``, ``.jsx``, ``.mjs``, ``.es``, ``.es6``, ``.htm``, ``.html``, ``.xhtm``, ``.xhtml``, ``.vue``, ``.hbs``, ``.ejs``, ``.njk``, ``.json``, ``.yaml``, ``.yml``, ``.raml``, ``.xml`` [8]_" Python [9]_,"2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13",Not applicable,``.py`` Ruby [10]_,"up to 3.3",Not applicable,"``.rb``, ``.erb``, ``.gemspec``, ``Gemfile``" @@ -45,4 +45,3 @@ .. [12] Support for the analysis of Swift requires macOS. .. [13] Embedded Swift is not supported. .. [14] TypeScript analysis is performed by running the JavaScript extractor with TypeScript enabled. This is the default. - .. [15] Support for Kotlin versions 1.6 and 1.7 is deprecated and will be removed in release 2.24.1. From 02c121c1b1b6b1be8ee070d26f0ea229ed9e2ddc Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Wed, 7 Jan 2026 10:59:00 +0100 Subject: [PATCH 16/24] Kotlin: Bump default version --- java/kotlin-extractor/dev/wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/kotlin-extractor/dev/wrapper.py b/java/kotlin-extractor/dev/wrapper.py index aeef81e5c1d2..3f09ea53a4f0 100755 --- a/java/kotlin-extractor/dev/wrapper.py +++ b/java/kotlin-extractor/dev/wrapper.py @@ -27,7 +27,7 @@ import io import os -DEFAULT_VERSION = "2.2.0" +DEFAULT_VERSION = "2.3.0-Beta2" def options(): From e70f6e4ce253d3d1368e8cf9d236d594d5c4bfe7 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Wed, 7 Jan 2026 11:23:10 +0100 Subject: [PATCH 17/24] Kotlin: Bump upper bound for supported kotlin version in integration test --- .../diagnostics/kotlin-version-too-new/diagnostics.expected | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected index 50cbd2609f26..5ef0ef541962 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected +++ b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.2.30.", + "markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.3.10.", "severity": "error", "source": { "extractorName": "java", From faccf3b5d70c8fa4c9a3f2821fe8188453459798 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 8 Jan 2026 09:59:31 +0100 Subject: [PATCH 18/24] Kotlin: Update kotlin compiler version in integration tests --- .../kotlin/all-platforms/compiler_arguments/app/build.gradle | 2 +- .../kotlin/all-platforms/gradle_groovy_app/app/build.gradle | 2 +- .../kotlin/all-platforms/kotlin_kfunction/app/build.gradle | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/app/build.gradle b/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/app/build.gradle index c0bc33405247..8b91012467ec 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/app/build.gradle +++ b/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/app/build.gradle @@ -8,7 +8,7 @@ plugins { // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin. - id 'org.jetbrains.kotlin.jvm' version '1.7.0' + id 'org.jetbrains.kotlin.jvm' version '1.8.0' // Apply the application plugin to add support for building a CLI application in Java. id 'application' diff --git a/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/app/build.gradle b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/app/build.gradle index 8ef1009376c9..8b91012467ec 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/app/build.gradle +++ b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/app/build.gradle @@ -8,7 +8,7 @@ plugins { // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin. - id 'org.jetbrains.kotlin.jvm' version '1.6.0' + id 'org.jetbrains.kotlin.jvm' version '1.8.0' // Apply the application plugin to add support for building a CLI application in Java. id 'application' diff --git a/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/app/build.gradle b/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/app/build.gradle index 924524190cff..8b91012467ec 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/app/build.gradle +++ b/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/app/build.gradle @@ -8,7 +8,7 @@ plugins { // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin. - id 'org.jetbrains.kotlin.jvm' version '1.6.20' + id 'org.jetbrains.kotlin.jvm' version '1.8.0' // Apply the application plugin to add support for building a CLI application in Java. id 'application' From 25031cd4404d668fa6f35313630888f1269a8a22 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 8 Jan 2026 10:02:45 +0100 Subject: [PATCH 19/24] Kotlin: Update kotlin serialization integration test to use Kotlin compiler 1.8.10 and accept test changes --- .../PrintAst.expected | 476 +----------------- .../app/build.gradle | 7 +- .../diag.expected | 2 - 3 files changed, 15 insertions(+), 470 deletions(-) diff --git a/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/PrintAst.expected b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/PrintAst.expected index 752db3cd6471..3fe2e593cef8 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/PrintAst.expected +++ b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/PrintAst.expected @@ -21,35 +21,6 @@ app/src/main/kotlin/testProject/App.kt: # 0| 0: [TypeAccess] int # 0| 3: [Parameter] serializationConstructorMarker # 0| 0: [TypeAccess] SerializationConstructorMarker -# 7| 5: [BlockStmt] { ... } -# 7| 0: [ExprStmt] ; -# 7| 0: [WhenExpr] when ... -# 7| 0: [WhenBranch] ... -> ... -# 7| 0: [ValueNEExpr] ... (value not-equals) ... -# 7| 0: [IntegerLiteral] 3 -# 7| 1: [AndBitwiseExpr] ... & ... -# 7| 0: [IntegerLiteral] 3 -# 7| 1: [VarAccess] seen1 -# 7| 1: [ExprStmt] ; -# 7| 0: [MethodCall] throwMissingFieldException(...) -# 7| -1: [TypeAccess] PluginExceptionsKt -# 7| 0: [VarAccess] seen1 -# 7| 1: [IntegerLiteral] 3 -# 7| 2: [MethodCall] getDescriptor(...) -# 7| -1: [VarAccess] INSTANCE -# 7| 1: [SuperConstructorInvocationStmt] super(...) -# 7| 2: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] Project.this.name -# 7| -1: [ThisAccess] Project.this -# 7| 0: [TypeAccess] Project -# 7| 1: [VarAccess] name -# 7| 3: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] Project.this.language -# 7| -1: [ThisAccess] Project.this -# 7| 0: [TypeAccess] Project -# 7| 1: [VarAccess] language # 0| 2: [Method] component1 #-----| 1: (Annotations) # 0| 1: [Annotation] NotNull @@ -224,21 +195,6 @@ app/src/main/kotlin/testProject/App.kt: #-----| -1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 0: [TypeAccess] SerialDescriptor -# 7| 5: [BlockStmt] { ... } -# 7| 0: [ExprStmt] ; -# 7| 0: [MethodCall] encodeStringElement(...) -# 7| -1: [VarAccess] output -# 7| 0: [VarAccess] serialDesc -# 7| 1: [IntegerLiteral] 0 -# 7| 2: [MethodCall] getName(...) -# 7| -1: [VarAccess] self -# 7| 1: [ExprStmt] ; -# 7| 0: [MethodCall] encodeIntElement(...) -# 7| -1: [VarAccess] output -# 7| 0: [VarAccess] serialDesc -# 7| 1: [IntegerLiteral] 1 -# 7| 2: [MethodCall] getLanguage(...) -# 7| -1: [VarAccess] self # 7| 10: [Class] $serializer #-----| -3: (Annotations) # 0| 1: [Annotation] Deprecated @@ -248,21 +204,13 @@ app/src/main/kotlin/testProject/App.kt: # 0| 2: [ArrayInit] {...} # 0| 3: [VarAccess] DeprecationLevel.HIDDEN # 0| -1: [TypeAccess] DeprecationLevel -# 0| 1: [FieldDeclaration] SerialDescriptor descriptor; -# 0| -1: [TypeAccess] SerialDescriptor -# 0| 2: [Method] childSerializers +# 0| 1: [Method] childSerializers #-----| 1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 3: [TypeAccess] KSerializer[] # 0| 0: [TypeAccess] KSerializer # 0| 0: [WildcardTypeAccess] ? ... -# 7| 5: [BlockStmt] { ... } -# 7| 0: [ReturnStmt] return ... -# 7| 0: [ArrayCreationExpr] new KSerializer[] -# 7| -2: [ArrayInit] {...} -# 7| -1: [TypeAccess] KSerializer -# 7| 0: [IntegerLiteral] 2 -# 0| 3: [Method] deserialize +# 0| 2: [Method] deserialize #-----| 1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 3: [TypeAccess] Project @@ -271,148 +219,11 @@ app/src/main/kotlin/testProject/App.kt: #-----| -1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 0: [TypeAccess] Decoder -# 7| 5: [BlockStmt] { ... } -# 7| 0: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp0_desc -# 7| 0: [MethodCall] getDescriptor(...) -# 7| -1: [ThisAccess] this -# 7| 1: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp1_flag -# 7| 0: [BooleanLiteral] true -# 7| 2: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp2_index -# 7| 0: [IntegerLiteral] 0 -# 7| 3: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp3_bitMask0 -# 7| 0: [IntegerLiteral] 0 -# 7| 4: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp4_local0 -# 7| 0: [NullLiteral] null -# 7| 5: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp5_local1 -# 7| 0: [IntegerLiteral] 0 -# 7| 6: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp6_input -# 7| 0: [MethodCall] beginStructure(...) -# 7| -1: [VarAccess] decoder -# 7| 0: [VarAccess] tmp0_desc -# 7| 7: [ExprStmt] ; -# 7| 0: [WhenExpr] when ... -# 7| 0: [WhenBranch] ... -> ... -# 7| 0: [MethodCall] decodeSequentially(...) -# 7| -1: [VarAccess] tmp6_input -# 7| 1: [BlockStmt] { ... } -# 7| 0: [BlockStmt] { ... } -# 7| 0: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp4_local0 -# 7| 1: [MethodCall] decodeStringElement(...) -# 7| -1: [VarAccess] tmp6_input -# 7| 0: [VarAccess] tmp0_desc -# 7| 1: [IntegerLiteral] 0 -# 7| 1: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp3_bitMask0 -# 7| 1: [OrBitwiseExpr] ... | ... -# 7| 0: [VarAccess] tmp3_bitMask0 -# 7| 1: [IntegerLiteral] 1 -# 7| 1: [BlockStmt] { ... } -# 7| 0: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp5_local1 -# 7| 1: [MethodCall] decodeIntElement(...) -# 7| -1: [VarAccess] tmp6_input -# 7| 0: [VarAccess] tmp0_desc -# 7| 1: [IntegerLiteral] 1 -# 7| 1: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp3_bitMask0 -# 7| 1: [OrBitwiseExpr] ... | ... -# 7| 0: [VarAccess] tmp3_bitMask0 -# 7| 1: [IntegerLiteral] 2 -# 7| 1: [WhenBranch] ... -> ... -# 7| 0: [BooleanLiteral] true -# 7| 1: [WhileStmt] while (...) -# 7| 0: [VarAccess] tmp1_flag -# 7| 1: [BlockStmt] { ... } -# 7| 0: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp2_index -# 7| 1: [MethodCall] decodeElementIndex(...) -# 7| -1: [VarAccess] tmp6_input -# 7| 0: [VarAccess] tmp0_desc -# 7| 1: [ExprStmt] ; -# 7| 0: [WhenExpr] when ... -# 7| 0: [WhenBranch] ... -> ... -# 7| 0: [ValueEQExpr] ... (value equals) ... -# 7| 0: [VarAccess] tmp2_index -# 7| 1: [IntegerLiteral] -1 -# 7| 1: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp1_flag -# 7| 1: [BooleanLiteral] false -# 7| 1: [WhenBranch] ... -> ... -# 7| 0: [ValueEQExpr] ... (value equals) ... -# 7| 0: [VarAccess] tmp2_index -# 7| 1: [IntegerLiteral] 0 -# 7| 1: [BlockStmt] { ... } -# 7| 0: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp4_local0 -# 7| 1: [MethodCall] decodeStringElement(...) -# 7| -1: [VarAccess] tmp6_input -# 7| 0: [VarAccess] tmp0_desc -# 7| 1: [IntegerLiteral] 0 -# 7| 1: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp3_bitMask0 -# 7| 1: [OrBitwiseExpr] ... | ... -# 7| 0: [VarAccess] tmp3_bitMask0 -# 7| 1: [IntegerLiteral] 1 -# 7| 2: [WhenBranch] ... -> ... -# 7| 0: [ValueEQExpr] ... (value equals) ... -# 7| 0: [VarAccess] tmp2_index -# 7| 1: [IntegerLiteral] 1 -# 7| 1: [BlockStmt] { ... } -# 7| 0: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp5_local1 -# 7| 1: [MethodCall] decodeIntElement(...) -# 7| -1: [VarAccess] tmp6_input -# 7| 0: [VarAccess] tmp0_desc -# 7| 1: [IntegerLiteral] 1 -# 7| 1: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] tmp3_bitMask0 -# 7| 1: [OrBitwiseExpr] ... | ... -# 7| 0: [VarAccess] tmp3_bitMask0 -# 7| 1: [IntegerLiteral] 2 -# 7| 3: [WhenBranch] ... -> ... -# 7| 0: [BooleanLiteral] true -# 7| 1: [ThrowStmt] throw ... -# 7| 0: [ClassInstanceExpr] new UnknownFieldException(...) -# 7| -3: [TypeAccess] UnknownFieldException -# 7| 0: [VarAccess] tmp2_index -# 7| 8: [ExprStmt] ; -# 7| 0: [MethodCall] endStructure(...) -# 7| -1: [VarAccess] tmp6_input -# 7| 0: [VarAccess] tmp0_desc -# 7| 9: [ReturnStmt] return ... -# 7| 0: [ClassInstanceExpr] new Project(...) -# 7| -3: [TypeAccess] Project -# 7| 0: [VarAccess] tmp3_bitMask0 -# 7| 1: [VarAccess] tmp4_local0 -# 7| 2: [VarAccess] tmp5_local1 -# 7| 3: [NullLiteral] null -# 0| 4: [Method] getDescriptor +# 0| 3: [Method] getDescriptor #-----| 1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 3: [TypeAccess] SerialDescriptor -# 0| 5: [BlockStmt] { ... } -# 0| 0: [ReturnStmt] return ... -# 0| 0: [VarAccess] this.descriptor -# 0| -1: [ThisAccess] this -# 0| 5: [Method] serialize +# 0| 4: [Method] serialize # 0| 3: [TypeAccess] Unit #-----| 4: (Parameters) # 0| 0: [Parameter] encoder @@ -423,55 +234,11 @@ app/src/main/kotlin/testProject/App.kt: #-----| -1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 0: [TypeAccess] Project -# 7| 5: [BlockStmt] { ... } -# 7| 0: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp0_desc -# 7| 0: [MethodCall] getDescriptor(...) -# 7| -1: [ThisAccess] this -# 7| 1: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp1_output -# 7| 0: [MethodCall] beginStructure(...) -# 7| -1: [VarAccess] encoder -# 7| 0: [VarAccess] tmp0_desc -# 7| 2: [ExprStmt] ; -# 7| 0: [MethodCall] write$Self(...) -# 7| -1: [TypeAccess] Project -# 7| 0: [VarAccess] value -# 7| 1: [VarAccess] tmp1_output -# 7| 2: [VarAccess] tmp0_desc -# 7| 3: [ExprStmt] ; -# 7| 0: [MethodCall] endStructure(...) -# 7| -1: [VarAccess] tmp1_output -# 7| 0: [VarAccess] tmp0_desc -# 7| 6: [Constructor] $serializer +# 7| 5: [Constructor] $serializer # 7| 5: [BlockStmt] { ... } # 7| 0: [SuperConstructorInvocationStmt] super(...) # 7| 1: [BlockStmt] { ... } -# 7| 0: [LocalVariableDeclStmt] var ...; -# 7| 1: [LocalVariableDeclExpr] tmp0_serialDesc -# 7| 0: [ClassInstanceExpr] new PluginGeneratedSerialDescriptor(...) -# 7| -3: [TypeAccess] PluginGeneratedSerialDescriptor -# 7| 0: [StringLiteral] "testProject.Project" -# 7| 1: [ThisAccess] $serializer.this -# 7| 0: [TypeAccess] $serializer -# 7| 2: [IntegerLiteral] 2 -# 7| 1: [ExprStmt] ; -# 7| 0: [MethodCall] addElement(...) -# 7| -1: [VarAccess] tmp0_serialDesc -# 7| 0: [StringLiteral] "name" -# 7| 1: [BooleanLiteral] false -# 7| 2: [ExprStmt] ; -# 7| 0: [MethodCall] addElement(...) -# 7| -1: [VarAccess] tmp0_serialDesc -# 7| 0: [StringLiteral] "language" -# 7| 1: [BooleanLiteral] false -# 7| 3: [ExprStmt] ; -# 7| 0: [AssignExpr] ...=... -# 7| 0: [VarAccess] $serializer.this.descriptor -# 7| -1: [ThisAccess] $serializer.this -# 7| 0: [TypeAccess] $serializer -# 7| 1: [VarAccess] tmp0_serialDesc -# 7| 7: [Method] typeParametersSerializers +# 7| 6: [Method] typeParametersSerializers # 7| 3: [TypeAccess] KSerializer[] # 7| 0: [TypeAccess] KSerializer # 7| 0: [WildcardTypeAccess] ? ... @@ -486,9 +253,6 @@ app/src/main/kotlin/testProject/App.kt: # 0| 1: [Annotation] NotNull # 0| 3: [TypeAccess] KSerializer # 0| 0: [TypeAccess] Project -# 7| 5: [BlockStmt] { ... } -# 7| 0: [ReturnStmt] return ... -# 7| 0: [VarAccess] INSTANCE # 7| 2: [Constructor] Companion # 7| 5: [BlockStmt] { ... } # 7| 0: [SuperConstructorInvocationStmt] super(...) @@ -554,45 +318,6 @@ app/src/main/kotlin/testProject/App.kt: # 0| 0: [TypeAccess] String # 0| 2: [Parameter] serializationConstructorMarker # 0| 0: [TypeAccess] SerializationConstructorMarker -# 14| 5: [BlockStmt] { ... } -# 14| 0: [ExprStmt] ; -# 14| 0: [WhenExpr] when ... -# 14| 0: [WhenBranch] ... -> ... -# 14| 0: [ValueNEExpr] ... (value not-equals) ... -# 14| 0: [IntegerLiteral] 0 -# 14| 1: [AndBitwiseExpr] ... & ... -# 14| 0: [IntegerLiteral] 0 -# 14| 1: [VarAccess] seen1 -# 14| 1: [ExprStmt] ; -# 14| 0: [MethodCall] throwMissingFieldException(...) -# 14| -1: [TypeAccess] PluginExceptionsKt -# 14| 0: [VarAccess] seen1 -# 14| 1: [IntegerLiteral] 0 -# 14| 2: [MethodCall] getDescriptor(...) -# 14| -1: [VarAccess] INSTANCE -# 14| 1: [SuperConstructorInvocationStmt] super(...) -# 14| 2: [ExprStmt] ; -# 14| 0: [WhenExpr] when ... -# 14| 0: [WhenBranch] ... -> ... -# 14| 0: [ValueEQExpr] ... (value equals) ... -# 14| 0: [IntegerLiteral] 0 -# 14| 1: [AndBitwiseExpr] ... & ... -# 14| 0: [VarAccess] seen1 -# 14| 1: [IntegerLiteral] 1 -# 14| 1: [ExprStmt] ; -# 14| 0: [AssignExpr] ...=... -# 14| 0: [VarAccess] X.this.id -# 14| -1: [ThisAccess] X.this -# 14| 0: [TypeAccess] X -# 16| 1: [StringLiteral] "X" -# 14| 1: [WhenBranch] ... -> ... -# 14| 0: [BooleanLiteral] true -# 14| 1: [ExprStmt] ; -# 14| 0: [AssignExpr] ...=... -# 14| 0: [VarAccess] X.this.id -# 14| -1: [ThisAccess] X.this -# 14| 0: [TypeAccess] X -# 14| 1: [VarAccess] id # 0| 2: [Method] write$Self #-----| 1: (Annotations) # 0| 1: [Annotation] JvmStatic @@ -610,32 +335,6 @@ app/src/main/kotlin/testProject/App.kt: #-----| -1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 0: [TypeAccess] SerialDescriptor -# 14| 5: [BlockStmt] { ... } -# 14| 0: [ExprStmt] ; -# 14| 0: [WhenExpr] when ... -# 14| 0: [WhenBranch] ... -> ... -# 14| 0: [WhenExpr] when ... -# 14| 0: [WhenBranch] ... -> ... -# 14| 0: [MethodCall] shouldEncodeElementDefault(...) -# 14| -1: [VarAccess] output -# 14| 0: [VarAccess] serialDesc -# 14| 1: [IntegerLiteral] 0 -# 14| 1: [ExprStmt] ; -# 14| 0: [BooleanLiteral] true -# 14| 1: [WhenBranch] ... -> ... -# 14| 0: [BooleanLiteral] true -# 14| 1: [ExprStmt] ; -# 14| 0: [ValueNEExpr] ... (value not-equals) ... -# 14| 0: [MethodCall] getId(...) -# 14| -1: [VarAccess] self -# 16| 1: [StringLiteral] "X" -# 14| 1: [ExprStmt] ; -# 14| 0: [MethodCall] encodeStringElement(...) -# 14| -1: [VarAccess] output -# 14| 0: [VarAccess] serialDesc -# 14| 1: [IntegerLiteral] 0 -# 14| 2: [MethodCall] getId(...) -# 14| -1: [VarAccess] self # 14| 3: [Class] $serializer #-----| -3: (Annotations) # 0| 1: [Annotation] Deprecated @@ -645,21 +344,13 @@ app/src/main/kotlin/testProject/App.kt: # 0| 2: [ArrayInit] {...} # 0| 3: [VarAccess] DeprecationLevel.HIDDEN # 0| -1: [TypeAccess] DeprecationLevel -# 0| 1: [FieldDeclaration] SerialDescriptor descriptor; -# 0| -1: [TypeAccess] SerialDescriptor -# 0| 2: [Method] childSerializers +# 0| 1: [Method] childSerializers #-----| 1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 3: [TypeAccess] KSerializer[] # 0| 0: [TypeAccess] KSerializer # 0| 0: [WildcardTypeAccess] ? ... -# 14| 5: [BlockStmt] { ... } -# 14| 0: [ReturnStmt] return ... -# 14| 0: [ArrayCreationExpr] new KSerializer[] -# 14| -2: [ArrayInit] {...} -# 14| -1: [TypeAccess] KSerializer -# 14| 0: [IntegerLiteral] 1 -# 0| 3: [Method] deserialize +# 0| 2: [Method] deserialize #-----| 1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 3: [TypeAccess] X @@ -668,112 +359,11 @@ app/src/main/kotlin/testProject/App.kt: #-----| -1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 0: [TypeAccess] Decoder -# 14| 5: [BlockStmt] { ... } -# 14| 0: [LocalVariableDeclStmt] var ...; -# 14| 1: [LocalVariableDeclExpr] tmp0_desc -# 14| 0: [MethodCall] getDescriptor(...) -# 14| -1: [ThisAccess] this -# 14| 1: [LocalVariableDeclStmt] var ...; -# 14| 1: [LocalVariableDeclExpr] tmp1_flag -# 14| 0: [BooleanLiteral] true -# 14| 2: [LocalVariableDeclStmt] var ...; -# 14| 1: [LocalVariableDeclExpr] tmp2_index -# 14| 0: [IntegerLiteral] 0 -# 14| 3: [LocalVariableDeclStmt] var ...; -# 14| 1: [LocalVariableDeclExpr] tmp3_bitMask0 -# 14| 0: [IntegerLiteral] 0 -# 14| 4: [LocalVariableDeclStmt] var ...; -# 14| 1: [LocalVariableDeclExpr] tmp4_local0 -# 14| 0: [NullLiteral] null -# 14| 5: [LocalVariableDeclStmt] var ...; -# 14| 1: [LocalVariableDeclExpr] tmp5_input -# 14| 0: [MethodCall] beginStructure(...) -# 14| -1: [VarAccess] decoder -# 14| 0: [VarAccess] tmp0_desc -# 14| 6: [ExprStmt] ; -# 14| 0: [WhenExpr] when ... -# 14| 0: [WhenBranch] ... -> ... -# 14| 0: [MethodCall] decodeSequentially(...) -# 14| -1: [VarAccess] tmp5_input -# 14| 1: [BlockStmt] { ... } -# 14| 0: [BlockStmt] { ... } -# 14| 0: [ExprStmt] ; -# 14| 0: [AssignExpr] ...=... -# 14| 0: [VarAccess] tmp4_local0 -# 14| 1: [MethodCall] decodeStringElement(...) -# 14| -1: [VarAccess] tmp5_input -# 14| 0: [VarAccess] tmp0_desc -# 14| 1: [IntegerLiteral] 0 -# 14| 1: [ExprStmt] ; -# 14| 0: [AssignExpr] ...=... -# 14| 0: [VarAccess] tmp3_bitMask0 -# 14| 1: [OrBitwiseExpr] ... | ... -# 14| 0: [VarAccess] tmp3_bitMask0 -# 14| 1: [IntegerLiteral] 1 -# 14| 1: [WhenBranch] ... -> ... -# 14| 0: [BooleanLiteral] true -# 14| 1: [WhileStmt] while (...) -# 14| 0: [VarAccess] tmp1_flag -# 14| 1: [BlockStmt] { ... } -# 14| 0: [ExprStmt] ; -# 14| 0: [AssignExpr] ...=... -# 14| 0: [VarAccess] tmp2_index -# 14| 1: [MethodCall] decodeElementIndex(...) -# 14| -1: [VarAccess] tmp5_input -# 14| 0: [VarAccess] tmp0_desc -# 14| 1: [ExprStmt] ; -# 14| 0: [WhenExpr] when ... -# 14| 0: [WhenBranch] ... -> ... -# 14| 0: [ValueEQExpr] ... (value equals) ... -# 14| 0: [VarAccess] tmp2_index -# 14| 1: [IntegerLiteral] -1 -# 14| 1: [ExprStmt] ; -# 14| 0: [AssignExpr] ...=... -# 14| 0: [VarAccess] tmp1_flag -# 14| 1: [BooleanLiteral] false -# 14| 1: [WhenBranch] ... -> ... -# 14| 0: [ValueEQExpr] ... (value equals) ... -# 14| 0: [VarAccess] tmp2_index -# 14| 1: [IntegerLiteral] 0 -# 14| 1: [BlockStmt] { ... } -# 14| 0: [ExprStmt] ; -# 14| 0: [AssignExpr] ...=... -# 14| 0: [VarAccess] tmp4_local0 -# 14| 1: [MethodCall] decodeStringElement(...) -# 14| -1: [VarAccess] tmp5_input -# 14| 0: [VarAccess] tmp0_desc -# 14| 1: [IntegerLiteral] 0 -# 14| 1: [ExprStmt] ; -# 14| 0: [AssignExpr] ...=... -# 14| 0: [VarAccess] tmp3_bitMask0 -# 14| 1: [OrBitwiseExpr] ... | ... -# 14| 0: [VarAccess] tmp3_bitMask0 -# 14| 1: [IntegerLiteral] 1 -# 14| 2: [WhenBranch] ... -> ... -# 14| 0: [BooleanLiteral] true -# 14| 1: [ThrowStmt] throw ... -# 14| 0: [ClassInstanceExpr] new UnknownFieldException(...) -# 14| -3: [TypeAccess] UnknownFieldException -# 14| 0: [VarAccess] tmp2_index -# 14| 7: [ExprStmt] ; -# 14| 0: [MethodCall] endStructure(...) -# 14| -1: [VarAccess] tmp5_input -# 14| 0: [VarAccess] tmp0_desc -# 14| 8: [ReturnStmt] return ... -# 14| 0: [ClassInstanceExpr] new X(...) -# 14| -3: [TypeAccess] X -# 14| 0: [VarAccess] tmp3_bitMask0 -# 14| 1: [VarAccess] tmp4_local0 -# 14| 2: [NullLiteral] null -# 0| 4: [Method] getDescriptor +# 0| 3: [Method] getDescriptor #-----| 1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 3: [TypeAccess] SerialDescriptor -# 0| 5: [BlockStmt] { ... } -# 0| 0: [ReturnStmt] return ... -# 0| 0: [VarAccess] this.descriptor -# 0| -1: [ThisAccess] this -# 0| 5: [Method] serialize +# 0| 4: [Method] serialize # 0| 3: [TypeAccess] Unit #-----| 4: (Parameters) # 0| 0: [Parameter] encoder @@ -784,50 +374,11 @@ app/src/main/kotlin/testProject/App.kt: #-----| -1: (Annotations) # 0| 1: [Annotation] NotNull # 0| 0: [TypeAccess] X -# 14| 5: [BlockStmt] { ... } -# 14| 0: [LocalVariableDeclStmt] var ...; -# 14| 1: [LocalVariableDeclExpr] tmp0_desc -# 14| 0: [MethodCall] getDescriptor(...) -# 14| -1: [ThisAccess] this -# 14| 1: [LocalVariableDeclStmt] var ...; -# 14| 1: [LocalVariableDeclExpr] tmp1_output -# 14| 0: [MethodCall] beginStructure(...) -# 14| -1: [VarAccess] encoder -# 14| 0: [VarAccess] tmp0_desc -# 14| 2: [ExprStmt] ; -# 14| 0: [MethodCall] write$Self(...) -# 14| -1: [TypeAccess] X -# 14| 0: [VarAccess] value -# 14| 1: [VarAccess] tmp1_output -# 14| 2: [VarAccess] tmp0_desc -# 14| 3: [ExprStmt] ; -# 14| 0: [MethodCall] endStructure(...) -# 14| -1: [VarAccess] tmp1_output -# 14| 0: [VarAccess] tmp0_desc -# 14| 6: [Constructor] $serializer +# 14| 5: [Constructor] $serializer # 14| 5: [BlockStmt] { ... } # 14| 0: [SuperConstructorInvocationStmt] super(...) # 14| 1: [BlockStmt] { ... } -# 14| 0: [LocalVariableDeclStmt] var ...; -# 14| 1: [LocalVariableDeclExpr] tmp0_serialDesc -# 14| 0: [ClassInstanceExpr] new PluginGeneratedSerialDescriptor(...) -# 14| -3: [TypeAccess] PluginGeneratedSerialDescriptor -# 14| 0: [StringLiteral] "testProject.X" -# 14| 1: [ThisAccess] $serializer.this -# 14| 0: [TypeAccess] $serializer -# 14| 2: [IntegerLiteral] 1 -# 14| 1: [ExprStmt] ; -# 14| 0: [MethodCall] addElement(...) -# 14| -1: [VarAccess] tmp0_serialDesc -# 14| 0: [StringLiteral] "id" -# 14| 1: [BooleanLiteral] true -# 14| 2: [ExprStmt] ; -# 14| 0: [AssignExpr] ...=... -# 14| 0: [VarAccess] $serializer.this.descriptor -# 14| -1: [ThisAccess] $serializer.this -# 14| 0: [TypeAccess] $serializer -# 14| 1: [VarAccess] tmp0_serialDesc -# 14| 7: [Method] typeParametersSerializers +# 14| 6: [Method] typeParametersSerializers # 14| 3: [TypeAccess] KSerializer[] # 14| 0: [TypeAccess] KSerializer # 14| 0: [WildcardTypeAccess] ? ... @@ -842,9 +393,6 @@ app/src/main/kotlin/testProject/App.kt: # 0| 1: [Annotation] NotNull # 0| 3: [TypeAccess] KSerializer # 0| 0: [TypeAccess] X -# 14| 5: [BlockStmt] { ... } -# 14| 0: [ReturnStmt] return ... -# 14| 0: [VarAccess] INSTANCE # 14| 2: [Constructor] Companion # 14| 5: [BlockStmt] { ... } # 14| 0: [SuperConstructorInvocationStmt] super(...) diff --git a/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/app/build.gradle b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/app/build.gradle index 528b73cabc5a..2b13663941d1 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/app/build.gradle +++ b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/app/build.gradle @@ -1,6 +1,6 @@ plugins { - id 'org.jetbrains.kotlin.jvm' version '1.6.10' - id 'org.jetbrains.kotlin.plugin.serialization' version '1.6.10' + id 'org.jetbrains.kotlin.jvm' version '1.8.10' + id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.10' } repositories { @@ -8,6 +8,5 @@ repositories { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-serialization:1.6.10" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0" } diff --git a/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/diag.expected b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/diag.expected index 96a297f9cb28..e69de29bb2d1 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/diag.expected +++ b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/diag.expected @@ -1,2 +0,0 @@ -| CodeQL Kotlin extractor | 5 | | Unbound symbol found, skipping extraction of expression | app/src/main/kotlin/testProject/App.kt:7:1:8:55 | app/src/main/kotlin/testProject/App.kt:7:1:8:55 | -| CodeQL Kotlin extractor | 5 | | Unbound symbol found, skipping extraction of expression | app/src/main/kotlin/testProject/App.kt:14:1:17:1 | app/src/main/kotlin/testProject/App.kt:14:1:17:1 | From 240e96114853aef1191bc22c085742dffa4fb507 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Tue, 13 Jan 2026 07:14:50 -0800 Subject: [PATCH 20/24] Kotlin: Update kotlin assets to Kotlin 2.3.0 --- MODULE.bazel | 6 +++--- java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar | 3 --- java/kotlin-extractor/deps/kotlin-compiler-2.3.0.jar | 3 +++ .../deps/kotlin-compiler-embeddable-2.3.0-Beta2.jar | 3 --- .../deps/kotlin-compiler-embeddable-2.3.0.jar | 3 +++ java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar | 3 --- java/kotlin-extractor/deps/kotlin-stdlib-2.3.0.jar | 3 +++ java/kotlin-extractor/dev/wrapper.py | 2 +- java/kotlin-extractor/versions.bzl | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar create mode 100644 java/kotlin-extractor/deps/kotlin-compiler-2.3.0.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0-Beta2.jar create mode 100644 java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0.jar delete mode 100644 java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar create mode 100644 java/kotlin-extractor/deps/kotlin-stdlib-2.3.0.jar diff --git a/MODULE.bazel b/MODULE.bazel index 8396af644c7b..b24546d4a3c1 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -230,7 +230,7 @@ use_repo( "kotlin-compiler-2.1.20-Beta1", "kotlin-compiler-2.2.0-Beta1", "kotlin-compiler-2.2.20-Beta2", - "kotlin-compiler-2.3.0-Beta2", + "kotlin-compiler-2.3.0", "kotlin-compiler-embeddable-1.8.0", "kotlin-compiler-embeddable-1.9.0-Beta", "kotlin-compiler-embeddable-1.9.20-Beta", @@ -240,7 +240,7 @@ use_repo( "kotlin-compiler-embeddable-2.1.20-Beta1", "kotlin-compiler-embeddable-2.2.0-Beta1", "kotlin-compiler-embeddable-2.2.20-Beta2", - "kotlin-compiler-embeddable-2.3.0-Beta2", + "kotlin-compiler-embeddable-2.3.0", "kotlin-stdlib-1.8.0", "kotlin-stdlib-1.9.0-Beta", "kotlin-stdlib-1.9.20-Beta", @@ -250,7 +250,7 @@ use_repo( "kotlin-stdlib-2.1.20-Beta1", "kotlin-stdlib-2.2.0-Beta1", "kotlin-stdlib-2.2.20-Beta2", - "kotlin-stdlib-2.3.0-Beta2", + "kotlin-stdlib-2.3.0", ) go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") diff --git a/java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar b/java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar deleted file mode 100644 index 81c85be01074..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ed7d52fa82ae3837e63b6f110a8e25ef807c773c1597f93fb3a1e509e2624c6 -size 59087152 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-2.3.0.jar b/java/kotlin-extractor/deps/kotlin-compiler-2.3.0.jar new file mode 100644 index 000000000000..58a4dfadbe9d --- /dev/null +++ b/java/kotlin-extractor/deps/kotlin-compiler-2.3.0.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03e377b3beffa83e26674d0663f746bfb969b197fd8aed9432cfd8abd60db0c5 +size 59091069 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0-Beta2.jar b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0-Beta2.jar deleted file mode 100644 index aa1aed82c11f..000000000000 --- a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0-Beta2.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d66c146d383a7b8463cb1a0fc9bbff9b0db0b136a465730a338f1fc2bf160f1c -size 57665679 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0.jar b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0.jar new file mode 100644 index 000000000000..00ec4cb68016 --- /dev/null +++ b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.3.0.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dbd882fa58c3d17e683a27390288315f8b490f8e3e3b1be4dc3e280d37e285a +size 57669576 diff --git a/java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar b/java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar deleted file mode 100644 index e0151662ad5b..000000000000 --- a/java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fb35d6a1bf6df0a5a4e78307c92885f63878a53499cc2800f0ba706e527ab615 -size 1796815 diff --git a/java/kotlin-extractor/deps/kotlin-stdlib-2.3.0.jar b/java/kotlin-extractor/deps/kotlin-stdlib-2.3.0.jar new file mode 100644 index 000000000000..5a668eba5f1d --- /dev/null +++ b/java/kotlin-extractor/deps/kotlin-stdlib-2.3.0.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:887587c91713250ad52fe14ad9166d042c33835049890e9437f355ffc5a195b1 +size 1796996 diff --git a/java/kotlin-extractor/dev/wrapper.py b/java/kotlin-extractor/dev/wrapper.py index 3f09ea53a4f0..7785c623f4fb 100755 --- a/java/kotlin-extractor/dev/wrapper.py +++ b/java/kotlin-extractor/dev/wrapper.py @@ -27,7 +27,7 @@ import io import os -DEFAULT_VERSION = "2.3.0-Beta2" +DEFAULT_VERSION = "2.3.0" def options(): diff --git a/java/kotlin-extractor/versions.bzl b/java/kotlin-extractor/versions.bzl index b7ae04934e17..33fca7a37f86 100644 --- a/java/kotlin-extractor/versions.bzl +++ b/java/kotlin-extractor/versions.bzl @@ -9,7 +9,7 @@ VERSIONS = [ "2.1.20-Beta1", "2.2.0-Beta1", "2.2.20-Beta2", - "2.3.0-Beta2", + "2.3.0", ] def _version_to_tuple(v): From 12ce54438b4f49d211e5276b4a790c3a8d69d60d Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Wed, 14 Jan 2026 07:20:37 -0800 Subject: [PATCH 21/24] Kotlin: Accept column location changes in tests --- .../java_modifiers/test.expected | 2 +- .../jvmoverloads-external-class/test.expected | 16 ++++++------ .../kotlin_java_static_fields/test.expected | 26 +++++++++---------- .../nullability-annotations/test.expected | 8 +++--- .../posix/module_mangled_names/test.expected | 6 ++--- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.expected b/java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.expected index a8040f7d82bb..459a8d9209de 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.expected +++ b/java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.expected @@ -1,2 +1,2 @@ | extlib.jar/extlib/A.class:0:0:0:0 | m | protected | -| test.kt:4:3:4:22 | m | override, protected | +| test.kt:4:12:4:22 | m | override, protected | diff --git a/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.expected b/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.expected index db5d2c766806..26a090843edf 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.expected +++ b/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.expected @@ -1,8 +1,8 @@ -| test.kt:3:3:3:45 | f | test.kt:3:23:3:32 | x | -| test.kt:3:3:3:45 | f | test.kt:3:35:3:40 | y | -| test.kt:3:3:3:45 | f | test.kt:3:35:3:40 | y | -| test.kt:3:3:3:45 | f$default | test.kt:3:3:3:45 | p0 | -| test.kt:3:3:3:45 | f$default | test.kt:3:3:3:45 | p1 | -| test.kt:3:3:3:45 | f$default | test.kt:3:3:3:45 | p2 | -| test.kt:3:3:3:45 | f$default | test.kt:3:3:3:45 | p3 | -| test.kt:3:3:3:45 | f$default | test.kt:3:3:3:45 | p4 | +| test.kt:3:17:3:45 | f | test.kt:3:23:3:32 | x | +| test.kt:3:17:3:45 | f | test.kt:3:35:3:40 | y | +| test.kt:3:17:3:45 | f | test.kt:3:35:3:40 | y | +| test.kt:3:17:3:45 | f$default | test.kt:3:17:3:45 | p0 | +| test.kt:3:17:3:45 | f$default | test.kt:3:17:3:45 | p1 | +| test.kt:3:17:3:45 | f$default | test.kt:3:17:3:45 | p2 | +| test.kt:3:17:3:45 | f$default | test.kt:3:17:3:45 | p3 | +| test.kt:3:17:3:45 | f$default | test.kt:3:17:3:45 | p4 | diff --git a/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.expected b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.expected index 9470b5e1e263..5839116cf34a 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.expected +++ b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.expected @@ -1,22 +1,22 @@ edges -| hasFields.kt:5:5:5:34 | constField : String | ReadsFields.java:5:10:5:29 | HasFields.constField | provenance | | -| hasFields.kt:5:28:5:34 | "taint" : String | hasFields.kt:5:5:5:34 | constField : String | provenance | | -| hasFields.kt:7:5:7:38 | : String | hasFields.kt:7:5:7:38 | : String | provenance | | -| hasFields.kt:7:5:7:38 | : String | hasFields.kt:7:5:7:38 | lateinitField : String | provenance | | -| hasFields.kt:7:5:7:38 | lateinitField : String | ReadsFields.java:6:10:6:32 | HasFields.lateinitField | provenance | | -| hasFields.kt:9:5:9:50 | jvmFieldAnnotatedField : String | ReadsFields.java:7:10:7:41 | HasFields.jvmFieldAnnotatedField | provenance | | -| hasFields.kt:9:44:9:50 | "taint" : String | hasFields.kt:9:5:9:50 | jvmFieldAnnotatedField : String | provenance | | -| hasFields.kt:14:21:14:27 | "taint" : String | hasFields.kt:7:5:7:38 | : String | provenance | | +| hasFields.kt:5:11:5:34 | constField : String | ReadsFields.java:5:10:5:29 | HasFields.constField | provenance | | +| hasFields.kt:5:28:5:34 | "taint" : String | hasFields.kt:5:11:5:34 | constField : String | provenance | | +| hasFields.kt:7:14:7:38 | : String | hasFields.kt:7:14:7:38 | : String | provenance | | +| hasFields.kt:7:14:7:38 | : String | hasFields.kt:7:14:7:38 | lateinitField : String | provenance | | +| hasFields.kt:7:14:7:38 | lateinitField : String | ReadsFields.java:6:10:6:32 | HasFields.lateinitField | provenance | | +| hasFields.kt:9:15:9:50 | jvmFieldAnnotatedField : String | ReadsFields.java:7:10:7:41 | HasFields.jvmFieldAnnotatedField | provenance | | +| hasFields.kt:9:44:9:50 | "taint" : String | hasFields.kt:9:15:9:50 | jvmFieldAnnotatedField : String | provenance | | +| hasFields.kt:14:21:14:27 | "taint" : String | hasFields.kt:7:14:7:38 | : String | provenance | | 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:11:5:34 | constField : String | semmle.label | constField : String | | hasFields.kt:5:28:5:34 | "taint" : String | semmle.label | "taint" : String | -| hasFields.kt:7:5:7:38 | : String | semmle.label | : String | -| hasFields.kt:7:5:7:38 | : String | semmle.label | : String | -| hasFields.kt:7:5:7:38 | lateinitField : String | semmle.label | lateinitField : String | -| hasFields.kt:9:5:9:50 | jvmFieldAnnotatedField : String | semmle.label | jvmFieldAnnotatedField : String | +| hasFields.kt:7:14:7:38 | : String | semmle.label | : String | +| hasFields.kt:7:14:7:38 | : String | semmle.label | : String | +| hasFields.kt:7:14:7:38 | lateinitField : String | semmle.label | lateinitField : String | +| hasFields.kt:9:15:9:50 | jvmFieldAnnotatedField : String | semmle.label | jvmFieldAnnotatedField : String | | hasFields.kt:9:44:9:50 | "taint" : String | semmle.label | "taint" : String | | hasFields.kt:14:21:14:27 | "taint" : String | semmle.label | "taint" : String | subpaths diff --git a/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.expected b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.expected index 8dd20ad64a46..89eb06d26c34 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.expected +++ b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.expected @@ -22,7 +22,7 @@ | ktUser.kt:0:0:0:0 | nullableAnnotated | parameter | ktUser.kt:0:0:0:0 | Nullable | | ktUser.kt:0:0:0:0 | nullableAnnotated | return value | ktUser.kt:0:0:0:0 | A | | ktUser.kt:0:0:0:0 | nullableAnnotated | return value | ktUser.kt:0:0:0:0 | Nullable | -| ktUser.kt:5:3:5:105 | f | parameter | ktUser.kt:0:0:0:0 | NotNull | -| ktUser.kt:5:3:5:105 | f | parameter | ktUser.kt:5:12:5:13 | A | -| ktUser.kt:5:3:5:105 | f | return value | ktUser.kt:0:0:0:0 | NotNull | -| ktUser.kt:5:3:5:105 | f | return value | ktUser.kt:5:3:5:4 | A | +| ktUser.kt:5:6:5:105 | f | parameter | ktUser.kt:0:0:0:0 | NotNull | +| ktUser.kt:5:6:5:105 | f | parameter | ktUser.kt:5:12:5:13 | A | +| ktUser.kt:5:6:5:105 | f | return value | ktUser.kt:0:0:0:0 | NotNull | +| ktUser.kt:5:6:5:105 | f | return value | ktUser.kt:5:3:5:4 | A | diff --git a/java/ql/integration-tests/kotlin/posix/module_mangled_names/test.expected b/java/ql/integration-tests/kotlin/posix/module_mangled_names/test.expected index 51b4fd853fff..a1fc953a2546 100644 --- a/java/ql/integration-tests/kotlin/posix/module_mangled_names/test.expected +++ b/java/ql/integration-tests/kotlin/posix/module_mangled_names/test.expected @@ -1,4 +1,4 @@ | User.java:3:21:3:24 | test | -| test1.kt:3:3:3:22 | f$main | -| test2.kt:3:3:3:22 | f$mymodule | -| test3.kt:3:3:3:22 | f$reservedchars___ | +| test1.kt:3:12:3:22 | f$main | +| test2.kt:3:12:3:22 | f$mymodule | +| test3.kt:3:12:3:22 | f$reservedchars___ | From 45bc8d5ac62b2fe9ed210972b3f47649eb4bd374 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 15 Jan 2026 09:20:41 -0800 Subject: [PATCH 22/24] Kotlin: Add bitwise 'and' operation expected by Kotlin 2.3 compiler to exist in the stdlib --- java/ql/test-kotlin1/library-tests/ministdlib/MiniStdLib.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/java/ql/test-kotlin1/library-tests/ministdlib/MiniStdLib.kt b/java/ql/test-kotlin1/library-tests/ministdlib/MiniStdLib.kt index ba48bc632345..1aaba910fa2b 100644 --- a/java/ql/test-kotlin1/library-tests/ministdlib/MiniStdLib.kt +++ b/java/ql/test-kotlin1/library-tests/ministdlib/MiniStdLib.kt @@ -26,6 +26,7 @@ public class Int { operator fun plus(other: Int): Int { return this.plus(other) } operator fun times(other: Int): Int { return this.times(other) } infix fun xor(other: Int): Int { return this.xor(other) } + infix fun and(other: Int): Int { return this.and(other) } } public object Unit { From d0878a2656f31ecdab0e404e70fe108341f68ea1 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 15 Jan 2026 10:51:03 -0800 Subject: [PATCH 23/24] Kotlin: Accept test changes --- .../test-kotlin1/library-tests/data-classes/PrintAst.expected | 2 +- java/ql/test-kotlin1/library-tests/methods/exprs.expected | 2 +- .../ql/test-kotlin1/library-tests/ministdlib/classes.expected | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/ql/test-kotlin1/library-tests/data-classes/PrintAst.expected b/java/ql/test-kotlin1/library-tests/data-classes/PrintAst.expected index f884671c0949..98999cf18696 100644 --- a/java/ql/test-kotlin1/library-tests/data-classes/PrintAst.expected +++ b/java/ql/test-kotlin1/library-tests/data-classes/PrintAst.expected @@ -93,7 +93,7 @@ dc.kt: # 0| 0: [BooleanLiteral] false # 0| 2: [LocalVariableDeclStmt] var ...; # 0| 1: [LocalVariableDeclExpr] tmp0_other_with_cast -# 0| 0: [CastExpr] (...)... +# 0| 0: [ImplicitCastExpr] # 0| 0: [TypeAccess] ProtoMapValue # 0| 1: [VarAccess] other # 0| 3: [ExprStmt] ; diff --git a/java/ql/test-kotlin1/library-tests/methods/exprs.expected b/java/ql/test-kotlin1/library-tests/methods/exprs.expected index 5e916c6ddbc6..ae7381efc737 100644 --- a/java/ql/test-kotlin1/library-tests/methods/exprs.expected +++ b/java/ql/test-kotlin1/library-tests/methods/exprs.expected @@ -23,7 +23,6 @@ | 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 | ... !is ... | NotInstanceOfExpr | | dataClass.kt:0:0:0:0 | ... & ... | AndBitwiseExpr | | dataClass.kt:0:0:0:0 | ... & ... | AndBitwiseExpr | @@ -37,6 +36,7 @@ | dataClass.kt:0:0:0:0 | ...=... | AssignExpr | | dataClass.kt:0:0:0:0 | ...=... | AssignExpr | | dataClass.kt:0:0:0:0 | ...=... | AssignExpr | +| dataClass.kt:0:0:0:0 | | ImplicitCastExpr | | dataClass.kt:0:0:0:0 | DataClass | TypeAccess | | dataClass.kt:0:0:0:0 | DataClass | TypeAccess | | dataClass.kt:0:0:0:0 | DataClass | TypeAccess | diff --git a/java/ql/test-kotlin1/library-tests/ministdlib/classes.expected b/java/ql/test-kotlin1/library-tests/ministdlib/classes.expected index 8d1bc5381290..36aaa6b629c4 100644 --- a/java/ql/test-kotlin1/library-tests/ministdlib/classes.expected +++ b/java/ql/test-kotlin1/library-tests/ministdlib/classes.expected @@ -1,7 +1,7 @@ | MiniStdLib.kt:12:1:15:1 | Any | | MiniStdLib.kt:17:1:19:1 | String | | MiniStdLib.kt:21:1:23:1 | Boolean | -| MiniStdLib.kt:25:1:29:1 | Int | -| MiniStdLib.kt:31:1:32:1 | Unit | +| MiniStdLib.kt:25:1:30:1 | Int | +| MiniStdLib.kt:32:1:33:1 | Unit | | MyClass.kt:1:1:1:16 | MyClass | | file://:0:0:0:0 | FakeKotlinClass | From 88628ff6ea17bd689c3e72ba61f2f333ef42d00c Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Thu, 15 Jan 2026 11:37:35 -0800 Subject: [PATCH 24/24] Kotlin: Accept test changes Accept test changes from Kotlin 2.3.0 update Updates expected test outputs for kotlin2 library tests to match actual compiler output. Changes include: - Location adjustments for properties/methods (now point to identifiers) - CastExpr -> ImplicitCastExpr for implicit type casts - Removed duplicate BlockStmt entries in loop ASTs - Super constructor call location changes Note that in Kotlin 2.3.0 super constructor calls now have locations spanning entire class declarations instead of the actual super call site. --- .../src/main/kotlin/utils/versions/rollup.sh | 20 + .../unused/ExperimentalCompilerApi.kt | 4 + .../versions/unused/IsUnderscoreParameter.kt | 7 + .../utils/versions/unused/ReferenceEntity.kt | 35 + .../versions/unused/SyntheticBodyKind.kt | 5 + .../kotlin/utils/versions/unused/Types.kt | 6 + .../unused/allOverriddenIncludingSelf.kt | 6 + .../kotlin/utils/versions/unused/copyTo.kt | 7 + .../versions/unused/getFileClassFqName.kt | 41 + .../versions/unused/withHasQuestionMark.kt | 13 + .../annotation_classes/PrintAst.expected | 50 +- .../annotation_classes/classes.expected | 12 +- .../annotations/jvmName/test.expected | 8 +- .../library-tests/classes/ctorCalls.expected | 14 +- .../classes/genericExprTypes.expected | 16 +- .../library-tests/comments/comments.expected | 6 +- .../method_accesses.expected | 2 +- .../data-classes/PrintAst.expected | 2 +- .../data-classes/callees.expected | 2 +- .../library-tests/exprs/PrintAst.expected | 39 +- .../library-tests/exprs/exprs.expected | 312 +++---- .../library-tests/exprs/funcExprs.expected | 4 +- .../library-tests/exprs/unaryOp.expected | 2 +- .../generic-instance-methods/test.expected | 4 +- .../test.expected | 6 +- .../inherited-default-value/test.expected | 4 +- .../interface-delegate/test.expected | 2 +- .../test.expected | 2 +- .../internal-public-alias/test.expected | 8 +- .../java_and_kotlin/test.expected | 22 +- .../visibility.expected | 24 +- .../jvmoverloads-annotation/PrintAst.expected | 872 +++++++++--------- .../jvmoverloads-annotation/test.expected | 78 +- .../jvmoverloads_flow/test.expected | 12 +- .../jvmoverloads_generics/test.expected | 18 +- .../jvmstatic-annotation/test.expected | 18 +- .../library-tests/lateinit/test.expected | 6 +- .../test.expected | 2 +- .../library-tests/methods/exprs.expected | 32 +- .../library-tests/methods/methods.expected | 20 +- .../library-tests/methods/parameters.expected | 8 +- .../modifiers/modifiers.expected | 74 +- .../parameter-defaults/defaults.expected | 8 +- .../private-anonymous-types/test.expected | 12 +- .../properties/properties.expected | 34 +- .../library-tests/stmts/PrintAst.expected | 54 +- .../library-tests/stmts/stmts.expected | 8 +- .../library-tests/vararg/args.expected | 6 +- 48 files changed, 1046 insertions(+), 901 deletions(-) create mode 100755 java/kotlin-extractor/src/main/kotlin/utils/versions/rollup.sh create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/unused/ExperimentalCompilerApi.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/unused/IsUnderscoreParameter.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/unused/ReferenceEntity.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/unused/SyntheticBodyKind.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/unused/Types.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/unused/allOverriddenIncludingSelf.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/unused/copyTo.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/unused/getFileClassFqName.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/unused/withHasQuestionMark.kt diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/rollup.sh b/java/kotlin-extractor/src/main/kotlin/utils/versions/rollup.sh new file mode 100755 index 000000000000..653d6c084ec9 --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/rollup.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +if (( $# != 2 )); then + echo Exactly two arguments expected. Got $# + exit 1 +fi + +SOURCE=$1 +DEST=$2 + +cd $SOURCE +for f in *; do + if [ -f ../$DEST/$f ]; then + echo -n "Skip" + else + echo -n "Copy" + cp $f ../$DEST + fi + echo ": $f" +done diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/ExperimentalCompilerApi.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/ExperimentalCompilerApi.kt new file mode 100644 index 000000000000..48829cc30c5f --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/ExperimentalCompilerApi.kt @@ -0,0 +1,4 @@ +package com.github.codeql + +// The compiler provides the annotation class, so we don't need to do +// anything diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/IsUnderscoreParameter.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/IsUnderscoreParameter.kt new file mode 100644 index 000000000000..d727126ffc4a --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/IsUnderscoreParameter.kt @@ -0,0 +1,7 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin +import org.jetbrains.kotlin.ir.declarations.IrValueParameter + +fun isUnderscoreParameter(vp: IrValueParameter) = + vp.origin == IrDeclarationOrigin.UNDERSCORE_PARAMETER diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/ReferenceEntity.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/ReferenceEntity.kt new file mode 100644 index 000000000000..666e4e38386a --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/ReferenceEntity.kt @@ -0,0 +1,35 @@ +package com.github.codeql.utils + +import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext +import org.jetbrains.kotlin.ir.symbols.* +import org.jetbrains.kotlin.name.CallableId +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.name.Name + +fun getClassByFqName(pluginContext: IrPluginContext, fqName: FqName): IrClassSymbol? { + val id = ClassId.topLevel(fqName) + return getClassByClassId(pluginContext, id) +} + +fun getClassByClassId(pluginContext: IrPluginContext, id: ClassId): IrClassSymbol? { + return pluginContext.referenceClass(id) +} + +fun getFunctionsByFqName( + pluginContext: IrPluginContext, + pkgName: FqName, + name: Name +): Collection { + val id = CallableId(pkgName, name) + return pluginContext.referenceFunctions(id) +} + +fun getPropertiesByFqName( + pluginContext: IrPluginContext, + pkgName: FqName, + name: Name +): Collection { + val id = CallableId(pkgName, name) + return pluginContext.referenceProperties(id) +} diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/SyntheticBodyKind.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/SyntheticBodyKind.kt new file mode 100644 index 000000000000..4c654282ca78 --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/SyntheticBodyKind.kt @@ -0,0 +1,5 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.expressions.IrSyntheticBodyKind + +val kind_ENUM_ENTRIES: IrSyntheticBodyKind? = IrSyntheticBodyKind.ENUM_ENTRIES diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/Types.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/Types.kt new file mode 100644 index 000000000000..7db5d520b29f --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/Types.kt @@ -0,0 +1,6 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.backend.jvm.ir.isRawType +import org.jetbrains.kotlin.ir.types.IrSimpleType + +fun IrSimpleType.codeQlIsRawType() = this.isRawType() diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/allOverriddenIncludingSelf.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/allOverriddenIncludingSelf.kt new file mode 100644 index 000000000000..2d33930ecbcf --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/allOverriddenIncludingSelf.kt @@ -0,0 +1,6 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction +import org.jetbrains.kotlin.ir.util.allOverridden + +fun IrSimpleFunction.allOverriddenIncludingSelf() = this.allOverridden(includeSelf = true) diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/copyTo.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/copyTo.kt new file mode 100644 index 000000000000..a68e93432470 --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/copyTo.kt @@ -0,0 +1,7 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.declarations.IrFunction +import org.jetbrains.kotlin.ir.declarations.IrValueParameter +import org.jetbrains.kotlin.ir.util.copyTo + +fun copyParameterToFunction(p: IrValueParameter, f: IrFunction) = p.copyTo(f) diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/getFileClassFqName.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/getFileClassFqName.kt new file mode 100644 index 000000000000..82275ba0342d --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/getFileClassFqName.kt @@ -0,0 +1,41 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.declarations.IrDeclaration +import org.jetbrains.kotlin.ir.declarations.IrField +import org.jetbrains.kotlin.ir.declarations.IrMemberWithContainerSource +import org.jetbrains.kotlin.load.kotlin.FacadeClassSource +import org.jetbrains.kotlin.name.FqName + +fun getFileClassFqName(d: IrDeclaration): FqName? { + // d is in a file class. + // Get the name in a similar way to the compiler's ExternalPackageParentPatcherLowering + // visitMemberAccess/generateOrGetFacadeClass. + + // But first, fields aren't IrMemberWithContainerSource, so we need + // to get back to the property (if there is one) + if (d is IrField) { + val propSym = d.correspondingPropertySymbol + if (propSym != null) { + return getFileClassFqName(propSym.owner) + } + } + + // Now the main code + if (d is IrMemberWithContainerSource) { + val containerSource = d.containerSource + if (containerSource is FacadeClassSource) { + val facadeClassName = containerSource.facadeClassName + if (facadeClassName != null) { + // TODO: This is really a multifile-class rather than a file-class, + // but for now we treat them the same. + return facadeClassName.fqNameForTopLevelClassMaybeWithDollars + } else { + return containerSource.className.fqNameForTopLevelClassMaybeWithDollars + } + } else { + return null + } + } else { + return null + } +} diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/withHasQuestionMark.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/withHasQuestionMark.kt new file mode 100644 index 000000000000..f4e171f8fb2a --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/unused/withHasQuestionMark.kt @@ -0,0 +1,13 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.types.IrType +import org.jetbrains.kotlin.ir.types.makeNotNull +import org.jetbrains.kotlin.ir.types.makeNullable + +fun IrType.codeQlWithHasQuestionMark(b: Boolean): IrType { + if (b) { + return this.makeNullable() + } else { + return this.makeNotNull() + } +} diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.expected b/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.expected index 1153b13c3bf9..a45b3b52351e 100644 --- a/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.expected +++ b/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.expected @@ -22,13 +22,13 @@ Annot1j.java: def.kt: # 0| [CompilationUnit] def # 0| 1: [Class] DefKt -# 45| 2: [Method] fn +# 46| 2: [Method] fn #-----| 1: (Annotations) # 45| 1: [Annotation] Annot0k # 21| 1: [IntegerLiteral] 0 #-----| 2: (Generic Parameters) # 46| 0: [TypeVariable] T -# 45| 3: [TypeAccess] Unit +# 46| 3: [TypeAccess] Unit #-----| 4: (Parameters) # 46| 0: [Parameter] a #-----| -1: (Annotations) @@ -41,38 +41,38 @@ def.kt: # 47| -1: [TypeAccess] ConsoleKt # 47| 0: [MethodCall] a(...) # 47| -1: [VarAccess] a -# 49| 1: [LocalVariableDeclStmt] var ...; -# 49| 1: [LocalVariableDeclExpr] x +# 50| 1: [LocalVariableDeclStmt] var ...; +# 50| 1: [LocalVariableDeclExpr] x # 50| 0: [IntegerLiteral] 10 -# 53| 3: [Method] getP +# 57| 3: [Method] getP #-----| 1: (Annotations) # 54| 1: [Annotation] Annot0k # 21| 1: [IntegerLiteral] 0 -# 53| 3: [TypeAccess] int -# 53| 5: [BlockStmt] { ... } -# 53| 0: [ReturnStmt] return ... -# 53| 0: [VarAccess] DefKt.p -# 53| -1: [TypeAccess] DefKt -# 53| 4: [FieldDeclaration] int p; +# 57| 3: [TypeAccess] int +# 57| 5: [BlockStmt] { ... } +# 57| 0: [ReturnStmt] return ... +# 57| 0: [VarAccess] DefKt.p +# 57| -1: [TypeAccess] DefKt +# 57| 4: [FieldDeclaration] int p; #-----| -2: (Annotations) # 56| 1: [Annotation] Annot0k # 21| 1: [IntegerLiteral] 0 -# 53| -1: [TypeAccess] int +# 57| -1: [TypeAccess] int # 57| 0: [IntegerLiteral] 5 -# 53| 5: [Method] setP +# 57| 5: [Method] setP #-----| 1: (Annotations) # 55| 1: [Annotation] Annot0k # 21| 1: [IntegerLiteral] 0 -# 53| 3: [TypeAccess] Unit +# 57| 3: [TypeAccess] Unit #-----| 4: (Parameters) -# 53| 0: [Parameter] -# 53| 0: [TypeAccess] int -# 53| 5: [BlockStmt] { ... } -# 53| 0: [ExprStmt] ; -# 53| 0: [AssignExpr] ...=... -# 53| 0: [VarAccess] DefKt.p -# 53| -1: [TypeAccess] DefKt -# 53| 1: [VarAccess] +# 57| 0: [Parameter] +# 57| 0: [TypeAccess] int +# 57| 5: [BlockStmt] { ... } +# 57| 0: [ExprStmt] ; +# 57| 0: [AssignExpr] ...=... +# 57| 0: [VarAccess] DefKt.p +# 57| -1: [TypeAccess] DefKt +# 57| 1: [VarAccess] # 59| 6: [ExtensionMethod] myExtension # 59| 3: [TypeAccess] Unit #-----| 4: (Parameters) @@ -219,13 +219,13 @@ def.kt: # 39| -1: [TypeAccess] Y # 39| 2: [VarAccess] Y.A # 39| -1: [TypeAccess] Y -# 41| 1: [Constructor] Z +# 42| 1: [Constructor] Z #-----| 1: (Annotations) # 41| 1: [Annotation] Annot0k # 21| 1: [IntegerLiteral] 0 -# 41| 5: [BlockStmt] { ... } +# 42| 5: [BlockStmt] { ... } # 42| 0: [SuperConstructorInvocationStmt] super(...) -# 41| 1: [BlockStmt] { ... } +# 42| 1: [BlockStmt] { ... } use.java: # 0| [CompilationUnit] use # 1| 1: [Class] use diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/classes.expected b/java/ql/test-kotlin2/library-tests/annotation_classes/classes.expected index d42e6cf854c2..db4ef27b32b6 100644 --- a/java/ql/test-kotlin2/library-tests/annotation_classes/classes.expected +++ b/java/ql/test-kotlin2/library-tests/annotation_classes/classes.expected @@ -17,7 +17,7 @@ annotationDeclarations | Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:8:7:8:7 | d | | Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:10:9:10:9 | e | | Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:12:13:12:13 | f | -| def.kt:5:1:21:60 | Annot0k | def.kt:21:26:21:59 | a | +| def.kt:5:1:21:60 | Annot0k | def.kt:21:44:21:59 | a | | def.kt:23:1:31:1 | Annot1k | def.kt:25:5:25:18 | a | | def.kt:23:1:31:1 | Annot1k | def.kt:26:5:26:24 | b | | def.kt:23:1:31:1 | Annot1k | def.kt:27:5:27:31 | c | @@ -29,12 +29,12 @@ annotations | def.kt:30:22:30:31 | Annot0k | def.kt:39:1:39:40 | Annot1k | def.kt:5:1:21:60 | Annot0k | | def.kt:38:1:38:17 | Annot0k | def.kt:38:1:43:1 | Z | def.kt:5:1:21:60 | Annot0k | | def.kt:39:1:39:40 | Annot1k | def.kt:38:1:43:1 | Z | def.kt:23:1:31:1 | Annot1k | -| def.kt:41:5:41:12 | Annot0k | def.kt:41:5:42:19 | Z | def.kt:5:1:21:60 | Annot0k | -| def.kt:45:1:45:8 | Annot0k | def.kt:45:1:51:1 | fn | def.kt:5:1:21:60 | Annot0k | +| def.kt:41:5:41:12 | Annot0k | def.kt:42:5:42:19 | Z | def.kt:5:1:21:60 | Annot0k | +| def.kt:45:1:45:8 | Annot0k | def.kt:46:1:51:1 | fn | def.kt:5:1:21:60 | Annot0k | | def.kt:46:21:46:28 | Annot0k | def.kt:46:21:46:39 | a | def.kt:5:1:21:60 | Annot0k | -| def.kt:54:1:54:12 | Annot0k | def.kt:53:1:57:19 | getP | def.kt:5:1:21:60 | Annot0k | -| def.kt:55:1:55:12 | Annot0k | def.kt:53:1:57:19 | setP | def.kt:5:1:21:60 | Annot0k | -| def.kt:56:1:56:14 | Annot0k | def.kt:53:1:57:23 | p | def.kt:5:1:21:60 | Annot0k | +| def.kt:54:1:54:12 | Annot0k | def.kt:57:1:57:19 | getP | def.kt:5:1:21:60 | Annot0k | +| def.kt:55:1:55:12 | Annot0k | def.kt:57:1:57:19 | setP | def.kt:5:1:21:60 | Annot0k | +| def.kt:56:1:56:14 | Annot0k | def.kt:57:1:57:23 | p | def.kt:5:1:21:60 | Annot0k | | def.kt:59:5:59:21 | Annot0k | def.kt:59:5:59:28 | | def.kt:5:1:21:60 | Annot0k | | use.java:10:5:10:21 | Annot0j | use.java:14:18:14:18 | Z | Annot0j.java:1:19:1:25 | Annot0j | | use.java:11:5:11:90 | Annot1j | use.java:14:18:14:18 | Z | Annot1j.java:1:19:1:25 | Annot1j | diff --git a/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.expected b/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.expected index c56618efda8b..ba6887606f25 100644 --- a/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.expected +++ b/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.expected @@ -1,8 +1,8 @@ | Test.java:2:17:2:17 | m | m | m | | test.kt:3:9:4:18 | getX_prop | getX_prop | getX | | test.kt:6:5:6:19 | getX | getX | getX | -| test.kt:8:5:10:14 | changeY | changeY | setY | -| test.kt:8:5:10:14 | y | y | getY | -| test.kt:12:5:13:15 | method | method | fn | +| test.kt:10:5:10:14 | changeY | changeY | setY | +| test.kt:10:5:10:14 | y | y | getY | +| test.kt:13:5:13:15 | method | method | fn | | test.kt:17:5:17:14 | p | p | p | -| test.kt:18:5:18:32 | w | w | q | +| test.kt:18:23:18:32 | w | w | q | diff --git a/java/ql/test-kotlin2/library-tests/classes/ctorCalls.expected b/java/ql/test-kotlin2/library-tests/classes/ctorCalls.expected index 0bfec48f3f24..e5fe3bf89244 100644 --- a/java/ql/test-kotlin2/library-tests/classes/ctorCalls.expected +++ b/java/ql/test-kotlin2/library-tests/classes/ctorCalls.expected @@ -2,11 +2,11 @@ thisCall | classes.kt:29:26:29:31 | this(...) | superCall | classes.kt:2:1:2:18 | super(...) | -| classes.kt:4:16:4:29 | super(...) | +| classes.kt:4:1:6:1 | super(...) | | classes.kt:8:1:10:1 | super(...) | -| classes.kt:12:23:12:34 | super(...) | -| classes.kt:17:18:17:28 | super(...) | -| classes.kt:28:19:28:29 | super(...) | +| classes.kt:12:1:15:1 | super(...) | +| classes.kt:17:1:18:1 | super(...) | +| classes.kt:28:1:30:1 | super(...) | | classes.kt:35:27:35:27 | super(...) | | classes.kt:63:1:91:1 | super(...) | | classes.kt:66:20:66:54 | super(...) | @@ -41,7 +41,7 @@ superCall | classes.kt:151:5:155:5 | super(...) | | classes.kt:159:5:159:14 | super(...) | | classes.kt:162:13:162:22 | super(...) | -| generic_anonymous.kt:1:25:1:34 | super(...) | +| generic_anonymous.kt:1:1:9:1 | super(...) | | generic_anonymous.kt:3:19:5:3 | super(...) | | generic_anonymous.kt:15:1:33:1 | super(...) | | generic_anonymous.kt:25:9:31:9 | super(...) | @@ -64,5 +64,5 @@ superCall | local_anonymous.kt:39:1:45:1 | super(...) | | local_anonymous.kt:40:14:44:5 | super(...) | | superChain.kt:1:1:1:33 | super(...) | -| superChain.kt:2:33:2:57 | super(...) | -| superChain.kt:3:33:3:57 | super(...) | +| superChain.kt:2:1:2:60 | super(...) | +| superChain.kt:3:1:3:60 | super(...) | diff --git a/java/ql/test-kotlin2/library-tests/classes/genericExprTypes.expected b/java/ql/test-kotlin2/library-tests/classes/genericExprTypes.expected index 2f7075c7e8e1..46522bd2145a 100644 --- a/java/ql/test-kotlin2/library-tests/classes/genericExprTypes.expected +++ b/java/ql/test-kotlin2/library-tests/classes/genericExprTypes.expected @@ -6,14 +6,14 @@ | generic_anonymous.kt:1:26:1:33 | t | T | | generic_anonymous.kt:1:26:1:33 | this | Generic | | generic_anonymous.kt:1:26:1:33 | this.t | T | -| generic_anonymous.kt:3:3:3:15 | T | T | -| generic_anonymous.kt:3:3:3:15 | new Object(...) { ... } | new Object(...) { ... } | -| generic_anonymous.kt:3:3:3:15 | this | Generic | -| generic_anonymous.kt:3:3:3:15 | this.x | new Object(...) { ... } | -| generic_anonymous.kt:3:3:5:3 | ...=... | new Object(...) { ... } | -| generic_anonymous.kt:3:3:5:3 | T | T | -| generic_anonymous.kt:3:3:5:3 | new Object(...) { ... } | new Object(...) { ... } | -| generic_anonymous.kt:3:3:5:3 | x | new Object(...) { ... } | +| generic_anonymous.kt:3:11:3:15 | T | T | +| generic_anonymous.kt:3:11:3:15 | new Object(...) { ... } | new Object(...) { ... } | +| generic_anonymous.kt:3:11:3:15 | this | Generic | +| generic_anonymous.kt:3:11:3:15 | this.x | new Object(...) { ... } | +| generic_anonymous.kt:3:11:5:3 | ...=... | new Object(...) { ... } | +| generic_anonymous.kt:3:11:5:3 | T | T | +| generic_anonymous.kt:3:11:5:3 | new Object(...) { ... } | new Object(...) { ... } | +| generic_anonymous.kt:3:11:5:3 | x | new Object(...) { ... } | | generic_anonymous.kt:3:19:5:3 | | new Object(...) { ... } | | generic_anonymous.kt:3:19:5:3 | Object | Object | | generic_anonymous.kt:3:19:5:3 | new (...) | new Object(...) { ... } | diff --git a/java/ql/test-kotlin2/library-tests/comments/comments.expected b/java/ql/test-kotlin2/library-tests/comments/comments.expected index 77a5ce164707..8c163a2a523d 100644 --- a/java/ql/test-kotlin2/library-tests/comments/comments.expected +++ b/java/ql/test-kotlin2/library-tests/comments/comments.expected @@ -18,9 +18,9 @@ comments commentOwners | comments.kt:1:1:1:36 | /** Kdoc owned by CompilationUnit */ | comments.kt:0:0:0:0 | comments | | comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | comments.kt:12:1:31:1 | Group | -| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:5:17:23 | getMembers$private | -| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:5:17:46 | members | -| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:5:17:46 | members | +| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:13:17:23 | getMembers$private | +| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:13:17:46 | members | +| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:13:17:46 | members | | comments.kt:19:5:22:7 | /**\n * Adds a [member] to this group.\n * @return the new size of the group.\n */ | comments.kt:23:5:26:5 | add | | comments.kt:48:1:50:3 | /**\n * A type alias comment\n */ | comments.kt:51:1:51:24 | MyType | | comments.kt:61:5:63:7 | /**\n * A prop comment\n */ | comments.kt:64:5:68:17 | prop | diff --git a/java/ql/test-kotlin2/library-tests/companion_objects/method_accesses.expected b/java/ql/test-kotlin2/library-tests/companion_objects/method_accesses.expected index e414c95fd543..b02c862d300b 100644 --- a/java/ql/test-kotlin2/library-tests/companion_objects/method_accesses.expected +++ b/java/ql/test-kotlin2/library-tests/companion_objects/method_accesses.expected @@ -2,4 +2,4 @@ | companion_objects.kt:23:5:23:11 | MyClassCompanion | VarAccess | companion_objects.kt:4:9:4:31 | funInCompanion | | companion_objects.kt:24:5:24:13 | new MyClass(...) | ClassInstanceExpr | companion_objects.kt:2:5:2:23 | funInClass | | companion_objects.kt:25:5:25:15 | MyInterfaceCompanion | VarAccess | companion_objects.kt:11:9:11:31 | funInCompanion | -| companion_objects.kt:26:5:26:9 | new Imp(...) | ClassInstanceExpr | companion_objects.kt:16:5:18:5 | funInInterface | +| companion_objects.kt:26:5:26:9 | new Imp(...) | ClassInstanceExpr | companion_objects.kt:16:14:18:5 | funInInterface | diff --git a/java/ql/test-kotlin2/library-tests/data-classes/PrintAst.expected b/java/ql/test-kotlin2/library-tests/data-classes/PrintAst.expected index e601e1378a69..cce5f37dab9a 100644 --- a/java/ql/test-kotlin2/library-tests/data-classes/PrintAst.expected +++ b/java/ql/test-kotlin2/library-tests/data-classes/PrintAst.expected @@ -93,7 +93,7 @@ dc.kt: # 0| 0: [BooleanLiteral] false # 0| 2: [LocalVariableDeclStmt] var ...; # 0| 1: [LocalVariableDeclExpr] tmp0_other_with_cast -# 0| 0: [CastExpr] (...)... +# 0| 0: [ImplicitCastExpr] # 0| 0: [TypeAccess] ProtoMapValue # 0| 1: [VarAccess] other # 0| 3: [ExprStmt] ; diff --git a/java/ql/test-kotlin2/library-tests/data-classes/callees.expected b/java/ql/test-kotlin2/library-tests/data-classes/callees.expected index a0352c3ac723..f16c4ffb4352 100644 --- a/java/ql/test-kotlin2/library-tests/data-classes/callees.expected +++ b/java/ql/test-kotlin2/library-tests/data-classes/callees.expected @@ -4,4 +4,4 @@ | dc.kt:0:0:0:0 | new ProtoMapValue(...) | ProtoMapValue.ProtoMapValue | | dc.kt:0:0:0:0 | toString(...) | java.util.Arrays.toString | | dc.kt:0:0:0:0 | toString(...) | java.util.Arrays.toString | -| dc.kt:1:25:1:71 | super(...) | java.lang.Object.Object | +| dc.kt:1:1:1:71 | super(...) | java.lang.Object.Object | diff --git a/java/ql/test-kotlin2/library-tests/exprs/PrintAst.expected b/java/ql/test-kotlin2/library-tests/exprs/PrintAst.expected index 78fc858d028e..ce315c35ca63 100644 --- a/java/ql/test-kotlin2/library-tests/exprs/PrintAst.expected +++ b/java/ql/test-kotlin2/library-tests/exprs/PrintAst.expected @@ -2520,22 +2520,21 @@ exprs.kt: # 137| 0: [GTExpr] ... > ... # 137| 0: [VarAccess] variable # 137| 1: [IntegerLiteral] 0 -# 137| 1: [BlockStmt] { ... } -# 138| 0: [ExprStmt] ; -# 138| 0: [ImplicitCoercionToUnitExpr] -# 138| 0: [TypeAccess] Unit -# 138| 1: [StmtExpr] -# 138| 0: [BlockStmt] { ... } -# 138| 0: [LocalVariableDeclStmt] var ...; -# 138| 1: [LocalVariableDeclExpr] -# 138| 0: [VarAccess] variable -# 138| 1: [ExprStmt] ; -# 138| 0: [AssignExpr] ...=... -# 138| 0: [VarAccess] variable -# 138| 1: [MethodCall] dec(...) -# 138| -1: [VarAccess] -# 138| 2: [ExprStmt] ; -# 138| 0: [VarAccess] +# 138| 1: [ExprStmt] ; +# 138| 0: [ImplicitCoercionToUnitExpr] +# 138| 0: [TypeAccess] Unit +# 138| 1: [StmtExpr] +# 138| 0: [BlockStmt] { ... } +# 138| 0: [LocalVariableDeclStmt] var ...; +# 138| 1: [LocalVariableDeclExpr] +# 138| 0: [VarAccess] variable +# 138| 1: [ExprStmt] ; +# 138| 0: [AssignExpr] ...=... +# 138| 0: [VarAccess] variable +# 138| 1: [MethodCall] dec(...) +# 138| -1: [VarAccess] +# 138| 2: [ExprStmt] ; +# 138| 0: [VarAccess] # 141| 119: [ReturnStmt] return ... # 141| 0: [AddExpr] ... + ... # 141| 0: [IntegerLiteral] 123 @@ -2624,7 +2623,9 @@ exprs.kt: # 167| 1: [BlockStmt] { ... } # 168| 0: [LocalVariableDeclStmt] var ...; # 168| 1: [LocalVariableDeclExpr] r2 -# 168| 0: [VarAccess] r +# 168| 0: [ImplicitCastExpr] +# 168| 0: [TypeAccess] Rectangle +# 168| 1: [VarAccess] r # 169| 1: [LocalVariableDeclStmt] var ...; # 169| 1: [LocalVariableDeclExpr] height # 169| 0: [VarAccess] r2.height @@ -3519,7 +3520,9 @@ exprs.kt: # 212| 1: [LocalVariableDeclExpr] b3 # 212| 0: [AddExpr] ... + ... # 212| 0: [NotNullExpr] ...!! -# 212| 0: [VarAccess] s +# 212| 0: [ImplicitCastExpr] +# 212| 0: [TypeAccess] String +# 212| 1: [VarAccess] s # 212| 1: [IntegerLiteral] 5 # 213| 5: [LocalVariableDeclStmt] var ...; # 213| 1: [LocalVariableDeclExpr] c0 diff --git a/java/ql/test-kotlin2/library-tests/exprs/exprs.expected b/java/ql/test-kotlin2/library-tests/exprs/exprs.expected index 001794509ffb..8c86fe5a1b27 100644 --- a/java/ql/test-kotlin2/library-tests/exprs/exprs.expected +++ b/java/ql/test-kotlin2/library-tests/exprs/exprs.expected @@ -129,20 +129,20 @@ | delegatedProperties.kt:26:13:26:28 | curValue | delegatedProperties.kt:25:64:31:9 | | VarAccess | | delegatedProperties.kt:26:13:26:28 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:26:28:26:28 | 0 | delegatedProperties.kt:25:64:31:9 | | IntegerLiteral | -| delegatedProperties.kt:27:13:27:88 | int | file://:0:0:0:0 | | TypeAccess | +| delegatedProperties.kt:27:22:27:88 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:27:35:27:47 | Object | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:27:50:27:71 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:27:50:27:71 | KProperty | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:27:81:27:88 | getCurValue(...) | delegatedProperties.kt:27:13:27:88 | getValue | MethodCall | -| delegatedProperties.kt:27:81:27:88 | this | delegatedProperties.kt:27:13:27:88 | getValue | ThisAccess | -| delegatedProperties.kt:28:13:30:13 | Unit | file://:0:0:0:0 | | TypeAccess | +| delegatedProperties.kt:27:81:27:88 | getCurValue(...) | delegatedProperties.kt:27:22:27:88 | getValue | MethodCall | +| delegatedProperties.kt:27:81:27:88 | this | delegatedProperties.kt:27:22:27:88 | getValue | ThisAccess | +| delegatedProperties.kt:28:22:30:13 | Unit | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:28:35:28:47 | Object | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:28:50:28:71 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:28:50:28:71 | KProperty | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:28:74:28:83 | int | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:29:17:29:32 | setCurValue(...) | delegatedProperties.kt:28:13:30:13 | setValue | MethodCall | -| delegatedProperties.kt:29:17:29:32 | this | delegatedProperties.kt:28:13:30:13 | setValue | ThisAccess | -| delegatedProperties.kt:29:28:29:32 | value | delegatedProperties.kt:28:13:30:13 | setValue | VarAccess | +| delegatedProperties.kt:29:17:29:32 | setCurValue(...) | delegatedProperties.kt:28:22:30:13 | setValue | MethodCall | +| delegatedProperties.kt:29:17:29:32 | this | delegatedProperties.kt:28:22:30:13 | setValue | ThisAccess | +| delegatedProperties.kt:29:28:29:32 | value | delegatedProperties.kt:28:22:30:13 | setValue | VarAccess | | delegatedProperties.kt:33:9:33:76 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:33:9:33:76 | readOnly$delegate | delegatedProperties.kt:18:5:40:5 | fn | LocalVariableDeclExpr | | delegatedProperties.kt:33:30:33:47 | ...::... | delegatedProperties.kt:33:9:33:76 | | PropertyRefExpr | @@ -265,22 +265,22 @@ | delegatedProperties.kt:42:30:42:47 | this.varResource0$delegate | delegatedProperties.kt:42:5:42:47 | getVarResource0 | VarAccess | | delegatedProperties.kt:42:30:42:47 | this.varResource0$delegate | delegatedProperties.kt:42:5:42:47 | setVarResource0 | VarAccess | | delegatedProperties.kt:42:30:42:47 | varResource0$delegate | delegatedProperties.kt:17:1:43:1 | Owner | VarAccess | -| delegatedProperties.kt:46:5:48:5 | int | file://:0:0:0:0 | | TypeAccess | +| delegatedProperties.kt:46:14:48:5 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:46:27:46:41 | Owner | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:46:44:46:65 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:46:44:46:65 | KProperty | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:47:16:47:16 | 1 | delegatedProperties.kt:46:5:48:5 | getValue | IntegerLiteral | -| delegatedProperties.kt:49:5:50:5 | Unit | file://:0:0:0:0 | | TypeAccess | +| delegatedProperties.kt:47:16:47:16 | 1 | delegatedProperties.kt:46:14:48:5 | getValue | IntegerLiteral | +| delegatedProperties.kt:49:14:50:5 | Unit | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:49:27:49:41 | Owner | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:49:44:49:65 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:49:44:49:65 | KProperty | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:49:68:49:78 | Integer | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:54:5:57:5 | ResourceDelegate | file://:0:0:0:0 | | TypeAccess | +| delegatedProperties.kt:54:14:57:5 | ResourceDelegate | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:54:34:54:48 | Owner | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:54:51:54:68 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:54:51:54:68 | KProperty | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:56:16:56:33 | ResourceDelegate | delegatedProperties.kt:54:5:57:5 | provideDelegate | TypeAccess | -| delegatedProperties.kt:56:16:56:33 | new ResourceDelegate(...) | delegatedProperties.kt:54:5:57:5 | provideDelegate | ClassInstanceExpr | +| delegatedProperties.kt:56:16:56:33 | ResourceDelegate | delegatedProperties.kt:54:14:57:5 | provideDelegate | TypeAccess | +| delegatedProperties.kt:56:16:56:33 | new ResourceDelegate(...) | delegatedProperties.kt:54:14:57:5 | provideDelegate | ClassInstanceExpr | | delegatedProperties.kt:60:1:60:20 | ...=... | delegatedProperties.kt:60:1:60:20 | setTopLevelInt | AssignExpr | | delegatedProperties.kt:60:1:60:20 | | delegatedProperties.kt:60:1:60:20 | setTopLevelInt | VarAccess | | delegatedProperties.kt:60:1:60:20 | DelegatedPropertiesKt | delegatedProperties.kt:60:1:60:20 | getTopLevelInt | TypeAccess | @@ -1461,6 +1461,8 @@ | exprs.kt:167:8:167:16 | ... (value not-equals) ... | exprs.kt:165:1:172:1 | foo | ValueNEExpr | | exprs.kt:167:13:167:16 | null | exprs.kt:165:1:172:1 | foo | NullLiteral | | exprs.kt:168:9:168:29 | r2 | exprs.kt:165:1:172:1 | foo | LocalVariableDeclExpr | +| exprs.kt:168:29:168:29 | | exprs.kt:165:1:172:1 | foo | ImplicitCastExpr | +| exprs.kt:168:29:168:29 | Rectangle | exprs.kt:165:1:172:1 | foo | TypeAccess | | exprs.kt:168:29:168:29 | r | exprs.kt:165:1:172:1 | foo | VarAccess | | exprs.kt:169:9:169:30 | height | exprs.kt:165:1:172:1 | foo | LocalVariableDeclExpr | | exprs.kt:169:22:169:23 | r2 | exprs.kt:165:1:172:1 | foo | VarAccess | @@ -1499,12 +1501,12 @@ | exprs.kt:175:25:175:28 | Direction | file://:0:0:0:0 | | TypeAccess | | exprs.kt:175:25:175:28 | Direction.EAST | exprs.kt:0:0:0:0 | | VarAccess | | exprs.kt:175:25:175:28 | new Direction(...) | exprs.kt:0:0:0:0 | | ClassInstanceExpr | +| exprs.kt:178:1:182:1 | 0 | exprs.kt:178:17:178:30 | Color | IntegerLiteral | +| exprs.kt:178:1:182:1 | Color | exprs.kt:178:17:178:30 | Color | TypeAccess | +| exprs.kt:178:1:182:1 | Enum | exprs.kt:178:17:178:30 | Color | TypeAccess | | exprs.kt:178:1:182:1 | String | file://:0:0:0:0 | | TypeAccess | -| exprs.kt:178:17:178:30 | 0 | exprs.kt:178:17:178:30 | Color | IntegerLiteral | -| exprs.kt:178:17:178:30 | Color | exprs.kt:178:17:178:30 | Color | TypeAccess | -| exprs.kt:178:17:178:30 | Enum | exprs.kt:178:17:178:30 | Color | TypeAccess | -| exprs.kt:178:17:178:30 | new Enum(...) | exprs.kt:178:17:178:30 | Color | ClassInstanceExpr | -| exprs.kt:178:17:178:30 | null | exprs.kt:178:17:178:30 | Color | NullLiteral | +| exprs.kt:178:1:182:1 | new Enum(...) | exprs.kt:178:17:178:30 | Color | ClassInstanceExpr | +| exprs.kt:178:1:182:1 | null | exprs.kt:178:17:178:30 | Color | NullLiteral | | exprs.kt:178:18:178:29 | ...=... | exprs.kt:178:17:178:30 | Color | KtInitializerAssignExpr | | exprs.kt:178:18:178:29 | int | file://:0:0:0:0 | | TypeAccess | | exprs.kt:178:18:178:29 | int | file://:0:0:0:0 | | TypeAccess | @@ -1548,12 +1550,12 @@ | exprs.kt:192:5:192:14 | a1 | exprs.kt:191:1:199:1 | Class1 | VarAccess | | exprs.kt:192:5:192:14 | int | file://:0:0:0:0 | | TypeAccess | | exprs.kt:192:14:192:14 | 1 | exprs.kt:191:1:199:1 | Class1 | IntegerLiteral | -| exprs.kt:193:5:198:5 | Object | file://:0:0:0:0 | | TypeAccess | -| exprs.kt:194:9:194:18 | a2 | exprs.kt:193:5:198:5 | getObject | LocalVariableDeclExpr | -| exprs.kt:194:18:194:18 | 2 | exprs.kt:193:5:198:5 | getObject | IntegerLiteral | -| exprs.kt:195:16:197:9 | | exprs.kt:193:5:198:5 | getObject | StmtExpr | -| exprs.kt:195:16:197:9 | Interface1 | exprs.kt:193:5:198:5 | getObject | TypeAccess | -| exprs.kt:195:16:197:9 | new (...) | exprs.kt:193:5:198:5 | getObject | ClassInstanceExpr | +| exprs.kt:193:13:198:5 | Object | file://:0:0:0:0 | | TypeAccess | +| exprs.kt:194:9:194:18 | a2 | exprs.kt:193:13:198:5 | getObject | LocalVariableDeclExpr | +| exprs.kt:194:18:194:18 | 2 | exprs.kt:193:13:198:5 | getObject | IntegerLiteral | +| exprs.kt:195:16:197:9 | | exprs.kt:193:13:198:5 | getObject | StmtExpr | +| exprs.kt:195:16:197:9 | Interface1 | exprs.kt:193:13:198:5 | getObject | TypeAccess | +| exprs.kt:195:16:197:9 | new (...) | exprs.kt:193:13:198:5 | getObject | ClassInstanceExpr | | exprs.kt:196:13:196:26 | String | file://:0:0:0:0 | | TypeAccess | | exprs.kt:196:13:196:26 | this | exprs.kt:196:13:196:26 | getA3 | ThisAccess | | exprs.kt:196:13:196:26 | this.a3 | exprs.kt:196:13:196:26 | getA3 | VarAccess | @@ -1593,6 +1595,8 @@ | exprs.kt:211:19:211:29 | ... + ... | exprs.kt:206:5:217:5 | x | AddExpr | | exprs.kt:211:28:211:28 | 5 | exprs.kt:206:5:217:5 | x | IntegerLiteral | | exprs.kt:212:9:212:25 | b3 | exprs.kt:206:5:217:5 | x | LocalVariableDeclExpr | +| exprs.kt:212:19:212:19 | | exprs.kt:206:5:217:5 | x | ImplicitCastExpr | +| exprs.kt:212:19:212:19 | String | exprs.kt:206:5:217:5 | x | TypeAccess | | exprs.kt:212:19:212:19 | s | exprs.kt:206:5:217:5 | x | VarAccess | | exprs.kt:212:19:212:21 | ...!! | exprs.kt:206:5:217:5 | x | NotNullExpr | | exprs.kt:212:19:212:25 | ... + ... | exprs.kt:206:5:217:5 | x | AddExpr | @@ -1754,9 +1758,9 @@ | exprs.kt:274:3:274:14 | ...%=... | exprs.kt:267:1:276:1 | inPlaceOperators | AssignRemExpr | | exprs.kt:274:3:274:14 | updated | exprs.kt:267:1:276:1 | inPlaceOperators | VarAccess | | exprs.kt:274:14:274:14 | 1 | exprs.kt:267:1:276:1 | inPlaceOperators | IntegerLiteral | -| exprs.kt:278:1:278:66 | T | file://:0:0:0:0 | | TypeAccess | -| exprs.kt:278:1:278:66 | T[] | file://:0:0:0:0 | | TypeAccess | -| exprs.kt:278:52:278:66 | | exprs.kt:278:1:278:66 | getEnumValues | ErrorExpr | +| exprs.kt:278:8:278:66 | T | file://:0:0:0:0 | | TypeAccess | +| exprs.kt:278:8:278:66 | T[] | file://:0:0:0:0 | | TypeAccess | +| exprs.kt:278:52:278:66 | | exprs.kt:278:8:278:66 | getEnumValues | ErrorExpr | | exprs.kt:280:1:283:1 | Unit | file://:0:0:0:0 | | TypeAccess | | exprs.kt:281:5:281:23 | | exprs.kt:280:1:283:1 | callToEnumValues | ImplicitCoercionToUnitExpr | | exprs.kt:281:5:281:23 | Color | exprs.kt:280:1:283:1 | callToEnumValues | TypeAccess | @@ -3167,9 +3171,9 @@ | funcExprs.kt:51:8:51:16 | FuncRef | funcExprs.kt:51:8:51:16 | invoke | TypeAccess | | funcExprs.kt:51:8:51:16 | Function0 | funcExprs.kt:21:1:52:1 | call | TypeAccess | | funcExprs.kt:51:8:51:16 | new FuncRef(...) | funcExprs.kt:51:8:51:16 | invoke | ClassInstanceExpr | -| funcExprs.kt:55:5:55:49 | int | file://:0:0:0:0 | | TypeAccess | +| funcExprs.kt:55:23:55:49 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:55:34:55:39 | int | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:55:49:55:49 | 5 | funcExprs.kt:55:5:55:49 | invoke | IntegerLiteral | +| funcExprs.kt:55:49:55:49 | 5 | funcExprs.kt:55:23:55:49 | invoke | IntegerLiteral | | funcExprs.kt:58:1:58:25 | Unit | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:58:12:58:21 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | funcExprs.kt:58:12:58:21 | Function0 | file://:0:0:0:0 | | TypeAccess | @@ -3247,43 +3251,43 @@ | 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:19:75:21 | "a" | funcExprs.kt:75:12:75:22 | invoke | StringLiteral | -| funcExprs.kt:77:5:77:60 | Unit | file://:0:0:0:0 | | TypeAccess | +| 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 | | funcExprs.kt:77:20:77:55 | Generic> | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:77:20:77:55 | Generic | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:77:20:77:55 | Integer | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:77:20:77:55 | String | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:82:1:96:1 | Unit | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:83:5:83:51 | l1 | funcExprs.kt:82:1:96:1 | fn | LocalVariableDeclExpr | -| funcExprs.kt:83:31:83:51 | ...->... | funcExprs.kt:82:1:96:1 | fn | LambdaExpr | -| funcExprs.kt:83:31:83:51 | Function1 | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:83:31:83:51 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | +| funcExprs.kt:82:9:96:1 | Unit | file://:0:0:0:0 | | TypeAccess | +| funcExprs.kt:83:5:83:51 | l1 | funcExprs.kt:82:9:96:1 | fn | LocalVariableDeclExpr | +| funcExprs.kt:83:31:83:51 | ...->... | funcExprs.kt:82:9:96:1 | fn | LambdaExpr | +| funcExprs.kt:83:31:83:51 | Function1 | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:83:31:83:51 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | | funcExprs.kt:83:31:83:51 | String | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:83:31:83:51 | String | funcExprs.kt:82:1:96:1 | fn | TypeAccess | +| funcExprs.kt:83:31:83:51 | String | funcExprs.kt:82:9:96:1 | fn | TypeAccess | | funcExprs.kt:83:33:83:33 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:83:38:83:38 | i | funcExprs.kt:83:31:83:51 | invoke | VarAccess | | funcExprs.kt:83:38:83:49 | toString(...) | funcExprs.kt:83:31:83:51 | invoke | MethodCall | -| funcExprs.kt:84:5:84:6 | l1 | funcExprs.kt:82:1:96:1 | fn | VarAccess | -| funcExprs.kt:84:5:84:16 | invoke(...) | funcExprs.kt:82:1:96:1 | fn | MethodCall | -| funcExprs.kt:84:8:84:16 | | funcExprs.kt:82:1:96:1 | fn | ImplicitCoercionToUnitExpr | -| funcExprs.kt:84:8:84:16 | Unit | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:84:15:84:15 | 5 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:86:5:86:59 | l2 | funcExprs.kt:82:1:96:1 | fn | LocalVariableDeclExpr | -| funcExprs.kt:86:39:86:59 | ...->... | funcExprs.kt:82:1:96:1 | fn | LambdaExpr | -| funcExprs.kt:86:39:86:59 | Function1 | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:86:39:86:59 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | +| funcExprs.kt:84:5:84:6 | l1 | funcExprs.kt:82:9:96:1 | fn | VarAccess | +| funcExprs.kt:84:5:84:16 | invoke(...) | funcExprs.kt:82:9:96:1 | fn | MethodCall | +| funcExprs.kt:84:8:84:16 | | funcExprs.kt:82:9:96:1 | fn | ImplicitCoercionToUnitExpr | +| funcExprs.kt:84:8:84:16 | Unit | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:84:15:84:15 | 5 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:86:5:86:59 | l2 | funcExprs.kt:82:9:96:1 | fn | LocalVariableDeclExpr | +| funcExprs.kt:86:39:86:59 | ...->... | funcExprs.kt:82:9:96:1 | fn | LambdaExpr | +| funcExprs.kt:86:39:86:59 | Function1 | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:86:39:86:59 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | | funcExprs.kt:86:39:86:59 | String | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:86:39:86:59 | String | funcExprs.kt:82:1:96:1 | fn | TypeAccess | +| funcExprs.kt:86:39:86:59 | String | funcExprs.kt:82:9:96:1 | fn | TypeAccess | | funcExprs.kt:86:41:86:41 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:86:46:86:46 | i | funcExprs.kt:86:39:86:59 | invoke | VarAccess | | funcExprs.kt:86:46:86:57 | toString(...) | funcExprs.kt:86:39:86:59 | invoke | MethodCall | -| funcExprs.kt:87:5:87:6 | l2 | funcExprs.kt:82:1:96:1 | fn | VarAccess | -| funcExprs.kt:87:5:87:16 | invoke(...) | funcExprs.kt:82:1:96:1 | fn | MethodCall | -| funcExprs.kt:87:8:87:16 | | funcExprs.kt:82:1:96:1 | fn | ImplicitCoercionToUnitExpr | -| funcExprs.kt:87:8:87:16 | Unit | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:87:15:87:15 | 5 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:89:5:90:69 | l3 | funcExprs.kt:82:1:96:1 | fn | LocalVariableDeclExpr | +| funcExprs.kt:87:5:87:6 | l2 | funcExprs.kt:82:9:96:1 | fn | VarAccess | +| funcExprs.kt:87:5:87:16 | invoke(...) | funcExprs.kt:82:9:96:1 | fn | MethodCall | +| funcExprs.kt:87:8:87:16 | | funcExprs.kt:82:9:96:1 | fn | ImplicitCoercionToUnitExpr | +| funcExprs.kt:87:8:87:16 | Unit | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:87:15:87:15 | 5 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:89:5:90:69 | l3 | funcExprs.kt:82:9:96:1 | fn | LocalVariableDeclExpr | | funcExprs.kt:90:15:90:69 | 0 | funcExprs.kt:90:15:90:69 | invoke | IntegerLiteral | | funcExprs.kt:90:15:90:69 | 1 | funcExprs.kt:90:15:90:69 | invoke | IntegerLiteral | | funcExprs.kt:90:15:90:69 | 2 | funcExprs.kt:90:15:90:69 | invoke | IntegerLiteral | @@ -3330,7 +3334,7 @@ | funcExprs.kt:90:15:90:69 | (...)... | funcExprs.kt:90:15:90:69 | invoke | CastExpr | | funcExprs.kt:90:15:90:69 | (...)... | funcExprs.kt:90:15:90:69 | invoke | CastExpr | | funcExprs.kt:90:15:90:69 | (...)... | funcExprs.kt:90:15:90:69 | invoke | CastExpr | -| funcExprs.kt:90:15:90:69 | ...->... | funcExprs.kt:82:1:96:1 | fn | LambdaExpr | +| funcExprs.kt:90:15:90:69 | ...->... | funcExprs.kt:82:9:96:1 | fn | LambdaExpr | | funcExprs.kt:90:15:90:69 | ...[...] | funcExprs.kt:90:15:90:69 | invoke | ArrayAccess | | funcExprs.kt:90:15:90:69 | ...[...] | funcExprs.kt:90:15:90:69 | invoke | ArrayAccess | | funcExprs.kt:90:15:90:69 | ...[...] | funcExprs.kt:90:15:90:69 | invoke | ArrayAccess | @@ -3354,9 +3358,9 @@ | funcExprs.kt:90:15:90:69 | ...[...] | funcExprs.kt:90:15:90:69 | invoke | ArrayAccess | | funcExprs.kt:90:15:90:69 | ...[...] | funcExprs.kt:90:15:90:69 | invoke | ArrayAccess | | funcExprs.kt:90:15:90:69 | ...[...] | funcExprs.kt:90:15:90:69 | invoke | ArrayAccess | -| funcExprs.kt:90:15:90:69 | FunctionN | funcExprs.kt:82:1:96:1 | fn | TypeAccess | +| funcExprs.kt:90:15:90:69 | FunctionN | funcExprs.kt:82:9:96:1 | fn | TypeAccess | | funcExprs.kt:90:15:90:69 | String | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:90:15:90:69 | String | funcExprs.kt:82:1:96:1 | fn | TypeAccess | +| funcExprs.kt:90:15:90:69 | String | funcExprs.kt:82:9:96:1 | fn | TypeAccess | | funcExprs.kt:90:15:90:69 | a0 | funcExprs.kt:90:15:90:69 | invoke | VarAccess | | funcExprs.kt:90:15:90:69 | a0 | funcExprs.kt:90:15:90:69 | invoke | VarAccess | | funcExprs.kt:90:15:90:69 | a0 | funcExprs.kt:90:15:90:69 | invoke | VarAccess | @@ -3429,64 +3433,64 @@ | 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:91:5:91:6 | l3 | funcExprs.kt:82:1:96:1 | fn | VarAccess | -| funcExprs.kt:91:5:91:60 | 23 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:5:91:60 | Object | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:91:5:91:60 | invoke(...) | funcExprs.kt:82:1:96:1 | fn | MethodCall | -| funcExprs.kt:91:5:91:60 | new Object[] | funcExprs.kt:82:1:96:1 | fn | ArrayCreationExpr | -| funcExprs.kt:91:5:91:60 | {...} | funcExprs.kt:82:1:96:1 | fn | ArrayInit | -| funcExprs.kt:91:8:91:60 | | funcExprs.kt:82:1:96:1 | fn | ImplicitCoercionToUnitExpr | -| funcExprs.kt:91:8:91:60 | Unit | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:91:15:91:15 | 1 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:17:91:17 | 2 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:19:91:19 | 3 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:21:91:21 | 4 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:23:91:23 | 5 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:25:91:25 | 6 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:27:91:27 | 7 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:29:91:29 | 8 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:31:91:31 | 9 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:33:91:33 | 0 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:35:91:35 | 1 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:37:91:37 | 2 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:39:91:39 | 3 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:41:91:41 | 4 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:43:91:43 | 5 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:45:91:45 | 6 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:47:91:47 | 7 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:49:91:49 | 8 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:51:91:51 | 9 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:53:91:53 | 0 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:55:91:55 | 1 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:57:91:57 | 2 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:91:59:91:59 | 3 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:93:5:94:67 | l4 | funcExprs.kt:82:1:96:1 | fn | LocalVariableDeclExpr | -| funcExprs.kt:94:15:94:67 | ...->... | funcExprs.kt:82:1:96:1 | fn | LambdaExpr | -| funcExprs.kt:94:15:94:67 | Function22 | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:1:96:1 | fn | TypeAccess | +| 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 | +| funcExprs.kt:91:5:91:60 | invoke(...) | funcExprs.kt:82:9:96:1 | fn | MethodCall | +| funcExprs.kt:91:5:91:60 | new Object[] | funcExprs.kt:82:9:96:1 | fn | ArrayCreationExpr | +| funcExprs.kt:91:5:91:60 | {...} | funcExprs.kt:82:9:96:1 | fn | ArrayInit | +| funcExprs.kt:91:8:91:60 | | funcExprs.kt:82:9:96:1 | fn | ImplicitCoercionToUnitExpr | +| funcExprs.kt:91:8:91:60 | Unit | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:91:15:91:15 | 1 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:17:91:17 | 2 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:19:91:19 | 3 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:21:91:21 | 4 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:23:91:23 | 5 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:25:91:25 | 6 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:27:91:27 | 7 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:29:91:29 | 8 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:31:91:31 | 9 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:33:91:33 | 0 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:35:91:35 | 1 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:37:91:37 | 2 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:39:91:39 | 3 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:41:91:41 | 4 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:43:91:43 | 5 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:45:91:45 | 6 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:47:91:47 | 7 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:49:91:49 | 8 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:51:91:51 | 9 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:53:91:53 | 0 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:55:91:55 | 1 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:57:91:57 | 2 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:91:59:91:59 | 3 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:93:5:94:67 | l4 | funcExprs.kt:82:9:96:1 | fn | LocalVariableDeclExpr | +| funcExprs.kt:94:15:94:67 | ...->... | funcExprs.kt:82:9:96:1 | fn | LambdaExpr | +| funcExprs.kt:94:15:94:67 | Function22 | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | Integer | funcExprs.kt:82:9:96:1 | fn | TypeAccess | | funcExprs.kt:94:15:94:67 | String | file://:0:0:0:0 | | TypeAccess | -| funcExprs.kt:94:15:94:67 | String | funcExprs.kt:82:1:96:1 | fn | TypeAccess | +| funcExprs.kt:94:15:94:67 | String | funcExprs.kt:82:9:96:1 | fn | TypeAccess | | funcExprs.kt:94:17:94:17 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:94:19:94:19 | int | file://:0:0:0:0 | | TypeAccess | | funcExprs.kt:94:21:94:21 | int | file://:0:0:0:0 | | TypeAccess | @@ -3510,32 +3514,32 @@ | 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:95:5:95:6 | l4 | funcExprs.kt:82:1:96:1 | fn | VarAccess | -| funcExprs.kt:95:5:95:58 | invoke(...) | funcExprs.kt:82:1:96:1 | fn | MethodCall | -| funcExprs.kt:95:8:95:58 | | funcExprs.kt:82:1:96:1 | fn | ImplicitCoercionToUnitExpr | -| funcExprs.kt:95:8:95:58 | Unit | funcExprs.kt:82:1:96:1 | fn | TypeAccess | -| funcExprs.kt:95:15:95:15 | 1 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:17:95:17 | 2 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:19:95:19 | 3 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:21:95:21 | 4 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:23:95:23 | 5 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:25:95:25 | 6 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:27:95:27 | 7 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:29:95:29 | 8 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:31:95:31 | 9 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:33:95:33 | 0 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:35:95:35 | 1 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:37:95:37 | 2 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:39:95:39 | 3 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:41:95:41 | 4 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:43:95:43 | 5 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:45:95:45 | 6 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:47:95:47 | 7 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:49:95:49 | 8 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:51:95:51 | 9 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:53:95:53 | 0 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:55:95:55 | 1 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | -| funcExprs.kt:95:57:95:57 | 2 | funcExprs.kt:82:1:96:1 | fn | IntegerLiteral | +| 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 | MethodCall | +| funcExprs.kt:95:8:95:58 | | funcExprs.kt:82:9:96:1 | fn | ImplicitCoercionToUnitExpr | +| funcExprs.kt:95:8:95:58 | Unit | funcExprs.kt:82:9:96:1 | fn | TypeAccess | +| funcExprs.kt:95:15:95:15 | 1 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:17:95:17 | 2 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:19:95:19 | 3 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:21:95:21 | 4 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:23:95:23 | 5 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:25:95:25 | 6 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:27:95:27 | 7 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:29:95:29 | 8 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:31:95:31 | 9 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:33:95:33 | 0 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:35:95:35 | 1 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:37:95:37 | 2 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:39:95:39 | 3 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:41:95:41 | 4 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:43:95:43 | 5 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:45:95:45 | 6 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:47:95:47 | 7 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:49:95:49 | 8 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:51:95:51 | 9 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:53:95:53 | 0 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:55:95:55 | 1 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | +| funcExprs.kt:95:57:95:57 | 2 | funcExprs.kt:82:9:96:1 | fn | IntegerLiteral | | kFunctionInvoke.kt:4:5:4:24 | Unit | file://:0:0:0:0 | | TypeAccess | | kFunctionInvoke.kt:4:11:4:19 | String | file://:0:0:0:0 | | TypeAccess | | kFunctionInvoke.kt:7:1:10:1 | Unit | file://:0:0:0:0 | | TypeAccess | @@ -4254,20 +4258,20 @@ | samConversion.kt:46:39:46:42 | true | samConversion.kt:46:32:46:44 | invoke | BooleanLiteral | | samConversion.kt:50:5:50:25 | boolean | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:50:12:50:15 | T | file://:0:0:0:0 | | TypeAccess | -| samConversion.kt:54:5:54:35 | Unit | file://:0:0:0:0 | | TypeAccess | +| samConversion.kt:54:13:54:35 | Unit | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:54:21:54:26 | int | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:54:29:54:34 | int | file://:0:0:0:0 | | TypeAccess | -| samConversion.kt:57:1:60:1 | Unit | file://:0:0:0:0 | | TypeAccess | -| samConversion.kt:58:5:58:45 | i0 | samConversion.kt:57:1:60:1 | test | LocalVariableDeclExpr | -| samConversion.kt:58:14:58:45 | (...)... | samConversion.kt:57:1:60:1 | test | CastExpr | +| samConversion.kt:57:9:60:1 | Unit | file://:0:0:0:0 | | TypeAccess | +| samConversion.kt:58:5:58:45 | i0 | samConversion.kt:57:9:60:1 | test | LocalVariableDeclExpr | +| samConversion.kt:58:14:58:45 | (...)... | samConversion.kt:57:9:60:1 | test | CastExpr | | samConversion.kt:58:14:58:45 | ...=... | samConversion.kt:58:14:58:45 | | AssignExpr | | samConversion.kt:58:14:58:45 | | samConversion.kt:58:14:58:45 | | VarAccess | | samConversion.kt:58:14:58:45 | | samConversion.kt:58:14:58:45 | fn1 | VarAccess | | samConversion.kt:58:14:58:45 | Function2 | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:58:14:58:45 | Integer | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:58:14:58:45 | Integer | file://:0:0:0:0 | | TypeAccess | -| samConversion.kt:58:14:58:45 | InterfaceFn1Sus | samConversion.kt:57:1:60:1 | test | TypeAccess | -| samConversion.kt:58:14:58:45 | InterfaceFn1Sus | samConversion.kt:57:1:60:1 | test | TypeAccess | +| samConversion.kt:58:14:58:45 | InterfaceFn1Sus | samConversion.kt:57:9:60:1 | test | TypeAccess | +| samConversion.kt:58:14:58:45 | InterfaceFn1Sus | samConversion.kt:57:9:60:1 | test | TypeAccess | | samConversion.kt:58:14:58:45 | Unit | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:58:14:58:45 | Unit | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:58:14:58:45 | i | samConversion.kt:58:14:58:45 | fn1 | VarAccess | @@ -4275,22 +4279,22 @@ | samConversion.kt:58:14:58:45 | int | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:58:14:58:45 | invoke(...) | samConversion.kt:58:14:58:45 | fn1 | MethodCall | | samConversion.kt:58:14:58:45 | j | samConversion.kt:58:14:58:45 | fn1 | VarAccess | -| samConversion.kt:58:14:58:45 | new (...) | samConversion.kt:57:1:60:1 | test | ClassInstanceExpr | +| samConversion.kt:58:14:58:45 | new (...) | samConversion.kt:57:9:60:1 | test | ClassInstanceExpr | | samConversion.kt:58:14:58:45 | this | samConversion.kt:58:14:58:45 | | ThisAccess | | samConversion.kt:58:14:58:45 | this. | samConversion.kt:58:14:58:45 | | VarAccess | -| samConversion.kt:58:30:58:45 | ...->... | samConversion.kt:57:1:60:1 | test | LambdaExpr | -| samConversion.kt:58:30:58:45 | Function2 | samConversion.kt:57:1:60:1 | test | TypeAccess | -| samConversion.kt:58:30:58:45 | Integer | samConversion.kt:57:1:60:1 | test | TypeAccess | -| samConversion.kt:58:30:58:45 | Integer | samConversion.kt:57:1:60:1 | test | TypeAccess | +| samConversion.kt:58:30:58:45 | ...->... | samConversion.kt:57:9:60:1 | test | LambdaExpr | +| samConversion.kt:58:30:58:45 | Function2 | samConversion.kt:57:9:60:1 | test | TypeAccess | +| samConversion.kt:58:30:58:45 | Integer | samConversion.kt:57:9:60:1 | test | TypeAccess | +| samConversion.kt:58:30:58:45 | Integer | samConversion.kt:57:9:60:1 | test | TypeAccess | | samConversion.kt:58:30:58:45 | Unit | file://:0:0:0:0 | | TypeAccess | -| samConversion.kt:58:30:58:45 | Unit | samConversion.kt:57:1:60:1 | test | TypeAccess | +| samConversion.kt:58:30:58:45 | Unit | samConversion.kt:57:9:60:1 | test | TypeAccess | | samConversion.kt:58:32:58:32 | int | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:58:35:58:35 | int | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:58:40:58:43 | INSTANCE | samConversion.kt:58:30:58:45 | invoke | VarAccess | -| samConversion.kt:59:5:59:6 | i0 | samConversion.kt:57:1:60:1 | test | VarAccess | -| samConversion.kt:59:5:59:15 | fn1(...) | samConversion.kt:57:1:60:1 | test | MethodCall | -| samConversion.kt:59:12:59:12 | 1 | samConversion.kt:57:1:60:1 | test | IntegerLiteral | -| samConversion.kt:59:14:59:14 | 2 | samConversion.kt:57:1:60:1 | test | IntegerLiteral | +| samConversion.kt:59:5:59:6 | i0 | samConversion.kt:57:9:60:1 | test | VarAccess | +| samConversion.kt:59:5:59:15 | fn1(...) | samConversion.kt:57:9:60:1 | test | MethodCall | +| samConversion.kt:59:12:59:12 | 1 | samConversion.kt:57:9:60:1 | test | IntegerLiteral | +| samConversion.kt:59:14:59:14 | 2 | samConversion.kt:57:9:60:1 | test | IntegerLiteral | | samConversion.kt:63:5:63:9 | int | file://:0:0:0:0 | | TypeAccess | | samConversion.kt:63:5:63:9 | this | samConversion.kt:63:5:63:9 | getX | ThisAccess | | samConversion.kt:63:5:63:9 | this.x | samConversion.kt:63:5:63:9 | getX | VarAccess | diff --git a/java/ql/test-kotlin2/library-tests/exprs/funcExprs.expected b/java/ql/test-kotlin2/library-tests/exprs/funcExprs.expected index 94ef616bff83..d4da8d6e0be5 100644 --- a/java/ql/test-kotlin2/library-tests/exprs/funcExprs.expected +++ b/java/ql/test-kotlin2/library-tests/exprs/funcExprs.expected @@ -88,8 +88,8 @@ anon_class_member_modifiers | delegatedProperties.kt:23:29:23:31 | new KProperty0(...) { ... } | delegatedProperties.kt:23:29:23:31 | invoke | override, public | | delegatedProperties.kt:25:64:31:9 | new ReadWriteProperty(...) { ... } | delegatedProperties.kt:26:13:26:24 | getCurValue | final, public | | delegatedProperties.kt:25:64:31:9 | new ReadWriteProperty(...) { ... } | delegatedProperties.kt:26:13:26:24 | setCurValue | final, public | -| delegatedProperties.kt:25:64:31:9 | new ReadWriteProperty(...) { ... } | delegatedProperties.kt:27:13:27:88 | getValue | override, public | -| delegatedProperties.kt:25:64:31:9 | new ReadWriteProperty(...) { ... } | delegatedProperties.kt:28:13:30:13 | setValue | override, public | +| delegatedProperties.kt:25:64:31:9 | new ReadWriteProperty(...) { ... } | delegatedProperties.kt:27:22:27:88 | getValue | override, public | +| delegatedProperties.kt:25:64:31:9 | new ReadWriteProperty(...) { ... } | delegatedProperties.kt:28:22:30:13 | setValue | override, public | | delegatedProperties.kt:33:30:33:47 | new KProperty0(...) { ... } | delegatedProperties.kt:33:30:33:47 | get | override, public | | delegatedProperties.kt:33:30:33:47 | new KProperty0(...) { ... } | delegatedProperties.kt:33:30:33:47 | invoke | override, public | | delegatedProperties.kt:34:31:34:48 | new KMutableProperty0(...) { ... } | delegatedProperties.kt:34:31:34:48 | get | override, public | diff --git a/java/ql/test-kotlin2/library-tests/exprs/unaryOp.expected b/java/ql/test-kotlin2/library-tests/exprs/unaryOp.expected index 487226320cc2..98fd8f545a69 100644 --- a/java/ql/test-kotlin2/library-tests/exprs/unaryOp.expected +++ b/java/ql/test-kotlin2/library-tests/exprs/unaryOp.expected @@ -4,7 +4,7 @@ | exprs.kt:121:14:121:16 | !... | exprs.kt:121:15:121:16 | b1 | | exprs.kt:202:18:202:20 | ...!! | exprs.kt:202:18:202:18 | x | | exprs.kt:211:19:211:21 | ...!! | exprs.kt:211:19:211:19 | s | -| exprs.kt:212:19:212:21 | ...!! | exprs.kt:212:19:212:19 | s | +| exprs.kt:212:19:212:21 | ...!! | exprs.kt:212:19:212:19 | | | exprs.kt:286:5:286:6 | -... | exprs.kt:286:6:286:6 | i | | exprs.kt:287:5:287:6 | +... | exprs.kt:287:6:287:6 | i | | exprs.kt:288:5:288:6 | -... | exprs.kt:288:6:288:6 | d | diff --git a/java/ql/test-kotlin2/library-tests/generic-instance-methods/test.expected b/java/ql/test-kotlin2/library-tests/generic-instance-methods/test.expected index 2a6682ec3d85..d44d1d94c097 100644 --- a/java/ql/test-kotlin2/library-tests/generic-instance-methods/test.expected +++ b/java/ql/test-kotlin2/library-tests/generic-instance-methods/test.expected @@ -71,7 +71,7 @@ refTypes | file:///!unknown-binary-location/Generic.class:0:0:0:0 | Generic | file:///!unknown-binary-location/Generic.class:0:0:0:0 | getter | getter() | No parameters | String | test.kt:1:1:13:1 | Generic | test.kt:7:3:7:26 | getter | | file:///!unknown-binary-location/Generic.class:0:0:0:0 | Generic | file:///!unknown-binary-location/Generic.class:0:0:0:0 | identity | identity(java.lang.String) | String | String | test.kt:1:1:13:1 | Generic | test.kt:6:3:6:35 | identity | | file:///!unknown-binary-location/Generic.class:0:0:0:0 | Generic | file:///!unknown-binary-location/Generic.class:0:0:0:0 | identity2 | identity2(java.lang.String) | String | String | test.kt:1:1:13:1 | Generic | test.kt:5:3:5:46 | identity2 | -| file:///!unknown-binary-location/Generic.class:0:0:0:0 | Generic | file:///!unknown-binary-location/Generic.class:0:0:0:0 | privateid | privateid(java.lang.String) | String | String | test.kt:1:1:13:1 | Generic | test.kt:10:3:10:41 | privateid | +| file:///!unknown-binary-location/Generic.class:0:0:0:0 | Generic | file:///!unknown-binary-location/Generic.class:0:0:0:0 | privateid | privateid(java.lang.String) | String | String | test.kt:1:1:13:1 | Generic | test.kt:10:11:10:41 | privateid | | file:///!unknown-binary-location/Generic.class:0:0:0:0 | Generic | file:///!unknown-binary-location/Generic.class:0:0:0:0 | setStored | setStored(java.lang.String) | String | void | test.kt:1:1:13:1 | Generic | test.kt:3:3:3:12 | setStored | | file:///!unknown-binary-location/Generic.class:0:0:0:0 | Generic | file:///!unknown-binary-location/Generic.class:0:0:0:0 | setter | setter(java.lang.String) | String | void | test.kt:1:1:13:1 | Generic | test.kt:8:3:8:41 | setter | | test.kt:0:0:0:0 | TestKt | test.kt:15:1:28:1 | user | user() | No parameters | void | test.kt:0:0:0:0 | TestKt | test.kt:15:1:28:1 | user | @@ -81,5 +81,5 @@ refTypes | test.kt:1:1:13:1 | Generic | test.kt:6:3:6:35 | identity | identity(java.lang.Object) | T | T | test.kt:1:1:13:1 | Generic | test.kt:6:3:6:35 | identity | | test.kt:1:1:13:1 | Generic | test.kt:7:3:7:26 | getter | getter() | No parameters | T | test.kt:1:1:13:1 | Generic | test.kt:7:3:7:26 | getter | | test.kt:1:1:13:1 | Generic | test.kt:8:3:8:41 | setter | setter(java.lang.Object) | T | void | test.kt:1:1:13:1 | Generic | test.kt:8:3:8:41 | setter | -| test.kt:1:1:13:1 | Generic | test.kt:10:3:10:41 | privateid | privateid(java.lang.Object) | T | T | test.kt:1:1:13:1 | Generic | test.kt:10:3:10:41 | privateid | +| test.kt:1:1:13:1 | Generic | test.kt:10:11:10:41 | privateid | privateid(java.lang.Object) | T | T | test.kt:1:1:13:1 | Generic | test.kt:10:11:10:41 | privateid | | test.kt:1:1:13:1 | Generic | test.kt:11:3:11:70 | callPrivateId | callPrivateId(Generic) | Generic | String | test.kt:1:1:13:1 | Generic | test.kt:11:3:11:70 | callPrivateId | diff --git a/java/ql/test-kotlin2/library-tests/generic-selective-extraction/test.expected b/java/ql/test-kotlin2/library-tests/generic-selective-extraction/test.expected index fbc7f2519f65..7132c6915e91 100644 --- a/java/ql/test-kotlin2/library-tests/generic-selective-extraction/test.expected +++ b/java/ql/test-kotlin2/library-tests/generic-selective-extraction/test.expected @@ -15,9 +15,9 @@ | Test.kt:1:1:8:1 | TestKt | Test.kt:3:3:3:15 | getField | | Test.kt:1:1:8:1 | TestKt | Test.kt:3:3:3:15 | setField | | Test.kt:1:1:8:1 | TestKt | Test.kt:3:3:3:22 | field | -| Test.kt:1:1:8:1 | TestKt | Test.kt:4:3:5:18 | getRawField | -| Test.kt:1:1:8:1 | TestKt | Test.kt:4:3:5:18 | setRawField | -| Test.kt:1:1:8:1 | TestKt | Test.kt:4:3:5:25 | rawField | +| Test.kt:1:1:8:1 | TestKt | Test.kt:5:3:5:18 | getRawField | +| Test.kt:1:1:8:1 | TestKt | Test.kt:5:3:5:18 | setRawField | +| Test.kt:1:1:8:1 | TestKt | Test.kt:5:3:5:25 | rawField | | Test.kt:1:1:8:1 | TestKt | Test.kt:6:3:6:22 | method | | Test.kt:10:1:10:20 | FieldUsedKt | Test.kt:10:1:10:20 | FieldUsedKt | | Test.kt:11:1:11:23 | RawFieldUsedKt | Test.kt:11:1:11:23 | RawFieldUsedKt | diff --git a/java/ql/test-kotlin2/library-tests/inherited-default-value/test.expected b/java/ql/test-kotlin2/library-tests/inherited-default-value/test.expected index 08da126b9b25..27b9d5d23b7c 100644 --- a/java/ql/test-kotlin2/library-tests/inherited-default-value/test.expected +++ b/java/ql/test-kotlin2/library-tests/inherited-default-value/test.expected @@ -1,2 +1,2 @@ -| test.kt:3:3:3:28 | f(...) | test.kt:3:3:3:28 | f | test.kt:1:1:5:1 | A | -| test.kt:11:16:11:23 | f$default(...) | test.kt:3:3:3:28 | f$default | test.kt:1:1:5:1 | A | +| test.kt:3:8:3:28 | f(...) | test.kt:3:8:3:28 | f | test.kt:1:1:5:1 | A | +| test.kt:11:16:11:23 | f$default(...) | test.kt:3:8:3:28 | f$default | test.kt:1:1:5:1 | A | diff --git a/java/ql/test-kotlin2/library-tests/interface-delegate/test.expected b/java/ql/test-kotlin2/library-tests/interface-delegate/test.expected index a5576a6c0837..f04dc01ae8bb 100644 --- a/java/ql/test-kotlin2/library-tests/interface-delegate/test.expected +++ b/java/ql/test-kotlin2/library-tests/interface-delegate/test.expected @@ -5,4 +5,4 @@ fields | intfDelegate.kt:3:3:3:15 | f | intfDelegate.kt:1:1:5:1 | Intf | | intfDelegate.kt:7:1:10:1 | Concrete | intfDelegate.kt:7:1:10:1 | Concrete | | intfDelegate.kt:7:26:9:1 | | intfDelegate.kt:7:26:9:1 | new Intf(...) { ... } | -| intfDelegate.kt:8:3:8:28 | f | intfDelegate.kt:7:26:9:1 | new Intf(...) { ... } | +| intfDelegate.kt:8:12:8:28 | f | intfDelegate.kt:7:26:9:1 | new Intf(...) { ... } | diff --git a/java/ql/test-kotlin2/library-tests/internal-constructor-called-from-java/test.expected b/java/ql/test-kotlin2/library-tests/internal-constructor-called-from-java/test.expected index 44dbca7993e7..c3eb1d9284f8 100644 --- a/java/ql/test-kotlin2/library-tests/internal-constructor-called-from-java/test.expected +++ b/java/ql/test-kotlin2/library-tests/internal-constructor-called-from-java/test.expected @@ -1 +1 @@ -| User.java:3:31:3:44 | new Test(...) | test.kt:3:3:3:51 | { ... } | +| User.java:3:31:3:44 | new Test(...) | test.kt:3:12:3:51 | { ... } | diff --git a/java/ql/test-kotlin2/library-tests/internal-public-alias/test.expected b/java/ql/test-kotlin2/library-tests/internal-public-alias/test.expected index 09dae53df720..db1728f23352 100644 --- a/java/ql/test-kotlin2/library-tests/internal-public-alias/test.expected +++ b/java/ql/test-kotlin2/library-tests/internal-public-alias/test.expected @@ -1,6 +1,6 @@ | User.java:3:21:3:24 | test | -| test.kt:3:3:3:26 | getInternalVal$main | +| test.kt:3:12:3:26 | getInternalVal$main | | test.kt:6:3:6:36 | getInternalVal | -| test.kt:8:3:8:26 | getInternalVar$main | -| test.kt:8:3:8:26 | setInternalVar$main | -| test.kt:10:3:10:32 | internalFun$main | +| test.kt:8:12:8:26 | getInternalVar$main | +| test.kt:8:12:8:26 | setInternalVar$main | +| test.kt:10:12:10:32 | internalFun$main | diff --git a/java/ql/test-kotlin2/library-tests/java_and_kotlin/test.expected b/java/ql/test-kotlin2/library-tests/java_and_kotlin/test.expected index 845ee4ab7884..3ae886713c31 100644 --- a/java/ql/test-kotlin2/library-tests/java_and_kotlin/test.expected +++ b/java/ql/test-kotlin2/library-tests/java_and_kotlin/test.expected @@ -1,19 +1,19 @@ #select | Java.java:5:3:5:26 | kotlinFun(...) | Kotlin.kt:2:2:4:2 | kotlinFun | -| Java.java:11:11:11:22 | fn0(...) | Kotlin.kt:8:5:8:38 | fn0 | -| Kotlin.kt:13:46:13:51 | fn0(...) | Kotlin.kt:8:5:8:38 | fn0 | -| Kotlin.kt:14:54:14:59 | fn1(...) | Kotlin.kt:9:5:9:46 | fn1 | +| Java.java:11:11:11:22 | fn0(...) | Kotlin.kt:8:10:8:38 | fn0 | +| Kotlin.kt:13:40:13:51 | fn0(...) | Kotlin.kt:8:10:8:38 | fn0 | +| Kotlin.kt:14:48:14:59 | fn1(...) | Kotlin.kt:9:18:9:46 | fn1 | methods | Java.java:4:7:4:13 | javaFun | javaFun() | | Java.java:10:17:10:19 | fn0 | fn0(int) | | Kotlin.kt:2:2:4:2 | kotlinFun | kotlinFun() | -| Kotlin.kt:8:5:8:38 | fn0 | fn0(int) | -| Kotlin.kt:9:5:9:46 | fn1 | fn1(int) | -| Kotlin.kt:13:5:13:51 | fn0 | fn0(int) | -| Kotlin.kt:14:5:14:59 | fn1 | fn1(int) | +| Kotlin.kt:8:10:8:38 | fn0 | fn0(int) | +| Kotlin.kt:9:18:9:46 | fn1 | fn1(int) | +| Kotlin.kt:13:14:13:51 | fn0 | fn0(int) | +| Kotlin.kt:14:22:14:59 | fn1 | fn1(int) | overrides -| Java.java:10:17:10:19 | fn0 | Kotlin.kt:8:5:8:38 | fn0 | -| Kotlin.kt:13:5:13:51 | fn0 | Kotlin.kt:8:5:8:38 | fn0 | -| Kotlin.kt:14:5:14:59 | fn1 | Kotlin.kt:9:5:9:46 | fn1 | +| Java.java:10:17:10:19 | fn0 | Kotlin.kt:8:10:8:38 | fn0 | +| Kotlin.kt:13:14:13:51 | fn0 | Kotlin.kt:8:10:8:38 | fn0 | +| Kotlin.kt:14:22:14:59 | fn1 | Kotlin.kt:9:18:9:46 | fn1 | signature_mismatch -| Kotlin.kt:9:5:9:46 | fn1 | fn1(int) | +| Kotlin.kt:9:18:9:46 | fn1 | fn1(int) | diff --git a/java/ql/test-kotlin2/library-tests/java_and_kotlin_internal/visibility.expected b/java/ql/test-kotlin2/library-tests/java_and_kotlin_internal/visibility.expected index 222e90470fe2..43e5e8eefbe3 100644 --- a/java/ql/test-kotlin2/library-tests/java_and_kotlin_internal/visibility.expected +++ b/java/ql/test-kotlin2/library-tests/java_and_kotlin_internal/visibility.expected @@ -1,16 +1,16 @@ #select -| Kotlin.kt:2:2:3:2 | kotlinFun$main | final | -| Kotlin.kt:2:2:3:2 | kotlinFun$main | internal | -| Kotlin.kt:6:1:6:36 | topLevelKotlinFun | final | -| Kotlin.kt:6:1:6:36 | topLevelKotlinFun | internal | -| Kotlin.kt:6:1:6:36 | topLevelKotlinFun | static | +| Kotlin.kt:2:11:3:2 | kotlinFun$main | final | +| Kotlin.kt:2:11:3:2 | kotlinFun$main | internal | +| Kotlin.kt:6:10:6:36 | topLevelKotlinFun | final | +| Kotlin.kt:6:10:6:36 | topLevelKotlinFun | internal | +| Kotlin.kt:6:10:6:36 | topLevelKotlinFun | static | isPublic isInternal -| Kotlin.kt:2:2:3:2 | kotlinFun$main | -| Kotlin.kt:6:1:6:36 | topLevelKotlinFun | +| Kotlin.kt:2:11:3:2 | kotlinFun$main | +| Kotlin.kt:6:10:6:36 | topLevelKotlinFun | modifiers_methods -| file://:0:0:0:0 | final | Kotlin.kt:2:2:3:2 | kotlinFun$main | -| file://:0:0:0:0 | final | Kotlin.kt:6:1:6:36 | topLevelKotlinFun | -| file://:0:0:0:0 | internal | Kotlin.kt:2:2:3:2 | kotlinFun$main | -| file://:0:0:0:0 | internal | Kotlin.kt:6:1:6:36 | topLevelKotlinFun | -| file://:0:0:0:0 | static | Kotlin.kt:6:1:6:36 | topLevelKotlinFun | +| file://:0:0:0:0 | final | Kotlin.kt:2:11:3:2 | kotlinFun$main | +| file://:0:0:0:0 | final | Kotlin.kt:6:10:6:36 | topLevelKotlinFun | +| file://:0:0:0:0 | internal | Kotlin.kt:2:11:3:2 | kotlinFun$main | +| file://:0:0:0:0 | internal | Kotlin.kt:6:10:6:36 | topLevelKotlinFun | +| file://:0:0:0:0 | static | Kotlin.kt:6:10:6:36 | topLevelKotlinFun | diff --git a/java/ql/test-kotlin2/library-tests/jvmoverloads-annotation/PrintAst.expected b/java/ql/test-kotlin2/library-tests/jvmoverloads-annotation/PrintAst.expected index 6355cc86a7a0..aed31ecc1f84 100644 --- a/java/ql/test-kotlin2/library-tests/jvmoverloads-annotation/PrintAst.expected +++ b/java/ql/test-kotlin2/library-tests/jvmoverloads-annotation/PrintAst.expected @@ -6,8 +6,8 @@ test.kt: # 1| 5: [BlockStmt] { ... } # 1| 0: [ReturnStmt] return ... # 1| 0: [StringLiteral] "Hello world" -# 44| 2: [ExtensionMethod] testExtensionFunction -# 44| 3: [TypeAccess] int +# 45| 2: [ExtensionMethod] testExtensionFunction +# 45| 3: [TypeAccess] int #-----| 4: (Parameters) # 45| 0: [Parameter] # 45| 0: [TypeAccess] Test @@ -19,10 +19,10 @@ test.kt: # 45| 0: [TypeAccess] double # 45| 4: [Parameter] e # 45| 0: [TypeAccess] boolean -# 44| 5: [BlockStmt] { ... } -# 44| 0: [ReturnStmt] return ... -# 44| 0: [MethodCall] testExtensionFunction$default(...) -# 44| -1: [TypeAccess] TestKt +# 45| 5: [BlockStmt] { ... } +# 45| 0: [ReturnStmt] return ... +# 45| 0: [MethodCall] testExtensionFunction$default(...) +# 45| -1: [TypeAccess] TestKt # 0| 0: [ExtensionReceiverAccess] this # 0| 1: [VarAccess] a # 0| 2: [VarAccess] b @@ -31,10 +31,10 @@ test.kt: # 0| 5: [VarAccess] e # 1| 6: [IntegerLiteral] 23 # 1| 7: [NullLiteral] null -# 44| 3: [ExtensionMethod] testExtensionFunction +# 45| 3: [ExtensionMethod] testExtensionFunction #-----| 1: (Annotations) # 44| 1: [Annotation] JvmOverloads -# 44| 3: [TypeAccess] int +# 45| 3: [TypeAccess] int #-----| 4: (Parameters) # 45| 0: [Parameter] # 45| 0: [TypeAccess] Test @@ -51,8 +51,8 @@ test.kt: # 45| 5: [BlockStmt] { ... } # 45| 0: [ReturnStmt] return ... # 45| 0: [VarAccess] a -# 44| 4: [ExtensionMethod] testExtensionFunction -# 44| 3: [TypeAccess] int +# 45| 4: [ExtensionMethod] testExtensionFunction +# 45| 3: [TypeAccess] int #-----| 4: (Parameters) # 45| 0: [Parameter] # 45| 0: [TypeAccess] Test @@ -62,10 +62,10 @@ test.kt: # 45| 0: [TypeAccess] double # 45| 3: [Parameter] e # 45| 0: [TypeAccess] boolean -# 44| 5: [BlockStmt] { ... } -# 44| 0: [ReturnStmt] return ... -# 44| 0: [MethodCall] testExtensionFunction$default(...) -# 44| -1: [TypeAccess] TestKt +# 45| 5: [BlockStmt] { ... } +# 45| 0: [ReturnStmt] return ... +# 45| 0: [MethodCall] testExtensionFunction$default(...) +# 45| -1: [TypeAccess] TestKt # 0| 0: [ExtensionReceiverAccess] this # 0| 1: [VarAccess] a # 1| 2: [NullLiteral] null @@ -74,63 +74,63 @@ test.kt: # 0| 5: [VarAccess] e # 1| 6: [IntegerLiteral] 21 # 1| 7: [NullLiteral] null -# 44| 5: [ExtensionMethod] testExtensionFunction$default -# 44| 3: [TypeAccess] int +# 45| 5: [ExtensionMethod] testExtensionFunction$default +# 45| 3: [TypeAccess] int #-----| 4: (Parameters) -# 44| 0: [Parameter] p0 -# 44| 0: [TypeAccess] Test -# 44| 1: [Parameter] p1 -# 44| 0: [TypeAccess] int -# 44| 2: [Parameter] p2 -# 44| 0: [TypeAccess] String -# 44| 3: [Parameter] p3 -# 44| 0: [TypeAccess] double -# 44| 4: [Parameter] p4 -# 44| 0: [TypeAccess] float -# 44| 5: [Parameter] p5 -# 44| 0: [TypeAccess] boolean -# 44| 6: [Parameter] p6 -# 44| 0: [TypeAccess] int -# 44| 7: [Parameter] p7 -# 44| 0: [TypeAccess] Object -# 44| 5: [BlockStmt] { ... } -# 44| 0: [IfStmt] if (...) -# 44| 0: [EQExpr] ... == ... -# 44| 0: [AndBitwiseExpr] ... & ... -# 44| 0: [IntegerLiteral] 2 -# 44| 1: [VarAccess] p6 -# 44| 1: [IntegerLiteral] 0 -# 44| 1: [ExprStmt] ; -# 44| 0: [AssignExpr] ...=... -# 44| 0: [VarAccess] p2 +# 45| 0: [Parameter] p0 +# 45| 0: [TypeAccess] Test +# 45| 1: [Parameter] p1 +# 45| 0: [TypeAccess] int +# 45| 2: [Parameter] p2 +# 45| 0: [TypeAccess] String +# 45| 3: [Parameter] p3 +# 45| 0: [TypeAccess] double +# 45| 4: [Parameter] p4 +# 45| 0: [TypeAccess] float +# 45| 5: [Parameter] p5 +# 45| 0: [TypeAccess] boolean +# 45| 6: [Parameter] p6 +# 45| 0: [TypeAccess] int +# 45| 7: [Parameter] p7 +# 45| 0: [TypeAccess] Object +# 45| 5: [BlockStmt] { ... } +# 45| 0: [IfStmt] if (...) +# 45| 0: [EQExpr] ... == ... +# 45| 0: [AndBitwiseExpr] ... & ... +# 45| 0: [IntegerLiteral] 2 +# 45| 1: [VarAccess] p6 +# 45| 1: [IntegerLiteral] 0 +# 45| 1: [ExprStmt] ; +# 45| 0: [AssignExpr] ...=... +# 45| 0: [VarAccess] p2 # 45| 1: [MethodCall] getString(...) # 45| -1: [TypeAccess] TestKt -# 44| 1: [IfStmt] if (...) -# 44| 0: [EQExpr] ... == ... -# 44| 0: [AndBitwiseExpr] ... & ... -# 44| 0: [IntegerLiteral] 8 -# 44| 1: [VarAccess] p6 -# 44| 1: [IntegerLiteral] 0 -# 44| 1: [ExprStmt] ; -# 44| 0: [AssignExpr] ...=... -# 44| 0: [VarAccess] p4 +# 45| 1: [IfStmt] if (...) +# 45| 0: [EQExpr] ... == ... +# 45| 0: [AndBitwiseExpr] ... & ... +# 45| 0: [IntegerLiteral] 8 +# 45| 1: [VarAccess] p6 +# 45| 1: [IntegerLiteral] 0 +# 45| 1: [ExprStmt] ; +# 45| 0: [AssignExpr] ...=... +# 45| 0: [VarAccess] p4 # 45| 1: [FloatLiteral] 1.0 -# 44| 2: [ReturnStmt] return ... -# 44| 0: [MethodCall] testExtensionFunction(...) -# 44| -1: [TypeAccess] TestKt -# 44| 0: [ExtensionReceiverAccess] this -# 44| 1: [VarAccess] p1 -# 44| 2: [VarAccess] p2 -# 44| 3: [VarAccess] p3 -# 44| 4: [VarAccess] p4 -# 44| 5: [VarAccess] p5 +# 45| 2: [ReturnStmt] return ... +# 45| 0: [MethodCall] testExtensionFunction(...) +# 45| -1: [TypeAccess] TestKt +# 45| 0: [ExtensionReceiverAccess] this +# 45| 1: [VarAccess] p1 +# 45| 2: [VarAccess] p2 +# 45| 3: [VarAccess] p3 +# 45| 4: [VarAccess] p4 +# 45| 5: [VarAccess] p5 # 3| 2: [Class] Test # 3| 1: [Constructor] Test # 3| 5: [BlockStmt] { ... } # 3| 0: [SuperConstructorInvocationStmt] super(...) # 3| 1: [BlockStmt] { ... } -# 5| 2: [Method] testStaticFunction -# 5| 3: [TypeAccess] int +# 6| 2: [Method] testStaticFunction +# 6| 3: [TypeAccess] int #-----| 4: (Parameters) # 6| 0: [Parameter] a # 6| 0: [TypeAccess] int @@ -140,10 +140,10 @@ test.kt: # 6| 0: [TypeAccess] double # 6| 3: [Parameter] e # 6| 0: [TypeAccess] boolean -# 5| 5: [BlockStmt] { ... } -# 5| 0: [ReturnStmt] return ... -# 5| 0: [MethodCall] testStaticFunction$default(...) -# 5| -1: [TypeAccess] Test +# 6| 5: [BlockStmt] { ... } +# 6| 0: [ReturnStmt] return ... +# 6| 0: [MethodCall] testStaticFunction$default(...) +# 6| -1: [TypeAccess] Test # 0| 0: [VarAccess] a # 0| 1: [VarAccess] b # 0| 2: [VarAccess] c @@ -151,11 +151,11 @@ test.kt: # 0| 4: [VarAccess] e # 1| 5: [IntegerLiteral] 23 # 1| 6: [NullLiteral] null -# 5| 3: [Method] testStaticFunction +# 6| 3: [Method] testStaticFunction #-----| 1: (Annotations) # 5| 1: [Annotation] JvmOverloads # 5| 2: [Annotation] JvmStatic -# 5| 3: [TypeAccess] int +# 6| 3: [TypeAccess] int #-----| 4: (Parameters) # 6| 0: [Parameter] a # 6| 0: [TypeAccess] int @@ -170,8 +170,8 @@ test.kt: # 6| 5: [BlockStmt] { ... } # 6| 0: [ReturnStmt] return ... # 6| 0: [VarAccess] a -# 5| 4: [Method] testStaticFunction -# 5| 3: [TypeAccess] int +# 6| 4: [Method] testStaticFunction +# 6| 3: [TypeAccess] int #-----| 4: (Parameters) # 6| 0: [Parameter] a # 6| 0: [TypeAccess] int @@ -179,10 +179,10 @@ test.kt: # 6| 0: [TypeAccess] double # 6| 2: [Parameter] e # 6| 0: [TypeAccess] boolean -# 5| 5: [BlockStmt] { ... } -# 5| 0: [ReturnStmt] return ... -# 5| 0: [MethodCall] testStaticFunction$default(...) -# 5| -1: [TypeAccess] Test +# 6| 5: [BlockStmt] { ... } +# 6| 0: [ReturnStmt] return ... +# 6| 0: [MethodCall] testStaticFunction$default(...) +# 6| -1: [TypeAccess] Test # 0| 0: [VarAccess] a # 1| 1: [NullLiteral] null # 0| 2: [VarAccess] c @@ -190,55 +190,55 @@ test.kt: # 0| 4: [VarAccess] e # 1| 5: [IntegerLiteral] 21 # 1| 6: [NullLiteral] null -# 5| 5: [Method] testStaticFunction$default -# 5| 3: [TypeAccess] int +# 6| 5: [Method] testStaticFunction$default +# 6| 3: [TypeAccess] int #-----| 4: (Parameters) -# 5| 0: [Parameter] p0 -# 5| 0: [TypeAccess] int -# 5| 1: [Parameter] p1 -# 5| 0: [TypeAccess] String -# 5| 2: [Parameter] p2 -# 5| 0: [TypeAccess] double -# 5| 3: [Parameter] p3 -# 5| 0: [TypeAccess] float -# 5| 4: [Parameter] p4 -# 5| 0: [TypeAccess] boolean -# 5| 5: [Parameter] p5 -# 5| 0: [TypeAccess] int -# 5| 6: [Parameter] p6 -# 5| 0: [TypeAccess] Object -# 5| 5: [BlockStmt] { ... } -# 5| 0: [IfStmt] if (...) -# 5| 0: [EQExpr] ... == ... -# 5| 0: [AndBitwiseExpr] ... & ... -# 5| 0: [IntegerLiteral] 2 -# 5| 1: [VarAccess] p5 -# 5| 1: [IntegerLiteral] 0 -# 5| 1: [ExprStmt] ; -# 5| 0: [AssignExpr] ...=... -# 5| 0: [VarAccess] p1 +# 6| 0: [Parameter] p0 +# 6| 0: [TypeAccess] int +# 6| 1: [Parameter] p1 +# 6| 0: [TypeAccess] String +# 6| 2: [Parameter] p2 +# 6| 0: [TypeAccess] double +# 6| 3: [Parameter] p3 +# 6| 0: [TypeAccess] float +# 6| 4: [Parameter] p4 +# 6| 0: [TypeAccess] boolean +# 6| 5: [Parameter] p5 +# 6| 0: [TypeAccess] int +# 6| 6: [Parameter] p6 +# 6| 0: [TypeAccess] Object +# 6| 5: [BlockStmt] { ... } +# 6| 0: [IfStmt] if (...) +# 6| 0: [EQExpr] ... == ... +# 6| 0: [AndBitwiseExpr] ... & ... +# 6| 0: [IntegerLiteral] 2 +# 6| 1: [VarAccess] p5 +# 6| 1: [IntegerLiteral] 0 +# 6| 1: [ExprStmt] ; +# 6| 0: [AssignExpr] ...=... +# 6| 0: [VarAccess] p1 # 6| 1: [MethodCall] getString(...) # 6| -1: [TypeAccess] TestKt -# 5| 1: [IfStmt] if (...) -# 5| 0: [EQExpr] ... == ... -# 5| 0: [AndBitwiseExpr] ... & ... -# 5| 0: [IntegerLiteral] 8 -# 5| 1: [VarAccess] p5 -# 5| 1: [IntegerLiteral] 0 -# 5| 1: [ExprStmt] ; -# 5| 0: [AssignExpr] ...=... -# 5| 0: [VarAccess] p3 +# 6| 1: [IfStmt] if (...) +# 6| 0: [EQExpr] ... == ... +# 6| 0: [AndBitwiseExpr] ... & ... +# 6| 0: [IntegerLiteral] 8 +# 6| 1: [VarAccess] p5 +# 6| 1: [IntegerLiteral] 0 +# 6| 1: [ExprStmt] ; +# 6| 0: [AssignExpr] ...=... +# 6| 0: [VarAccess] p3 # 6| 1: [FloatLiteral] 1.0 -# 5| 2: [ReturnStmt] return ... -# 5| 0: [MethodCall] testStaticFunction(...) -# 5| -1: [TypeAccess] Test -# 5| 0: [VarAccess] p0 -# 5| 1: [VarAccess] p1 -# 5| 2: [VarAccess] p2 -# 5| 3: [VarAccess] p3 -# 5| 4: [VarAccess] p4 -# 8| 6: [Method] testMemberFunction -# 8| 3: [TypeAccess] int +# 6| 2: [ReturnStmt] return ... +# 6| 0: [MethodCall] testStaticFunction(...) +# 6| -1: [TypeAccess] Test +# 6| 0: [VarAccess] p0 +# 6| 1: [VarAccess] p1 +# 6| 2: [VarAccess] p2 +# 6| 3: [VarAccess] p3 +# 6| 4: [VarAccess] p4 +# 9| 6: [Method] testMemberFunction +# 9| 3: [TypeAccess] int #-----| 4: (Parameters) # 9| 0: [Parameter] a # 9| 0: [TypeAccess] int @@ -248,10 +248,10 @@ test.kt: # 9| 0: [TypeAccess] double # 9| 3: [Parameter] e # 9| 0: [TypeAccess] boolean -# 8| 5: [BlockStmt] { ... } -# 8| 0: [ReturnStmt] return ... -# 8| 0: [MethodCall] testMemberFunction$default(...) -# 8| -1: [TypeAccess] Test +# 9| 5: [BlockStmt] { ... } +# 9| 0: [ReturnStmt] return ... +# 9| 0: [MethodCall] testMemberFunction$default(...) +# 9| -1: [TypeAccess] Test # 0| 0: [ThisAccess] this # 0| 1: [VarAccess] a # 0| 2: [VarAccess] b @@ -260,10 +260,10 @@ test.kt: # 0| 5: [VarAccess] e # 1| 6: [IntegerLiteral] 23 # 1| 7: [NullLiteral] null -# 8| 7: [Method] testMemberFunction +# 9| 7: [Method] testMemberFunction #-----| 1: (Annotations) # 8| 1: [Annotation] JvmOverloads -# 8| 3: [TypeAccess] int +# 9| 3: [TypeAccess] int #-----| 4: (Parameters) # 9| 0: [Parameter] a # 9| 0: [TypeAccess] int @@ -278,8 +278,8 @@ test.kt: # 9| 5: [BlockStmt] { ... } # 9| 0: [ReturnStmt] return ... # 9| 0: [VarAccess] a -# 8| 8: [Method] testMemberFunction -# 8| 3: [TypeAccess] int +# 9| 8: [Method] testMemberFunction +# 9| 3: [TypeAccess] int #-----| 4: (Parameters) # 9| 0: [Parameter] a # 9| 0: [TypeAccess] int @@ -287,10 +287,10 @@ test.kt: # 9| 0: [TypeAccess] double # 9| 2: [Parameter] e # 9| 0: [TypeAccess] boolean -# 8| 5: [BlockStmt] { ... } -# 8| 0: [ReturnStmt] return ... -# 8| 0: [MethodCall] testMemberFunction$default(...) -# 8| -1: [TypeAccess] Test +# 9| 5: [BlockStmt] { ... } +# 9| 0: [ReturnStmt] return ... +# 9| 0: [MethodCall] testMemberFunction$default(...) +# 9| -1: [TypeAccess] Test # 0| 0: [ThisAccess] this # 0| 1: [VarAccess] a # 1| 2: [NullLiteral] null @@ -299,57 +299,57 @@ test.kt: # 0| 5: [VarAccess] e # 1| 6: [IntegerLiteral] 21 # 1| 7: [NullLiteral] null -# 8| 9: [Method] testMemberFunction$default -# 8| 3: [TypeAccess] int +# 9| 9: [Method] testMemberFunction$default +# 9| 3: [TypeAccess] int #-----| 4: (Parameters) -# 8| 0: [Parameter] p0 -# 8| 0: [TypeAccess] Test -# 8| 1: [Parameter] p1 -# 8| 0: [TypeAccess] int -# 8| 2: [Parameter] p2 -# 8| 0: [TypeAccess] String -# 8| 3: [Parameter] p3 -# 8| 0: [TypeAccess] double -# 8| 4: [Parameter] p4 -# 8| 0: [TypeAccess] float -# 8| 5: [Parameter] p5 -# 8| 0: [TypeAccess] boolean -# 8| 6: [Parameter] p6 -# 8| 0: [TypeAccess] int -# 8| 7: [Parameter] p7 -# 8| 0: [TypeAccess] Object -# 8| 5: [BlockStmt] { ... } -# 8| 0: [IfStmt] if (...) -# 8| 0: [EQExpr] ... == ... -# 8| 0: [AndBitwiseExpr] ... & ... -# 8| 0: [IntegerLiteral] 2 -# 8| 1: [VarAccess] p6 -# 8| 1: [IntegerLiteral] 0 -# 8| 1: [ExprStmt] ; -# 8| 0: [AssignExpr] ...=... -# 8| 0: [VarAccess] p2 +# 9| 0: [Parameter] p0 +# 9| 0: [TypeAccess] Test +# 9| 1: [Parameter] p1 +# 9| 0: [TypeAccess] int +# 9| 2: [Parameter] p2 +# 9| 0: [TypeAccess] String +# 9| 3: [Parameter] p3 +# 9| 0: [TypeAccess] double +# 9| 4: [Parameter] p4 +# 9| 0: [TypeAccess] float +# 9| 5: [Parameter] p5 +# 9| 0: [TypeAccess] boolean +# 9| 6: [Parameter] p6 +# 9| 0: [TypeAccess] int +# 9| 7: [Parameter] p7 +# 9| 0: [TypeAccess] Object +# 9| 5: [BlockStmt] { ... } +# 9| 0: [IfStmt] if (...) +# 9| 0: [EQExpr] ... == ... +# 9| 0: [AndBitwiseExpr] ... & ... +# 9| 0: [IntegerLiteral] 2 +# 9| 1: [VarAccess] p6 +# 9| 1: [IntegerLiteral] 0 +# 9| 1: [ExprStmt] ; +# 9| 0: [AssignExpr] ...=... +# 9| 0: [VarAccess] p2 # 9| 1: [MethodCall] getString(...) # 9| -1: [TypeAccess] TestKt -# 8| 1: [IfStmt] if (...) -# 8| 0: [EQExpr] ... == ... -# 8| 0: [AndBitwiseExpr] ... & ... -# 8| 0: [IntegerLiteral] 8 -# 8| 1: [VarAccess] p6 -# 8| 1: [IntegerLiteral] 0 -# 8| 1: [ExprStmt] ; -# 8| 0: [AssignExpr] ...=... -# 8| 0: [VarAccess] p4 +# 9| 1: [IfStmt] if (...) +# 9| 0: [EQExpr] ... == ... +# 9| 0: [AndBitwiseExpr] ... & ... +# 9| 0: [IntegerLiteral] 8 +# 9| 1: [VarAccess] p6 +# 9| 1: [IntegerLiteral] 0 +# 9| 1: [ExprStmt] ; +# 9| 0: [AssignExpr] ...=... +# 9| 0: [VarAccess] p4 # 9| 1: [FloatLiteral] 1.0 -# 8| 2: [ReturnStmt] return ... -# 8| 0: [MethodCall] testMemberFunction(...) -# 8| -1: [VarAccess] p0 -# 8| 0: [VarAccess] p1 -# 8| 1: [VarAccess] p2 -# 8| 2: [VarAccess] p3 -# 8| 3: [VarAccess] p4 -# 8| 4: [VarAccess] p5 -# 11| 10: [ExtensionMethod] testMemberExtensionFunction -# 11| 3: [TypeAccess] int +# 9| 2: [ReturnStmt] return ... +# 9| 0: [MethodCall] testMemberFunction(...) +# 9| -1: [VarAccess] p0 +# 9| 0: [VarAccess] p1 +# 9| 1: [VarAccess] p2 +# 9| 2: [VarAccess] p3 +# 9| 3: [VarAccess] p4 +# 9| 4: [VarAccess] p5 +# 12| 10: [ExtensionMethod] testMemberExtensionFunction +# 12| 3: [TypeAccess] int #-----| 4: (Parameters) # 12| 0: [Parameter] # 12| 0: [TypeAccess] Test2 @@ -361,10 +361,10 @@ test.kt: # 12| 0: [TypeAccess] double # 12| 4: [Parameter] e # 12| 0: [TypeAccess] boolean -# 11| 5: [BlockStmt] { ... } -# 11| 0: [ReturnStmt] return ... -# 11| 0: [MethodCall] testMemberExtensionFunction$default(...) -# 11| -1: [TypeAccess] Test +# 12| 5: [BlockStmt] { ... } +# 12| 0: [ReturnStmt] return ... +# 12| 0: [MethodCall] testMemberExtensionFunction$default(...) +# 12| -1: [TypeAccess] Test # 0| 0: [ThisAccess] Test.this # 0| 0: [TypeAccess] Test # 0| 1: [ExtensionReceiverAccess] this @@ -375,10 +375,10 @@ test.kt: # 0| 6: [VarAccess] e # 1| 7: [IntegerLiteral] 23 # 1| 8: [NullLiteral] null -# 11| 11: [ExtensionMethod] testMemberExtensionFunction +# 12| 11: [ExtensionMethod] testMemberExtensionFunction #-----| 1: (Annotations) # 11| 1: [Annotation] JvmOverloads -# 11| 3: [TypeAccess] int +# 12| 3: [TypeAccess] int #-----| 4: (Parameters) # 12| 0: [Parameter] # 12| 0: [TypeAccess] Test2 @@ -395,8 +395,8 @@ test.kt: # 12| 5: [BlockStmt] { ... } # 12| 0: [ReturnStmt] return ... # 12| 0: [VarAccess] a -# 11| 12: [ExtensionMethod] testMemberExtensionFunction -# 11| 3: [TypeAccess] int +# 12| 12: [ExtensionMethod] testMemberExtensionFunction +# 12| 3: [TypeAccess] int #-----| 4: (Parameters) # 12| 0: [Parameter] # 12| 0: [TypeAccess] Test2 @@ -406,10 +406,10 @@ test.kt: # 12| 0: [TypeAccess] double # 12| 3: [Parameter] e # 12| 0: [TypeAccess] boolean -# 11| 5: [BlockStmt] { ... } -# 11| 0: [ReturnStmt] return ... -# 11| 0: [MethodCall] testMemberExtensionFunction$default(...) -# 11| -1: [TypeAccess] Test +# 12| 5: [BlockStmt] { ... } +# 12| 0: [ReturnStmt] return ... +# 12| 0: [MethodCall] testMemberExtensionFunction$default(...) +# 12| -1: [TypeAccess] Test # 0| 0: [ThisAccess] Test.this # 0| 0: [TypeAccess] Test # 0| 1: [ExtensionReceiverAccess] this @@ -420,58 +420,58 @@ test.kt: # 0| 6: [VarAccess] e # 1| 7: [IntegerLiteral] 21 # 1| 8: [NullLiteral] null -# 11| 13: [ExtensionMethod] testMemberExtensionFunction$default -# 11| 3: [TypeAccess] int +# 12| 13: [ExtensionMethod] testMemberExtensionFunction$default +# 12| 3: [TypeAccess] int #-----| 4: (Parameters) -# 11| 0: [Parameter] p0 -# 11| 0: [TypeAccess] Test -# 11| 1: [Parameter] p1 -# 11| 0: [TypeAccess] Test2 -# 11| 2: [Parameter] p2 -# 11| 0: [TypeAccess] int -# 11| 3: [Parameter] p3 -# 11| 0: [TypeAccess] String -# 11| 4: [Parameter] p4 -# 11| 0: [TypeAccess] double -# 11| 5: [Parameter] p5 -# 11| 0: [TypeAccess] float -# 11| 6: [Parameter] p6 -# 11| 0: [TypeAccess] boolean -# 11| 7: [Parameter] p7 -# 11| 0: [TypeAccess] int -# 11| 8: [Parameter] p8 -# 11| 0: [TypeAccess] Object -# 11| 5: [BlockStmt] { ... } -# 11| 0: [IfStmt] if (...) -# 11| 0: [EQExpr] ... == ... -# 11| 0: [AndBitwiseExpr] ... & ... -# 11| 0: [IntegerLiteral] 2 -# 11| 1: [VarAccess] p7 -# 11| 1: [IntegerLiteral] 0 -# 11| 1: [ExprStmt] ; -# 11| 0: [AssignExpr] ...=... -# 11| 0: [VarAccess] p3 +# 12| 0: [Parameter] p0 +# 12| 0: [TypeAccess] Test +# 12| 1: [Parameter] p1 +# 12| 0: [TypeAccess] Test2 +# 12| 2: [Parameter] p2 +# 12| 0: [TypeAccess] int +# 12| 3: [Parameter] p3 +# 12| 0: [TypeAccess] String +# 12| 4: [Parameter] p4 +# 12| 0: [TypeAccess] double +# 12| 5: [Parameter] p5 +# 12| 0: [TypeAccess] float +# 12| 6: [Parameter] p6 +# 12| 0: [TypeAccess] boolean +# 12| 7: [Parameter] p7 +# 12| 0: [TypeAccess] int +# 12| 8: [Parameter] p8 +# 12| 0: [TypeAccess] Object +# 12| 5: [BlockStmt] { ... } +# 12| 0: [IfStmt] if (...) +# 12| 0: [EQExpr] ... == ... +# 12| 0: [AndBitwiseExpr] ... & ... +# 12| 0: [IntegerLiteral] 2 +# 12| 1: [VarAccess] p7 +# 12| 1: [IntegerLiteral] 0 +# 12| 1: [ExprStmt] ; +# 12| 0: [AssignExpr] ...=... +# 12| 0: [VarAccess] p3 # 12| 1: [MethodCall] getString(...) # 12| -1: [TypeAccess] TestKt -# 11| 1: [IfStmt] if (...) -# 11| 0: [EQExpr] ... == ... -# 11| 0: [AndBitwiseExpr] ... & ... -# 11| 0: [IntegerLiteral] 8 -# 11| 1: [VarAccess] p7 -# 11| 1: [IntegerLiteral] 0 -# 11| 1: [ExprStmt] ; -# 11| 0: [AssignExpr] ...=... -# 11| 0: [VarAccess] p5 +# 12| 1: [IfStmt] if (...) +# 12| 0: [EQExpr] ... == ... +# 12| 0: [AndBitwiseExpr] ... & ... +# 12| 0: [IntegerLiteral] 8 +# 12| 1: [VarAccess] p7 +# 12| 1: [IntegerLiteral] 0 +# 12| 1: [ExprStmt] ; +# 12| 0: [AssignExpr] ...=... +# 12| 0: [VarAccess] p5 # 12| 1: [FloatLiteral] 1.0 -# 11| 2: [ReturnStmt] return ... -# 11| 0: [MethodCall] testMemberExtensionFunction(...) -# 11| -1: [VarAccess] p0 -# 11| 0: [ExtensionReceiverAccess] this -# 11| 1: [VarAccess] p2 -# 11| 2: [VarAccess] p3 -# 11| 3: [VarAccess] p4 -# 11| 4: [VarAccess] p5 -# 11| 5: [VarAccess] p6 +# 12| 2: [ReturnStmt] return ... +# 12| 0: [MethodCall] testMemberExtensionFunction(...) +# 12| -1: [VarAccess] p0 +# 12| 0: [ExtensionReceiverAccess] this +# 12| 1: [VarAccess] p2 +# 12| 2: [VarAccess] p3 +# 12| 3: [VarAccess] p4 +# 12| 4: [VarAccess] p5 +# 12| 5: [VarAccess] p6 # 16| 3: [Class] Test2 # 16| 1: [Constructor] Test2 #-----| 4: (Parameters) @@ -575,8 +575,8 @@ test.kt: # 18| 5: [BlockStmt] { ... } # 18| 0: [SuperConstructorInvocationStmt] super(...) # 18| 1: [BlockStmt] { ... } -# 20| 2: [Method] testCompanionFunction -# 20| 3: [TypeAccess] int +# 21| 2: [Method] testCompanionFunction +# 21| 3: [TypeAccess] int #-----| 4: (Parameters) # 21| 0: [Parameter] a # 21| 0: [TypeAccess] int @@ -586,10 +586,10 @@ test.kt: # 21| 0: [TypeAccess] double # 21| 3: [Parameter] e # 21| 0: [TypeAccess] boolean -# 20| 5: [BlockStmt] { ... } -# 20| 0: [ReturnStmt] return ... -# 20| 0: [MethodCall] testCompanionFunction$default(...) -# 20| -1: [TypeAccess] Companion +# 21| 5: [BlockStmt] { ... } +# 21| 0: [ReturnStmt] return ... +# 21| 0: [MethodCall] testCompanionFunction$default(...) +# 21| -1: [TypeAccess] Companion # 0| 0: [ThisAccess] this # 0| 1: [VarAccess] a # 0| 2: [VarAccess] b @@ -598,10 +598,10 @@ test.kt: # 0| 5: [VarAccess] e # 1| 6: [IntegerLiteral] 23 # 1| 7: [NullLiteral] null -# 20| 3: [Method] testCompanionFunction +# 21| 3: [Method] testCompanionFunction #-----| 1: (Annotations) # 20| 1: [Annotation] JvmOverloads -# 20| 3: [TypeAccess] int +# 21| 3: [TypeAccess] int #-----| 4: (Parameters) # 21| 0: [Parameter] a # 21| 0: [TypeAccess] int @@ -616,8 +616,8 @@ test.kt: # 21| 5: [BlockStmt] { ... } # 21| 0: [ReturnStmt] return ... # 21| 0: [VarAccess] a -# 20| 4: [Method] testCompanionFunction -# 20| 3: [TypeAccess] int +# 21| 4: [Method] testCompanionFunction +# 21| 3: [TypeAccess] int #-----| 4: (Parameters) # 21| 0: [Parameter] a # 21| 0: [TypeAccess] int @@ -625,10 +625,10 @@ test.kt: # 21| 0: [TypeAccess] double # 21| 2: [Parameter] e # 21| 0: [TypeAccess] boolean -# 20| 5: [BlockStmt] { ... } -# 20| 0: [ReturnStmt] return ... -# 20| 0: [MethodCall] testCompanionFunction$default(...) -# 20| -1: [TypeAccess] Companion +# 21| 5: [BlockStmt] { ... } +# 21| 0: [ReturnStmt] return ... +# 21| 0: [MethodCall] testCompanionFunction$default(...) +# 21| -1: [TypeAccess] Companion # 0| 0: [ThisAccess] this # 0| 1: [VarAccess] a # 1| 2: [NullLiteral] null @@ -637,57 +637,57 @@ test.kt: # 0| 5: [VarAccess] e # 1| 6: [IntegerLiteral] 21 # 1| 7: [NullLiteral] null -# 20| 5: [Method] testCompanionFunction$default -# 20| 3: [TypeAccess] int +# 21| 5: [Method] testCompanionFunction$default +# 21| 3: [TypeAccess] int #-----| 4: (Parameters) -# 20| 0: [Parameter] p0 -# 20| 0: [TypeAccess] Companion -# 20| 1: [Parameter] p1 -# 20| 0: [TypeAccess] int -# 20| 2: [Parameter] p2 -# 20| 0: [TypeAccess] String -# 20| 3: [Parameter] p3 -# 20| 0: [TypeAccess] double -# 20| 4: [Parameter] p4 -# 20| 0: [TypeAccess] float -# 20| 5: [Parameter] p5 -# 20| 0: [TypeAccess] boolean -# 20| 6: [Parameter] p6 -# 20| 0: [TypeAccess] int -# 20| 7: [Parameter] p7 -# 20| 0: [TypeAccess] Object -# 20| 5: [BlockStmt] { ... } -# 20| 0: [IfStmt] if (...) -# 20| 0: [EQExpr] ... == ... -# 20| 0: [AndBitwiseExpr] ... & ... -# 20| 0: [IntegerLiteral] 2 -# 20| 1: [VarAccess] p6 -# 20| 1: [IntegerLiteral] 0 -# 20| 1: [ExprStmt] ; -# 20| 0: [AssignExpr] ...=... -# 20| 0: [VarAccess] p2 +# 21| 0: [Parameter] p0 +# 21| 0: [TypeAccess] Companion +# 21| 1: [Parameter] p1 +# 21| 0: [TypeAccess] int +# 21| 2: [Parameter] p2 +# 21| 0: [TypeAccess] String +# 21| 3: [Parameter] p3 +# 21| 0: [TypeAccess] double +# 21| 4: [Parameter] p4 +# 21| 0: [TypeAccess] float +# 21| 5: [Parameter] p5 +# 21| 0: [TypeAccess] boolean +# 21| 6: [Parameter] p6 +# 21| 0: [TypeAccess] int +# 21| 7: [Parameter] p7 +# 21| 0: [TypeAccess] Object +# 21| 5: [BlockStmt] { ... } +# 21| 0: [IfStmt] if (...) +# 21| 0: [EQExpr] ... == ... +# 21| 0: [AndBitwiseExpr] ... & ... +# 21| 0: [IntegerLiteral] 2 +# 21| 1: [VarAccess] p6 +# 21| 1: [IntegerLiteral] 0 +# 21| 1: [ExprStmt] ; +# 21| 0: [AssignExpr] ...=... +# 21| 0: [VarAccess] p2 # 21| 1: [MethodCall] getString(...) # 21| -1: [TypeAccess] TestKt -# 20| 1: [IfStmt] if (...) -# 20| 0: [EQExpr] ... == ... -# 20| 0: [AndBitwiseExpr] ... & ... -# 20| 0: [IntegerLiteral] 8 -# 20| 1: [VarAccess] p6 -# 20| 1: [IntegerLiteral] 0 -# 20| 1: [ExprStmt] ; -# 20| 0: [AssignExpr] ...=... -# 20| 0: [VarAccess] p4 +# 21| 1: [IfStmt] if (...) +# 21| 0: [EQExpr] ... == ... +# 21| 0: [AndBitwiseExpr] ... & ... +# 21| 0: [IntegerLiteral] 8 +# 21| 1: [VarAccess] p6 +# 21| 1: [IntegerLiteral] 0 +# 21| 1: [ExprStmt] ; +# 21| 0: [AssignExpr] ...=... +# 21| 0: [VarAccess] p4 # 21| 1: [FloatLiteral] 1.0 -# 20| 2: [ReturnStmt] return ... -# 20| 0: [MethodCall] testCompanionFunction(...) -# 20| -1: [VarAccess] p0 -# 20| 0: [VarAccess] p1 -# 20| 1: [VarAccess] p2 -# 20| 2: [VarAccess] p3 -# 20| 3: [VarAccess] p4 -# 20| 4: [VarAccess] p5 -# 23| 6: [Method] testStaticCompanionFunction -# 23| 3: [TypeAccess] int +# 21| 2: [ReturnStmt] return ... +# 21| 0: [MethodCall] testCompanionFunction(...) +# 21| -1: [VarAccess] p0 +# 21| 0: [VarAccess] p1 +# 21| 1: [VarAccess] p2 +# 21| 2: [VarAccess] p3 +# 21| 3: [VarAccess] p4 +# 21| 4: [VarAccess] p5 +# 24| 6: [Method] testStaticCompanionFunction +# 24| 3: [TypeAccess] int #-----| 4: (Parameters) # 24| 0: [Parameter] a # 24| 0: [TypeAccess] int @@ -697,10 +697,10 @@ test.kt: # 24| 0: [TypeAccess] double # 24| 3: [Parameter] e # 24| 0: [TypeAccess] boolean -# 23| 5: [BlockStmt] { ... } -# 23| 0: [ReturnStmt] return ... -# 23| 0: [MethodCall] testStaticCompanionFunction$default(...) -# 23| -1: [TypeAccess] Companion +# 24| 5: [BlockStmt] { ... } +# 24| 0: [ReturnStmt] return ... +# 24| 0: [MethodCall] testStaticCompanionFunction$default(...) +# 24| -1: [TypeAccess] Companion # 0| 0: [ThisAccess] this # 0| 1: [VarAccess] a # 0| 2: [VarAccess] b @@ -709,11 +709,11 @@ test.kt: # 0| 5: [VarAccess] e # 1| 6: [IntegerLiteral] 23 # 1| 7: [NullLiteral] null -# 23| 7: [Method] testStaticCompanionFunction +# 24| 7: [Method] testStaticCompanionFunction #-----| 1: (Annotations) # 23| 1: [Annotation] JvmOverloads # 23| 2: [Annotation] JvmStatic -# 23| 3: [TypeAccess] int +# 24| 3: [TypeAccess] int #-----| 4: (Parameters) # 24| 0: [Parameter] a # 24| 0: [TypeAccess] int @@ -728,8 +728,8 @@ test.kt: # 24| 5: [BlockStmt] { ... } # 24| 0: [ReturnStmt] return ... # 24| 0: [VarAccess] a -# 23| 8: [Method] testStaticCompanionFunction -# 23| 3: [TypeAccess] int +# 24| 8: [Method] testStaticCompanionFunction +# 24| 3: [TypeAccess] int #-----| 4: (Parameters) # 24| 0: [Parameter] a # 24| 0: [TypeAccess] int @@ -737,10 +737,10 @@ test.kt: # 24| 0: [TypeAccess] double # 24| 2: [Parameter] e # 24| 0: [TypeAccess] boolean -# 23| 5: [BlockStmt] { ... } -# 23| 0: [ReturnStmt] return ... -# 23| 0: [MethodCall] testStaticCompanionFunction$default(...) -# 23| -1: [TypeAccess] Companion +# 24| 5: [BlockStmt] { ... } +# 24| 0: [ReturnStmt] return ... +# 24| 0: [MethodCall] testStaticCompanionFunction$default(...) +# 24| -1: [TypeAccess] Companion # 0| 0: [ThisAccess] this # 0| 1: [VarAccess] a # 1| 2: [NullLiteral] null @@ -749,57 +749,57 @@ test.kt: # 0| 5: [VarAccess] e # 1| 6: [IntegerLiteral] 21 # 1| 7: [NullLiteral] null -# 23| 9: [Method] testStaticCompanionFunction$default -# 23| 3: [TypeAccess] int +# 24| 9: [Method] testStaticCompanionFunction$default +# 24| 3: [TypeAccess] int #-----| 4: (Parameters) -# 23| 0: [Parameter] p0 -# 23| 0: [TypeAccess] Companion -# 23| 1: [Parameter] p1 -# 23| 0: [TypeAccess] int -# 23| 2: [Parameter] p2 -# 23| 0: [TypeAccess] String -# 23| 3: [Parameter] p3 -# 23| 0: [TypeAccess] double -# 23| 4: [Parameter] p4 -# 23| 0: [TypeAccess] float -# 23| 5: [Parameter] p5 -# 23| 0: [TypeAccess] boolean -# 23| 6: [Parameter] p6 -# 23| 0: [TypeAccess] int -# 23| 7: [Parameter] p7 -# 23| 0: [TypeAccess] Object -# 23| 5: [BlockStmt] { ... } -# 23| 0: [IfStmt] if (...) -# 23| 0: [EQExpr] ... == ... -# 23| 0: [AndBitwiseExpr] ... & ... -# 23| 0: [IntegerLiteral] 2 -# 23| 1: [VarAccess] p6 -# 23| 1: [IntegerLiteral] 0 -# 23| 1: [ExprStmt] ; -# 23| 0: [AssignExpr] ...=... -# 23| 0: [VarAccess] p2 +# 24| 0: [Parameter] p0 +# 24| 0: [TypeAccess] Companion +# 24| 1: [Parameter] p1 +# 24| 0: [TypeAccess] int +# 24| 2: [Parameter] p2 +# 24| 0: [TypeAccess] String +# 24| 3: [Parameter] p3 +# 24| 0: [TypeAccess] double +# 24| 4: [Parameter] p4 +# 24| 0: [TypeAccess] float +# 24| 5: [Parameter] p5 +# 24| 0: [TypeAccess] boolean +# 24| 6: [Parameter] p6 +# 24| 0: [TypeAccess] int +# 24| 7: [Parameter] p7 +# 24| 0: [TypeAccess] Object +# 24| 5: [BlockStmt] { ... } +# 24| 0: [IfStmt] if (...) +# 24| 0: [EQExpr] ... == ... +# 24| 0: [AndBitwiseExpr] ... & ... +# 24| 0: [IntegerLiteral] 2 +# 24| 1: [VarAccess] p6 +# 24| 1: [IntegerLiteral] 0 +# 24| 1: [ExprStmt] ; +# 24| 0: [AssignExpr] ...=... +# 24| 0: [VarAccess] p2 # 24| 1: [MethodCall] getString(...) # 24| -1: [TypeAccess] TestKt -# 23| 1: [IfStmt] if (...) -# 23| 0: [EQExpr] ... == ... -# 23| 0: [AndBitwiseExpr] ... & ... -# 23| 0: [IntegerLiteral] 8 -# 23| 1: [VarAccess] p6 -# 23| 1: [IntegerLiteral] 0 -# 23| 1: [ExprStmt] ; -# 23| 0: [AssignExpr] ...=... -# 23| 0: [VarAccess] p4 +# 24| 1: [IfStmt] if (...) +# 24| 0: [EQExpr] ... == ... +# 24| 0: [AndBitwiseExpr] ... & ... +# 24| 0: [IntegerLiteral] 8 +# 24| 1: [VarAccess] p6 +# 24| 1: [IntegerLiteral] 0 +# 24| 1: [ExprStmt] ; +# 24| 0: [AssignExpr] ...=... +# 24| 0: [VarAccess] p4 # 24| 1: [FloatLiteral] 1.0 -# 23| 2: [ReturnStmt] return ... -# 23| 0: [MethodCall] testStaticCompanionFunction(...) -# 23| -1: [VarAccess] p0 -# 23| 0: [VarAccess] p1 -# 23| 1: [VarAccess] p2 -# 23| 2: [VarAccess] p3 -# 23| 3: [VarAccess] p4 -# 23| 4: [VarAccess] p5 -# 23| 6: [Method] testStaticCompanionFunction -# 23| 3: [TypeAccess] int +# 24| 2: [ReturnStmt] return ... +# 24| 0: [MethodCall] testStaticCompanionFunction(...) +# 24| -1: [VarAccess] p0 +# 24| 0: [VarAccess] p1 +# 24| 1: [VarAccess] p2 +# 24| 2: [VarAccess] p3 +# 24| 3: [VarAccess] p4 +# 24| 4: [VarAccess] p5 +# 24| 6: [Method] testStaticCompanionFunction +# 24| 3: [TypeAccess] int #-----| 4: (Parameters) # 24| 0: [Parameter] a # 24| 0: [TypeAccess] int @@ -809,10 +809,10 @@ test.kt: # 24| 0: [TypeAccess] double # 24| 3: [Parameter] e # 24| 0: [TypeAccess] boolean -# 23| 5: [BlockStmt] { ... } -# 23| 0: [ReturnStmt] return ... -# 23| 0: [MethodCall] testStaticCompanionFunction$default(...) -# 23| -1: [TypeAccess] Companion +# 24| 5: [BlockStmt] { ... } +# 24| 0: [ReturnStmt] return ... +# 24| 0: [MethodCall] testStaticCompanionFunction$default(...) +# 24| -1: [TypeAccess] Companion # 0| 0: [ThisAccess] this # 0| 1: [VarAccess] a # 0| 2: [VarAccess] b @@ -821,8 +821,8 @@ test.kt: # 0| 5: [VarAccess] e # 1| 6: [IntegerLiteral] 23 # 1| 7: [NullLiteral] null -# 23| 7: [Method] testStaticCompanionFunction -# 23| 3: [TypeAccess] int +# 24| 7: [Method] testStaticCompanionFunction +# 24| 3: [TypeAccess] int #-----| 4: (Parameters) # 24| 0: [Parameter] a # 24| 0: [TypeAccess] int @@ -834,18 +834,18 @@ test.kt: # 24| 0: [TypeAccess] float # 24| 4: [Parameter] e # 24| 0: [TypeAccess] boolean -# 23| 5: [BlockStmt] { ... } -# 23| 0: [ReturnStmt] return ... -# 23| 0: [MethodCall] testStaticCompanionFunction(...) -# 23| -1: [VarAccess] Test2.Companion -# 23| -1: [TypeAccess] Test2 -# 23| 0: [VarAccess] a -# 23| 1: [VarAccess] b -# 23| 2: [VarAccess] c -# 23| 3: [VarAccess] d -# 23| 4: [VarAccess] e -# 23| 8: [Method] testStaticCompanionFunction -# 23| 3: [TypeAccess] int +# 24| 5: [BlockStmt] { ... } +# 24| 0: [ReturnStmt] return ... +# 24| 0: [MethodCall] testStaticCompanionFunction(...) +# 24| -1: [VarAccess] Test2.Companion +# 24| -1: [TypeAccess] Test2 +# 24| 0: [VarAccess] a +# 24| 1: [VarAccess] b +# 24| 2: [VarAccess] c +# 24| 3: [VarAccess] d +# 24| 4: [VarAccess] e +# 24| 8: [Method] testStaticCompanionFunction +# 24| 3: [TypeAccess] int #-----| 4: (Parameters) # 24| 0: [Parameter] a # 24| 0: [TypeAccess] int @@ -853,10 +853,10 @@ test.kt: # 24| 0: [TypeAccess] double # 24| 2: [Parameter] e # 24| 0: [TypeAccess] boolean -# 23| 5: [BlockStmt] { ... } -# 23| 0: [ReturnStmt] return ... -# 23| 0: [MethodCall] testStaticCompanionFunction$default(...) -# 23| -1: [TypeAccess] Companion +# 24| 5: [BlockStmt] { ... } +# 24| 0: [ReturnStmt] return ... +# 24| 0: [MethodCall] testStaticCompanionFunction$default(...) +# 24| -1: [TypeAccess] Companion # 0| 0: [ThisAccess] this # 0| 1: [VarAccess] a # 1| 2: [NullLiteral] null @@ -953,17 +953,17 @@ test.kt: # 0| 3: [VarAccess] d # 1| 4: [IntegerLiteral] 11 # 1| 5: [NullLiteral] null -# 32| 5: [Method] testMemberFunction -# 32| 3: [TypeAccess] int +# 33| 5: [Method] testMemberFunction +# 33| 3: [TypeAccess] int #-----| 4: (Parameters) # 33| 0: [Parameter] b # 33| 0: [TypeAccess] T # 33| 1: [Parameter] d # 33| 0: [TypeAccess] T -# 32| 5: [BlockStmt] { ... } -# 32| 0: [ReturnStmt] return ... -# 32| 0: [MethodCall] testMemberFunction$default(...) -# 32| -1: [TypeAccess] GenericTest<> +# 33| 5: [BlockStmt] { ... } +# 33| 0: [ReturnStmt] return ... +# 33| 0: [MethodCall] testMemberFunction$default(...) +# 33| -1: [TypeAccess] GenericTest<> # 0| 0: [ThisAccess] this # 1| 1: [IntegerLiteral] 0 # 0| 2: [VarAccess] b @@ -971,10 +971,10 @@ test.kt: # 0| 4: [VarAccess] d # 1| 5: [IntegerLiteral] 10 # 1| 6: [NullLiteral] null -# 32| 6: [Method] testMemberFunction +# 33| 6: [Method] testMemberFunction #-----| 1: (Annotations) # 32| 1: [Annotation] JvmOverloads -# 32| 3: [TypeAccess] int +# 33| 3: [TypeAccess] int #-----| 4: (Parameters) # 33| 0: [Parameter] a # 33| 0: [TypeAccess] int @@ -987,8 +987,8 @@ test.kt: # 33| 5: [BlockStmt] { ... } # 33| 0: [ReturnStmt] return ... # 33| 0: [VarAccess] a -# 32| 7: [Method] testMemberFunction -# 32| 3: [TypeAccess] int +# 33| 7: [Method] testMemberFunction +# 33| 3: [TypeAccess] int #-----| 4: (Parameters) # 33| 0: [Parameter] a # 33| 0: [TypeAccess] int @@ -996,10 +996,10 @@ test.kt: # 33| 0: [TypeAccess] T # 33| 2: [Parameter] d # 33| 0: [TypeAccess] T -# 32| 5: [BlockStmt] { ... } -# 32| 0: [ReturnStmt] return ... -# 32| 0: [MethodCall] testMemberFunction$default(...) -# 32| -1: [TypeAccess] GenericTest<> +# 33| 5: [BlockStmt] { ... } +# 33| 0: [ReturnStmt] return ... +# 33| 0: [MethodCall] testMemberFunction$default(...) +# 33| -1: [TypeAccess] GenericTest<> # 0| 0: [ThisAccess] this # 0| 1: [VarAccess] a # 0| 2: [VarAccess] b @@ -1007,51 +1007,51 @@ test.kt: # 0| 4: [VarAccess] d # 1| 5: [IntegerLiteral] 11 # 1| 6: [NullLiteral] null -# 32| 8: [Method] testMemberFunction$default -# 32| 3: [TypeAccess] int +# 33| 8: [Method] testMemberFunction$default +# 33| 3: [TypeAccess] int #-----| 4: (Parameters) -# 32| 0: [Parameter] p0 -# 32| 0: [TypeAccess] GenericTest<> -# 32| 1: [Parameter] p1 -# 32| 0: [TypeAccess] int -# 32| 2: [Parameter] p2 -# 32| 0: [TypeAccess] Object -# 32| 3: [Parameter] p3 -# 32| 0: [TypeAccess] String -# 32| 4: [Parameter] p4 -# 32| 0: [TypeAccess] Object -# 32| 5: [Parameter] p5 -# 32| 0: [TypeAccess] int -# 32| 6: [Parameter] p6 -# 32| 0: [TypeAccess] Object -# 32| 5: [BlockStmt] { ... } -# 32| 0: [IfStmt] if (...) -# 32| 0: [EQExpr] ... == ... -# 32| 0: [AndBitwiseExpr] ... & ... -# 32| 0: [IntegerLiteral] 1 -# 32| 1: [VarAccess] p5 -# 32| 1: [IntegerLiteral] 0 -# 32| 1: [ExprStmt] ; -# 32| 0: [AssignExpr] ...=... -# 32| 0: [VarAccess] p1 +# 33| 0: [Parameter] p0 +# 33| 0: [TypeAccess] GenericTest<> +# 33| 1: [Parameter] p1 +# 33| 0: [TypeAccess] int +# 33| 2: [Parameter] p2 +# 33| 0: [TypeAccess] Object +# 33| 3: [Parameter] p3 +# 33| 0: [TypeAccess] String +# 33| 4: [Parameter] p4 +# 33| 0: [TypeAccess] Object +# 33| 5: [Parameter] p5 +# 33| 0: [TypeAccess] int +# 33| 6: [Parameter] p6 +# 33| 0: [TypeAccess] Object +# 33| 5: [BlockStmt] { ... } +# 33| 0: [IfStmt] if (...) +# 33| 0: [EQExpr] ... == ... +# 33| 0: [AndBitwiseExpr] ... & ... +# 33| 0: [IntegerLiteral] 1 +# 33| 1: [VarAccess] p5 +# 33| 1: [IntegerLiteral] 0 +# 33| 1: [ExprStmt] ; +# 33| 0: [AssignExpr] ...=... +# 33| 0: [VarAccess] p1 # 33| 1: [IntegerLiteral] 1 -# 32| 1: [IfStmt] if (...) -# 32| 0: [EQExpr] ... == ... -# 32| 0: [AndBitwiseExpr] ... & ... -# 32| 0: [IntegerLiteral] 4 -# 32| 1: [VarAccess] p5 -# 32| 1: [IntegerLiteral] 0 -# 32| 1: [ExprStmt] ; -# 32| 0: [AssignExpr] ...=... -# 32| 0: [VarAccess] p3 +# 33| 1: [IfStmt] if (...) +# 33| 0: [EQExpr] ... == ... +# 33| 0: [AndBitwiseExpr] ... & ... +# 33| 0: [IntegerLiteral] 4 +# 33| 1: [VarAccess] p5 +# 33| 1: [IntegerLiteral] 0 +# 33| 1: [ExprStmt] ; +# 33| 0: [AssignExpr] ...=... +# 33| 0: [VarAccess] p3 # 33| 1: [StringLiteral] "Hello world" -# 32| 2: [ReturnStmt] return ... -# 32| 0: [MethodCall] testMemberFunction(...) -# 32| -1: [VarAccess] p0 -# 32| 0: [VarAccess] p1 -# 32| 1: [VarAccess] p2 -# 32| 2: [VarAccess] p3 -# 32| 3: [VarAccess] p4 +# 33| 2: [ReturnStmt] return ... +# 33| 0: [MethodCall] testMemberFunction(...) +# 33| -1: [VarAccess] p0 +# 33| 0: [VarAccess] p1 +# 33| 1: [VarAccess] p2 +# 33| 2: [VarAccess] p3 +# 33| 3: [VarAccess] p4 # 35| 9: [Method] useSpecialised # 35| 3: [TypeAccess] Unit #-----| 4: (Parameters) diff --git a/java/ql/test-kotlin2/library-tests/jvmoverloads-annotation/test.expected b/java/ql/test-kotlin2/library-tests/jvmoverloads-annotation/test.expected index a8d3f281f8c1..e47edc61a6b3 100644 --- a/java/ql/test-kotlin2/library-tests/jvmoverloads-annotation/test.expected +++ b/java/ql/test-kotlin2/library-tests/jvmoverloads-annotation/test.expected @@ -13,45 +13,45 @@ | file:///!unknown-binary-location/GenericTest.class:0:0:0:0 | GenericTest | file:///!unknown-binary-location/GenericTest.class:0:0:0:0 | testMemberFunction | testMemberFunction(java.lang.Float,java.lang.Float) | | file:///!unknown-binary-location/GenericTest.class:0:0:0:0 | GenericTest | file:///!unknown-binary-location/GenericTest.class:0:0:0:0 | useSpecialised | useSpecialised(GenericTest,GenericTest) | | test.kt:0:0:0:0 | TestKt | test.kt:1:1:1:31 | getString | getString() | -| test.kt:0:0:0:0 | TestKt | test.kt:44:1:45:112 | testExtensionFunction | testExtensionFunction(Test,int,double,boolean) | -| test.kt:0:0:0:0 | TestKt | test.kt:44:1:45:112 | testExtensionFunction | testExtensionFunction(Test,int,java.lang.String,double,boolean) | -| test.kt:0:0:0:0 | TestKt | test.kt:44:1:45:112 | testExtensionFunction | testExtensionFunction(Test,int,java.lang.String,double,float,boolean) | -| test.kt:0:0:0:0 | TestKt | test.kt:44:1:45:112 | testExtensionFunction$default | testExtensionFunction$default(Test,int,java.lang.String,double,float,boolean,int,java.lang.Object) | +| test.kt:0:0:0:0 | TestKt | test.kt:45:1:45:112 | testExtensionFunction | testExtensionFunction(Test,int,double,boolean) | +| test.kt:0:0:0:0 | TestKt | test.kt:45:1:45:112 | testExtensionFunction | testExtensionFunction(Test,int,java.lang.String,double,boolean) | +| test.kt:0:0:0:0 | TestKt | test.kt:45:1:45:112 | testExtensionFunction | testExtensionFunction(Test,int,java.lang.String,double,float,boolean) | +| test.kt:0:0:0:0 | TestKt | test.kt:45:1:45:112 | testExtensionFunction$default | testExtensionFunction$default(Test,int,java.lang.String,double,float,boolean,int,java.lang.Object) | | test.kt:3:1:14:1 | Test | test.kt:3:1:14:1 | Test | Test() | -| test.kt:3:1:14:1 | Test | test.kt:5:3:6:106 | testStaticFunction | testStaticFunction(int,double,boolean) | -| test.kt:3:1:14:1 | Test | test.kt:5:3:6:106 | testStaticFunction | testStaticFunction(int,java.lang.String,double,boolean) | -| test.kt:3:1:14:1 | Test | test.kt:5:3:6:106 | testStaticFunction | testStaticFunction(int,java.lang.String,double,float,boolean) | -| test.kt:3:1:14:1 | Test | test.kt:5:3:6:106 | testStaticFunction$default | testStaticFunction$default(int,java.lang.String,double,float,boolean,int,java.lang.Object) | -| test.kt:3:1:14:1 | Test | test.kt:8:3:9:106 | testMemberFunction | testMemberFunction(int,double,boolean) | -| test.kt:3:1:14:1 | Test | test.kt:8:3:9:106 | testMemberFunction | testMemberFunction(int,java.lang.String,double,boolean) | -| test.kt:3:1:14:1 | Test | test.kt:8:3:9:106 | testMemberFunction | testMemberFunction(int,java.lang.String,double,float,boolean) | -| test.kt:3:1:14:1 | Test | test.kt:8:3:9:106 | testMemberFunction$default | testMemberFunction$default(Test,int,java.lang.String,double,float,boolean,int,java.lang.Object) | -| test.kt:3:1:14:1 | Test | test.kt:11:3:12:121 | testMemberExtensionFunction | testMemberExtensionFunction(Test2,int,double,boolean) | -| test.kt:3:1:14:1 | Test | test.kt:11:3:12:121 | testMemberExtensionFunction | testMemberExtensionFunction(Test2,int,java.lang.String,double,boolean) | -| test.kt:3:1:14:1 | Test | test.kt:11:3:12:121 | testMemberExtensionFunction | testMemberExtensionFunction(Test2,int,java.lang.String,double,float,boolean) | -| test.kt:3:1:14:1 | Test | test.kt:11:3:12:121 | testMemberExtensionFunction$default | testMemberExtensionFunction$default(Test,Test2,int,java.lang.String,double,float,boolean,int,java.lang.Object) | -| test.kt:16:1:28:1 | Test2 | test.kt:16:20:16:117 | Test2 | Test2(int,double,boolean) | -| test.kt:16:1:28:1 | Test2 | test.kt:16:20:16:117 | Test2 | Test2(int,java.lang.String,double,boolean) | -| test.kt:16:1:28:1 | Test2 | test.kt:16:20:16:117 | Test2 | Test2(int,java.lang.String,double,float,boolean) | -| test.kt:16:1:28:1 | Test2 | test.kt:16:20:16:117 | Test2 | Test2(int,java.lang.String,double,float,boolean,int,kotlin.jvm.internal.DefaultConstructorMarker) | -| test.kt:16:1:28:1 | Test2 | test.kt:23:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,double,boolean) | -| test.kt:16:1:28:1 | Test2 | test.kt:23:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,java.lang.String,double,boolean) | -| test.kt:16:1:28:1 | Test2 | test.kt:23:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,java.lang.String,double,float,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:6:3:6:106 | testStaticFunction | testStaticFunction(int,double,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:6:3:6:106 | testStaticFunction | testStaticFunction(int,java.lang.String,double,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:6:3:6:106 | testStaticFunction | testStaticFunction(int,java.lang.String,double,float,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:6:3:6:106 | testStaticFunction$default | testStaticFunction$default(int,java.lang.String,double,float,boolean,int,java.lang.Object) | +| test.kt:3:1:14:1 | Test | test.kt:9:3:9:106 | testMemberFunction | testMemberFunction(int,double,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:9:3:9:106 | testMemberFunction | testMemberFunction(int,java.lang.String,double,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:9:3:9:106 | testMemberFunction | testMemberFunction(int,java.lang.String,double,float,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:9:3:9:106 | testMemberFunction$default | testMemberFunction$default(Test,int,java.lang.String,double,float,boolean,int,java.lang.Object) | +| test.kt:3:1:14:1 | Test | test.kt:12:3:12:121 | testMemberExtensionFunction | testMemberExtensionFunction(Test2,int,double,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:12:3:12:121 | testMemberExtensionFunction | testMemberExtensionFunction(Test2,int,java.lang.String,double,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:12:3:12:121 | testMemberExtensionFunction | testMemberExtensionFunction(Test2,int,java.lang.String,double,float,boolean) | +| test.kt:3:1:14:1 | Test | test.kt:12:3:12:121 | testMemberExtensionFunction$default | testMemberExtensionFunction$default(Test,Test2,int,java.lang.String,double,float,boolean,int,java.lang.Object) | +| test.kt:16:1:28:1 | Test2 | test.kt:16:34:16:117 | Test2 | Test2(int,double,boolean) | +| test.kt:16:1:28:1 | Test2 | test.kt:16:34:16:117 | Test2 | Test2(int,java.lang.String,double,boolean) | +| test.kt:16:1:28:1 | Test2 | test.kt:16:34:16:117 | Test2 | Test2(int,java.lang.String,double,float,boolean) | +| test.kt:16:1:28:1 | Test2 | test.kt:16:34:16:117 | Test2 | Test2(int,java.lang.String,double,float,boolean,int,kotlin.jvm.internal.DefaultConstructorMarker) | +| test.kt:16:1:28:1 | Test2 | test.kt:24:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,double,boolean) | +| test.kt:16:1:28:1 | Test2 | test.kt:24:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,java.lang.String,double,boolean) | +| test.kt:16:1:28:1 | Test2 | test.kt:24:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,java.lang.String,double,float,boolean) | | test.kt:18:3:26:3 | Companion | test.kt:18:3:26:3 | Companion | Companion() | -| test.kt:18:3:26:3 | Companion | test.kt:20:5:21:111 | testCompanionFunction | testCompanionFunction(int,double,boolean) | -| test.kt:18:3:26:3 | Companion | test.kt:20:5:21:111 | testCompanionFunction | testCompanionFunction(int,java.lang.String,double,boolean) | -| test.kt:18:3:26:3 | Companion | test.kt:20:5:21:111 | testCompanionFunction | testCompanionFunction(int,java.lang.String,double,float,boolean) | -| test.kt:18:3:26:3 | Companion | test.kt:20:5:21:111 | testCompanionFunction$default | testCompanionFunction$default(Test2.Companion,int,java.lang.String,double,float,boolean,int,java.lang.Object) | -| test.kt:18:3:26:3 | Companion | test.kt:23:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,double,boolean) | -| test.kt:18:3:26:3 | Companion | test.kt:23:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,java.lang.String,double,boolean) | -| test.kt:18:3:26:3 | Companion | test.kt:23:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,java.lang.String,double,float,boolean) | -| test.kt:18:3:26:3 | Companion | test.kt:23:5:24:117 | testStaticCompanionFunction$default | testStaticCompanionFunction$default(Test2.Companion,int,java.lang.String,double,float,boolean,int,java.lang.Object) | -| test.kt:30:1:42:1 | GenericTest | test.kt:30:29:30:104 | GenericTest | GenericTest(int,java.lang.Object,java.lang.Object) | -| test.kt:30:1:42:1 | GenericTest | test.kt:30:29:30:104 | GenericTest | GenericTest(int,java.lang.Object,java.lang.String,java.lang.Object) | -| test.kt:30:1:42:1 | GenericTest | test.kt:30:29:30:104 | GenericTest | GenericTest(int,java.lang.Object,java.lang.String,java.lang.Object,int,kotlin.jvm.internal.DefaultConstructorMarker) | -| test.kt:30:1:42:1 | GenericTest | test.kt:30:29:30:104 | GenericTest | GenericTest(java.lang.Object,java.lang.Object) | -| test.kt:30:1:42:1 | GenericTest | test.kt:32:3:33:84 | testMemberFunction | testMemberFunction(int,java.lang.Object,java.lang.Object) | -| test.kt:30:1:42:1 | GenericTest | test.kt:32:3:33:84 | testMemberFunction | testMemberFunction(int,java.lang.Object,java.lang.String,java.lang.Object) | -| test.kt:30:1:42:1 | GenericTest | test.kt:32:3:33:84 | testMemberFunction | testMemberFunction(java.lang.Object,java.lang.Object) | -| test.kt:30:1:42:1 | GenericTest | test.kt:32:3:33:84 | testMemberFunction$default | testMemberFunction$default(GenericTest,int,java.lang.Object,java.lang.String,java.lang.Object,int,java.lang.Object) | +| test.kt:18:3:26:3 | Companion | test.kt:21:5:21:111 | testCompanionFunction | testCompanionFunction(int,double,boolean) | +| test.kt:18:3:26:3 | Companion | test.kt:21:5:21:111 | testCompanionFunction | testCompanionFunction(int,java.lang.String,double,boolean) | +| test.kt:18:3:26:3 | Companion | test.kt:21:5:21:111 | testCompanionFunction | testCompanionFunction(int,java.lang.String,double,float,boolean) | +| test.kt:18:3:26:3 | Companion | test.kt:21:5:21:111 | testCompanionFunction$default | testCompanionFunction$default(Test2.Companion,int,java.lang.String,double,float,boolean,int,java.lang.Object) | +| test.kt:18:3:26:3 | Companion | test.kt:24:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,double,boolean) | +| test.kt:18:3:26:3 | Companion | test.kt:24:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,java.lang.String,double,boolean) | +| test.kt:18:3:26:3 | Companion | test.kt:24:5:24:117 | testStaticCompanionFunction | testStaticCompanionFunction(int,java.lang.String,double,float,boolean) | +| test.kt:18:3:26:3 | Companion | test.kt:24:5:24:117 | testStaticCompanionFunction$default | testStaticCompanionFunction$default(Test2.Companion,int,java.lang.String,double,float,boolean,int,java.lang.Object) | +| test.kt:30:1:42:1 | GenericTest | test.kt:30:43:30:104 | GenericTest | GenericTest(int,java.lang.Object,java.lang.Object) | +| test.kt:30:1:42:1 | GenericTest | test.kt:30:43:30:104 | GenericTest | GenericTest(int,java.lang.Object,java.lang.String,java.lang.Object) | +| test.kt:30:1:42:1 | GenericTest | test.kt:30:43:30:104 | GenericTest | GenericTest(int,java.lang.Object,java.lang.String,java.lang.Object,int,kotlin.jvm.internal.DefaultConstructorMarker) | +| test.kt:30:1:42:1 | GenericTest | test.kt:30:43:30:104 | GenericTest | GenericTest(java.lang.Object,java.lang.Object) | +| test.kt:30:1:42:1 | GenericTest | test.kt:33:3:33:84 | testMemberFunction | testMemberFunction(int,java.lang.Object,java.lang.Object) | +| test.kt:30:1:42:1 | GenericTest | test.kt:33:3:33:84 | testMemberFunction | testMemberFunction(int,java.lang.Object,java.lang.String,java.lang.Object) | +| test.kt:30:1:42:1 | GenericTest | test.kt:33:3:33:84 | testMemberFunction | testMemberFunction(java.lang.Object,java.lang.Object) | +| test.kt:30:1:42:1 | GenericTest | test.kt:33:3:33:84 | testMemberFunction$default | testMemberFunction$default(GenericTest,int,java.lang.Object,java.lang.String,java.lang.Object,int,java.lang.Object) | | test.kt:30:1:42:1 | GenericTest | test.kt:35:3:40:3 | useSpecialised | useSpecialised(GenericTest,GenericTest) | diff --git a/java/ql/test-kotlin2/library-tests/jvmoverloads_flow/test.expected b/java/ql/test-kotlin2/library-tests/jvmoverloads_flow/test.expected index feac5a14c95f..5892fe226aa5 100644 --- a/java/ql/test-kotlin2/library-tests/jvmoverloads_flow/test.expected +++ b/java/ql/test-kotlin2/library-tests/jvmoverloads_flow/test.expected @@ -12,9 +12,9 @@ | User.java:35:61:35:68 | source(...) | test.kt:74:10:74:10 | s | User.java:5:22:5:25 | test | | User.java:38:28:38:35 | source(...) | test.kt:84:10:84:10 | y | User.java:5:22:5:25 | test | | User.java:39:20:39:27 | source(...) | test.kt:84:10:84:10 | y | User.java:5:22:5:25 | test | -| test.kt:10:55:10:62 | source(...) | test.kt:10:84:10:84 | s | test.kt:9:3:10:87 | taintSuppliedAsDefault$default | -| test.kt:22:63:22:70 | source(...) | test.kt:22:92:22:92 | s | test.kt:21:5:22:95 | taintSuppliedAsDefaultStatic$default | -| test.kt:30:55:30:62 | source(...) | test.kt:30:84:30:84 | s | test.kt:29:3:30:87 | taintSuppliedAsDefault$default | -| test.kt:40:53:40:60 | source(...) | test.kt:40:80:40:80 | s | test.kt:39:3:40:83 | taintSuppliedAsDefault$default | -| test.kt:47:92:47:99 | source(...) | test.kt:50:10:50:10 | s | test.kt:47:41:47:112 | ConstructorTaintsByDefault | -| test.kt:63:100:63:107 | source(...) | test.kt:66:10:66:10 | s | test.kt:63:51:63:118 | GenericConstructorTaintsByDefault | +| test.kt:10:55:10:62 | source(...) | test.kt:10:84:10:84 | s | test.kt:10:3:10:87 | taintSuppliedAsDefault$default | +| test.kt:22:63:22:70 | source(...) | test.kt:22:92:22:92 | s | test.kt:22:5:22:95 | taintSuppliedAsDefaultStatic$default | +| test.kt:30:55:30:62 | source(...) | test.kt:30:84:30:84 | s | test.kt:30:3:30:87 | taintSuppliedAsDefault$default | +| test.kt:40:53:40:60 | source(...) | test.kt:40:80:40:80 | s | test.kt:40:3:40:83 | taintSuppliedAsDefault$default | +| test.kt:47:92:47:99 | source(...) | test.kt:50:10:50:10 | s | test.kt:47:55:47:112 | ConstructorTaintsByDefault | +| test.kt:63:100:63:107 | source(...) | test.kt:66:10:66:10 | s | test.kt:63:65:63:118 | GenericConstructorTaintsByDefault | diff --git a/java/ql/test-kotlin2/library-tests/jvmoverloads_generics/test.expected b/java/ql/test-kotlin2/library-tests/jvmoverloads_generics/test.expected index 964935c841fd..7bd54989bcf8 100644 --- a/java/ql/test-kotlin2/library-tests/jvmoverloads_generics/test.expected +++ b/java/ql/test-kotlin2/library-tests/jvmoverloads_generics/test.expected @@ -1,9 +1,9 @@ -| test.kt:3:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads() | return | T | genericFunctionWithOverloads() | -| test.kt:3:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object) | param | T | genericFunctionWithOverloads(java.lang.Object) | -| test.kt:3:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object) | return | T | genericFunctionWithOverloads(java.lang.Object) | -| test.kt:3:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List) | param | List | genericFunctionWithOverloads(java.lang.Object,java.util.List) | -| test.kt:3:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List) | param | T | genericFunctionWithOverloads(java.lang.Object,java.util.List) | -| test.kt:3:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List) | return | T | genericFunctionWithOverloads(java.lang.Object,java.util.List) | -| test.kt:3:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | param | List | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | -| test.kt:3:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | param | T | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | -| test.kt:3:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | return | T | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | +| test.kt:4:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads() | return | T | genericFunctionWithOverloads() | +| test.kt:4:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object) | param | T | genericFunctionWithOverloads(java.lang.Object) | +| test.kt:4:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object) | return | T | genericFunctionWithOverloads(java.lang.Object) | +| test.kt:4:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List) | param | List | genericFunctionWithOverloads(java.lang.Object,java.util.List) | +| test.kt:4:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List) | param | T | genericFunctionWithOverloads(java.lang.Object,java.util.List) | +| test.kt:4:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List) | return | T | genericFunctionWithOverloads(java.lang.Object,java.util.List) | +| test.kt:4:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | param | List | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | +| test.kt:4:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | param | T | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | +| test.kt:4:3:4:94 | genericFunctionWithOverloads | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | return | T | genericFunctionWithOverloads(java.lang.Object,java.util.List,java.lang.Object) | diff --git a/java/ql/test-kotlin2/library-tests/jvmstatic-annotation/test.expected b/java/ql/test-kotlin2/library-tests/jvmstatic-annotation/test.expected index 71e45333654a..813562aa20d6 100644 --- a/java/ql/test-kotlin2/library-tests/jvmstatic-annotation/test.expected +++ b/java/ql/test-kotlin2/library-tests/jvmstatic-annotation/test.expected @@ -3,15 +3,15 @@ staticMembers | test.kt:0:0:0:0 | TestKt | test.kt:49:1:67:1 | externalUser | Method | | test.kt:9:1:29:1 | HasCompanion | test.kt:11:3:27:3 | Companion | Class | | test.kt:9:1:29:1 | HasCompanion | test.kt:11:3:27:3 | Companion | Field | -| test.kt:9:1:29:1 | HasCompanion | test.kt:13:5:13:71 | staticMethod | Method | -| test.kt:9:1:29:1 | HasCompanion | test.kt:16:5:16:37 | getStaticProp | Method | -| test.kt:9:1:29:1 | HasCompanion | test.kt:16:5:16:37 | setStaticProp | Method | +| test.kt:9:1:29:1 | HasCompanion | test.kt:13:16:13:71 | staticMethod | Method | +| test.kt:9:1:29:1 | HasCompanion | test.kt:16:16:16:37 | getStaticProp | Method | +| test.kt:9:1:29:1 | HasCompanion | test.kt:16:16:16:37 | setStaticProp | Method | | test.kt:9:1:29:1 | HasCompanion | test.kt:20:7:20:45 | getPropWithStaticGetter | Method | | test.kt:9:1:29:1 | HasCompanion | test.kt:25:7:25:60 | setPropWithStaticSetter | Method | | test.kt:31:1:47:1 | NonCompanion | test.kt:31:1:47:1 | INSTANCE | Field | -| test.kt:31:1:47:1 | NonCompanion | test.kt:33:3:33:69 | staticMethod | Method | -| test.kt:31:1:47:1 | NonCompanion | test.kt:36:3:36:35 | getStaticProp | Method | -| test.kt:31:1:47:1 | NonCompanion | test.kt:36:3:36:35 | setStaticProp | Method | +| test.kt:31:1:47:1 | NonCompanion | test.kt:33:14:33:69 | staticMethod | Method | +| test.kt:31:1:47:1 | NonCompanion | test.kt:36:14:36:35 | getStaticProp | Method | +| test.kt:31:1:47:1 | NonCompanion | test.kt:36:14:36:35 | setStaticProp | Method | | test.kt:31:1:47:1 | NonCompanion | test.kt:40:5:40:43 | getPropWithStaticGetter | Method | | test.kt:31:1:47:1 | NonCompanion | test.kt:45:5:45:58 | setPropWithStaticSetter | Method | #select @@ -25,11 +25,11 @@ staticMembers | test.kt:11:3:27:3 | Companion | JavaUser.java:8:5:8:73 | setNonStaticProp(...) | JavaUser.java:8:5:8:26 | HasCompanion.Companion | instance | | test.kt:11:3:27:3 | Companion | JavaUser.java:9:5:9:100 | setPropWithStaticGetter(...) | JavaUser.java:9:5:9:26 | HasCompanion.Companion | instance | | test.kt:11:3:27:3 | Companion | JavaUser.java:9:52:9:99 | getPropWithStaticSetter(...) | JavaUser.java:9:52:9:73 | HasCompanion.Companion | instance | -| test.kt:11:3:27:3 | Companion | test.kt:13:5:13:71 | staticMethod(...) | test.kt:13:5:13:71 | HasCompanion.Companion | instance | +| test.kt:11:3:27:3 | Companion | test.kt:13:16:13:71 | staticMethod(...) | test.kt:13:16:13:71 | HasCompanion.Companion | instance | | test.kt:11:3:27:3 | Companion | test.kt:13:54:13:71 | nonStaticMethod(...) | test.kt:13:54:13:71 | this | instance | | test.kt:11:3:27:3 | Companion | test.kt:14:46:14:60 | staticMethod(...) | test.kt:14:46:14:60 | this | instance | -| test.kt:11:3:27:3 | Companion | test.kt:16:5:16:37 | getStaticProp(...) | test.kt:16:5:16:37 | HasCompanion.Companion | instance | -| test.kt:11:3:27:3 | Companion | test.kt:16:5:16:37 | setStaticProp(...) | test.kt:16:5:16:37 | HasCompanion.Companion | instance | +| test.kt:11:3:27:3 | Companion | test.kt:16:16:16:37 | getStaticProp(...) | test.kt:16:16:16:37 | HasCompanion.Companion | instance | +| test.kt:11:3:27:3 | Companion | test.kt:16:16:16:37 | setStaticProp(...) | test.kt:16:16:16:37 | HasCompanion.Companion | instance | | test.kt:11:3:27:3 | Companion | test.kt:20:7:20:45 | getPropWithStaticGetter(...) | test.kt:20:7:20:45 | HasCompanion.Companion | instance | | test.kt:11:3:27:3 | Companion | test.kt:20:26:20:45 | getPropWithStaticSetter(...) | test.kt:20:26:20:45 | this | instance | | test.kt:11:3:27:3 | Companion | test.kt:21:24:21:47 | setPropWithStaticSetter(...) | test.kt:21:24:21:47 | this | instance | diff --git a/java/ql/test-kotlin2/library-tests/lateinit/test.expected b/java/ql/test-kotlin2/library-tests/lateinit/test.expected index 3e8b48d298b8..4a54d9d28585 100644 --- a/java/ql/test-kotlin2/library-tests/lateinit/test.expected +++ b/java/ql/test-kotlin2/library-tests/lateinit/test.expected @@ -1,8 +1,8 @@ | test.kt:4:15:4:26 | println(...) | file:///ConsoleKt.class:0:0:0:0 | println | -| test.kt:9:9:9:13 | getTest0$private(...) | test.kt:2:5:2:40 | getTest0$private | +| test.kt:9:9:9:13 | getTest0$private(...) | test.kt:2:22:2:40 | getTest0$private | | test.kt:9:9:9:17 | f(...) | test.kt:4:5:4:26 | f | | test.kt:10:13:10:23 | get(...) | test.kt:10:13:10:23 | get | -| test.kt:10:13:10:23 | getTest0$private(...) | test.kt:2:5:2:40 | getTest0$private | -| test.kt:10:13:10:23 | setTest0$private(...) | test.kt:2:5:2:40 | setTest0$private | +| test.kt:10:13:10:23 | getTest0$private(...) | test.kt:2:22:2:40 | getTest0$private | +| test.kt:10:13:10:23 | setTest0$private(...) | test.kt:2:22:2:40 | setTest0$private | | test.kt:10:13:10:37 | isInitialized(...) | file:///LateinitKt.class:0:0:0:0 | isInitialized | | test.kt:14:9:14:17 | f(...) | test.kt:4:5:4:26 | f | diff --git a/java/ql/test-kotlin2/library-tests/methods-mixed-java-and-kotlin/test.expected b/java/ql/test-kotlin2/library-tests/methods-mixed-java-and-kotlin/test.expected index 43281e98beba..12654f3142a8 100644 --- a/java/ql/test-kotlin2/library-tests/methods-mixed-java-and-kotlin/test.expected +++ b/java/ql/test-kotlin2/library-tests/methods-mixed-java-and-kotlin/test.expected @@ -2,5 +2,5 @@ | A.java:4:10:4:12 | foo | j.A.foo | foo(java.lang.Object) | A.java:4:10:4:12 | foo | j.A.foo | | B.java:4:17:4:19 | foo | j.B.foo | foo(java.lang.String) | B.java:4:17:4:19 | foo | j.B.foo | | W.kt:4:5:4:17 | foo | k.A.foo | foo(java.lang.Object) | W.kt:4:5:4:17 | foo | k.A.foo | -| W.kt:8:5:8:34 | foo | k.B.foo | foo(java.lang.String) | W.kt:8:5:8:34 | foo | k.B.foo | +| W.kt:8:14:8:34 | foo | k.B.foo | foo(java.lang.String) | W.kt:8:14:8:34 | foo | k.B.foo | | file:///!unknown-binary-location/k/A.class:0:0:0:0 | foo | k.A.foo | foo(java.lang.String) | W.kt:4:5:4:17 | foo | k.A.foo | diff --git a/java/ql/test-kotlin2/library-tests/methods/exprs.expected b/java/ql/test-kotlin2/library-tests/methods/exprs.expected index accffb8beff8..fbe0ff419440 100644 --- a/java/ql/test-kotlin2/library-tests/methods/exprs.expected +++ b/java/ql/test-kotlin2/library-tests/methods/exprs.expected @@ -23,7 +23,6 @@ | 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 | ... !is ... | NotInstanceOfExpr | | dataClass.kt:0:0:0:0 | ... & ... | AndBitwiseExpr | | dataClass.kt:0:0:0:0 | ... & ... | AndBitwiseExpr | @@ -37,6 +36,7 @@ | dataClass.kt:0:0:0:0 | ...=... | AssignExpr | | dataClass.kt:0:0:0:0 | ...=... | AssignExpr | | dataClass.kt:0:0:0:0 | ...=... | AssignExpr | +| dataClass.kt:0:0:0:0 | | ImplicitCastExpr | | dataClass.kt:0:0:0:0 | DataClass | TypeAccess | | dataClass.kt:0:0:0:0 | DataClass | TypeAccess | | dataClass.kt:0:0:0:0 | DataClass | TypeAccess | @@ -233,12 +233,12 @@ | enumClass.kt:0:0:0:0 | EnumWithFunctions | TypeAccess | | enumClass.kt:0:0:0:0 | EnumWithFunctions | TypeAccess | | enumClass.kt:0:0:0:0 | EnumWithFunctions[] | TypeAccess | +| enumClass.kt:1:1:4:1 | 0 | IntegerLiteral | +| enumClass.kt:1:1:4:1 | Enum | TypeAccess | +| enumClass.kt:1:1:4:1 | EnumClass | TypeAccess | | enumClass.kt:1:1:4:1 | String | TypeAccess | -| enumClass.kt:1:21:1:32 | 0 | IntegerLiteral | -| enumClass.kt:1:21:1:32 | Enum | TypeAccess | -| enumClass.kt:1:21:1:32 | EnumClass | TypeAccess | -| enumClass.kt:1:21:1:32 | new Enum(...) | ClassInstanceExpr | -| enumClass.kt:1:21:1:32 | null | NullLiteral | +| enumClass.kt:1:1:4:1 | new Enum(...) | ClassInstanceExpr | +| enumClass.kt:1:1:4:1 | null | NullLiteral | | enumClass.kt:1:22:1:31 | ...=... | KtInitializerAssignExpr | | enumClass.kt:1:22:1:31 | int | TypeAccess | | enumClass.kt:1:22:1:31 | int | TypeAccess | @@ -275,19 +275,19 @@ | enumClass.kt:8:3:11:4 | VAL | TypeAccess | | enumClass.kt:8:3:11:4 | new EnumWithFunctions(...) | ClassInstanceExpr | | enumClass.kt:8:3:11:4 | new VAL(...) | ClassInstanceExpr | -| enumClass.kt:9:5:9:30 | int | TypeAccess | +| enumClass.kt:9:14:9:30 | int | TypeAccess | | enumClass.kt:9:20:9:25 | int | TypeAccess | | enumClass.kt:9:30:9:30 | i | VarAccess | -| enumClass.kt:10:5:10:42 | int | TypeAccess | +| enumClass.kt:10:14:10:42 | int | TypeAccess | | enumClass.kt:10:20:10:25 | int | TypeAccess | | enumClass.kt:10:30:10:33 | this | ThisAccess | | enumClass.kt:10:30:10:38 | f(...) | MethodCall | | enumClass.kt:10:30:10:42 | ... + ... | AddExpr | | enumClass.kt:10:37:10:37 | i | VarAccess | | enumClass.kt:10:42:10:42 | i | VarAccess | -| enumClass.kt:13:3:13:29 | int | TypeAccess | +| enumClass.kt:13:12:13:29 | int | TypeAccess | | enumClass.kt:13:18:13:23 | int | TypeAccess | -| enumClass.kt:14:3:14:29 | int | TypeAccess | +| enumClass.kt:14:12:14:29 | int | TypeAccess | | enumClass.kt:14:18:14:23 | int | TypeAccess | | methods2.kt:4:1:5:1 | Unit | TypeAccess | | methods2.kt:4:26:4:31 | int | TypeAccess | @@ -374,7 +374,7 @@ | methods5.kt:10:13:10:18 | | ImplicitCoercionToUnitExpr | | methods5.kt:10:13:10:18 | Unit | TypeAccess | | methods5.kt:10:16:10:17 | 42 | IntegerLiteral | -| methods6.kt:3:1:4:1 | Unit | TypeAccess | +| methods6.kt:3:9:4:1 | Unit | TypeAccess | | methods.kt:2:1:3:1 | Unit | TypeAccess | | methods.kt:2:20:2:25 | int | TypeAccess | | methods.kt:2:28:2:33 | int | TypeAccess | @@ -392,9 +392,9 @@ | methods.kt:11:9:11:28 | topLevelMethod(...) | MethodCall | | methods.kt:11:24:11:24 | b | VarAccess | | methods.kt:11:27:11:27 | 4 | IntegerLiteral | -| methods.kt:14:5:14:29 | Unit | TypeAccess | -| methods.kt:15:5:15:35 | Unit | TypeAccess | -| methods.kt:16:5:16:31 | Unit | TypeAccess | -| methods.kt:17:5:17:33 | Unit | TypeAccess | +| methods.kt:14:12:14:29 | Unit | TypeAccess | +| methods.kt:15:15:15:35 | Unit | TypeAccess | +| methods.kt:16:13:16:31 | Unit | TypeAccess | +| methods.kt:17:14:17:33 | Unit | TypeAccess | | methods.kt:18:5:18:36 | Unit | TypeAccess | -| methods.kt:19:5:19:29 | Unit | TypeAccess | +| methods.kt:19:12:19:29 | Unit | TypeAccess | diff --git a/java/ql/test-kotlin2/library-tests/methods/methods.expected b/java/ql/test-kotlin2/library-tests/methods/methods.expected index 94c0d62e20b1..abd50a29c1f2 100644 --- a/java/ql/test-kotlin2/library-tests/methods/methods.expected +++ b/java/ql/test-kotlin2/library-tests/methods/methods.expected @@ -34,10 +34,10 @@ methods | enumClass.kt:6:1:16:1 | EnumWithFunctions | enumClass.kt:0:0:0:0 | getEntries | getEntries() | final, public, static | Compiler generated | | enumClass.kt:6:1:16:1 | EnumWithFunctions | enumClass.kt:0:0:0:0 | valueOf | valueOf(java.lang.String) | final, public, static | Compiler generated | | enumClass.kt:6:1:16:1 | EnumWithFunctions | enumClass.kt:0:0:0:0 | values | values() | final, public, static | Compiler generated | -| enumClass.kt:6:1:16:1 | EnumWithFunctions | enumClass.kt:13:3:13:29 | f | f(int) | abstract, public | | -| enumClass.kt:6:1:16:1 | EnumWithFunctions | enumClass.kt:14:3:14:29 | g | g(int) | abstract, public | | -| enumClass.kt:8:3:11:4 | VAL | enumClass.kt:9:5:9:30 | f | f(int) | override, public | | -| enumClass.kt:8:3:11:4 | VAL | enumClass.kt:10:5:10:42 | g | g(int) | override, public | | +| enumClass.kt:6:1:16:1 | EnumWithFunctions | enumClass.kt:13:12:13:29 | f | f(int) | abstract, public | | +| enumClass.kt:6:1:16:1 | EnumWithFunctions | enumClass.kt:14:12:14:29 | g | g(int) | abstract, public | | +| enumClass.kt:8:3:11:4 | VAL | enumClass.kt:9:14:9:30 | f | f(int) | override, public | | +| enumClass.kt:8:3:11:4 | VAL | enumClass.kt:10:14:10:42 | g | g(int) | override, public | | | methods2.kt:0:0:0:0 | Methods2Kt | methods2.kt:4:1:5:1 | fooBarTopLevelMethod | fooBarTopLevelMethod(int,int) | final, public, static | | | methods2.kt:7:1:10:1 | Class2 | methods2.kt:8:5:9:5 | fooBarClassMethod | fooBarClassMethod(int,int) | final, public | | | methods3.kt:0:0:0:0 | Methods3Kt | methods3.kt:3:1:3:49 | fooBarTopLevelMethodExt | fooBarTopLevelMethodExt(java.lang.String,int) | final, public, static | | @@ -48,16 +48,16 @@ methods | methods5.kt:0:0:0:0 | Methods5Kt | methods5.kt:3:1:11:1 | x | x() | final, public, static | | | methods5.kt:5:3:5:27 | | methods5.kt:5:3:5:27 | a | a(int) | final, public | | | methods5.kt:9:3:9:32 | | methods5.kt:9:3:9:32 | f1 | f1(foo.bar.C1,int) | final, public | | -| methods6.kt:0:0:0:0 | Methods6Kt | methods6.kt:3:1:4:1 | s | s() | final, public, static, suspend | | +| methods6.kt:0:0:0:0 | Methods6Kt | methods6.kt:3:9:4:1 | s | s() | final, public, static, suspend | | | methods.kt:0:0:0:0 | MethodsKt | methods.kt:2:1:3:1 | topLevelMethod | topLevelMethod(int,int) | final, public, static | | | methods.kt:5:1:20:1 | Class | methods.kt:6:5:7:5 | classMethod | classMethod(int,int) | final, public | | | methods.kt:5:1:20:1 | Class | methods.kt:9:5:12:5 | anotherClassMethod | anotherClassMethod(int,int) | final, public | | -| methods.kt:5:1:20:1 | Class | methods.kt:14:5:14:29 | publicFun | publicFun() | final, public | | -| methods.kt:5:1:20:1 | Class | methods.kt:15:5:15:35 | protectedFun | protectedFun() | final, protected | | -| methods.kt:5:1:20:1 | Class | methods.kt:16:5:16:31 | privateFun | privateFun() | final, private | | -| methods.kt:5:1:20:1 | Class | methods.kt:17:5:17:33 | internalFun$main | internalFun$main() | final, internal | | +| methods.kt:5:1:20:1 | Class | methods.kt:14:12:14:29 | publicFun | publicFun() | final, public | | +| methods.kt:5:1:20:1 | Class | methods.kt:15:15:15:35 | protectedFun | protectedFun() | final, protected | | +| methods.kt:5:1:20:1 | Class | methods.kt:16:13:16:31 | privateFun | privateFun() | final, private | | +| methods.kt:5:1:20:1 | Class | methods.kt:17:14:17:33 | internalFun$main | internalFun$main() | final, internal | | | methods.kt:5:1:20:1 | Class | methods.kt:18:5:18:36 | noExplicitVisibilityFun | noExplicitVisibilityFun() | final, public | | -| methods.kt:5:1:20:1 | Class | methods.kt:19:5:19:29 | inlineFun | inlineFun() | final, inline, public | | +| methods.kt:5:1:20:1 | Class | methods.kt:19:12:19:29 | inlineFun | inlineFun() | final, inline, public | | constructors | dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:1:21:1:47 | DataClass | DataClass(int,java.lang.String) | | delegates.kt:3:1:12:1 | MyClass | delegates.kt:3:1:12:1 | MyClass | MyClass() | diff --git a/java/ql/test-kotlin2/library-tests/methods/parameters.expected b/java/ql/test-kotlin2/library-tests/methods/parameters.expected index 3e5485f27245..b26345a228d5 100644 --- a/java/ql/test-kotlin2/library-tests/methods/parameters.expected +++ b/java/ql/test-kotlin2/library-tests/methods/parameters.expected @@ -24,10 +24,10 @@ | delegates.kt:8:66:11:5 | invoke | delegates.kt:9:20:9:22 | new | 2 | | enumClass.kt:0:0:0:0 | valueOf | enumClass.kt:1:1:4:1 | value | 0 | | enumClass.kt:0:0:0:0 | valueOf | enumClass.kt:6:1:16:1 | value | 0 | -| enumClass.kt:9:5:9:30 | f | enumClass.kt:9:20:9:25 | i | 0 | -| enumClass.kt:10:5:10:42 | g | enumClass.kt:10:20:10:25 | i | 0 | -| enumClass.kt:13:3:13:29 | f | enumClass.kt:13:18:13:23 | i | 0 | -| enumClass.kt:14:3:14:29 | g | enumClass.kt:14:18:14:23 | i | 0 | +| enumClass.kt:9:14:9:30 | f | enumClass.kt:9:20:9:25 | i | 0 | +| enumClass.kt:10:14:10:42 | g | enumClass.kt:10:20:10:25 | i | 0 | +| enumClass.kt:13:12:13:29 | f | enumClass.kt:13:18:13:23 | i | 0 | +| enumClass.kt:14:12:14:29 | g | enumClass.kt:14:18:14:23 | i | 0 | | methods2.kt:4:1:5:1 | fooBarTopLevelMethod | methods2.kt:4:26:4:31 | x | 0 | | methods2.kt:4:1:5:1 | fooBarTopLevelMethod | methods2.kt:4:34:4:39 | y | 1 | | methods2.kt:8:5:9:5 | fooBarClassMethod | methods2.kt:8:27:8:32 | x | 0 | diff --git a/java/ql/test-kotlin2/library-tests/modifiers/modifiers.expected b/java/ql/test-kotlin2/library-tests/modifiers/modifiers.expected index 6bc77b34a0ad..4fc6ff961db5 100644 --- a/java/ql/test-kotlin2/library-tests/modifiers/modifiers.expected +++ b/java/ql/test-kotlin2/library-tests/modifiers/modifiers.expected @@ -1,20 +1,20 @@ | modifiers.kt:1:1:29:1 | X | Class | public | | modifiers.kt:1:1:29:1 | X | Constructor | public | -| modifiers.kt:2:5:2:17 | getA$private | Method | final | -| modifiers.kt:2:5:2:17 | getA$private | Method | private | -| modifiers.kt:2:5:2:21 | a | Field | final | -| modifiers.kt:2:5:2:21 | a | Field | private | -| modifiers.kt:2:5:2:21 | a | Property | private | -| modifiers.kt:3:5:3:19 | getB | Method | final | -| modifiers.kt:3:5:3:19 | getB | Method | protected | -| modifiers.kt:3:5:3:23 | b | Field | final | -| modifiers.kt:3:5:3:23 | b | Field | private | -| modifiers.kt:3:5:3:23 | b | Property | protected | -| modifiers.kt:4:5:4:18 | getC$main | Method | final | -| modifiers.kt:4:5:4:18 | getC$main | Method | internal | -| modifiers.kt:4:5:4:22 | c | Field | final | -| modifiers.kt:4:5:4:22 | c | Field | private | -| modifiers.kt:4:5:4:22 | c | Property | internal | +| modifiers.kt:2:13:2:17 | getA$private | Method | final | +| modifiers.kt:2:13:2:17 | getA$private | Method | private | +| modifiers.kt:2:13:2:21 | a | Field | final | +| modifiers.kt:2:13:2:21 | a | Field | private | +| modifiers.kt:2:13:2:21 | a | Property | private | +| modifiers.kt:3:15:3:19 | getB | Method | final | +| modifiers.kt:3:15:3:19 | getB | Method | protected | +| modifiers.kt:3:15:3:23 | b | Field | final | +| modifiers.kt:3:15:3:23 | b | Field | private | +| modifiers.kt:3:15:3:23 | b | Property | protected | +| modifiers.kt:4:14:4:18 | getC$main | Method | final | +| modifiers.kt:4:14:4:18 | getC$main | Method | internal | +| modifiers.kt:4:14:4:22 | c | Field | final | +| modifiers.kt:4:14:4:22 | c | Field | private | +| modifiers.kt:4:14:4:22 | c | Property | internal | | modifiers.kt:5:5:5:9 | getD | Method | final | | modifiers.kt:5:5:5:9 | getD | Method | public | | modifiers.kt:5:5:5:34 | d | Field | final | @@ -23,11 +23,11 @@ | modifiers.kt:7:5:9:5 | Nested | Class | final | | modifiers.kt:7:5:9:5 | Nested | Class | protected | | modifiers.kt:7:5:9:5 | Nested | Constructor | public | -| modifiers.kt:8:9:8:25 | getE | Method | final | -| modifiers.kt:8:9:8:25 | getE | Method | public | -| modifiers.kt:8:9:8:29 | e | Field | final | -| modifiers.kt:8:9:8:29 | e | Field | private | -| modifiers.kt:8:9:8:29 | e | Property | public | +| modifiers.kt:8:16:8:25 | getE | Method | final | +| modifiers.kt:8:16:8:25 | getE | Method | public | +| modifiers.kt:8:16:8:29 | e | Field | final | +| modifiers.kt:8:16:8:29 | e | Field | private | +| modifiers.kt:8:16:8:29 | e | Property | public | | modifiers.kt:11:5:15:5 | fn1 | Method | final | | modifiers.kt:11:5:15:5 | fn1 | Method | public | | modifiers.kt:12:16:14:9 | | Constructor | public | @@ -49,17 +49,17 @@ | modifiers.kt:23:9:23:27 | localClass | Constructor | public | | modifiers.kt:23:9:23:27 | localClass | LocalClass | final | | modifiers.kt:23:9:23:27 | localClass | LocalClass | private | -| modifiers.kt:26:5:26:46 | fn4 | Method | final | -| modifiers.kt:26:5:26:46 | fn4 | Method | inline | -| modifiers.kt:26:5:26:46 | fn4 | Method | public | +| modifiers.kt:26:12:26:46 | fn4 | Method | final | +| modifiers.kt:26:12:26:46 | fn4 | Method | inline | +| modifiers.kt:26:12:26:46 | fn4 | Method | public | | modifiers.kt:26:20:26:41 | f | Parameter | noinline | -| modifiers.kt:27:5:27:49 | fn5 | Method | final | -| modifiers.kt:27:5:27:49 | fn5 | Method | inline | -| modifiers.kt:27:5:27:49 | fn5 | Method | public | +| modifiers.kt:27:12:27:49 | fn5 | Method | final | +| modifiers.kt:27:12:27:49 | fn5 | Method | inline | +| modifiers.kt:27:12:27:49 | fn5 | Method | public | | modifiers.kt:27:20:27:44 | f | Parameter | crossinline | -| modifiers.kt:28:5:28:39 | fn6 | Method | final | -| modifiers.kt:28:5:28:39 | fn6 | Method | inline | -| modifiers.kt:28:5:28:39 | fn6 | Method | public | +| modifiers.kt:28:12:28:39 | fn6 | Method | final | +| modifiers.kt:28:12:28:39 | fn6 | Method | inline | +| modifiers.kt:28:12:28:39 | fn6 | Method | public | | modifiers.kt:28:17:28:25 | T | TypeVariable | reified | | modifiers.kt:31:1:33:1 | Y | Class | final | | modifiers.kt:31:1:33:1 | Y | Class | public | @@ -75,13 +75,13 @@ | modifiers.kt:35:1:41:1 | LateInit | Class | final | | modifiers.kt:35:1:41:1 | LateInit | Class | public | | modifiers.kt:35:1:41:1 | LateInit | Constructor | public | -| modifiers.kt:36:5:36:40 | getTest0$private | Method | final | -| modifiers.kt:36:5:36:40 | getTest0$private | Method | private | -| modifiers.kt:36:5:36:40 | setTest0$private | Method | final | -| modifiers.kt:36:5:36:40 | setTest0$private | Method | private | -| modifiers.kt:36:5:36:40 | test0 | Field | private | -| modifiers.kt:36:5:36:40 | test0 | Property | lateinit | -| modifiers.kt:36:5:36:40 | test0 | Property | private | +| modifiers.kt:36:22:36:40 | getTest0$private | Method | final | +| modifiers.kt:36:22:36:40 | getTest0$private | Method | private | +| modifiers.kt:36:22:36:40 | setTest0$private | Method | final | +| modifiers.kt:36:22:36:40 | setTest0$private | Method | private | +| modifiers.kt:36:22:36:40 | test0 | Field | private | +| modifiers.kt:36:22:36:40 | test0 | Property | lateinit | +| modifiers.kt:36:22:36:40 | test0 | Property | private | | modifiers.kt:38:5:40:5 | fn | Method | final | | modifiers.kt:38:5:40:5 | fn | Method | public | -| modifiers.kt:39:9:39:36 | LateInit test1 | LocalVariableDecl | lateinit | +| modifiers.kt:39:18:39:36 | LateInit test1 | LocalVariableDecl | lateinit | diff --git a/java/ql/test-kotlin2/library-tests/parameter-defaults/defaults.expected b/java/ql/test-kotlin2/library-tests/parameter-defaults/defaults.expected index 2e7d2920d78d..fe02743697d8 100644 --- a/java/ql/test-kotlin2/library-tests/parameter-defaults/defaults.expected +++ b/java/ql/test-kotlin2/library-tests/parameter-defaults/defaults.expected @@ -1,6 +1,6 @@ | test.kt:5:3:7:3 | f | test.kt:5:3:7:3 | f$default | | test.kt:19:3:22:3 | f | test.kt:19:3:22:3 | f$default | -| test.kt:34:3:36:3 | f | test.kt:34:3:36:3 | f$default | +| test.kt:34:14:36:3 | f | test.kt:34:14:36:3 | f$default | | test.kt:56:3:58:3 | test | test.kt:56:3:58:3 | test$default | | test.kt:68:22:68:75 | TestConstructor | test.kt:68:22:68:75 | TestConstructor | | test.kt:86:5:88:5 | f | test.kt:86:5:88:5 | f$default | @@ -9,9 +9,9 @@ | test.kt:135:3:135:43 | testReturn | test.kt:135:3:135:43 | testReturn$default | | test.kt:145:3:147:3 | f | test.kt:145:3:147:3 | f$default | | test.kt:158:3:158:35 | f | test.kt:158:3:158:35 | f$default | -| test.kt:159:3:159:44 | g$main | test.kt:159:3:159:44 | g$main$default | -| test.kt:160:3:160:45 | h | test.kt:160:3:160:45 | h$default | -| test.kt:161:3:161:43 | i | test.kt:161:3:161:43 | i$default | +| test.kt:159:12:159:44 | g$main | test.kt:159:12:159:44 | g$main$default | +| test.kt:160:13:160:45 | h | test.kt:160:13:160:45 | h$default | +| test.kt:161:11:161:43 | i | test.kt:161:11:161:43 | i$default | | test.kt:171:3:171:97 | f | test.kt:171:3:171:97 | f$default | | test.kt:179:3:179:46 | f | test.kt:179:3:179:46 | f$default | | test.kt:180:3:180:34 | f | test.kt:180:3:180:34 | f$default | diff --git a/java/ql/test-kotlin2/library-tests/private-anonymous-types/test.expected b/java/ql/test-kotlin2/library-tests/private-anonymous-types/test.expected index fa622bab6ff8..c87337a92c74 100644 --- a/java/ql/test-kotlin2/library-tests/private-anonymous-types/test.expected +++ b/java/ql/test-kotlin2/library-tests/private-anonymous-types/test.expected @@ -19,15 +19,15 @@ | test.kt:7:1:22:1 | A | test.kt:7:16:7:21 | A | | test.kt:7:1:22:1 | A | test.kt:9:3:9:14 | getAnonType | | test.kt:7:1:22:1 | A | test.kt:9:3:11:3 | anonType | -| test.kt:7:1:22:1 | A | test.kt:13:3:13:29 | getPrivateAnonType$private | -| test.kt:7:1:22:1 | A | test.kt:13:3:15:3 | privateAnonType | +| test.kt:7:1:22:1 | A | test.kt:13:11:13:29 | getPrivateAnonType$private | +| test.kt:7:1:22:1 | A | test.kt:13:11:15:3 | privateAnonType | | test.kt:7:1:22:1 | A | test.kt:17:3:20:3 | privateUser | | test.kt:9:18:11:3 | new If(...) { ... } | test.kt:9:18:11:3 | | -| test.kt:9:18:11:3 | new If(...) { ... } | test.kt:10:5:10:18 | getX | -| test.kt:9:18:11:3 | new If(...) { ... } | test.kt:10:5:10:22 | x | +| test.kt:9:18:11:3 | new If(...) { ... } | test.kt:10:14:10:18 | getX | +| test.kt:9:18:11:3 | new If(...) { ... } | test.kt:10:14:10:22 | x | | test.kt:13:33:15:3 | new If(...) { ... } | test.kt:13:33:15:3 | | -| test.kt:13:33:15:3 | new If(...) { ... } | test.kt:14:5:14:18 | getX | -| test.kt:13:33:15:3 | new If(...) { ... } | test.kt:14:5:14:22 | x | +| test.kt:13:33:15:3 | new If(...) { ... } | test.kt:14:14:14:18 | getX | +| test.kt:13:33:15:3 | new If(...) { ... } | test.kt:14:14:14:22 | x | enclosingTypes | file:///!unknown-binary-location/A$.class:0:0:0:0 | new If(...) { ... }<> | file:///!unknown-binary-location/A.class:0:0:0:0 | A | | file:///!unknown-binary-location/A$.class:0:0:0:0 | new If(...) { ... }<> | file:///!unknown-binary-location/A.class:0:0:0:0 | A | diff --git a/java/ql/test-kotlin2/library-tests/properties/properties.expected b/java/ql/test-kotlin2/library-tests/properties/properties.expected index 6e2d867153ce..705427f13a86 100644 --- a/java/ql/test-kotlin2/library-tests/properties/properties.expected +++ b/java/ql/test-kotlin2/library-tests/properties/properties.expected @@ -4,7 +4,7 @@ | properties.kt:3:5:3:25 | modifiableInt | properties.kt:3:5:3:21 | getModifiableInt | properties.kt:3:5:3:21 | setModifiableInt | properties.kt:3:5:3:25 | modifiableInt | public | | properties.kt:4:5:4:24 | immutableInt | properties.kt:4:5:4:20 | getImmutableInt | file://:0:0:0:0 | | properties.kt:4:5:4:24 | immutableInt | public | | properties.kt:5:5:5:26 | typedProp | properties.kt:5:5:5:22 | getTypedProp | file://:0:0:0:0 | | properties.kt:5:5:5:26 | typedProp | public | -| properties.kt:6:5:6:38 | abstractTypeProp | properties.kt:6:5:6:38 | getAbstractTypeProp | file://:0:0:0:0 | | file://:0:0:0:0 | | public | +| properties.kt:6:14:6:38 | abstractTypeProp | properties.kt:6:14:6:38 | getAbstractTypeProp | file://:0:0:0:0 | | file://:0:0:0:0 | | public | | properties.kt:7:5:7:30 | initialisedInInit | properties.kt:7:5:7:30 | getInitialisedInInit | file://:0:0:0:0 | | properties.kt:7:5:7:30 | initialisedInInit | public | | properties.kt:11:5:11:40 | useConstructorArg | properties.kt:11:5:11:25 | getUseConstructorArg | file://:0:0:0:0 | | properties.kt:11:5:11:40 | useConstructorArg | public | | properties.kt:12:5:13:21 | five | properties.kt:13:13:13:21 | getFive | file://:0:0:0:0 | | file://:0:0:0:0 | | public | @@ -17,17 +17,17 @@ | properties.kt:28:5:29:22 | overrideGetter | properties.kt:29:13:29:22 | getOverrideGetter | properties.kt:28:5:28:22 | setOverrideGetter | properties.kt:28:5:29:22 | overrideGetter | public | | properties.kt:30:5:31:29 | overrideGetterUseField | properties.kt:31:13:31:29 | getOverrideGetterUseField | properties.kt:30:5:30:30 | setOverrideGetterUseField | properties.kt:30:5:31:29 | overrideGetterUseField | public | | properties.kt:32:5:33:29 | useField | properties.kt:33:13:33:29 | getUseField | file://:0:0:0:0 | | properties.kt:32:5:33:29 | useField | public | -| properties.kt:34:5:34:36 | lateInitVar | properties.kt:34:5:34:36 | getLateInitVar | properties.kt:34:5:34:36 | setLateInitVar | properties.kt:34:5:34:36 | lateInitVar | lateinit, public | -| properties.kt:35:5:35:32 | privateProp | properties.kt:35:5:35:27 | getPrivateProp$private | file://:0:0:0:0 | | properties.kt:35:5:35:32 | privateProp | private | -| properties.kt:36:5:36:36 | protectedProp | properties.kt:36:5:36:31 | getProtectedProp | file://:0:0:0:0 | | properties.kt:36:5:36:36 | protectedProp | protected | -| properties.kt:37:5:37:30 | publicProp | properties.kt:37:5:37:25 | getPublicProp | file://:0:0:0:0 | | properties.kt:37:5:37:30 | publicProp | public | -| properties.kt:38:5:38:34 | internalProp | properties.kt:38:5:38:29 | getInternalProp$main | file://:0:0:0:0 | | properties.kt:38:5:38:34 | internalProp | internal | -| properties.kt:67:1:67:23 | constVal | properties.kt:67:1:67:18 | getConstVal | file://:0:0:0:0 | | properties.kt:67:1:67:23 | constVal | public | +| properties.kt:34:14:34:36 | lateInitVar | properties.kt:34:14:34:36 | getLateInitVar | properties.kt:34:14:34:36 | setLateInitVar | properties.kt:34:14:34:36 | lateInitVar | lateinit, public | +| properties.kt:35:13:35:32 | privateProp | properties.kt:35:13:35:27 | getPrivateProp$private | file://:0:0:0:0 | | properties.kt:35:13:35:32 | privateProp | private | +| properties.kt:36:15:36:36 | protectedProp | properties.kt:36:15:36:31 | getProtectedProp | file://:0:0:0:0 | | properties.kt:36:15:36:36 | protectedProp | protected | +| properties.kt:37:12:37:30 | publicProp | properties.kt:37:12:37:25 | getPublicProp | file://:0:0:0:0 | | properties.kt:37:12:37:30 | publicProp | public | +| properties.kt:38:14:38:34 | internalProp | properties.kt:38:14:38:29 | getInternalProp$main | file://:0:0:0:0 | | properties.kt:38:14:38:34 | internalProp | internal | +| properties.kt:67:7:67:23 | constVal | properties.kt:67:7:67:18 | getConstVal | file://:0:0:0:0 | | properties.kt:67:7:67:23 | constVal | public | | properties.kt:70:5:70:16 | prop | properties.kt:70:5:70:12 | getProp | file://:0:0:0:0 | | properties.kt:70:5:70:16 | prop | public | | properties.kt:78:1:79:13 | x | properties.kt:79:5:79:13 | getX | file://:0:0:0:0 | | file://:0:0:0:0 | | public | | properties.kt:80:1:81:13 | x | properties.kt:81:5:81:13 | getX | file://:0:0:0:0 | | file://:0:0:0:0 | | public | -| properties.kt:84:5:84:29 | data | properties.kt:84:5:84:25 | getData$private | properties.kt:84:5:84:25 | setData$private | properties.kt:84:5:84:29 | data | private | -| properties.kt:92:5:93:18 | data | properties.kt:93:9:93:18 | getData | properties.kt:92:5:92:25 | setData$private | properties.kt:92:5:93:18 | data | private | +| properties.kt:84:13:84:29 | data | properties.kt:84:13:84:25 | getData$private | properties.kt:84:13:84:25 | setData$private | properties.kt:84:13:84:29 | data | private | +| properties.kt:92:13:93:18 | data | properties.kt:93:9:93:18 | getData | properties.kt:92:13:92:25 | setData$private | properties.kt:92:13:93:18 | data | private | fieldDeclarations | properties.kt:2:27:2:50 | int constructorProp; | properties.kt:2:27:2:50 | constructorProp | 0 | | properties.kt:2:53:2:83 | int mutableConstructorProp; | properties.kt:2:53:2:83 | mutableConstructorProp | 0 | @@ -43,12 +43,12 @@ fieldDeclarations | properties.kt:28:5:29:22 | int overrideGetter; | properties.kt:28:5:29:22 | overrideGetter | 0 | | properties.kt:30:5:31:29 | int overrideGetterUseField; | properties.kt:30:5:31:29 | overrideGetterUseField | 0 | | properties.kt:32:5:33:29 | int useField; | properties.kt:32:5:33:29 | useField | 0 | -| properties.kt:34:5:34:36 | String lateInitVar; | properties.kt:34:5:34:36 | lateInitVar | 0 | -| properties.kt:35:5:35:32 | int privateProp; | properties.kt:35:5:35:32 | privateProp | 0 | -| properties.kt:36:5:36:36 | int protectedProp; | properties.kt:36:5:36:36 | protectedProp | 0 | -| properties.kt:37:5:37:30 | int publicProp; | properties.kt:37:5:37:30 | publicProp | 0 | -| properties.kt:38:5:38:34 | int internalProp; | properties.kt:38:5:38:34 | internalProp | 0 | -| properties.kt:67:1:67:23 | int constVal; | properties.kt:67:1:67:23 | constVal | 0 | +| properties.kt:34:14:34:36 | String lateInitVar; | properties.kt:34:14:34:36 | lateInitVar | 0 | +| properties.kt:35:13:35:32 | int privateProp; | properties.kt:35:13:35:32 | privateProp | 0 | +| properties.kt:36:15:36:36 | int protectedProp; | properties.kt:36:15:36:36 | protectedProp | 0 | +| properties.kt:37:12:37:30 | int publicProp; | properties.kt:37:12:37:30 | publicProp | 0 | +| properties.kt:38:14:38:34 | int internalProp; | properties.kt:38:14:38:34 | internalProp | 0 | +| properties.kt:67:7:67:23 | int constVal; | properties.kt:67:7:67:23 | constVal | 0 | | properties.kt:70:5:70:16 | int prop; | properties.kt:70:5:70:16 | prop | 0 | -| properties.kt:84:5:84:29 | int data; | properties.kt:84:5:84:29 | data | 0 | -| properties.kt:92:5:93:18 | int data; | properties.kt:92:5:93:18 | data | 0 | +| properties.kt:84:13:84:29 | int data; | properties.kt:84:13:84:29 | data | 0 | +| properties.kt:92:13:93:18 | int data; | properties.kt:92:13:93:18 | data | 0 | diff --git a/java/ql/test-kotlin2/library-tests/stmts/PrintAst.expected b/java/ql/test-kotlin2/library-tests/stmts/PrintAst.expected index c97765b3a733..473e06e32310 100644 --- a/java/ql/test-kotlin2/library-tests/stmts/PrintAst.expected +++ b/java/ql/test-kotlin2/library-tests/stmts/PrintAst.expected @@ -97,20 +97,19 @@ stmts.kt: # 23| 0: [LTExpr] ... < ... # 23| 0: [VarAccess] x # 23| 1: [IntegerLiteral] 100 -# 23| 1: [BlockStmt] { ... } -# 24| 0: [BlockStmt] { ... } -# 24| 0: [DoStmt] do ... while (...) -# 26| 0: [GTExpr] ... > ... -# 26| 0: [VarAccess] y -# 26| 1: [IntegerLiteral] 100 -# 24| 1: [BlockStmt] { ... } -# 25| 0: [ExprStmt] ; -# 25| 0: [WhenExpr] when ... -# 25| 0: [WhenBranch] ... -> ... -# 25| 0: [GTExpr] ... > ... -# 25| 0: [VarAccess] x -# 25| 1: [VarAccess] y -# 25| 1: [BreakStmt] break +# 24| 1: [BlockStmt] { ... } +# 24| 0: [DoStmt] do ... while (...) +# 26| 0: [GTExpr] ... > ... +# 26| 0: [VarAccess] y +# 26| 1: [IntegerLiteral] 100 +# 24| 1: [BlockStmt] { ... } +# 25| 0: [ExprStmt] ; +# 25| 0: [WhenExpr] when ... +# 25| 0: [WhenBranch] ... -> ... +# 25| 0: [GTExpr] ... > ... +# 25| 0: [VarAccess] x +# 25| 1: [VarAccess] y +# 25| 1: [BreakStmt] break # 28| 1: [WhileStmt] while (...) # 28| 0: [GTExpr] ... > ... # 28| 0: [VarAccess] x @@ -137,20 +136,19 @@ stmts.kt: # 35| 1: [MethodCall] rangeTo(...) # 35| -1: [VarAccess] x # 35| 0: [VarAccess] y -# 35| 2: [BlockStmt] { ... } -# 36| 0: [BlockStmt] { ... } -# 36| 0: [DoStmt] do ... while (...) -# 38| 0: [GTExpr] ... > ... -# 38| 0: [VarAccess] y -# 38| 1: [IntegerLiteral] 100 -# 36| 1: [BlockStmt] { ... } -# 37| 0: [ExprStmt] ; -# 37| 0: [WhenExpr] when ... -# 37| 0: [WhenBranch] ... -> ... -# 37| 0: [GTExpr] ... > ... -# 37| 0: [VarAccess] x -# 37| 1: [VarAccess] y -# 37| 1: [BreakStmt] break +# 36| 2: [BlockStmt] { ... } +# 36| 0: [DoStmt] do ... while (...) +# 38| 0: [GTExpr] ... > ... +# 38| 0: [VarAccess] y +# 38| 1: [IntegerLiteral] 100 +# 36| 1: [BlockStmt] { ... } +# 37| 0: [ExprStmt] ; +# 37| 0: [WhenExpr] when ... +# 37| 0: [WhenBranch] ... -> ... +# 37| 0: [GTExpr] ... > ... +# 37| 0: [VarAccess] x +# 37| 1: [VarAccess] y +# 37| 1: [BreakStmt] break # 41| 4: [EnhancedForStmt] for (... : ...) #-----| 0: (Single Local Variable Declaration) # 41| 1: [LocalVariableDeclExpr] diff --git a/java/ql/test-kotlin2/library-tests/stmts/stmts.expected b/java/ql/test-kotlin2/library-tests/stmts/stmts.expected index 62238cbfaefc..c004c4bc0d6f 100644 --- a/java/ql/test-kotlin2/library-tests/stmts/stmts.expected +++ b/java/ql/test-kotlin2/library-tests/stmts/stmts.expected @@ -33,7 +33,6 @@ | stmts.kt:22:27:44:1 | { ... } | BlockStmt | | stmts.kt:23:11:27:5 |