mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-03 08:31:29 +00:00
Compare commits
281 Commits
push/ilmir
...
rr/pdn_byt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dc65c6a3e | ||
|
|
05e642cacf | ||
|
|
f830786b20 | ||
|
|
22c5b3a990 | ||
|
|
29d2a6acee | ||
|
|
f278de8768 | ||
|
|
7dcdbf283b | ||
|
|
eb1dcdb344 | ||
|
|
476b3befaf | ||
|
|
01dd3d6ed4 | ||
|
|
c4147bc2fd | ||
|
|
5a6819daa8 | ||
|
|
1fb4590978 | ||
|
|
9ebce7849c | ||
|
|
be4a518a25 | ||
|
|
17e4a6142c | ||
|
|
f2c0b8c68d | ||
|
|
8a2279de2b | ||
|
|
c7b2c731af | ||
|
|
97fc187e77 | ||
|
|
99f9b79c87 | ||
|
|
79d49e6dbd | ||
|
|
8011452c28 | ||
|
|
d459cde010 | ||
|
|
411441c332 | ||
|
|
afcb2ca904 | ||
|
|
b336a335bf | ||
|
|
59f936fdef | ||
|
|
37926f333e | ||
|
|
e9a33e0335 | ||
|
|
e0216cc9f4 | ||
|
|
e0a95ff556 | ||
|
|
7fd8f7b3bc | ||
|
|
70e3877efc | ||
|
|
5ceefa3e3b | ||
|
|
e4bd33eb4f | ||
|
|
f71e08df4d | ||
|
|
ac86ad252f | ||
|
|
1d47f4ad2b | ||
|
|
c6fa363487 | ||
|
|
7a81d0de8a | ||
|
|
7be48a0b4b | ||
|
|
63e5298be9 | ||
|
|
b894b7df6e | ||
|
|
c8ef0715b9 | ||
|
|
0c3f2eefe0 | ||
|
|
7e170770ea | ||
|
|
28690b7f32 | ||
|
|
7b8926f85b | ||
|
|
7c1520a424 | ||
|
|
965e328766 | ||
|
|
683872ecbf | ||
|
|
5c224ad17c | ||
|
|
393a19db54 | ||
|
|
867d7b5bca | ||
|
|
310d98c4f7 | ||
|
|
13b1664edf | ||
|
|
ee4a1d173d | ||
|
|
8840a9ecd1 | ||
|
|
f7a9bc3521 | ||
|
|
23ffbe4d9e | ||
|
|
7d95943b8b | ||
|
|
857bee6ced | ||
|
|
03f9d78eb3 | ||
|
|
4e6c483ccc | ||
|
|
bb35d9271f | ||
|
|
53f02a53f0 | ||
|
|
1f0089c5de | ||
|
|
d07c76fca4 | ||
|
|
6be33448d6 | ||
|
|
e59a57d11c | ||
|
|
e7b81c52a7 | ||
|
|
d602470027 | ||
|
|
fe351f26ef | ||
|
|
a94597d85a | ||
|
|
44fcd7e891 | ||
|
|
4cb6303fa8 | ||
|
|
2a5d511b66 | ||
|
|
00e5e462ea | ||
|
|
1a85da5ff8 | ||
|
|
c3264a2979 | ||
|
|
de4221afd8 | ||
|
|
54c6ae2cce | ||
|
|
3be2734c63 | ||
|
|
c1fe0d7158 | ||
|
|
1271fabffa | ||
|
|
27015a657c | ||
|
|
470103bfac | ||
|
|
f029179fe0 | ||
|
|
401fbae8d8 | ||
|
|
ea458e6848 | ||
|
|
a52c6858a9 | ||
|
|
134fb7741e | ||
|
|
ec3fa2610e | ||
|
|
0bf408e147 | ||
|
|
4e0485c523 | ||
|
|
147fd22cfb | ||
|
|
f1f97b4104 | ||
|
|
70b88ada93 | ||
|
|
d66f95b80e | ||
|
|
f1fb438d00 | ||
|
|
7103aa3100 | ||
|
|
66b8a444c2 | ||
|
|
6aee396e4b | ||
|
|
994f940a31 | ||
|
|
f189ebc983 | ||
|
|
6db3960d56 | ||
|
|
c2cdf9c796 | ||
|
|
99e022d023 | ||
|
|
d4162f876f | ||
|
|
234ab3b35d | ||
|
|
f98f41bbc3 | ||
|
|
c3b1be1a39 | ||
|
|
46f5c2073d | ||
|
|
7f7373dad2 | ||
|
|
951daeea3a | ||
|
|
1ae41443a2 | ||
|
|
24d792fb49 | ||
|
|
b2005302dc | ||
|
|
1093bffc62 | ||
|
|
e6b9935df9 | ||
|
|
75d9cd3814 | ||
|
|
3c4d0a1814 | ||
|
|
f4617b2c03 | ||
|
|
22ea5c7de4 | ||
|
|
95a1a4e66a | ||
|
|
5fb30b05ff | ||
|
|
e2786197ff | ||
|
|
47e8b2f9dc | ||
|
|
a76c5d66eb | ||
|
|
da6c5e13d5 | ||
|
|
a5c33c8d42 | ||
|
|
f8efe3b5df | ||
|
|
5324cbe729 | ||
|
|
8c9ad81c76 | ||
|
|
e87d816994 | ||
|
|
d3d4e94cd6 | ||
|
|
732405895f | ||
|
|
f228c3bb04 | ||
|
|
4f352950d9 | ||
|
|
a097a58edf | ||
|
|
e6d923f65c | ||
|
|
f1cf6b54e7 | ||
|
|
6833e83a6f | ||
|
|
7fe10e27a1 | ||
|
|
fe5e968896 | ||
|
|
590a8d088d | ||
|
|
6ae4c3f281 | ||
|
|
e0fe122ee9 | ||
|
|
9bc3404833 | ||
|
|
e0c8a6658b | ||
|
|
04daf8fce8 | ||
|
|
387dafb8c5 | ||
|
|
27ddc31f15 | ||
|
|
59de12c609 | ||
|
|
f519150c08 | ||
|
|
645014092c | ||
|
|
4ae5efd6da | ||
|
|
21e9bd7ea2 | ||
|
|
2666a93e6a | ||
|
|
e6c089ef40 | ||
|
|
ac0af39660 | ||
|
|
0a811bdd1a | ||
|
|
5fc1514104 | ||
|
|
2f7d6da22f | ||
|
|
b9ae22207e | ||
|
|
ee48fc320d | ||
|
|
0a68edf3bd | ||
|
|
f3dc8dfb21 | ||
|
|
e8e9f67069 | ||
|
|
1fb8c3b1d7 | ||
|
|
05f0507cbb | ||
|
|
bed45affe1 | ||
|
|
684c4c2825 | ||
|
|
0d99b01dcb | ||
|
|
8bbdc20809 | ||
|
|
9c8e92f5af | ||
|
|
70f9b77cce | ||
|
|
27766c2575 | ||
|
|
7084fec651 | ||
|
|
8ea3b52454 | ||
|
|
dc19e39dd2 | ||
|
|
088db0e138 | ||
|
|
48994976d4 | ||
|
|
dcbb1fb22b | ||
|
|
7dedd04ed9 | ||
|
|
3e0eb06e3e | ||
|
|
e4870740e1 | ||
|
|
63160293fb | ||
|
|
8071a1e246 | ||
|
|
9e9450caa2 | ||
|
|
57c4f79c1c | ||
|
|
26e39b3d2a | ||
|
|
051310124b | ||
|
|
73b796f184 | ||
|
|
34609b264d | ||
|
|
4fffed4165 | ||
|
|
c959b271a4 | ||
|
|
46d5e974df | ||
|
|
1dfc3c0520 | ||
|
|
eedc4d8c3f | ||
|
|
aa04f60df4 | ||
|
|
4c66c1c137 | ||
|
|
19ecb78531 | ||
|
|
2cfbad9477 | ||
|
|
b5e3dc414f | ||
|
|
8a1855e4da | ||
|
|
71c5c8b20a | ||
|
|
fb4ddd2f6e | ||
|
|
76b297fd73 | ||
|
|
597b18582a | ||
|
|
bb2a50a4eb | ||
|
|
d1f18c4651 | ||
|
|
22dcc92951 | ||
|
|
e83ceb9d40 | ||
|
|
36aee8f2b4 | ||
|
|
dab09e7052 | ||
|
|
c73dadbcdf | ||
|
|
dab693b075 | ||
|
|
f5379c5a04 | ||
|
|
00bc04b3df | ||
|
|
7f4da93cc3 | ||
|
|
9a4a39e680 | ||
|
|
b1fb0ba9e1 | ||
|
|
8a2cab346a | ||
|
|
b5caa658d6 | ||
|
|
454ae3b17a | ||
|
|
92df1f575a | ||
|
|
6a03f31e50 | ||
|
|
43a2ad0467 | ||
|
|
a736d62edd | ||
|
|
2e14b65644 | ||
|
|
4ddc0ed3fe | ||
|
|
eb831b9afc | ||
|
|
6b95bcdbdb | ||
|
|
9894b97058 | ||
|
|
26ea0be635 | ||
|
|
f40f506852 | ||
|
|
ea233cddf8 | ||
|
|
eed143d17b | ||
|
|
41e822e8cb | ||
|
|
5829f1a6e7 | ||
|
|
e78e8f8c79 | ||
|
|
32c1101959 | ||
|
|
ac993754e1 | ||
|
|
ce62348709 | ||
|
|
fd082b1574 | ||
|
|
e79c133331 | ||
|
|
29a0c448a6 | ||
|
|
023f4e9f46 | ||
|
|
f9d415eda6 | ||
|
|
284e828cd6 | ||
|
|
e3b5cc491d | ||
|
|
7fb2bf00c5 | ||
|
|
83bae89ed8 | ||
|
|
4353365968 | ||
|
|
9336e4b09b | ||
|
|
b5ef6c9316 | ||
|
|
81a5ae7780 | ||
|
|
eed4cb4f00 | ||
|
|
3a8d1c4b5e | ||
|
|
f253b1fb15 | ||
|
|
7b14975740 | ||
|
|
7525d9a1ce | ||
|
|
05a6d89151 | ||
|
|
f893709e5b | ||
|
|
bbcfde7231 | ||
|
|
6f96c225d7 | ||
|
|
b530427bb2 | ||
|
|
91fedd6a12 | ||
|
|
80f95528c2 | ||
|
|
d75d42da9d | ||
|
|
c65553bb8a | ||
|
|
4133f38c8c | ||
|
|
564de2790f | ||
|
|
cc0f28b698 | ||
|
|
e869f8091a | ||
|
|
450fb5e915 | ||
|
|
ce7092a638 | ||
|
|
8041c3aa1d | ||
|
|
0a446230f7 |
@@ -192,7 +192,7 @@ extra["versions.kotlinx-collections-immutable-jvm"] = immutablesVersion
|
||||
extra["versions.ktor-network"] = "1.0.1"
|
||||
|
||||
if (!project.hasProperty("versions.kotlin-native")) {
|
||||
extra["versions.kotlin-native"] = "1.5.20-dev-4865"
|
||||
extra["versions.kotlin-native"] = "1.5.20-dev-5613"
|
||||
}
|
||||
|
||||
val intellijUltimateEnabled by extra(project.kotlinBuildProperties.intellijUltimateEnabled)
|
||||
@@ -368,7 +368,8 @@ val gradlePluginProjects = listOf(
|
||||
":kotlin-annotation-processing-gradle",
|
||||
":kotlin-noarg",
|
||||
":kotlin-sam-with-receiver",
|
||||
":kotlin-parcelize-compiler"
|
||||
":kotlin-parcelize-compiler",
|
||||
":kotlin-lombok"
|
||||
)
|
||||
|
||||
apply {
|
||||
@@ -577,26 +578,6 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
if ((gradle.startParameter as? org.gradle.api.internal.StartParameterInternal)?.isConfigurationCache != true) {
|
||||
// TODO: remove it once Gradle is bumped to 6.8:
|
||||
// See https://docs.gradle.org/6.8/release-notes.html#more-cache-hits-when-empty-directories-are-present
|
||||
gradle.buildFinished {
|
||||
val taskGraph = gradle?.taskGraph
|
||||
if (taskGraph != null) {
|
||||
taskGraph.allTasks
|
||||
.filterIsInstance<SourceTask>()
|
||||
.filter { it.didWork }
|
||||
.forEach {
|
||||
it.source.visit {
|
||||
if (file.isDirectory && file.listFiles()?.isEmpty() == true) {
|
||||
logger.warn("Empty source directories may cause build cache misses: " + file.absolutePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gradle.taskGraph.whenReady {
|
||||
fun Boolean.toOnOff(): String = if (this) "on" else "off"
|
||||
val profile = if (isTeamcityBuild) "CI" else "Local"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
package plugins
|
||||
|
||||
import PublishToMavenLocalSerializable
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.attributes.Usage
|
||||
@@ -13,10 +14,10 @@ import org.gradle.api.plugins.JavaBasePlugin
|
||||
import org.gradle.api.publish.PublishingExtension
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
|
||||
import org.gradle.api.publish.maven.tasks.PublishToMavenLocal
|
||||
import org.gradle.api.publish.maven.tasks.PublishToMavenRepository
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import org.gradle.plugins.signing.Sign
|
||||
import org.gradle.plugins.signing.SigningExtension
|
||||
import org.gradle.plugins.signing.SigningPlugin
|
||||
import java.util.*
|
||||
@@ -27,7 +28,6 @@ class KotlinBuildPublishingPlugin @Inject constructor(
|
||||
) : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
apply<MavenPublishPlugin>()
|
||||
apply<SigningPlugin>()
|
||||
|
||||
val publishedRuntime = configurations.maybeCreate(RUNTIME_CONFIGURATION).apply {
|
||||
isCanBeConsumed = false
|
||||
@@ -132,32 +132,40 @@ fun Project.configureDefaultPublishing() {
|
||||
}
|
||||
}
|
||||
|
||||
configureSigning()
|
||||
val signingRequired = project.providers.gradleProperty("signingRequired").forUseAtConfigurationTime().orNull?.toBoolean()
|
||||
?: project.providers.gradleProperty("isSonatypeRelease").forUseAtConfigurationTime().orNull?.toBoolean() ?: false
|
||||
|
||||
if (signingRequired) {
|
||||
apply<SigningPlugin>()
|
||||
configureSigning()
|
||||
}
|
||||
|
||||
tasks.register("install") {
|
||||
dependsOn(tasks.named("publishToMavenLocal"))
|
||||
}
|
||||
|
||||
// workaround for Gradle configuration cache
|
||||
// TODO: remove it when https://github.com/gradle/gradle/pull/16945 merged into used in build Gradle version
|
||||
tasks.withType(PublishToMavenLocal::class.java) {
|
||||
val originalTask = this
|
||||
val serializablePublishTask =
|
||||
tasks.register(originalTask.name + "Serializable", PublishToMavenLocalSerializable::class.java) {
|
||||
publication = originalTask.publication
|
||||
}
|
||||
originalTask.onlyIf { false }
|
||||
originalTask.dependsOn(serializablePublishTask)
|
||||
}
|
||||
|
||||
tasks.withType<PublishToMavenRepository>()
|
||||
.matching { it.name.endsWith("PublicationTo${KotlinBuildPublishingPlugin.REPOSITORY_NAME}Repository") }
|
||||
.all { configureRepository() }
|
||||
}
|
||||
|
||||
private fun Project.configureSigning() {
|
||||
val signingRequired = provider {
|
||||
project.findProperty("signingRequired")?.toString()?.toBoolean()
|
||||
?: project.property("isSonatypeRelease") as Boolean
|
||||
}
|
||||
|
||||
configure<SigningExtension> {
|
||||
setRequired(signingRequired)
|
||||
sign(extensions.getByType<PublishingExtension>().publications) // all publications
|
||||
useGpgCmd()
|
||||
}
|
||||
|
||||
tasks.withType<Sign>().configureEach {
|
||||
setOnlyIf { signingRequired.get() }
|
||||
}
|
||||
}
|
||||
|
||||
fun TaskProvider<PublishToMavenRepository>.configureRepository() =
|
||||
@@ -181,4 +189,4 @@ private fun PublishToMavenRepository.configureRepository() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,22 @@
|
||||
// usages in build scripts are not tracked properly
|
||||
@file:Suppress("unused")
|
||||
|
||||
import org.gradle.api.InvalidUserDataException
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.artifacts.ProjectDependency
|
||||
import org.gradle.api.file.FileSystemOperations
|
||||
import org.gradle.api.internal.tasks.testing.filter.DefaultTestFilter
|
||||
import org.gradle.api.publish.internal.PublishOperation
|
||||
import org.gradle.api.publish.maven.internal.publication.MavenPublicationInternal
|
||||
import org.gradle.api.publish.maven.internal.publisher.MavenNormalizedPublication
|
||||
import org.gradle.api.publish.maven.internal.publisher.MavenPublisher
|
||||
import org.gradle.api.publish.maven.internal.publisher.ValidatingMavenPublisher
|
||||
import org.gradle.api.publish.maven.tasks.AbstractPublishToMaven
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.internal.serialization.Cached
|
||||
import org.gradle.kotlin.dsl.extra
|
||||
import org.gradle.kotlin.dsl.project
|
||||
import org.gradle.kotlin.dsl.support.serviceOf
|
||||
@@ -38,6 +47,7 @@ val kotlinGradlePluginAndItsRequired = arrayOf(
|
||||
":kotlin-compiler-runner",
|
||||
":kotlin-daemon-embeddable",
|
||||
":kotlin-daemon-client",
|
||||
":kotlin-project-model",
|
||||
":kotlin-gradle-plugin-api",
|
||||
":kotlin-gradle-plugin",
|
||||
":kotlin-gradle-plugin-model",
|
||||
@@ -279,3 +289,30 @@ fun Task.useAndroidSdk() {
|
||||
fun Task.useAndroidJar() {
|
||||
TaskUtils.useAndroidJar(this)
|
||||
}
|
||||
|
||||
// Workaround to make PublishToMavenLocal compatible with Gradle configuration cache
|
||||
// TODO: remove it when https://github.com/gradle/gradle/pull/16945 merged into used in build Gradle version
|
||||
abstract class PublishToMavenLocalSerializable : AbstractPublishToMaven() {
|
||||
private val normalizedPublication = Cached.of { this.computeNormalizedPublication() }
|
||||
|
||||
private fun computeNormalizedPublication(): MavenNormalizedPublication {
|
||||
val publicationInternal: MavenPublicationInternal = publicationInternal
|
||||
?: throw InvalidUserDataException("The 'publication' property is required")
|
||||
duplicatePublicationTracker.checkCanPublishToMavenLocal(publicationInternal)
|
||||
return publicationInternal.asNormalisedPublication()
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
open fun publish() {
|
||||
val normalizedPublication = normalizedPublication.get()
|
||||
object : PublishOperation(normalizedPublication.name, "mavenLocal") {
|
||||
override fun publish() {
|
||||
val localPublisher = mavenPublishers.getLocalPublisher(
|
||||
temporaryDirFactory
|
||||
)
|
||||
val validatingPublisher: MavenPublisher = ValidatingMavenPublisher(localPublisher)
|
||||
validatingPublisher.publish(normalizedPublication, null)
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
}
|
||||
@@ -87,4 +87,4 @@ open class SamTypeFactory {
|
||||
companion object {
|
||||
val INSTANCE = SamTypeFactory()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,14 @@ public class ClosureCodegen extends MemberCodegen<KtElement> {
|
||||
for (int i = 0; i < superInterfaceTypes.size(); i++) {
|
||||
KotlinType superInterfaceType = superInterfaceTypes.get(i);
|
||||
sw.writeInterface();
|
||||
superInterfaceAsmTypes[i] = typeMapper.mapSupertype(superInterfaceType, sw).getInternalName();
|
||||
Type superInterfaceAsmType;
|
||||
if (samType != null && superInterfaceType.getConstructor() == samType.getType().getConstructor()) {
|
||||
superInterfaceAsmType = typeMapper.mapSupertype(superInterfaceType, null);
|
||||
sw.writeAsmType(superInterfaceAsmType);
|
||||
} else {
|
||||
superInterfaceAsmType = typeMapper.mapSupertype(superInterfaceType, sw);
|
||||
}
|
||||
superInterfaceAsmTypes[i] = superInterfaceAsmType.getInternalName();
|
||||
sw.writeInterfaceEnd();
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt
|
||||
|
||||
override fun transform(internalClassName: String, node: MethodNode) {
|
||||
val interpreter = RedundantBoxingInterpreter(node.instructions, generationState)
|
||||
val frames = MethodTransformer.analyze(internalClassName, node, interpreter)
|
||||
val frames = analyze(internalClassName, node, interpreter)
|
||||
|
||||
interpretPopInstructionsForBoxedValues(interpreter, node, frames)
|
||||
|
||||
@@ -168,7 +168,8 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt
|
||||
val frame = frames[i] ?: continue
|
||||
val insn = insnList[i]
|
||||
if ((insn.opcode == Opcodes.ASTORE || insn.opcode == Opcodes.ALOAD) &&
|
||||
(insn as VarInsnNode).`var` == localVariableNode.index) {
|
||||
(insn as VarInsnNode).`var` == localVariableNode.index
|
||||
) {
|
||||
if (insn.getOpcode() == Opcodes.ASTORE) {
|
||||
values.add(frame.top()!!)
|
||||
} else {
|
||||
|
||||
@@ -87,11 +87,6 @@ fun CallableMemberDescriptor.createTypeParameterWithNewName(
|
||||
return newDescriptor
|
||||
}
|
||||
|
||||
fun KotlinType.removeExternalProjections(): KotlinType {
|
||||
val newArguments = arguments.map { TypeProjectionImpl(Variance.INVARIANT, it.type) }
|
||||
return replace(newArguments)
|
||||
}
|
||||
|
||||
fun isInlineClassConstructorAccessor(descriptor: FunctionDescriptor): Boolean =
|
||||
descriptor is AccessorForConstructorDescriptor &&
|
||||
descriptor.calleeDescriptor.constructedClass.isInlineClass()
|
||||
|
||||
@@ -33,13 +33,11 @@ import com.intellij.openapi.diagnostic.Logger
|
||||
import com.intellij.openapi.extensions.ExtensionsArea
|
||||
import com.intellij.openapi.fileTypes.PlainTextFileType
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.roots.LanguageLevelProjectExtension
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.util.io.FileUtilRt
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.openapi.vfs.*
|
||||
import com.intellij.openapi.vfs.impl.ZipHandler
|
||||
import com.intellij.pom.java.LanguageLevel
|
||||
import com.intellij.psi.PsiElementFinder
|
||||
import com.intellij.psi.PsiManager
|
||||
import com.intellij.psi.impl.JavaClassSupersImpl
|
||||
@@ -94,6 +92,7 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer
|
||||
import org.jetbrains.kotlin.resolve.ModuleAnnotationsResolver
|
||||
import org.jetbrains.kotlin.resolve.extensions.ExtraImportsProviderExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.SyntheticJavaResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension
|
||||
@@ -577,6 +576,7 @@ class KotlinCoreEnvironment private constructor(
|
||||
fun registerPluginExtensionPoints(project: MockProject) {
|
||||
ExpressionCodegenExtension.registerExtensionPoint(project)
|
||||
SyntheticResolveExtension.registerExtensionPoint(project)
|
||||
SyntheticJavaResolveExtension.registerExtensionPoint(project)
|
||||
ClassBuilderInterceptorExtension.registerExtensionPoint(project)
|
||||
AnalysisHandlerExtension.registerExtensionPoint(project)
|
||||
PackageFragmentProviderExtension.registerExtensionPoint(project)
|
||||
|
||||
@@ -96,6 +96,7 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer
|
||||
import org.jetbrains.kotlin.resolve.ModuleAnnotationsResolver
|
||||
import org.jetbrains.kotlin.resolve.extensions.ExtraImportsProviderExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.SyntheticJavaResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension
|
||||
@@ -569,6 +570,7 @@ class KotlinCoreEnvironment private constructor(
|
||||
fun registerPluginExtensionPoints(project: MockProject) {
|
||||
ExpressionCodegenExtension.registerExtensionPoint(project)
|
||||
SyntheticResolveExtension.registerExtensionPoint(project)
|
||||
SyntheticJavaResolveExtension.registerExtensionPoint(project)
|
||||
ClassBuilderInterceptorExtension.registerExtensionPoint(project)
|
||||
AnalysisHandlerExtension.registerExtensionPoint(project)
|
||||
PackageFragmentProviderExtension.registerExtensionPoint(project)
|
||||
|
||||
@@ -37,8 +37,7 @@ import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
|
||||
import org.jetbrains.kotlin.cli.common.checkKotlinPackageUsage
|
||||
import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoot
|
||||
import org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.OUTPUT
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.WARNING
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.*
|
||||
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
|
||||
import org.jetbrains.kotlin.cli.common.messages.OutputMessageUtil
|
||||
import org.jetbrains.kotlin.cli.common.output.writeAll
|
||||
@@ -305,6 +304,11 @@ object KotlinToJVMBytecodeCompiler {
|
||||
val project = environment.project
|
||||
val performanceManager = environment.configuration.get(CLIConfigurationKeys.PERF_MANAGER)
|
||||
|
||||
environment.messageCollector.report(
|
||||
STRONG_WARNING,
|
||||
"ATTENTION!\n This build uses in-dev FIR: \n -Xuse-fir"
|
||||
)
|
||||
|
||||
PsiElementFinder.EP.getPoint(project).unregisterExtension(JavaElementFinder::class.java)
|
||||
|
||||
val projectConfiguration = environment.configuration
|
||||
|
||||
@@ -367,8 +367,14 @@ object KotlinCompilerClient {
|
||||
}
|
||||
|
||||
|
||||
private fun startDaemon(compilerId: CompilerId, daemonJVMOptions: DaemonJVMOptions, daemonOptions: DaemonOptions, reportingTargets: DaemonReportingTargets): Boolean {
|
||||
val javaExecutable = File(File(CompilerSystemProperties.JAVA_HOME.safeValue, "bin"), "java")
|
||||
private fun startDaemon(
|
||||
compilerId: CompilerId,
|
||||
daemonJVMOptions: DaemonJVMOptions,
|
||||
daemonOptions: DaemonOptions,
|
||||
reportingTargets: DaemonReportingTargets
|
||||
): Boolean {
|
||||
val daemonJavaExecutable = compilerId.javaExecutable
|
||||
?: File(File(CompilerSystemProperties.JAVA_HOME.safeValue, "bin"), "java")
|
||||
val serverHostname = CompilerSystemProperties.JAVA_RMI_SERVER_HOSTNAME.value ?: error("${CompilerSystemProperties.JAVA_RMI_SERVER_HOSTNAME.property} is not set!")
|
||||
val platformSpecificOptions = listOf(
|
||||
// hide daemon window
|
||||
@@ -380,7 +386,7 @@ object KotlinCompilerClient {
|
||||
listOf("--illegal-access=permit")
|
||||
else emptyList()
|
||||
val args = listOf(
|
||||
javaExecutable.absolutePath, "-cp", compilerId.compilerClasspath.joinToString(File.pathSeparator)) +
|
||||
daemonJavaExecutable.absolutePath, "-cp", compilerId.compilerClasspath.joinToString(File.pathSeparator)) +
|
||||
platformSpecificOptions +
|
||||
daemonJVMOptions.mappers.flatMap { it.toArgs("-") } +
|
||||
javaIllegalAccessWorkaround +
|
||||
|
||||
@@ -49,7 +49,7 @@ suspend fun walkDaemonsAsync(
|
||||
useRMI: Boolean = true,
|
||||
useSockets: Boolean = true
|
||||
): List<DaemonWithMetadataAsync> { // TODO: replace with Deferred<List<DaemonWithMetadataAsync>> and use mapNotNullAsync to speed this up
|
||||
val classPathDigest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString()
|
||||
val classPathDigest = compilerId.digest()
|
||||
val portExtractor = makePortFromRunFilenameExtractor(classPathDigest)
|
||||
return registryDir.walk().toList() // list, since walk returns Sequence and Sequence.map{...} is not inline => coroutines dont work
|
||||
.map { Pair(it, portExtractor(it.name)) }
|
||||
|
||||
@@ -217,7 +217,7 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio
|
||||
runFileDir,
|
||||
makeRunFilenameString(
|
||||
timestamp = "%tFT%<tH-%<tM-%<tS.%<tLZ".format(Calendar.getInstance(TimeZone.getTimeZone("Z"))),
|
||||
digest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString(),
|
||||
digest = compilerId.digest(),
|
||||
port = port.toString()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -55,7 +55,7 @@ fun walkDaemons(registryDir: File,
|
||||
filter: (File, Int) -> Boolean = { _, _ -> true },
|
||||
report: (DaemonReportCategory, String) -> Unit = { _, _ -> }
|
||||
): Sequence<DaemonWithMetadata> {
|
||||
val classPathDigest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString()
|
||||
val classPathDigest = compilerId.digest()
|
||||
val portExtractor = makePortFromRunFilenameExtractor(classPathDigest)
|
||||
return registryDir.walk()
|
||||
.map { Pair(it, portExtractor(it.name)) }
|
||||
|
||||
@@ -231,12 +231,38 @@ fun ByteArray.toHexString(): String = joinToString("", transform = { "%02x".form
|
||||
|
||||
data class CompilerId(
|
||||
var compilerClasspath: List<String> = listOf(),
|
||||
var compilerVersion: String = ""
|
||||
var compilerVersion: String = "",
|
||||
var javaExecutable: File? = null
|
||||
) : OptionsGroup {
|
||||
|
||||
override val mappers: List<PropMapper<*, *, *>>
|
||||
get() = listOf(PropMapper(this, CompilerId::compilerClasspath, toString = { it.joinToString(File.pathSeparator) }, fromString = { it.trimQuotes().split(File.pathSeparator) }),
|
||||
StringPropMapper(this, CompilerId::compilerVersion))
|
||||
get() = listOf(
|
||||
PropMapper(
|
||||
dest = this,
|
||||
prop = CompilerId::compilerClasspath,
|
||||
toString = { it.joinToString(File.pathSeparator) },
|
||||
fromString = { it.trimQuotes().split(File.pathSeparator) }
|
||||
),
|
||||
StringPropMapper(
|
||||
dest = this,
|
||||
prop = CompilerId::compilerVersion
|
||||
),
|
||||
PropMapper(
|
||||
dest = this,
|
||||
prop = CompilerId::javaExecutable,
|
||||
toString = { it?.absolutePath },
|
||||
fromString = { File(it.trimQuotes()) },
|
||||
skipIf = { it == null }
|
||||
)
|
||||
)
|
||||
|
||||
fun digest(): String = compilerClasspath
|
||||
.map { File(it).absolutePath }
|
||||
.run {
|
||||
javaExecutable?.let { plus(it.absolutePath) } ?: this
|
||||
}
|
||||
.distinctStringsDigest()
|
||||
.toHexString()
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
@@ -245,6 +271,15 @@ data class CompilerId(
|
||||
@JvmStatic
|
||||
fun makeCompilerId(paths: Iterable<File>): CompilerId =
|
||||
CompilerId(compilerClasspath = paths.map { it.absolutePath })
|
||||
|
||||
@JvmStatic
|
||||
fun makeCompilerId(
|
||||
paths: Iterable<File>,
|
||||
javaExecutable: File
|
||||
): CompilerId = CompilerId(
|
||||
compilerClasspath = paths.map { it.absolutePath },
|
||||
javaExecutable = javaExecutable
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.daemon
|
||||
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.util.io.FileUtilRt
|
||||
import junit.framework.TestCase
|
||||
@@ -277,6 +278,129 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun getJdk8Location() = System.getenv("JDK_18") ?: System.getenv("JAVA_HOME")
|
||||
|
||||
fun testNewDaemonIsNotStartedForSameJavaExecutable() {
|
||||
withFlagFile(getTestName(true), "-client1.alive") { flagFile1 ->
|
||||
withFlagFile(getTestName(true), "-client2.alive") { flagFile2 ->
|
||||
val daemonOptions = makeTestDaemonOptions(getTestName(true))
|
||||
val compilerIdJdk8 = CompilerId.makeCompilerId(
|
||||
compilerClassPath +
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler-sources.jar"),
|
||||
File(getJdk8Location()).resolve("bin/java")
|
||||
)
|
||||
|
||||
withLogFile("kotlin-daemon-test-1") { logFile ->
|
||||
val daemonJVMOptions = makeTestDaemonJvmOptions(logFile)
|
||||
assertTrue(logFile.length() == 0L)
|
||||
|
||||
val daemon1 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk8,
|
||||
flagFile1,
|
||||
daemonJVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemon1)
|
||||
logFile.assertLogContainsSequence("INFO: starting daemon")
|
||||
|
||||
|
||||
val daemon2 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk8,
|
||||
flagFile2,
|
||||
daemonJVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemon2)
|
||||
|
||||
val logContent = logFile.readText().lines()
|
||||
assert(
|
||||
logContent.filter { it.contains("INFO: starting daemon") }.size == 1
|
||||
) {
|
||||
"Second daemon instance was started!"
|
||||
}
|
||||
assert(
|
||||
logContent.filter {
|
||||
it.contains("INFO: Registered a client alive file: ${flagFile2.absolutePath}")
|
||||
}.size == 1
|
||||
) {
|
||||
"Second client was not connected to the same instance!"
|
||||
}
|
||||
|
||||
KotlinCompilerClient.shutdownCompileService(compilerIdJdk8, daemonOptions)
|
||||
|
||||
Thread.sleep(100)
|
||||
|
||||
logFile.assertLogContainsSequence("Shutdown started")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ignored on Windows OS due to https://bugs.openjdk.java.net/browse/JDK-8189953 bug in JDK 9
|
||||
// Should be unignored once JDK10+ will be available by default on CI agents
|
||||
fun testNewDaemonIsStartedOnJavaExecutableChange() {
|
||||
if (SystemInfo.isWindows) return
|
||||
|
||||
withFlagFile(getTestName(true), "-client1.alive") { flagFile1 ->
|
||||
withFlagFile(getTestName(true), "-client2.alive") { flagFile2 ->
|
||||
val daemonOptions = makeTestDaemonOptions(getTestName(true))
|
||||
val compilerIdJdk8 = CompilerId.makeCompilerId(
|
||||
compilerClassPath +
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler-sources.jar"),
|
||||
File(getJdk8Location()).resolve("bin/java")
|
||||
)
|
||||
val compilerIdJdk9 = CompilerId.makeCompilerId(
|
||||
compilerClassPath +
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler-sources.jar"),
|
||||
File(System.getenv("JDK_9")).resolve("bin/java")
|
||||
)
|
||||
|
||||
withLogFile("kotlin-daemon-test-1") { logFile1 ->
|
||||
withLogFile("kotlin-daemon-test-2") { logFile2 ->
|
||||
val daemonJdk8JVMOptions = makeTestDaemonJvmOptions(logFile1)
|
||||
assertTrue(logFile1.length() == 0L)
|
||||
val daemonJdk9JVMOptions = makeTestDaemonJvmOptions(logFile2)
|
||||
assertTrue(logFile2.length() == 0L)
|
||||
|
||||
val daemonJdk7 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk8,
|
||||
flagFile1,
|
||||
daemonJdk8JVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemonJdk7)
|
||||
logFile1.assertLogContainsSequence("INFO: starting daemon")
|
||||
|
||||
val daemonJdk9 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk9,
|
||||
flagFile2,
|
||||
daemonJdk9JVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemonJdk9)
|
||||
logFile2.assertLogContainsSequence("INFO: starting daemon")
|
||||
|
||||
KotlinCompilerClient.shutdownCompileService(compilerIdJdk8, daemonOptions)
|
||||
KotlinCompilerClient.shutdownCompileService(compilerIdJdk9, daemonOptions)
|
||||
|
||||
Thread.sleep(100)
|
||||
|
||||
logFile1.assertLogContainsSequence("Shutdown started")
|
||||
logFile2.assertLogContainsSequence("Shutdown started")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun testDaemonRunError() {
|
||||
withFlagFile(getTestName(true), ".alive") { flagFile ->
|
||||
val daemonOptions = DaemonOptions(shutdownDelayMilliseconds = 1, verbose = true, runFilesPath = File(testTempDir, getTestName(true)).absolutePath)
|
||||
|
||||
@@ -243,7 +243,7 @@ abstract class CompileServiceImplBase(
|
||||
runFileDir,
|
||||
makeRunFilenameString(
|
||||
timestamp = "%tFT%<tH-%<tM-%<tS.%<tLZ".format(Calendar.getInstance(TimeZone.getTimeZone("Z"))),
|
||||
digest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString(),
|
||||
digest = compilerId.digest(),
|
||||
port = port.toString()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -29,6 +29,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationUsedAsAnnotationArgument.kt")
|
||||
public void testAnnotationUsedAsAnnotationArgument() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asImports.kt")
|
||||
public void testAsImports() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/asImports.kt");
|
||||
@@ -174,6 +179,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/ft.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceDeclaration.kt")
|
||||
public void testFunInterfaceDeclaration() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/funInterfaceDeclaration.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("functionTypeAlias.kt")
|
||||
public void testFunctionTypeAlias() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/functionTypeAlias.kt");
|
||||
@@ -980,6 +990,24 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/fir/analysis-tests/testData/resolve/contracts")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Contracts extends AbstractLazyBodyIsNotTouchedTilContractsPhaseTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInContracts() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/contracts"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("genericContract.kt")
|
||||
public void testGenericContract() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/fir/analysis-tests/testData/resolve/delegates")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -2827,11 +2855,21 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/integerLiteralInLhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("leakedImplicitType.kt")
|
||||
public void testLeakedImplicitType() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/leakedImplicitType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("referenceToExtension.kt")
|
||||
public void testReferenceToExtension() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/referenceToExtension.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("referenceToField.kt")
|
||||
public void testReferenceToField() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/referenceToField.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/simple.kt");
|
||||
|
||||
27
compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.fir.txt
vendored
Normal file
27
compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.fir.txt
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
FILE: annotationUsedAsAnnotationArgument.kt
|
||||
public final annotation class Ann : R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final annotation class Ann2 : R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann2| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final annotation class Ann3 : R|kotlin/Annotation| {
|
||||
public constructor(arg: R|kotlin/Int|, s: R|kotlin/String|): R|Ann3| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val arg: R|kotlin/Int| = R|<local>/arg|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public final val s: R|kotlin/String| = R|<local>/s|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
@R|Ann3|(@R|Ann3|(@R|Ann|() Int(5), String()) @R|Ann2|() Int(1), String()) public final val a: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
11
compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.kt
vendored
Normal file
11
compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.kt
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
annotation class Ann
|
||||
|
||||
annotation class Ann2
|
||||
|
||||
annotation class Ann3(val arg: Int, val s: String)
|
||||
|
||||
@Ann3(
|
||||
<!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann3(
|
||||
<!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann<!> 5, ""
|
||||
)<!> <!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann2<!> 1, ""
|
||||
) val a = 0
|
||||
@@ -15,5 +15,5 @@ class B : A() {
|
||||
}
|
||||
|
||||
fun test(b: B) {
|
||||
b.<!HIDDEN!>foo<!>("")
|
||||
b.<!INVISIBLE_REFERENCE!>foo<!>("")
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@ FILE: stringTemplates.kt
|
||||
public final fun foo(s: R|kotlin/String|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test(a: R|A|): R|kotlin/Unit| {
|
||||
R|/foo|(<strcat>(R|<local>/a|.R|kotlin/Any.toString|()))
|
||||
R|/foo|(<strcat>(R|<local>/a|))
|
||||
}
|
||||
|
||||
@@ -191,63 +191,68 @@ digraph complex_kt {
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
56 [label="Enter block"];
|
||||
57 [label="Access variable this@R|/firstIsInstanceOrNull|"];
|
||||
58 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()"];
|
||||
59 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
60 [label="Enter while loop"];
|
||||
57 [label="Enter block"];
|
||||
58 [label="Access variable this@R|/firstIsInstanceOrNull|"];
|
||||
59 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()"];
|
||||
60 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
61 [label="Enter loop condition"];
|
||||
62 [label="Access variable R|<local>/<iterator>|"];
|
||||
63 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
64 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
65 [label="Enter loop block"];
|
||||
61 [label="Enter while loop"];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
62 [label="Enter loop condition"];
|
||||
63 [label="Access variable R|<local>/<iterator>|"];
|
||||
64 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
65 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
66 [label="Enter block"];
|
||||
67 [label="Access variable R|<local>/<iterator>|"];
|
||||
68 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
|
||||
69 [label="Variable declaration: lval element: R|kotlin/Any?|"];
|
||||
66 [label="Enter loop block"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
70 [label="Enter when"];
|
||||
67 [label="Enter block"];
|
||||
68 [label="Access variable R|<local>/<iterator>|"];
|
||||
69 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
|
||||
70 [label="Variable declaration: lval element: R|kotlin/Any?|"];
|
||||
subgraph cluster_25 {
|
||||
color=blue
|
||||
71 [label="Enter when branch condition "];
|
||||
72 [label="Access variable R|<local>/element|"];
|
||||
73 [label="Type operator: (R|<local>/element| is R|T|)"];
|
||||
74 [label="Exit when branch condition"];
|
||||
71 [label="Enter when"];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
72 [label="Enter when branch condition "];
|
||||
73 [label="Access variable R|<local>/element|"];
|
||||
74 [label="Type operator: (R|<local>/element| is R|T|)"];
|
||||
75 [label="Exit when branch condition"];
|
||||
}
|
||||
76 [label="Synthetic else branch"];
|
||||
77 [label="Enter when branch result"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
78 [label="Enter block"];
|
||||
79 [label="Access variable R|<local>/element|"];
|
||||
80 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
|
||||
81 [label="Stub" style="filled" fillcolor=gray];
|
||||
82 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
83 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
84 [label="Exit when"];
|
||||
}
|
||||
75 [label="Synthetic else branch"];
|
||||
76 [label="Enter when branch result"];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
77 [label="Enter block"];
|
||||
78 [label="Access variable R|<local>/element|"];
|
||||
79 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
|
||||
80 [label="Stub" style="filled" fillcolor=gray];
|
||||
81 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
82 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
83 [label="Exit when"];
|
||||
85 [label="Exit block"];
|
||||
}
|
||||
84 [label="Exit block"];
|
||||
86 [label="Exit loop block"];
|
||||
}
|
||||
85 [label="Exit loop block"];
|
||||
87 [label="Exit whileloop"];
|
||||
}
|
||||
86 [label="Exit whileloop"];
|
||||
88 [label="Exit block"];
|
||||
}
|
||||
87 [label="Const: Null(null)"];
|
||||
88 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
|
||||
89 [label="Stub" style="filled" fillcolor=gray];
|
||||
90 [label="Exit block" style="filled" fillcolor=gray];
|
||||
89 [label="Const: Null(null)"];
|
||||
90 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
|
||||
91 [label="Stub" style="filled" fillcolor=gray];
|
||||
92 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
91 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
|
||||
93 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
|
||||
}
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
@@ -258,8 +263,8 @@ digraph complex_kt {
|
||||
61 -> {62};
|
||||
62 -> {63};
|
||||
63 -> {64};
|
||||
64 -> {86 65};
|
||||
65 -> {66};
|
||||
64 -> {65};
|
||||
65 -> {87 66};
|
||||
66 -> {67};
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
@@ -268,24 +273,26 @@ digraph complex_kt {
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
73 -> {74};
|
||||
74 -> {76 75};
|
||||
75 -> {83};
|
||||
76 -> {77};
|
||||
74 -> {75};
|
||||
75 -> {77 76};
|
||||
76 -> {84};
|
||||
77 -> {78};
|
||||
78 -> {79};
|
||||
79 -> {91};
|
||||
79 -> {80} [style=dotted];
|
||||
79 -> {80};
|
||||
80 -> {93};
|
||||
80 -> {81} [style=dotted];
|
||||
81 -> {82} [style=dotted];
|
||||
82 -> {83} [style=dotted];
|
||||
83 -> {84};
|
||||
83 -> {84} [style=dotted];
|
||||
84 -> {85};
|
||||
85 -> {61} [color=green style=dashed];
|
||||
86 -> {87};
|
||||
85 -> {86};
|
||||
86 -> {62} [color=green style=dashed];
|
||||
87 -> {88};
|
||||
88 -> {91};
|
||||
88 -> {89} [style=dotted];
|
||||
89 -> {90} [style=dotted];
|
||||
88 -> {89};
|
||||
89 -> {90};
|
||||
90 -> {93};
|
||||
90 -> {91} [style=dotted];
|
||||
91 -> {92} [style=dotted];
|
||||
92 -> {93} [style=dotted];
|
||||
|
||||
}
|
||||
|
||||
@@ -25,13 +25,16 @@ FILE: complex.kt
|
||||
|
||||
}
|
||||
public final inline fun <reified T : R|kotlin/Any|> R|kotlin/collections/List<*>|.firstIsInstanceOrNull(): R|T?| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>| = this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval element: R|kotlin/Any?| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()
|
||||
when () {
|
||||
(R|<local>/element| is R|T|) -> {
|
||||
^firstIsInstanceOrNull R|<local>/element|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>| = this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval element: R|kotlin/Any?| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()
|
||||
when () {
|
||||
(R|<local>/element| is R|T|) -> {
|
||||
^firstIsInstanceOrNull R|<local>/element|
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ digraph jumps_kt {
|
||||
}
|
||||
51 [label="Variable declaration: lval y: R|kotlin/Int?|"];
|
||||
52 [label="Access variable R|<local>/y|"];
|
||||
53 [label="Function call: R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
53 [label="Function call: R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
54 [label="Exit block"];
|
||||
}
|
||||
55 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
|
||||
@@ -22,7 +22,7 @@ FILE: jumps.kt
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
}
|
||||
public final fun test_3(x: R|kotlin/Int?|): R|kotlin/Unit| {
|
||||
while(Boolean(true)) {
|
||||
|
||||
@@ -118,44 +118,49 @@ digraph loops_kt {
|
||||
subgraph cluster_13 {
|
||||
color=blue
|
||||
37 [label="Enter block"];
|
||||
38 [label="Const: Int(0)"];
|
||||
39 [label="Const: Int(5)"];
|
||||
40 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
|
||||
41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
|
||||
42 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
|
||||
subgraph cluster_14 {
|
||||
color=blue
|
||||
43 [label="Enter while loop"];
|
||||
38 [label="Enter block"];
|
||||
39 [label="Const: Int(0)"];
|
||||
40 [label="Const: Int(5)"];
|
||||
41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
|
||||
42 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
|
||||
43 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
|
||||
subgraph cluster_15 {
|
||||
color=blue
|
||||
44 [label="Enter loop condition"];
|
||||
45 [label="Access variable R|<local>/<iterator>|"];
|
||||
46 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
47 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
48 [label="Enter loop block"];
|
||||
44 [label="Enter while loop"];
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
45 [label="Enter loop condition"];
|
||||
46 [label="Access variable R|<local>/<iterator>|"];
|
||||
47 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
48 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_17 {
|
||||
color=blue
|
||||
49 [label="Enter block"];
|
||||
50 [label="Access variable R|<local>/<iterator>|"];
|
||||
51 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
|
||||
52 [label="Variable declaration: lval i: R|kotlin/Int|"];
|
||||
53 [label="Access variable R|<local>/x|"];
|
||||
54 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
55 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
|
||||
56 [label="Exit block"];
|
||||
49 [label="Enter loop block"];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
50 [label="Enter block"];
|
||||
51 [label="Access variable R|<local>/<iterator>|"];
|
||||
52 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
|
||||
53 [label="Variable declaration: lval i: R|kotlin/Int|"];
|
||||
54 [label="Access variable R|<local>/x|"];
|
||||
55 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
56 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
|
||||
57 [label="Exit block"];
|
||||
}
|
||||
58 [label="Exit loop block"];
|
||||
}
|
||||
57 [label="Exit loop block"];
|
||||
59 [label="Exit whileloop"];
|
||||
}
|
||||
58 [label="Exit whileloop"];
|
||||
60 [label="Exit block"];
|
||||
}
|
||||
59 [label="Access variable R|<local>/x|"];
|
||||
60 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
61 [label="Exit block"];
|
||||
61 [label="Access variable R|<local>/x|"];
|
||||
62 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
63 [label="Exit block"];
|
||||
}
|
||||
62 [label="Exit function testFor" style="filled" fillcolor=red];
|
||||
64 [label="Exit function testFor" style="filled" fillcolor=red];
|
||||
}
|
||||
36 -> {37};
|
||||
37 -> {38};
|
||||
@@ -168,8 +173,8 @@ digraph loops_kt {
|
||||
44 -> {45};
|
||||
45 -> {46};
|
||||
46 -> {47};
|
||||
47 -> {58 48};
|
||||
48 -> {49};
|
||||
47 -> {48};
|
||||
48 -> {59 49};
|
||||
49 -> {50};
|
||||
50 -> {51};
|
||||
51 -> {52};
|
||||
@@ -178,226 +183,226 @@ digraph loops_kt {
|
||||
54 -> {55};
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
57 -> {44} [color=green style=dashed];
|
||||
58 -> {59};
|
||||
57 -> {58};
|
||||
58 -> {45} [color=green style=dashed];
|
||||
59 -> {60};
|
||||
60 -> {61};
|
||||
61 -> {62};
|
||||
62 -> {63};
|
||||
63 -> {64};
|
||||
|
||||
subgraph cluster_18 {
|
||||
subgraph cluster_19 {
|
||||
color=red
|
||||
63 [label="Enter function testWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_19 {
|
||||
65 [label="Enter function testWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
64 [label="Enter block"];
|
||||
subgraph cluster_20 {
|
||||
66 [label="Enter block"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
65 [label="Enter while loop"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
66 [label="Enter loop condition"];
|
||||
67 [label="Const: Boolean(true)"];
|
||||
68 [label="Exit loop condition"];
|
||||
}
|
||||
67 [label="Enter while loop"];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
69 [label="Enter loop block"];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
70 [label="Enter block"];
|
||||
71 [label="Const: Int(1)"];
|
||||
72 [label="Exit block"];
|
||||
}
|
||||
73 [label="Exit loop block"];
|
||||
68 [label="Enter loop condition"];
|
||||
69 [label="Const: Boolean(true)"];
|
||||
70 [label="Exit loop condition"];
|
||||
}
|
||||
74 [label="Exit whileloop" style="filled" fillcolor=gray];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
71 [label="Enter loop block"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
72 [label="Enter block"];
|
||||
73 [label="Const: Int(1)"];
|
||||
74 [label="Exit block"];
|
||||
}
|
||||
75 [label="Exit loop block"];
|
||||
}
|
||||
76 [label="Exit whileloop" style="filled" fillcolor=gray];
|
||||
}
|
||||
75 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
76 [label="Exit block" style="filled" fillcolor=gray];
|
||||
77 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
78 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
77 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
79 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
}
|
||||
63 -> {64};
|
||||
64 -> {65};
|
||||
65 -> {66};
|
||||
66 -> {67};
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
68 -> {74} [style=dotted];
|
||||
69 -> {70};
|
||||
70 -> {71};
|
||||
70 -> {76} [style=dotted];
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
73 -> {66} [color=green style=dashed];
|
||||
74 -> {75} [style=dotted];
|
||||
75 -> {76} [style=dotted];
|
||||
73 -> {74};
|
||||
74 -> {75};
|
||||
75 -> {68} [color=green style=dashed];
|
||||
76 -> {77} [style=dotted];
|
||||
77 -> {78} [style=dotted];
|
||||
78 -> {79} [style=dotted];
|
||||
|
||||
subgraph cluster_24 {
|
||||
subgraph cluster_25 {
|
||||
color=red
|
||||
78 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_25 {
|
||||
80 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
79 [label="Enter block"];
|
||||
subgraph cluster_26 {
|
||||
81 [label="Enter block"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
80 [label="Enter while loop"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
81 [label="Enter loop condition"];
|
||||
82 [label="Const: Boolean(true)"];
|
||||
83 [label="Exit loop condition"];
|
||||
}
|
||||
82 [label="Enter while loop"];
|
||||
subgraph cluster_28 {
|
||||
color=blue
|
||||
84 [label="Enter loop block"];
|
||||
subgraph cluster_29 {
|
||||
83 [label="Enter loop condition"];
|
||||
84 [label="Const: Boolean(true)"];
|
||||
85 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_29 {
|
||||
color=blue
|
||||
86 [label="Enter loop block"];
|
||||
subgraph cluster_30 {
|
||||
color=blue
|
||||
85 [label="Enter block"];
|
||||
subgraph cluster_30 {
|
||||
87 [label="Enter block"];
|
||||
subgraph cluster_31 {
|
||||
color=blue
|
||||
86 [label="Enter when"];
|
||||
subgraph cluster_31 {
|
||||
color=blue
|
||||
87 [label="Enter when branch condition "];
|
||||
88 [label="Access variable R|<local>/b|"];
|
||||
89 [label="Exit when branch condition"];
|
||||
}
|
||||
90 [label="Synthetic else branch"];
|
||||
91 [label="Enter when branch result"];
|
||||
88 [label="Enter when"];
|
||||
subgraph cluster_32 {
|
||||
color=blue
|
||||
92 [label="Enter block"];
|
||||
93 [label="Jump: break@@@[Boolean(true)] "];
|
||||
94 [label="Stub" style="filled" fillcolor=gray];
|
||||
95 [label="Exit block" style="filled" fillcolor=gray];
|
||||
89 [label="Enter when branch condition "];
|
||||
90 [label="Access variable R|<local>/b|"];
|
||||
91 [label="Exit when branch condition"];
|
||||
}
|
||||
96 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
97 [label="Exit when"];
|
||||
92 [label="Synthetic else branch"];
|
||||
93 [label="Enter when branch result"];
|
||||
subgraph cluster_33 {
|
||||
color=blue
|
||||
94 [label="Enter block"];
|
||||
95 [label="Jump: break@@@[Boolean(true)] "];
|
||||
96 [label="Stub" style="filled" fillcolor=gray];
|
||||
97 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
98 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
99 [label="Exit when"];
|
||||
}
|
||||
98 [label="Exit block"];
|
||||
100 [label="Exit block"];
|
||||
}
|
||||
99 [label="Exit loop block"];
|
||||
101 [label="Exit loop block"];
|
||||
}
|
||||
100 [label="Exit whileloop"];
|
||||
102 [label="Exit whileloop"];
|
||||
}
|
||||
101 [label="Const: Int(1)"];
|
||||
102 [label="Exit block"];
|
||||
103 [label="Const: Int(1)"];
|
||||
104 [label="Exit block"];
|
||||
}
|
||||
103 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
105 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
}
|
||||
78 -> {79};
|
||||
79 -> {80};
|
||||
80 -> {81};
|
||||
81 -> {82};
|
||||
82 -> {83};
|
||||
83 -> {84};
|
||||
83 -> {100} [style=dotted];
|
||||
84 -> {85};
|
||||
85 -> {86};
|
||||
85 -> {102} [style=dotted];
|
||||
86 -> {87};
|
||||
87 -> {88};
|
||||
88 -> {89};
|
||||
89 -> {91 90};
|
||||
90 -> {97};
|
||||
91 -> {92};
|
||||
92 -> {93};
|
||||
93 -> {100};
|
||||
93 -> {94} [style=dotted];
|
||||
94 -> {95} [style=dotted];
|
||||
89 -> {90};
|
||||
90 -> {91};
|
||||
91 -> {93 92};
|
||||
92 -> {99};
|
||||
93 -> {94};
|
||||
94 -> {95};
|
||||
95 -> {102};
|
||||
95 -> {96} [style=dotted];
|
||||
96 -> {97} [style=dotted];
|
||||
97 -> {98};
|
||||
98 -> {99};
|
||||
99 -> {81} [color=green style=dashed];
|
||||
97 -> {98} [style=dotted];
|
||||
98 -> {99} [style=dotted];
|
||||
99 -> {100};
|
||||
100 -> {101};
|
||||
101 -> {102};
|
||||
101 -> {83} [color=green style=dashed];
|
||||
102 -> {103};
|
||||
103 -> {104};
|
||||
104 -> {105};
|
||||
|
||||
subgraph cluster_33 {
|
||||
subgraph cluster_34 {
|
||||
color=red
|
||||
104 [label="Enter function testWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_34 {
|
||||
106 [label="Enter function testWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_35 {
|
||||
color=blue
|
||||
105 [label="Enter block"];
|
||||
subgraph cluster_35 {
|
||||
107 [label="Enter block"];
|
||||
subgraph cluster_36 {
|
||||
color=blue
|
||||
106 [label="Enter while loop"];
|
||||
subgraph cluster_36 {
|
||||
color=blue
|
||||
107 [label="Enter loop condition"];
|
||||
108 [label="Const: Boolean(false)"];
|
||||
109 [label="Exit loop condition"];
|
||||
}
|
||||
108 [label="Enter while loop"];
|
||||
subgraph cluster_37 {
|
||||
color=blue
|
||||
110 [label="Enter loop block" style="filled" fillcolor=gray];
|
||||
subgraph cluster_38 {
|
||||
color=blue
|
||||
111 [label="Enter block" style="filled" fillcolor=gray];
|
||||
112 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
113 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
114 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
109 [label="Enter loop condition"];
|
||||
110 [label="Const: Boolean(false)"];
|
||||
111 [label="Exit loop condition"];
|
||||
}
|
||||
115 [label="Exit whileloop"];
|
||||
subgraph cluster_38 {
|
||||
color=blue
|
||||
112 [label="Enter loop block" style="filled" fillcolor=gray];
|
||||
subgraph cluster_39 {
|
||||
color=blue
|
||||
113 [label="Enter block" style="filled" fillcolor=gray];
|
||||
114 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
115 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
116 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
}
|
||||
117 [label="Exit whileloop"];
|
||||
}
|
||||
116 [label="Const: Int(1)"];
|
||||
117 [label="Exit block"];
|
||||
118 [label="Const: Int(1)"];
|
||||
119 [label="Exit block"];
|
||||
}
|
||||
118 [label="Exit function testWhileFalse" style="filled" fillcolor=red];
|
||||
120 [label="Exit function testWhileFalse" style="filled" fillcolor=red];
|
||||
}
|
||||
104 -> {105};
|
||||
105 -> {106};
|
||||
106 -> {107};
|
||||
107 -> {108};
|
||||
108 -> {109};
|
||||
109 -> {115};
|
||||
109 -> {110} [style=dotted];
|
||||
110 -> {111} [style=dotted];
|
||||
109 -> {110};
|
||||
110 -> {111};
|
||||
111 -> {117};
|
||||
111 -> {112} [style=dotted];
|
||||
112 -> {113} [style=dotted];
|
||||
113 -> {114} [style=dotted];
|
||||
114 -> {107} [color=green style=dotted];
|
||||
115 -> {116};
|
||||
116 -> {117};
|
||||
114 -> {115} [style=dotted];
|
||||
115 -> {116} [style=dotted];
|
||||
116 -> {109} [color=green style=dotted];
|
||||
117 -> {118};
|
||||
|
||||
subgraph cluster_39 {
|
||||
color=red
|
||||
119 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_40 {
|
||||
color=blue
|
||||
120 [label="Enter block"];
|
||||
subgraph cluster_41 {
|
||||
color=blue
|
||||
121 [label="Enter do-while loop"];
|
||||
subgraph cluster_42 {
|
||||
color=blue
|
||||
122 [label="Enter loop block"];
|
||||
subgraph cluster_43 {
|
||||
color=blue
|
||||
123 [label="Enter block"];
|
||||
124 [label="Const: Int(1)"];
|
||||
125 [label="Exit block"];
|
||||
}
|
||||
126 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_44 {
|
||||
color=blue
|
||||
127 [label="Enter loop condition"];
|
||||
128 [label="Const: Boolean(true)"];
|
||||
129 [label="Exit loop condition"];
|
||||
}
|
||||
130 [label="Exit do-whileloop" style="filled" fillcolor=gray];
|
||||
}
|
||||
131 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
132 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
133 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
}
|
||||
118 -> {119};
|
||||
119 -> {120};
|
||||
120 -> {121};
|
||||
|
||||
subgraph cluster_40 {
|
||||
color=red
|
||||
121 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_41 {
|
||||
color=blue
|
||||
122 [label="Enter block"];
|
||||
subgraph cluster_42 {
|
||||
color=blue
|
||||
123 [label="Enter do-while loop"];
|
||||
subgraph cluster_43 {
|
||||
color=blue
|
||||
124 [label="Enter loop block"];
|
||||
subgraph cluster_44 {
|
||||
color=blue
|
||||
125 [label="Enter block"];
|
||||
126 [label="Const: Int(1)"];
|
||||
127 [label="Exit block"];
|
||||
}
|
||||
128 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_45 {
|
||||
color=blue
|
||||
129 [label="Enter loop condition"];
|
||||
130 [label="Const: Boolean(true)"];
|
||||
131 [label="Exit loop condition"];
|
||||
}
|
||||
132 [label="Exit do-whileloop" style="filled" fillcolor=gray];
|
||||
}
|
||||
133 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
134 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
135 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
}
|
||||
121 -> {122};
|
||||
122 -> {123};
|
||||
123 -> {124};
|
||||
@@ -406,128 +411,128 @@ digraph loops_kt {
|
||||
126 -> {127};
|
||||
127 -> {128};
|
||||
128 -> {129};
|
||||
129 -> {130} [style=dotted];
|
||||
129 -> {122} [color=green style=dashed];
|
||||
130 -> {131} [style=dotted];
|
||||
129 -> {130};
|
||||
130 -> {131};
|
||||
131 -> {132} [style=dotted];
|
||||
131 -> {124} [color=green style=dashed];
|
||||
132 -> {133} [style=dotted];
|
||||
133 -> {134} [style=dotted];
|
||||
134 -> {135} [style=dotted];
|
||||
|
||||
subgraph cluster_45 {
|
||||
subgraph cluster_46 {
|
||||
color=red
|
||||
134 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_46 {
|
||||
136 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_47 {
|
||||
color=blue
|
||||
135 [label="Enter block"];
|
||||
subgraph cluster_47 {
|
||||
137 [label="Enter block"];
|
||||
subgraph cluster_48 {
|
||||
color=blue
|
||||
136 [label="Enter do-while loop"];
|
||||
subgraph cluster_48 {
|
||||
138 [label="Enter do-while loop"];
|
||||
subgraph cluster_49 {
|
||||
color=blue
|
||||
137 [label="Enter loop block"];
|
||||
subgraph cluster_49 {
|
||||
139 [label="Enter loop block"];
|
||||
subgraph cluster_50 {
|
||||
color=blue
|
||||
138 [label="Enter block"];
|
||||
subgraph cluster_50 {
|
||||
140 [label="Enter block"];
|
||||
subgraph cluster_51 {
|
||||
color=blue
|
||||
139 [label="Enter when"];
|
||||
subgraph cluster_51 {
|
||||
color=blue
|
||||
140 [label="Enter when branch condition "];
|
||||
141 [label="Access variable R|<local>/b|"];
|
||||
142 [label="Exit when branch condition"];
|
||||
}
|
||||
143 [label="Synthetic else branch"];
|
||||
144 [label="Enter when branch result"];
|
||||
141 [label="Enter when"];
|
||||
subgraph cluster_52 {
|
||||
color=blue
|
||||
145 [label="Enter block"];
|
||||
146 [label="Jump: break@@@[Boolean(true)] "];
|
||||
147 [label="Stub" style="filled" fillcolor=gray];
|
||||
148 [label="Exit block" style="filled" fillcolor=gray];
|
||||
142 [label="Enter when branch condition "];
|
||||
143 [label="Access variable R|<local>/b|"];
|
||||
144 [label="Exit when branch condition"];
|
||||
}
|
||||
149 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
150 [label="Exit when"];
|
||||
145 [label="Synthetic else branch"];
|
||||
146 [label="Enter when branch result"];
|
||||
subgraph cluster_53 {
|
||||
color=blue
|
||||
147 [label="Enter block"];
|
||||
148 [label="Jump: break@@@[Boolean(true)] "];
|
||||
149 [label="Stub" style="filled" fillcolor=gray];
|
||||
150 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
151 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
152 [label="Exit when"];
|
||||
}
|
||||
151 [label="Exit block"];
|
||||
153 [label="Exit block"];
|
||||
}
|
||||
152 [label="Exit loop block"];
|
||||
154 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_53 {
|
||||
subgraph cluster_54 {
|
||||
color=blue
|
||||
153 [label="Enter loop condition"];
|
||||
154 [label="Const: Boolean(true)"];
|
||||
155 [label="Exit loop condition"];
|
||||
155 [label="Enter loop condition"];
|
||||
156 [label="Const: Boolean(true)"];
|
||||
157 [label="Exit loop condition"];
|
||||
}
|
||||
156 [label="Exit do-whileloop"];
|
||||
158 [label="Exit do-whileloop"];
|
||||
}
|
||||
157 [label="Const: Int(1)"];
|
||||
158 [label="Exit block"];
|
||||
159 [label="Const: Int(1)"];
|
||||
160 [label="Exit block"];
|
||||
}
|
||||
159 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
161 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
}
|
||||
134 -> {135};
|
||||
135 -> {136};
|
||||
136 -> {137};
|
||||
137 -> {138};
|
||||
138 -> {139};
|
||||
139 -> {140};
|
||||
140 -> {141};
|
||||
141 -> {142};
|
||||
142 -> {144 143};
|
||||
143 -> {150};
|
||||
144 -> {145};
|
||||
145 -> {146};
|
||||
146 -> {156};
|
||||
146 -> {147} [style=dotted];
|
||||
147 -> {148} [style=dotted];
|
||||
142 -> {143};
|
||||
143 -> {144};
|
||||
144 -> {146 145};
|
||||
145 -> {152};
|
||||
146 -> {147};
|
||||
147 -> {148};
|
||||
148 -> {158};
|
||||
148 -> {149} [style=dotted];
|
||||
149 -> {150} [style=dotted];
|
||||
150 -> {151};
|
||||
151 -> {152};
|
||||
150 -> {151} [style=dotted];
|
||||
151 -> {152} [style=dotted];
|
||||
152 -> {153};
|
||||
153 -> {154};
|
||||
154 -> {155};
|
||||
155 -> {156} [style=dotted];
|
||||
155 -> {137} [color=green style=dashed];
|
||||
155 -> {156};
|
||||
156 -> {157};
|
||||
157 -> {158};
|
||||
157 -> {158} [style=dotted];
|
||||
157 -> {139} [color=green style=dashed];
|
||||
158 -> {159};
|
||||
|
||||
subgraph cluster_54 {
|
||||
color=red
|
||||
160 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_55 {
|
||||
color=blue
|
||||
161 [label="Enter block"];
|
||||
subgraph cluster_56 {
|
||||
color=blue
|
||||
162 [label="Enter do-while loop"];
|
||||
subgraph cluster_57 {
|
||||
color=blue
|
||||
163 [label="Enter loop block"];
|
||||
subgraph cluster_58 {
|
||||
color=blue
|
||||
164 [label="Enter block"];
|
||||
165 [label="Const: Int(1)"];
|
||||
166 [label="Exit block"];
|
||||
}
|
||||
167 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_59 {
|
||||
color=blue
|
||||
168 [label="Enter loop condition"];
|
||||
169 [label="Const: Boolean(false)"];
|
||||
170 [label="Exit loop condition"];
|
||||
}
|
||||
171 [label="Exit do-whileloop"];
|
||||
}
|
||||
172 [label="Const: Int(1)"];
|
||||
173 [label="Exit block"];
|
||||
}
|
||||
174 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
}
|
||||
159 -> {160};
|
||||
160 -> {161};
|
||||
161 -> {162};
|
||||
|
||||
subgraph cluster_55 {
|
||||
color=red
|
||||
162 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_56 {
|
||||
color=blue
|
||||
163 [label="Enter block"];
|
||||
subgraph cluster_57 {
|
||||
color=blue
|
||||
164 [label="Enter do-while loop"];
|
||||
subgraph cluster_58 {
|
||||
color=blue
|
||||
165 [label="Enter loop block"];
|
||||
subgraph cluster_59 {
|
||||
color=blue
|
||||
166 [label="Enter block"];
|
||||
167 [label="Const: Int(1)"];
|
||||
168 [label="Exit block"];
|
||||
}
|
||||
169 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_60 {
|
||||
color=blue
|
||||
170 [label="Enter loop condition"];
|
||||
171 [label="Const: Boolean(false)"];
|
||||
172 [label="Exit loop condition"];
|
||||
}
|
||||
173 [label="Exit do-whileloop"];
|
||||
}
|
||||
174 [label="Const: Int(1)"];
|
||||
175 [label="Exit block"];
|
||||
}
|
||||
176 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
}
|
||||
162 -> {163};
|
||||
163 -> {164};
|
||||
164 -> {165};
|
||||
@@ -537,9 +542,11 @@ digraph loops_kt {
|
||||
168 -> {169};
|
||||
169 -> {170};
|
||||
170 -> {171};
|
||||
170 -> {163} [color=green style=dotted];
|
||||
171 -> {172};
|
||||
172 -> {173};
|
||||
172 -> {165} [color=green style=dotted];
|
||||
173 -> {174};
|
||||
174 -> {175};
|
||||
175 -> {176};
|
||||
|
||||
}
|
||||
|
||||
@@ -14,10 +14,13 @@ FILE: loops.kt
|
||||
(R|<local>/x| is R|kotlin/String|)
|
||||
}
|
||||
public final fun testFor(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval y: R|kotlin/Boolean| = (R|<local>/x| is R|kotlin/String|)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval y: R|kotlin/Boolean| = (R|<local>/x| is R|kotlin/String|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
(R|<local>/x| is R|kotlin/String|)
|
||||
|
||||
@@ -11,7 +11,7 @@ FILE: const.kt
|
||||
public get(): R|kotlin/String|
|
||||
public final const val f: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(2)).R|kotlin/Int.times|(Int(3)).R|kotlin/Int.div|(Int(4)).R|kotlin/Int.rem|(Int(5)).R|kotlin/Int.minus|(Int(1))
|
||||
public get(): R|kotlin/Int|
|
||||
public final const val g: R|kotlin/String| = <strcat>(String(string ), R|/f|.R|kotlin/Any.toString|())
|
||||
public final const val g: R|kotlin/String| = <strcat>(String(string ), R|/f|)
|
||||
public get(): R|kotlin/String|
|
||||
public final const val h: R|kotlin/String| = String(string).R|kotlin/String.plus|(R|/g|)
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
35
compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.fir.txt
vendored
Normal file
35
compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.fir.txt
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
FILE: genericContract.kt
|
||||
public final inline fun <reified T> requreIsInstance(value: R|kotlin/Any|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> value is T
|
||||
>
|
||||
{
|
||||
when () {
|
||||
(R|<local>/value| !is R|T|) -> {
|
||||
throw R|java/lang/IllegalArgumentException.IllegalArgumentException|()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_1(s: R|kotlin/Any|): R|kotlin/Unit| {
|
||||
R|/requreIsInstance|<R|kotlin/String|>(R|<local>/s|)
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
}
|
||||
public final inline fun <reified T> requreIsInstanceOf(value: R|kotlin/Any|, requiredValue: R|T|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> value is T
|
||||
>
|
||||
{
|
||||
when () {
|
||||
(R|<local>/value| !is R|T|) -> {
|
||||
throw R|java/lang/IllegalArgumentException.IllegalArgumentException|()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_2(x: R|kotlin/Any|, s: R|kotlin/String|): R|kotlin/Unit| {
|
||||
R|/requreIsInstanceOf|<R|kotlin/String|>(R|<local>/x|, R|<local>/s|)
|
||||
R|<local>/x|.R|kotlin/String.length|
|
||||
}
|
||||
25
compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.kt
vendored
Normal file
25
compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.kt
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
inline fun <reified T> requreIsInstance(value: Any) contract [
|
||||
returns() implies (value is T)
|
||||
] {
|
||||
if (value !is T) throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
fun test_1(s: Any) {
|
||||
requreIsInstance<String>(s)
|
||||
s.length
|
||||
}
|
||||
|
||||
inline fun <reified T> requreIsInstanceOf(value: Any, requiredValue: T) contract [
|
||||
returns() implies (value is T)
|
||||
] {
|
||||
if (value !is T) throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
fun test_2(x: Any, s: String) {
|
||||
requreIsInstanceOf(x, s)
|
||||
x.length
|
||||
}
|
||||
@@ -50,5 +50,5 @@ FILE: annotationArgumentMustBeConst.kt
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
@R|Ann1|(vararg(R|/foo|, R|/foo|.R|kotlin/String.plus|(R|/bar|), <strcat>(R|/foo|.R|kotlin/Any.toString|(), String( ), R|/bar|.R|kotlin/Any.toString|()), <strcat>(R|/baz|().R|kotlin/Any.toString|(), String( )))) @R|Ann2|(<implicitArrayOf>(R|/bar|, R|/baz|(), R|/bar|.R|kotlin/Int.plus|(R|/cnst|))) @R|Ann3|(R|/arr|) public final fun test(): R|kotlin/Unit| {
|
||||
@R|Ann1|(vararg(R|/foo|, R|/foo|.R|kotlin/String.plus|(R|/bar|), <strcat>(R|/foo|, String( ), R|/bar|), <strcat>(R|/baz|(), String( )))) @R|Ann2|(<implicitArrayOf>(R|/bar|, R|/baz|(), R|/bar|.R|kotlin/Int.plus|(R|/cnst|))) @R|Ann3|(R|/arr|) public final fun test(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ fun foo() {
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation class Ann<!>
|
||||
|
||||
@Ann class Local {
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR{LT}!>// There should also be NESTED_CLASS_NOT_ALLOWED report here.
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR{PSI}!>annotation <!NESTED_CLASS_NOT_ALLOWED!>class Nested<!><!><!>
|
||||
// There should also be NESTED_CLASS_NOT_ALLOWED report here.
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation <!NESTED_CLASS_NOT_ALLOWED!>class Nested<!><!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
sealed class A
|
||||
|
||||
val b = <!HIDDEN!>A<!>()
|
||||
val b = <!INVISIBLE_REFERENCE!>A<!>()
|
||||
|
||||
@@ -21,7 +21,7 @@ val a = <!TYPE_ARGUMENTS_NOT_ALLOWED!>rest<Int><!>.<!UNRESOLVED_REFERENCE!>MyCla
|
||||
val b = Best.<!UNRESOLVED_REFERENCE!>MyClass<!><String>
|
||||
|
||||
class B<E>
|
||||
class C<F<!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>Boolean<!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>><!> <!SYNTAX{PSI}!>:<!> <!SYNTAX{PSI}!>B<!><!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>F<!><!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>Boolean<!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>(<!><!SYNTAX{PSI}!>)<!>
|
||||
class C<F<!SYNTAX!><<!><!SYNTAX!>Boolean<!><!SYNTAX!>><!><!SYNTAX!>><!> <!SYNTAX!>:<!> <!SYNTAX!>B<!><!SYNTAX!><<!><!SYNTAX!>F<!><!SYNTAX!><<!><!SYNTAX!>Boolean<!><!SYNTAX!>><!><!SYNTAX!>><!><!SYNTAX!>(<!><!SYNTAX!>)<!>
|
||||
|
||||
fun <G> gest() {}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ fun test() {
|
||||
val b1 = B<<!UPPER_BOUND_VIOLATED!>Int<!>>()
|
||||
val b2 = B<C>()
|
||||
val b3 = B<<!UPPER_BOUND_VIOLATED!>Any?<!>>()
|
||||
val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()<!UNRESOLVED_REFERENCE{PSI}!>NL<!><!SYNTAX{PSI}!><<!>Int<!SYNTAX{PSI}!>><!>()NumberPhile<!SYNTAX{PSI}!><!>
|
||||
val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()<!UNRESOLVED_REFERENCE!>NL<!><!SYNTAX!><<!>Int<!SYNTAX!>><!>()NumberPhile<!SYNTAX!><!>
|
||||
val b5 = B<<!UPPER_BOUND_VIOLATED!>B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>><!>>()
|
||||
fest<<!UPPER_BOUND_VIOLATED!>Boolean<!>>()
|
||||
fest<C>()
|
||||
@@ -40,7 +40,7 @@ fun <K, L : K> rest() {
|
||||
|
||||
class NumColl<T : Collection<Number>>
|
||||
typealias NL<K> = NumColl<List<K>>
|
||||
val test7 = NL<Int>()<!UNRESOLVED_REFERENCE{PSI}!>NumberPhile<!><!SYNTAX{PSI}!><!>
|
||||
val test7 = NL<Int>()<!UNRESOLVED_REFERENCE!>NumberPhile<!><!SYNTAX!><!>
|
||||
val test8 = NL<String>()
|
||||
|
||||
class NumberPhile<T: Number>(x: T)
|
||||
|
||||
@@ -20,10 +20,13 @@ FILE: enumValues.kt
|
||||
}
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval values: R|kotlin/Array<MyEnum>| = Q|MyEnum|.R|/MyEnum.values|()
|
||||
lval <iterator>: R|kotlin/collections/Iterator<MyEnum>| = R|<local>/values|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<MyEnum>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval value: R|MyEnum| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|MyEnum|>|()
|
||||
R|<local>/value|.R|/MyEnum.bar|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<MyEnum>| = R|<local>/values|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<MyEnum>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval value: R|MyEnum| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|MyEnum|>|()
|
||||
R|<local>/value|.R|/MyEnum.bar|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval first: R|MyEnum| = Q|MyEnum|.R|/MyEnum.valueOf|(String(FIRST))
|
||||
|
||||
@@ -18,10 +18,10 @@ FILE: errCallable.kt
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval x: <ERROR TYPE REF: No result type for initializer> = ::<Unresolved name: Nested>#
|
||||
lval x: R|ERROR CLASS: Unresolved reference: Nested| = ::<Unresolved reference: Nested>#
|
||||
}
|
||||
|
||||
}
|
||||
public final fun R|Your|.foo(): R|kotlin/Unit| {
|
||||
lval x: <ERROR TYPE REF: No result type for initializer> = ::<Unresolved name: Nested>#
|
||||
lval x: R|ERROR CLASS: Unresolved reference: Nested| = ::<Unresolved reference: Nested>#
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ FILE: lambda.kt
|
||||
}
|
||||
)
|
||||
R|/itIs|(<L> = itIs@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| <inline=NoInline> {
|
||||
^ <strcat>(String(this is ), R|<local>/it|.R|kotlin/Any.toString|(), String( test))
|
||||
^ <strcat>(String(this is ), R|<local>/it|, String( test))
|
||||
}
|
||||
)
|
||||
R|/multipleArgs|(<L> = multipleArgs@fun <anonymous>(a: R|kotlin/String|, b: R|kotlin/String|): R|kotlin/String| <inline=NoInline> {
|
||||
^ <strcat>(String(This is test of ), R|<local>/a|.R|kotlin/Any.toString|(), String(, ), R|<local>/b|.R|kotlin/Any.toString|())
|
||||
^ <strcat>(String(This is test of ), R|<local>/a|, String(, ), R|<local>/b|)
|
||||
}
|
||||
)
|
||||
lval s: R|kotlin/String| = fun <anonymous>(): R|kotlin/String| <inline=Unknown> {
|
||||
|
||||
@@ -11,8 +11,8 @@ open class Outer {
|
||||
|
||||
class Derived : Outer() {
|
||||
fun foo() {
|
||||
Outer.<!HIDDEN!>PrivateNested<!>()
|
||||
super.<!HIDDEN!>PrivateInner<!>()
|
||||
Outer.<!INVISIBLE_REFERENCE!>PrivateNested<!>()
|
||||
super.<!INVISIBLE_REFERENCE!>PrivateInner<!>()
|
||||
|
||||
Outer.ProtectedNested()
|
||||
super.ProtectedInner()
|
||||
@@ -23,11 +23,11 @@ class Derived : Outer() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
Outer.<!HIDDEN!>PrivateNested<!>()
|
||||
Outer().<!HIDDEN!>PrivateInner<!>()
|
||||
Outer.<!INVISIBLE_REFERENCE!>PrivateNested<!>()
|
||||
Outer().<!INVISIBLE_REFERENCE!>PrivateInner<!>()
|
||||
|
||||
Outer.<!HIDDEN!>ProtectedNested<!>()
|
||||
Outer().<!HIDDEN!>ProtectedInner<!>()
|
||||
Outer.<!INVISIBLE_REFERENCE!>ProtectedNested<!>()
|
||||
Outer().<!INVISIBLE_REFERENCE!>ProtectedInner<!>()
|
||||
|
||||
Outer.PublicNested()
|
||||
Outer().PublicInner()
|
||||
|
||||
@@ -9,21 +9,21 @@ private class Private {
|
||||
bar()
|
||||
Nested()
|
||||
fromCompanion()
|
||||
NotCompanion.<!HIDDEN!>foo<!>() // hidden
|
||||
NotCompanion.<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun foo() {
|
||||
bar()
|
||||
fromCompanion()
|
||||
NotCompanion.<!HIDDEN!>foo<!>() // hidden
|
||||
NotCompanion.<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
}
|
||||
}
|
||||
|
||||
private class Nested {
|
||||
fun foo() {
|
||||
fromCompanion()
|
||||
NotCompanion.<!HIDDEN!>foo<!>() // hidden
|
||||
NotCompanion.<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ fun withLocals() {
|
||||
|
||||
Local().baz()
|
||||
|
||||
Local().<!HIDDEN!>bar<!>() // hidden
|
||||
Local().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
}
|
||||
|
||||
fun test() {
|
||||
@@ -62,14 +62,14 @@ fun test() {
|
||||
Private().baz()
|
||||
Private().Inner()
|
||||
|
||||
Private().<!HIDDEN!>bar<!>() // hidden
|
||||
Private.<!HIDDEN!>Nested<!>() // hidden
|
||||
Private.<!HIDDEN!>fromCompanion<!>() // hidden
|
||||
Private().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
Private.<!INVISIBLE_REFERENCE!>Nested<!>() // hidden
|
||||
Private.<!INVISIBLE_REFERENCE!>fromCompanion<!>() // hidden
|
||||
}
|
||||
|
||||
// FILE: second.kt
|
||||
|
||||
fun secondTest() {
|
||||
<!HIDDEN!>foo<!>() // hidden
|
||||
<!HIDDEN!>Private<!>() // hidden
|
||||
<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
<!INVISIBLE_REFERENCE!>Private<!>() // hidden
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class Derived : Protected() {
|
||||
fun foo() {
|
||||
bar()
|
||||
Nested().foo()
|
||||
Nested().<!HIDDEN!>bar<!>() // hidden
|
||||
Nested().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
|
||||
fromCompanion()
|
||||
protectedFromCompanion()
|
||||
@@ -48,8 +48,8 @@ fun test() {
|
||||
Protected().baz()
|
||||
Protected().Inner()
|
||||
|
||||
Protected().<!HIDDEN!>bar<!>() // hidden
|
||||
Protected.<!HIDDEN!>Nested<!>() // hidden
|
||||
Protected().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
Protected.<!INVISIBLE_REFERENCE!>Nested<!>() // hidden
|
||||
}
|
||||
|
||||
open class Generic<T>(val x: T) {
|
||||
|
||||
@@ -36,7 +36,7 @@ FILE: test.kt
|
||||
lval bar: R|kotlin/CharSequence?| = R|<local>/x|?.{ $subj$.R|/SomeClass.bar| }
|
||||
when () {
|
||||
!=(R|<local>/bar|, Null(null)) -> {
|
||||
R|<local>/x|.R|/SomeClass.bar|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/CharSequence.length>#
|
||||
R|<local>/x|.R|/SomeClass.bar|.<Inapplicable(UNSAFE_CALL): kotlin/CharSequence.length>#
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,10 +66,13 @@ FILE: CanBeValChecker.kt
|
||||
public final fun stackOverflowBug(): R|kotlin/Unit| {
|
||||
lvar a: R|kotlin/Int|
|
||||
R|<local>/a| = Int(1)
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(10)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
R|kotlin/io/print|(R|<local>/i|)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(10)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
R|kotlin/io/print|(R|<local>/i|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FILE: StringTemplate.kt
|
||||
public abstract interface IC : R|kotlin/Any| {
|
||||
public open fun toString(x: R|kotlin/String|): R|kotlin/String| {
|
||||
^toString <strcat>(String(IC), R|<local>/x|.R|kotlin/Any.toString|())
|
||||
^toString <strcat>(String(IC), R|<local>/x|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ FILE: RedundantExplicitTypeChecker.kt
|
||||
|
||||
}
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval s: R|kotlin/String| = <strcat>(String(Hello ), Int(10).R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|())
|
||||
lval s: R|kotlin/String| = <strcat>(String(Hello ), Int(10).R|kotlin/Int.plus|(Int(1)))
|
||||
lval str: R|kotlin/String?| = String()
|
||||
lval o: R|Obj| = Q|Obj|
|
||||
lval p: R|Point| = R|/PointImpl.PointImpl|(Int(1), Int(2))
|
||||
|
||||
@@ -14,7 +14,7 @@ FILE: RedundantSetterParameterTypeChecker.kt
|
||||
public final var x: R|kotlin/String| = String()
|
||||
public get(): R|kotlin/String|
|
||||
public set(param: R|kotlin/String|): R|kotlin/Unit| {
|
||||
F|/x| = <strcat>(R|<local>/param|.R|kotlin/Any.toString|(), String( ))
|
||||
F|/x| = <strcat>(R|<local>/param|, String( ))
|
||||
}
|
||||
public final class My : R|kotlin/Any| {
|
||||
public constructor(): R|My| {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
FILE: RedundantSingleExpressionStringTemplateChecker.kt
|
||||
public final val x: R|kotlin/String| = String(Hello)
|
||||
public get(): R|kotlin/String|
|
||||
public final val y: R|kotlin/String| = <strcat>(R|/x|.R|kotlin/Any.toString|())
|
||||
public final val y: R|kotlin/String| = <strcat>(R|/x|)
|
||||
public get(): R|kotlin/String|
|
||||
public final val z: R|kotlin/String| = <strcat>(R|/y|.R|kotlin/Any.hashCode|().R|kotlin/Any.toString|())
|
||||
public final val z: R|kotlin/String| = <strcat>(R|/y|.R|kotlin/Any.hashCode|())
|
||||
public get(): R|kotlin/String|
|
||||
public final fun toString(x: R|kotlin/String|): R|kotlin/String| {
|
||||
^toString <strcat>(String(IC), R|<local>/x|.R|kotlin/Any.toString|())
|
||||
^toString <strcat>(String(IC), R|<local>/x|)
|
||||
}
|
||||
public final data class ProductGroup : R|kotlin/Any| {
|
||||
public constructor(short_name: R|kotlin/String|, parent: R|ProductGroup?|): R|ProductGroup| {
|
||||
@@ -24,7 +24,7 @@ FILE: RedundantSingleExpressionStringTemplateChecker.kt
|
||||
this@R|/ProductGroup|.R|/ProductGroup.short_name|
|
||||
}
|
||||
else -> {
|
||||
<strcat>(this@R|/ProductGroup|.R|/ProductGroup.parent|.R|/ProductGroup.name|.R|kotlin/Any.toString|(), String( ), this@R|/ProductGroup|.R|/ProductGroup.short_name|.R|kotlin/Any.toString|())
|
||||
<strcat>(this@R|/ProductGroup|.R|/ProductGroup.parent|.R|/ProductGroup.name|, String( ), this@R|/ProductGroup|.R|/ProductGroup.short_name|)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ open class J {
|
||||
}
|
||||
|
||||
var buf = 0
|
||||
private get() = 42
|
||||
<!GETTER_VISIBILITY_DIFFERS_FROM_PROPERTY_VISIBILITY!>private<!> get() = 42
|
||||
protected set(value) {
|
||||
field = value
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ FILE: NotNullTypeChain.kt
|
||||
public final val list1: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1))
|
||||
public get(): R|kotlin/collections/List<kotlin/Int>|
|
||||
public final val list: R|kotlin/collections/List<kotlin/String>| = R|/list1|.R|kotlin/collections/orEmpty|<R|kotlin/Int|>().R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/String|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/String| <inline=Inline, kind=UNKNOWN> {
|
||||
^ <strcat>(R|<local>/it|.R|kotlin/Any.toString|())
|
||||
^ <strcat>(R|<local>/it|)
|
||||
}
|
||||
)
|
||||
public get(): R|kotlin/collections/List<kotlin/String>|
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
FILE: NoWarning.kt
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntRange| = Int(3).R|kotlin/Int.rangeTo|(Int(4))
|
||||
@@ -14,9 +17,12 @@ FILE: NoWarning.kt
|
||||
|
||||
}
|
||||
public final fun backward(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/ranges/downTo|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/ranges/downTo|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntProgression| = Int(4).R|kotlin/ranges/downTo|(Int(3))
|
||||
@@ -28,9 +34,12 @@ FILE: NoWarning.kt
|
||||
|
||||
}
|
||||
public final fun until(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/until|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/until|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntRange| = Int(3).R|kotlin/ranges/until|(Int(4))
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
FILE: Warning.kt
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/Int.rangeTo|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/Int.rangeTo|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntRange| = Int(10).R|kotlin/Int.rangeTo|(Int(0))
|
||||
@@ -14,9 +17,12 @@ FILE: Warning.kt
|
||||
|
||||
}
|
||||
public final fun backward(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/downTo|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/downTo|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntProgression| = Int(-3).R|kotlin/ranges/downTo|(Int(4))
|
||||
@@ -28,9 +34,12 @@ FILE: Warning.kt
|
||||
|
||||
}
|
||||
public final fun until(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/until|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/until|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntRange| = Int(4).R|kotlin/ranges/until|(Int(3))
|
||||
|
||||
@@ -3,18 +3,21 @@ FILE: manyLocalVariables.kt
|
||||
lvar a: R|kotlin/Int| = Int(1)
|
||||
lvar b: R|kotlin/Int| = Int(2)
|
||||
lvar c: R|kotlin/Int| = Int(3)
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
when () {
|
||||
==(R|<local>/a|, Int(2)) -> {
|
||||
R|<local>/b| = R|<local>/c|
|
||||
R|<local>/c| = R|<local>/a|
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b| = R|<local>/a|
|
||||
R|<local>/c| = R|<local>/b|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
when () {
|
||||
==(R|<local>/a|, Int(2)) -> {
|
||||
R|<local>/b| = R|<local>/c|
|
||||
R|<local>/c| = R|<local>/a|
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b| = R|<local>/a|
|
||||
R|<local>/c| = R|<local>/b|
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,12 +8,15 @@ FILE: fib.kt
|
||||
|
||||
lvar current: R|kotlin/Int| = Int(1)
|
||||
lvar prev: R|kotlin/Int| = Int(1)
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/Int.rangeTo|(R|<local>/n|).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval temp: R|kotlin/Int| = R|<local>/current|
|
||||
R|<local>/current| = R|<local>/current|.R|kotlin/Int.plus|(R|<local>/prev|)
|
||||
R|<local>/prev| = R|<local>/temp|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/Int.rangeTo|(R|<local>/n|).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval temp: R|kotlin/Int| = R|<local>/current|
|
||||
R|<local>/current| = R|<local>/current|.R|kotlin/Int.plus|(R|<local>/prev|)
|
||||
R|<local>/prev| = R|<local>/temp|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
^fibIterative R|<local>/current|
|
||||
|
||||
61
compiler/fir/analysis-tests/testData/resolve/funInterfaceDeclaration.fir.txt
vendored
Normal file
61
compiler/fir/analysis-tests/testData/resolve/funInterfaceDeclaration.fir.txt
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
FILE: funInterfaceDeclaration.kt
|
||||
public abstract interface Test1 : R|kotlin/Any| {
|
||||
public abstract fun foo(): R|kotlin/Unit|
|
||||
|
||||
public abstract fun boo(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test2 : R|kotlin/Any| {
|
||||
}
|
||||
public abstract interface Test3 : R|kotlin/Any| {
|
||||
public abstract val a: R|kotlin/Int|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public abstract fun foo(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test4 : R|kotlin/Any| {
|
||||
public abstract fun <T> foo(a: R|T|): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test5 : R|kotlin/Any| {
|
||||
public abstract fun foo(a: R|kotlin/Int| = Int(5)): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test6 : R|kotlin/Any| {
|
||||
public abstract suspend fun foo(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test7 : R|kotlin/Any| {
|
||||
public abstract fun foo(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test8 : R|Test7| {
|
||||
public abstract fun boo(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test9 : R|kotlin/Any| {
|
||||
public open fun num(m: R|kotlin/Int|): R|kotlin/Int| {
|
||||
^num R|<local>/m|.R|kotlin/Int.times|(R|<local>/m|)
|
||||
}
|
||||
|
||||
}
|
||||
public abstract interface Test10 : R|Test9| {
|
||||
public abstract fun test(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test11 : R|kotlin/Any| {
|
||||
public abstract val a: R|kotlin/Int|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
public abstract interface Test12 : R|Test11| {
|
||||
public abstract fun test(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test14 : R|kotlin/Any| {
|
||||
public abstract suspend fun test(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Test15 : R|Test14| {
|
||||
}
|
||||
45
compiler/fir/analysis-tests/testData/resolve/funInterfaceDeclaration.kt
vendored
Normal file
45
compiler/fir/analysis-tests/testData/resolve/funInterfaceDeclaration.kt
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
// !LANGUAGE: -SuspendFunctionsInFunInterfaces
|
||||
|
||||
<!FUN_INTERFACE_WRONG_COUNT_OF_ABSTRACT_MEMBERS!>fun<!> interface Test1{
|
||||
fun foo()
|
||||
fun boo()
|
||||
}
|
||||
<!FUN_INTERFACE_WRONG_COUNT_OF_ABSTRACT_MEMBERS!>fun<!> interface Test2 {}
|
||||
fun interface Test3 {
|
||||
<!FUN_INTERFACE_CANNOT_HAVE_ABSTRACT_PROPERTIES!>val<!> a: Int
|
||||
fun foo()
|
||||
}
|
||||
fun interface Test4{
|
||||
fun <!FUN_INTERFACE_ABSTRACT_METHOD_WITH_TYPE_PARAMETERS!><T><!> foo(a: T)
|
||||
}
|
||||
fun interface Test5{
|
||||
fun foo(<!FUN_INTERFACE_ABSTRACT_METHOD_WITH_DEFAULT_VALUE!>a: Int = 5<!>)
|
||||
}
|
||||
fun interface Test6{
|
||||
<!FUN_INTERFACE_WITH_SUSPEND_FUNCTION!>suspend<!> fun foo()
|
||||
}
|
||||
fun interface Test7{
|
||||
fun foo()
|
||||
}
|
||||
<!FUN_INTERFACE_WRONG_COUNT_OF_ABSTRACT_MEMBERS!>fun<!> interface Test8: Test7{
|
||||
fun boo()
|
||||
}
|
||||
interface Test9 {
|
||||
fun num(m: Int): Int {
|
||||
return m * m
|
||||
}
|
||||
}
|
||||
fun interface Test10 : Test9 {
|
||||
fun test()
|
||||
}
|
||||
interface Test11 {
|
||||
val a: Int
|
||||
}
|
||||
<!FUN_INTERFACE_CANNOT_HAVE_ABSTRACT_PROPERTIES!>fun<!> interface Test12 : Test11 {
|
||||
fun test()
|
||||
}
|
||||
interface Test14 {
|
||||
suspend fun test()
|
||||
}
|
||||
<!FUN_INTERFACE_WITH_SUSPEND_FUNCTION!>fun<!> interface Test15 : Test14
|
||||
|
||||
@@ -5,18 +5,24 @@ FILE: nestedExtensionFunctionType.kt
|
||||
R|<local>/f|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
}
|
||||
public final fun test_1(a: R|A|, ys: R|kotlin/collections/List<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>| = R|<local>/ys|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval y: R|(A) -> kotlin/Unit| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|(A) -> kotlin/Unit|>|()
|
||||
R|<local>/y|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>| = R|<local>/ys|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval y: R|(A) -> kotlin/Unit| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|(A) -> kotlin/Unit|>|()
|
||||
R|<local>/y|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_2(a: R|A|, vararg zs: @R|kotlin/ExtensionFunctionType|() R|kotlin/Array<out @ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>| = R|<local>/zs|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out @ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval z: R|(A) -> kotlin/Unit| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|(A) -> kotlin/Unit|>|()
|
||||
R|<local>/z|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>| = R|<local>/zs|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out @ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval z: R|(A) -> kotlin/Unit| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|(A) -> kotlin/Unit|>|()
|
||||
R|<local>/z|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,6 @@ open class B<V> : A<Any, V>() {
|
||||
|
||||
fun test_1(b: B<Int>, x: Int, inv: Inv<Int>) {
|
||||
b.take(x)
|
||||
b.take(<!ARGUMENT_TYPE_MISMATCH!>null<!>)
|
||||
b.take(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
b.takeInv(inv)
|
||||
}
|
||||
|
||||
25
compiler/fir/analysis-tests/testData/resolve/references/leakedImplicitType.fir.txt
vendored
Normal file
25
compiler/fir/analysis-tests/testData/resolve/references/leakedImplicitType.fir.txt
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
FILE: leakedImplicitType.kt
|
||||
public final class Foo : R|kotlin/Any| {
|
||||
public constructor(): R|Foo| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun bar(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
public final fun f(): R|ERROR CLASS: Unresolved reference: bar| {
|
||||
^f <Unresolved name: Unresolved>#()::<Unresolved reference: bar>#
|
||||
}
|
||||
|
||||
}
|
||||
public abstract interface IA : R|kotlin/Any| {
|
||||
}
|
||||
public abstract interface IB : R|IA| {
|
||||
}
|
||||
public final fun R|IA|.extFun(x: R|IB|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun R|IB|.extFun(x: R|IA|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun testWithExpectedType(): R|kotlin/Unit| {
|
||||
lval extFun_AA_B: R|IA.(IA) -> kotlin/Unit| = Q|IB|::<Unresolved reference: extFun>#
|
||||
}
|
||||
18
compiler/fir/analysis-tests/testData/resolve/references/leakedImplicitType.kt
vendored
Normal file
18
compiler/fir/analysis-tests/testData/resolve/references/leakedImplicitType.kt
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// ISSUE: KT-46072
|
||||
|
||||
// Case 1
|
||||
class Foo {
|
||||
fun bar() {}
|
||||
fun f() = <!UNRESOLVED_REFERENCE!>Unresolved<!>()::bar // Type of Unresolved()::bar is implicit
|
||||
}
|
||||
|
||||
// Case 2
|
||||
interface IA
|
||||
interface IB : IA
|
||||
|
||||
fun IA.extFun(x: IB) {}
|
||||
fun IB.extFun(x: IA) {}
|
||||
|
||||
fun testWithExpectedType() {
|
||||
val extFun_AA_B: IA.(IA) -> Unit = IB::<!UNRESOLVED_REFERENCE!>extFun<!> // extFun is unresolved, type of IB::extFun is implicit
|
||||
}
|
||||
@@ -40,8 +40,8 @@ FILE: referenceToExtension.kt
|
||||
}
|
||||
|
||||
public final fun test_2(): R|kotlin/Unit| {
|
||||
lval extensionValRef: <ERROR TYPE REF: No result type for initializer> = Q|GenericTest.B|::<Unresolved name: extensionVal>#
|
||||
lval extensionFunRef: <ERROR TYPE REF: No result type for initializer> = Q|GenericTest.B|::<Unresolved name: extensionFun>#
|
||||
lval extensionValRef: R|ERROR CLASS: Unresolved reference: extensionVal| = Q|GenericTest.B|::<Unresolved reference: extensionVal>#
|
||||
lval extensionFunRef: R|ERROR CLASS: Unresolved reference: extensionFun| = Q|GenericTest.B|::<Unresolved reference: extensionFun>#
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
13
compiler/fir/analysis-tests/testData/resolve/references/referenceToField.fir.txt
vendored
Normal file
13
compiler/fir/analysis-tests/testData/resolve/references/referenceToField.fir.txt
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
FILE: referenceToField.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val x: R|kotlin/Int| = Int(1)
|
||||
public get(): R|kotlin/Int| {
|
||||
::F|/A.x|
|
||||
^ this@R|/A|.F|/A.x|
|
||||
}
|
||||
|
||||
}
|
||||
7
compiler/fir/analysis-tests/testData/resolve/references/referenceToField.kt
vendored
Normal file
7
compiler/fir/analysis-tests/testData/resolve/references/referenceToField.kt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
val x: Int = 1
|
||||
get() {
|
||||
::<!UNSUPPORTED!>field<!>
|
||||
return field
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,11 @@ fun interface MyRunnable {
|
||||
fun foo(x: Int): Boolean
|
||||
}
|
||||
|
||||
fun interface WithProperty {
|
||||
val x: Int
|
||||
<!FUN_INTERFACE_WRONG_COUNT_OF_ABSTRACT_MEMBERS!>fun<!> interface WithProperty {
|
||||
<!FUN_INTERFACE_CANNOT_HAVE_ABSTRACT_PROPERTIES!>val<!> x: Int
|
||||
}
|
||||
|
||||
fun interface TwoAbstract : MyRunnable {
|
||||
<!FUN_INTERFACE_WRONG_COUNT_OF_ABSTRACT_MEMBERS!>fun<!> interface TwoAbstract : MyRunnable {
|
||||
fun bar()
|
||||
}
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ digraph bangbang_kt {
|
||||
78 [label="Exit when"];
|
||||
}
|
||||
79 [label="Access variable R|<local>/a|"];
|
||||
80 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
80 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
81 [label="Exit block"];
|
||||
}
|
||||
82 [label="Exit function test_3" style="filled" fillcolor=red];
|
||||
@@ -331,14 +331,14 @@ digraph bangbang_kt {
|
||||
color=blue
|
||||
123 [label="Enter block"];
|
||||
124 [label="Access variable R|<local>/a|"];
|
||||
125 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
125 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
126 [label="Exit block"];
|
||||
}
|
||||
127 [label="Exit when branch result"];
|
||||
128 [label="Exit when"];
|
||||
}
|
||||
129 [label="Access variable R|<local>/a|"];
|
||||
130 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
130 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
131 [label="Exit block"];
|
||||
}
|
||||
132 [label="Exit function test_5" style="filled" fillcolor=red];
|
||||
|
||||
@@ -32,7 +32,7 @@ FILE: bangbang.kt
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
public final fun test_4(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
when () {
|
||||
@@ -46,11 +46,11 @@ FILE: bangbang.kt
|
||||
public final fun test_5(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
when () {
|
||||
R|<local>/b| || R|<local>/a|!!.R|/A.foo|() -> {
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
public final fun <X : R|A?|> test_6(x: R|X|): R|kotlin/Unit| {
|
||||
R|<local>/x|!!.R|/A.foo|()
|
||||
|
||||
@@ -17,7 +17,7 @@ FILE: booleanElvisBoundSmartcast.kt
|
||||
R|<local>/a|.R|/A.foo|()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ FILE: booleanElvisBoundSmartcast.kt
|
||||
public final fun test_2(a: R|A?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
R|<local>/a|?.{ $subj$.R|/A.b| } ?: Boolean(true) -> {
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/a|.R|/A.foo|()
|
||||
|
||||
@@ -46,7 +46,7 @@ digraph equalsToBoolean_kt {
|
||||
color=blue
|
||||
17 [label="Enter block"];
|
||||
18 [label="Access variable R|<local>/b|"];
|
||||
19 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()"];
|
||||
19 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()"];
|
||||
20 [label="Exit block"];
|
||||
}
|
||||
21 [label="Exit when branch result"];
|
||||
@@ -130,7 +130,7 @@ digraph equalsToBoolean_kt {
|
||||
color=blue
|
||||
50 [label="Enter block"];
|
||||
51 [label="Access variable R|<local>/b|"];
|
||||
52 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()"];
|
||||
52 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()"];
|
||||
53 [label="Exit block"];
|
||||
}
|
||||
54 [label="Exit when branch result"];
|
||||
@@ -205,7 +205,7 @@ digraph equalsToBoolean_kt {
|
||||
color=blue
|
||||
77 [label="Enter block"];
|
||||
78 [label="Access variable R|<local>/b|"];
|
||||
79 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()"];
|
||||
79 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()"];
|
||||
80 [label="Exit block"];
|
||||
}
|
||||
81 [label="Exit when branch result"];
|
||||
@@ -271,7 +271,7 @@ digraph equalsToBoolean_kt {
|
||||
color=blue
|
||||
98 [label="Enter block"];
|
||||
99 [label="Access variable R|<local>/b|"];
|
||||
100 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()"];
|
||||
100 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()"];
|
||||
101 [label="Exit block"];
|
||||
}
|
||||
102 [label="Exit when branch result"];
|
||||
@@ -355,7 +355,7 @@ digraph equalsToBoolean_kt {
|
||||
color=blue
|
||||
131 [label="Enter block"];
|
||||
132 [label="Access variable R|<local>/b|"];
|
||||
133 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()"];
|
||||
133 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()"];
|
||||
134 [label="Exit block"];
|
||||
}
|
||||
135 [label="Exit when branch result"];
|
||||
@@ -421,7 +421,7 @@ digraph equalsToBoolean_kt {
|
||||
color=blue
|
||||
152 [label="Enter block"];
|
||||
153 [label="Access variable R|<local>/b|"];
|
||||
154 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()"];
|
||||
154 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()"];
|
||||
155 [label="Exit block"];
|
||||
}
|
||||
156 [label="Exit when branch result"];
|
||||
@@ -496,7 +496,7 @@ digraph equalsToBoolean_kt {
|
||||
color=blue
|
||||
179 [label="Enter block"];
|
||||
180 [label="Access variable R|<local>/b|"];
|
||||
181 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()"];
|
||||
181 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()"];
|
||||
182 [label="Exit block"];
|
||||
}
|
||||
183 [label="Exit when branch result"];
|
||||
@@ -580,7 +580,7 @@ digraph equalsToBoolean_kt {
|
||||
color=blue
|
||||
212 [label="Enter block"];
|
||||
213 [label="Access variable R|<local>/b|"];
|
||||
214 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()"];
|
||||
214 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()"];
|
||||
215 [label="Exit block"];
|
||||
}
|
||||
216 [label="Exit when branch result"];
|
||||
|
||||
@@ -12,7 +12,7 @@ FILE: equalsToBoolean.kt
|
||||
R|<local>/b|.R|kotlin/Boolean.not|()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ FILE: equalsToBoolean.kt
|
||||
public final fun test_2(b: R|kotlin/Boolean?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
!=(==(R|<local>/b|, Boolean(true)), Boolean(true)) -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b|.R|kotlin/Boolean.not|()
|
||||
@@ -31,7 +31,7 @@ FILE: equalsToBoolean.kt
|
||||
public final fun test_3(b: R|kotlin/Boolean?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
==(==(R|<local>/b|, Boolean(true)), Boolean(false)) -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b|.R|kotlin/Boolean.not|()
|
||||
@@ -45,7 +45,7 @@ FILE: equalsToBoolean.kt
|
||||
R|<local>/b|.R|kotlin/Boolean.not|()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ FILE: equalsToBoolean.kt
|
||||
public final fun test_5(b: R|kotlin/Boolean?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
==(!=(R|<local>/b|, Boolean(true)), Boolean(true)) -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b|.R|kotlin/Boolean.not|()
|
||||
@@ -67,7 +67,7 @@ FILE: equalsToBoolean.kt
|
||||
R|<local>/b|.R|kotlin/Boolean.not|()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ FILE: equalsToBoolean.kt
|
||||
R|<local>/b|.R|kotlin/Boolean.not|()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ FILE: equalsToBoolean.kt
|
||||
public final fun test_8(b: R|kotlin/Boolean?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
!=(!=(R|<local>/b|, Boolean(true)), Boolean(false)) -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Boolean.not>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Boolean.not>#()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b|.R|kotlin/Boolean.not|()
|
||||
|
||||
@@ -267,7 +267,7 @@ digraph jumpFromRhsOfOperator_kt {
|
||||
101 [label="Exit ||"];
|
||||
}
|
||||
102 [label="Access variable R|<local>/a|"];
|
||||
103 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
103 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
104 [label="Exit block"];
|
||||
}
|
||||
105 [label="Exit function test_5" style="filled" fillcolor=red];
|
||||
@@ -309,7 +309,7 @@ digraph jumpFromRhsOfOperator_kt {
|
||||
117 [label="Exit &&"];
|
||||
}
|
||||
118 [label="Access variable R|<local>/a|"];
|
||||
119 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
119 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
120 [label="Exit block"];
|
||||
}
|
||||
121 [label="Exit function teat_6" style="filled" fillcolor=red];
|
||||
@@ -364,14 +364,14 @@ digraph jumpFromRhsOfOperator_kt {
|
||||
color=blue
|
||||
139 [label="Enter block"];
|
||||
140 [label="Access variable R|<local>/a|"];
|
||||
141 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
141 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
142 [label="Exit block"];
|
||||
}
|
||||
143 [label="Exit when branch result"];
|
||||
144 [label="Exit when"];
|
||||
}
|
||||
145 [label="Access variable R|<local>/a|"];
|
||||
146 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
146 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
147 [label="Exit block"];
|
||||
}
|
||||
148 [label="Exit function test_7" style="filled" fillcolor=red];
|
||||
@@ -437,14 +437,14 @@ digraph jumpFromRhsOfOperator_kt {
|
||||
color=blue
|
||||
166 [label="Enter block"];
|
||||
167 [label="Access variable R|<local>/a|"];
|
||||
168 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
168 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
169 [label="Exit block"];
|
||||
}
|
||||
170 [label="Exit when branch result"];
|
||||
171 [label="Exit when"];
|
||||
}
|
||||
172 [label="Access variable R|<local>/a|"];
|
||||
173 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
173 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
174 [label="Exit block"];
|
||||
}
|
||||
175 [label="Exit function test_8" style="filled" fillcolor=red];
|
||||
|
||||
@@ -31,27 +31,27 @@ FILE: jumpFromRhsOfOperator.kt
|
||||
}
|
||||
public final fun test_5(a: R|A?|): R|kotlin/Unit| {
|
||||
==(R|<local>/a|, Null(null)) || throw R|java/lang/Exception.Exception|()
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
public final fun teat_6(a: R|A?|): R|kotlin/Unit| {
|
||||
!=(R|<local>/a|, Null(null)) && throw R|java/lang/Exception.Exception|()
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
public final fun test_7(a: R|A?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
==(R|<local>/a|, Null(null)) || throw R|java/lang/Exception.Exception|() -> {
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
public final fun test_8(a: R|A?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
!=(R|<local>/a|, Null(null)) && throw R|java/lang/Exception.Exception|() -> {
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,17 +10,20 @@ FILE: boundSmartcastsInBranches.kt
|
||||
}
|
||||
public final fun test_0(list: R|kotlin/collections/List<A>|): R|kotlin/Unit| {
|
||||
lvar goodA: R|A?| = Null(null)
|
||||
lval <iterator>: R|kotlin/collections/Iterator<A>| = R|<local>/list|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<A>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval a: R|A| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|A|>|()
|
||||
when () {
|
||||
==(R|<local>/goodA|, Null(null)) -> {
|
||||
R|<local>/goodA| = R|<local>/a|
|
||||
continue@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()]
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<A>| = R|<local>/list|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<A>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval a: R|A| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|A|>|()
|
||||
when () {
|
||||
==(R|<local>/goodA|, Null(null)) -> {
|
||||
R|<local>/goodA| = R|<local>/a|
|
||||
continue@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()]
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/goodA|.R|/A.s|
|
||||
}
|
||||
|
||||
R|<local>/goodA|.R|/A.s|
|
||||
}
|
||||
|
||||
}
|
||||
@@ -132,23 +135,23 @@ FILE: boundSmartcastsInBranches.kt
|
||||
when () {
|
||||
!=(R|<local>/x|, Null(null)) -> {
|
||||
R|<local>/x|.R|kotlin/String.length|
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
R|<local>/z|.R|kotlin/String.length|
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
!=(R|<local>/y|, Null(null)) -> {
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
R|<local>/y|.R|kotlin/String.length|
|
||||
R|<local>/z|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/z|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
!=(R|<local>/z|, Null(null)) -> {
|
||||
R|<local>/x|.R|kotlin/String.length|
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
R|<local>/z|.R|kotlin/String.length|
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,9 +136,9 @@ digraph equalsAndIdentity_kt {
|
||||
color=blue
|
||||
50 [label="Enter block"];
|
||||
51 [label="Access variable R|<local>/x|"];
|
||||
52 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
52 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
53 [label="Access variable R|<local>/y|"];
|
||||
54 [label="Function call: R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
54 [label="Function call: R|<local>/y|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
55 [label="Exit block"];
|
||||
}
|
||||
56 [label="Exit when branch result"];
|
||||
@@ -161,9 +161,9 @@ digraph equalsAndIdentity_kt {
|
||||
color=blue
|
||||
66 [label="Enter block"];
|
||||
67 [label="Access variable R|<local>/x|"];
|
||||
68 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
68 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
69 [label="Access variable R|<local>/y|"];
|
||||
70 [label="Function call: R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
70 [label="Function call: R|<local>/y|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
71 [label="Exit block"];
|
||||
}
|
||||
72 [label="Exit when branch result"];
|
||||
|
||||
@@ -22,15 +22,15 @@ FILE: equalsAndIdentity.kt
|
||||
public final fun test_2(x: R|A?|, y: R|A?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
==(R|<local>/x|, R|<local>/y|) -> {
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
===(R|<local>/x|, R|<local>/y|) -> {
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ fun a(): Int {
|
||||
if (c == null ||
|
||||
0 < c // FE 1.0: smart cast impossible, see KT-10240
|
||||
) c = 0
|
||||
return c ?: 0
|
||||
return c <!USELESS_ELVIS!>?: 0<!>
|
||||
}
|
||||
|
||||
var c: Int = 0
|
||||
|
||||
@@ -239,7 +239,7 @@ digraph nullability_kt {
|
||||
color=blue
|
||||
76 [label="Enter block"];
|
||||
77 [label="Access variable R|<local>/x|"];
|
||||
78 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
78 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
79 [label="Exit block"];
|
||||
}
|
||||
80 [label="Exit when branch result"];
|
||||
@@ -255,7 +255,7 @@ digraph nullability_kt {
|
||||
87 [label="Exit when"];
|
||||
}
|
||||
88 [label="Access variable R|<local>/x|"];
|
||||
89 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
89 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
90 [label="Exit block"];
|
||||
}
|
||||
91 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||
@@ -323,14 +323,14 @@ digraph nullability_kt {
|
||||
color=blue
|
||||
109 [label="Enter block"];
|
||||
110 [label="Access variable R|<local>/x|"];
|
||||
111 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
111 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
112 [label="Exit block"];
|
||||
}
|
||||
113 [label="Exit when branch result"];
|
||||
114 [label="Exit when"];
|
||||
}
|
||||
115 [label="Access variable R|<local>/x|"];
|
||||
116 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
116 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
117 [label="Exit block"];
|
||||
}
|
||||
118 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
@@ -492,11 +492,11 @@ digraph nullability_kt {
|
||||
176 [label="Access variable R|/Q.data|"];
|
||||
177 [label="Access variable R|<local>/q|"];
|
||||
178 [label="Access variable R|/Q.data|"];
|
||||
179 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
179 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
180 [label="Access variable R|<local>/q|"];
|
||||
181 [label="Access variable R|/Q.data|"];
|
||||
182 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
183 [label="Function call: R|<local>/q|.R|/Q.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
182 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
183 [label="Function call: R|<local>/q|.R|/Q.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
184 [label="Exit block"];
|
||||
}
|
||||
185 [label="Exit when branch result"];
|
||||
@@ -566,11 +566,11 @@ digraph nullability_kt {
|
||||
208 [label="Access variable R|/Q.data|"];
|
||||
209 [label="Access variable R|<local>/q|"];
|
||||
210 [label="Access variable R|/Q.data|"];
|
||||
211 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
211 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
212 [label="Access variable R|<local>/q|"];
|
||||
213 [label="Access variable R|/Q.data|"];
|
||||
214 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
215 [label="Function call: R|<local>/q|.R|/Q.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
214 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
215 [label="Function call: R|<local>/q|.R|/Q.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
216 [label="Exit block"];
|
||||
}
|
||||
217 [label="Exit function test_6" style="filled" fillcolor=red];
|
||||
@@ -640,11 +640,11 @@ digraph nullability_kt {
|
||||
239 [label="Function call: R|<local>/q|.R|/Q.fdata|()"];
|
||||
240 [label="Access variable R|<local>/q|"];
|
||||
241 [label="Function call: R|<local>/q|.R|/Q.fdata|()"];
|
||||
242 [label="Function call: R|<local>/q|.R|/Q.fdata|().<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.fs>#()"];
|
||||
242 [label="Function call: R|<local>/q|.R|/Q.fdata|().<Inapplicable(UNSAFE_CALL): /MyData.fs>#()"];
|
||||
243 [label="Access variable R|<local>/q|"];
|
||||
244 [label="Function call: R|<local>/q|.R|/Q.fdata|()"];
|
||||
245 [label="Function call: R|<local>/q|.R|/Q.fdata|().<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.fs>#()"];
|
||||
246 [label="Function call: R|<local>/q|.R|/Q.fdata|().<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.fs>#().R|kotlin/Int.inc|()"];
|
||||
245 [label="Function call: R|<local>/q|.R|/Q.fdata|().<Inapplicable(UNSAFE_CALL): /MyData.fs>#()"];
|
||||
246 [label="Function call: R|<local>/q|.R|/Q.fdata|().<Inapplicable(UNSAFE_CALL): /MyData.fs>#().R|kotlin/Int.inc|()"];
|
||||
247 [label="Exit block"];
|
||||
}
|
||||
248 [label="Exit when branch result"];
|
||||
@@ -769,7 +769,7 @@ digraph nullability_kt {
|
||||
285 [label="Exit when"];
|
||||
}
|
||||
286 [label="Access variable R|<local>/b|"];
|
||||
287 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
287 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
subgraph cluster_66 {
|
||||
color=blue
|
||||
288 [label="Enter when"];
|
||||
@@ -794,7 +794,7 @@ digraph nullability_kt {
|
||||
301 [label="Exit when"];
|
||||
}
|
||||
302 [label="Access variable R|<local>/b|"];
|
||||
303 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
303 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
subgraph cluster_69 {
|
||||
color=blue
|
||||
304 [label="Enter when"];
|
||||
@@ -819,7 +819,7 @@ digraph nullability_kt {
|
||||
317 [label="Exit when"];
|
||||
}
|
||||
318 [label="Access variable R|<local>/b|"];
|
||||
319 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
319 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
subgraph cluster_72 {
|
||||
color=blue
|
||||
320 [label="Enter when"];
|
||||
@@ -844,7 +844,7 @@ digraph nullability_kt {
|
||||
333 [label="Exit when"];
|
||||
}
|
||||
334 [label="Access variable R|<local>/b|"];
|
||||
335 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
335 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
336 [label="Exit block"];
|
||||
}
|
||||
337 [label="Exit function test_9" style="filled" fillcolor=red];
|
||||
@@ -940,14 +940,14 @@ digraph nullability_kt {
|
||||
color=blue
|
||||
348 [label="Enter block"];
|
||||
349 [label="Access variable R|<local>/b|"];
|
||||
350 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
350 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
351 [label="Exit block"];
|
||||
}
|
||||
352 [label="Exit when branch result"];
|
||||
353 [label="Exit when"];
|
||||
}
|
||||
354 [label="Access variable R|<local>/b|"];
|
||||
355 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
355 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
subgraph cluster_80 {
|
||||
color=blue
|
||||
356 [label="Enter when"];
|
||||
@@ -965,14 +965,14 @@ digraph nullability_kt {
|
||||
color=blue
|
||||
364 [label="Enter block"];
|
||||
365 [label="Access variable R|<local>/b|"];
|
||||
366 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
366 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
367 [label="Exit block"];
|
||||
}
|
||||
368 [label="Exit when branch result"];
|
||||
369 [label="Exit when"];
|
||||
}
|
||||
370 [label="Access variable R|<local>/b|"];
|
||||
371 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
371 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
subgraph cluster_83 {
|
||||
color=blue
|
||||
372 [label="Enter when"];
|
||||
@@ -990,14 +990,14 @@ digraph nullability_kt {
|
||||
color=blue
|
||||
380 [label="Enter block"];
|
||||
381 [label="Access variable R|<local>/b|"];
|
||||
382 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
382 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
383 [label="Exit block"];
|
||||
}
|
||||
384 [label="Exit when branch result"];
|
||||
385 [label="Exit when"];
|
||||
}
|
||||
386 [label="Access variable R|<local>/b|"];
|
||||
387 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
387 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
subgraph cluster_86 {
|
||||
color=blue
|
||||
388 [label="Enter when"];
|
||||
@@ -1015,14 +1015,14 @@ digraph nullability_kt {
|
||||
color=blue
|
||||
396 [label="Enter block"];
|
||||
397 [label="Access variable R|<local>/b|"];
|
||||
398 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
398 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
399 [label="Exit block"];
|
||||
}
|
||||
400 [label="Exit when branch result"];
|
||||
401 [label="Exit when"];
|
||||
}
|
||||
402 [label="Access variable R|<local>/b|"];
|
||||
403 [label="Function call: R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
403 [label="Function call: R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
404 [label="Exit block"];
|
||||
}
|
||||
405 [label="Exit function test_10" style="filled" fillcolor=red];
|
||||
@@ -1139,11 +1139,11 @@ digraph nullability_kt {
|
||||
436 [label="Access variable R|/QImpl.data|"];
|
||||
437 [label="Access variable R|<local>/q2|"];
|
||||
438 [label="Access variable R|/QImpl.data|"];
|
||||
439 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
439 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
440 [label="Access variable R|<local>/q2|"];
|
||||
441 [label="Access variable R|/QImpl.data|"];
|
||||
442 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
443 [label="Function call: R|<local>/q2|.R|/QImpl.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
442 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
443 [label="Function call: R|<local>/q2|.R|/QImpl.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
subgraph cluster_94 {
|
||||
color=blue
|
||||
444 [label="Enter when"];
|
||||
@@ -1280,11 +1280,11 @@ digraph nullability_kt {
|
||||
490 [label="Access variable R|/QImplWithCustomGetter.data|"];
|
||||
491 [label="Access variable R|<local>/q|"];
|
||||
492 [label="Access variable R|/QImplWithCustomGetter.data|"];
|
||||
493 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
493 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
494 [label="Access variable R|<local>/q|"];
|
||||
495 [label="Access variable R|/QImplWithCustomGetter.data|"];
|
||||
496 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
497 [label="Function call: R|<local>/q|.R|/QImplWithCustomGetter.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
496 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
497 [label="Function call: R|<local>/q|.R|/QImplWithCustomGetter.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
498 [label="Exit block"];
|
||||
}
|
||||
499 [label="Exit when branch result"];
|
||||
@@ -1363,11 +1363,11 @@ digraph nullability_kt {
|
||||
524 [label="Access variable R|/QImplMutable.data|"];
|
||||
525 [label="Access variable R|<local>/q|"];
|
||||
526 [label="Access variable R|/QImplMutable.data|"];
|
||||
527 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
527 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
528 [label="Access variable R|<local>/q|"];
|
||||
529 [label="Access variable R|/QImplMutable.data|"];
|
||||
530 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#"];
|
||||
531 [label="Function call: R|<local>/q|.R|/QImplMutable.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
530 [label="Access variable <Inapplicable(UNSAFE_CALL): /MyData.s>#"];
|
||||
531 [label="Function call: R|<local>/q|.R|/QImplMutable.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()"];
|
||||
532 [label="Exit block"];
|
||||
}
|
||||
533 [label="Exit when branch result"];
|
||||
|
||||
@@ -67,23 +67,23 @@ FILE: nullability.kt
|
||||
R|<local>/x|.R|/A.foo|()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
public final fun test_2(x: R|A?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
==(R|<local>/x|, Null(null)) -> {
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
else -> {
|
||||
R|<local>/x|.R|/A.foo|()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
public final fun test_3(x: R|A?|): R|kotlin/Unit| {
|
||||
R|<local>/x| ?: ^test_3 Unit
|
||||
@@ -102,8 +102,8 @@ FILE: nullability.kt
|
||||
when () {
|
||||
!=(R|<local>/q|?.{ $subj$.R|/Q.data| }?.{ $subj$.R|/MyData.s| }?.{ $subj$.R|kotlin/Int.inc|() }, Null(null)) -> {
|
||||
R|<local>/q|.R|/Q.data|
|
||||
R|<local>/q|.R|/Q.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#
|
||||
R|<local>/q|.R|/Q.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
R|<local>/q|.R|/Q.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#
|
||||
R|<local>/q|.R|/Q.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,15 +111,15 @@ FILE: nullability.kt
|
||||
public final fun test_6(q: R|Q?|): R|kotlin/Unit| {
|
||||
R|<local>/q|?.{ $subj$.R|/Q.data| }?.{ $subj$.R|/MyData.s| }?.{ $subj$.R|kotlin/Int.inc|() } ?: ^test_6 Unit
|
||||
R|<local>/q|.R|/Q.data|
|
||||
R|<local>/q|.R|/Q.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#
|
||||
R|<local>/q|.R|/Q.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
R|<local>/q|.R|/Q.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#
|
||||
R|<local>/q|.R|/Q.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
}
|
||||
public final fun test_7(q: R|Q?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
!=(R|<local>/q|?.{ $subj$.R|/Q.fdata|() }?.{ $subj$.R|/MyData.fs|() }?.{ $subj$.R|kotlin/Int.inc|() }, Null(null)) -> {
|
||||
R|<local>/q|.R|/Q.fdata|()
|
||||
R|<local>/q|.R|/Q.fdata|().<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.fs>#()
|
||||
R|<local>/q|.R|/Q.fdata|().<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.fs>#().R|kotlin/Int.inc|()
|
||||
R|<local>/q|.R|/Q.fdata|().<Inapplicable(UNSAFE_CALL): /MyData.fs>#()
|
||||
R|<local>/q|.R|/Q.fdata|().<Inapplicable(UNSAFE_CALL): /MyData.fs>#().R|kotlin/Int.inc|()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,58 +139,58 @@ FILE: nullability.kt
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
when () {
|
||||
===(R|<local>/a|, R|<local>/b|) -> {
|
||||
R|<local>/b|.R|kotlin/Int.inc|()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
when () {
|
||||
==(R|<local>/b|, R|<local>/a|) -> {
|
||||
R|<local>/b|.R|kotlin/Int.inc|()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
when () {
|
||||
===(R|<local>/b|, R|<local>/a|) -> {
|
||||
R|<local>/b|.R|kotlin/Int.inc|()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
}
|
||||
public final fun test_10(a: R|kotlin/Int?|, b: R|kotlin/Int?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
==(R|<local>/a|, R|<local>/b|) -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
when () {
|
||||
===(R|<local>/a|, R|<local>/b|) -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
when () {
|
||||
==(R|<local>/b|, R|<local>/a|) -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
when () {
|
||||
===(R|<local>/b|, R|<local>/a|) -> {
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/b|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/b|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
}
|
||||
public final fun test_11(q: R|QImpl?|, q2: R|QImpl|): R|kotlin/Unit| {
|
||||
when () {
|
||||
@@ -199,8 +199,8 @@ FILE: nullability.kt
|
||||
R|<local>/q|.R|/QImpl.data|.R|/MyData.s|
|
||||
R|<local>/q|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()
|
||||
R|<local>/q2|.R|/QImpl.data|
|
||||
R|<local>/q2|.R|/QImpl.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#
|
||||
R|<local>/q2|.R|/QImpl.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
R|<local>/q2|.R|/QImpl.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#
|
||||
R|<local>/q2|.R|/QImpl.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
when () {
|
||||
!=(R|<local>/q2|.R|/QImpl.data|, Null(null)) -> {
|
||||
R|<local>/q2|.R|/QImpl.data|.R|/MyData.s|
|
||||
@@ -216,8 +216,8 @@ FILE: nullability.kt
|
||||
when () {
|
||||
!=(R|<local>/q|?.{ $subj$.R|/QImplWithCustomGetter.data| }?.{ $subj$.R|/MyData.s| }?.{ $subj$.R|kotlin/Int.inc|() }, Null(null)) -> {
|
||||
R|<local>/q|.R|/QImplWithCustomGetter.data|
|
||||
R|<local>/q|.R|/QImplWithCustomGetter.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#
|
||||
R|<local>/q|.R|/QImplWithCustomGetter.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
R|<local>/q|.R|/QImplWithCustomGetter.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#
|
||||
R|<local>/q|.R|/QImplWithCustomGetter.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,8 +226,8 @@ FILE: nullability.kt
|
||||
when () {
|
||||
!=(R|<local>/q|?.{ $subj$.R|/QImplMutable.data| }?.{ $subj$.R|/MyData.s| }?.{ $subj$.R|kotlin/Int.inc|() }, Null(null)) -> {
|
||||
R|<local>/q|.R|/QImplMutable.data|
|
||||
R|<local>/q|.R|/QImplMutable.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#
|
||||
R|<local>/q|.R|/QImplMutable.data|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
R|<local>/q|.R|/QImplMutable.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#
|
||||
R|<local>/q|.R|/QImplMutable.data|.<Inapplicable(UNSAFE_CALL): /MyData.s>#.R|kotlin/Int.inc|()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,6 @@ fun test_3(a: Any?, b: Boolean) {
|
||||
|
||||
fun test_4(a: Any?, b: Boolean) {
|
||||
if (a is String || b) {
|
||||
a<!UNSAFE_CALL!>.<!>foo() // Should be Bad
|
||||
a.<!INAPPLICABLE_CANDIDATE!>foo<!>() // Should be Bad
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ digraph safeCallAndEqualityToBool_kt {
|
||||
color=blue
|
||||
21 [label="Enter block"];
|
||||
22 [label="Access variable R|<local>/s|"];
|
||||
23 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
23 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
24 [label="Exit block"];
|
||||
}
|
||||
25 [label="Exit when branch result"];
|
||||
@@ -131,7 +131,7 @@ digraph safeCallAndEqualityToBool_kt {
|
||||
color=blue
|
||||
49 [label="Enter block"];
|
||||
50 [label="Access variable R|<local>/s|"];
|
||||
51 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
51 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
52 [label="Exit block"];
|
||||
}
|
||||
53 [label="Exit when branch result"];
|
||||
@@ -217,7 +217,7 @@ digraph safeCallAndEqualityToBool_kt {
|
||||
color=blue
|
||||
83 [label="Enter block"];
|
||||
84 [label="Access variable R|<local>/s|"];
|
||||
85 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
85 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
86 [label="Exit block"];
|
||||
}
|
||||
87 [label="Exit when branch result"];
|
||||
@@ -294,7 +294,7 @@ digraph safeCallAndEqualityToBool_kt {
|
||||
color=blue
|
||||
111 [label="Enter block"];
|
||||
112 [label="Access variable R|<local>/s|"];
|
||||
113 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
113 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
114 [label="Exit block"];
|
||||
}
|
||||
115 [label="Exit when branch result"];
|
||||
|
||||
@@ -8,7 +8,7 @@ FILE: safeCallAndEqualityToBool.kt
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
}
|
||||
else -> {
|
||||
R|<local>/s|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/s|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ FILE: safeCallAndEqualityToBool.kt
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
}
|
||||
else -> {
|
||||
R|<local>/s|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/s|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ FILE: safeCallAndEqualityToBool.kt
|
||||
public final fun test_3(s: R|kotlin/String?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
!=(R|<local>/s|?.{ $subj$.R|/check|() }, Boolean(true)) -> {
|
||||
R|<local>/s|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/s|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
}
|
||||
else -> {
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
@@ -38,7 +38,7 @@ FILE: safeCallAndEqualityToBool.kt
|
||||
public final fun test_4(s: R|kotlin/String?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
!=(R|<local>/s|?.{ $subj$.R|/check|() }, Boolean(false)) -> {
|
||||
R|<local>/s|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/s|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
}
|
||||
else -> {
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
|
||||
@@ -53,7 +53,7 @@ digraph safeCalls_kt {
|
||||
19 [label="Function call: $subj$.R|/foo|(...)"];
|
||||
20 [label="Exit safe call"];
|
||||
21 [label="Access variable R|<local>/x|"];
|
||||
22 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
22 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
23 [label="Exit block"];
|
||||
}
|
||||
24 [label="Exit function test" style="filled" fillcolor=red];
|
||||
@@ -208,7 +208,7 @@ digraph safeCalls_kt {
|
||||
78 [label="Function call: $subj$.R|/A.bool|()"];
|
||||
79 [label="Exit safe call"];
|
||||
80 [label="Access variable R|<local>/x|"];
|
||||
81 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.id>#()"];
|
||||
81 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.id>#()"];
|
||||
82 [label="Exit block"];
|
||||
}
|
||||
83 [label="Exit function test_4" style="filled" fillcolor=red];
|
||||
@@ -272,7 +272,7 @@ digraph safeCalls_kt {
|
||||
101 [label="Function call: $subj$.R|/boo|(...)"];
|
||||
102 [label="Exit safe call"];
|
||||
103 [label="Access variable R|<local>/x|"];
|
||||
104 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.id>#()"];
|
||||
104 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.id>#()"];
|
||||
105 [label="Exit block"];
|
||||
}
|
||||
106 [label="Exit function test_5" style="filled" fillcolor=red];
|
||||
|
||||
@@ -6,7 +6,7 @@ FILE: safeCalls.kt
|
||||
}
|
||||
public final fun test(x: R|kotlin/String?|): R|kotlin/Unit| {
|
||||
R|<local>/x|?.{ $subj$.R|/foo|(==(R|<local>/x|.R|kotlin/String.length|, Int(1))) }
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
}
|
||||
public abstract interface A : R|kotlin/Any| {
|
||||
public abstract fun bar(a: R|A|): R|kotlin/String|
|
||||
@@ -28,7 +28,7 @@ FILE: safeCalls.kt
|
||||
}
|
||||
public final fun test_4(x: R|A?|): R|kotlin/Unit| {
|
||||
R|<local>/x|?.{ $subj$.R|/A.id|() }?.{ $subj$.R|/A.bool|() }
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.id>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.id>#()
|
||||
}
|
||||
public final fun R|kotlin/Any?|.boo(b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
}
|
||||
@@ -37,5 +37,5 @@ FILE: safeCalls.kt
|
||||
^test_5 Unit
|
||||
}
|
||||
) }?.{ $subj$.R|/boo|(R|<local>/x|.R|/A.bool|()) }
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.id>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.id>#()
|
||||
}
|
||||
|
||||
@@ -166,83 +166,88 @@ digraph smartcastToNothing_kt {
|
||||
52 [label="Enter block"];
|
||||
53 [label="Const: Null(null)"];
|
||||
54 [label="Variable declaration: lvar s: R|A?|"];
|
||||
55 [label="Access variable R|<local>/results|"];
|
||||
56 [label="Function call: R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()"];
|
||||
57 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>|"];
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
58 [label="Enter while loop"];
|
||||
55 [label="Enter block"];
|
||||
56 [label="Access variable R|<local>/results|"];
|
||||
57 [label="Function call: R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()"];
|
||||
58 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>|"];
|
||||
subgraph cluster_17 {
|
||||
color=blue
|
||||
59 [label="Enter loop condition"];
|
||||
60 [label="Access variable R|<local>/<iterator>|"];
|
||||
61 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
62 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
63 [label="Enter loop block"];
|
||||
59 [label="Enter while loop"];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
60 [label="Enter loop condition"];
|
||||
61 [label="Access variable R|<local>/<iterator>|"];
|
||||
62 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
63 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
64 [label="Enter block"];
|
||||
65 [label="Access variable R|<local>/<iterator>|"];
|
||||
66 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()"];
|
||||
67 [label="Stub" style="filled" fillcolor=gray];
|
||||
68 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray];
|
||||
69 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
|
||||
70 [label="Stub" style="filled" fillcolor=gray];
|
||||
71 [label="Assignment: R|<local>/s|" style="filled" fillcolor=gray];
|
||||
64 [label="Enter loop block"];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
72 [label="Enter when" style="filled" fillcolor=gray];
|
||||
65 [label="Enter block"];
|
||||
66 [label="Access variable R|<local>/<iterator>|"];
|
||||
67 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()"];
|
||||
68 [label="Stub" style="filled" fillcolor=gray];
|
||||
69 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray];
|
||||
70 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
|
||||
71 [label="Stub" style="filled" fillcolor=gray];
|
||||
72 [label="Assignment: R|<local>/s|" style="filled" fillcolor=gray];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
73 [label="Enter when branch condition " style="filled" fillcolor=gray];
|
||||
74 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
|
||||
75 [label="Stub" style="filled" fillcolor=gray];
|
||||
76 [label="Access variable <Unresolved name: b>#" style="filled" fillcolor=gray];
|
||||
77 [label="Exit when branch condition" style="filled" fillcolor=gray];
|
||||
73 [label="Enter when" style="filled" fillcolor=gray];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
74 [label="Enter when branch condition " style="filled" fillcolor=gray];
|
||||
75 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
|
||||
76 [label="Stub" style="filled" fillcolor=gray];
|
||||
77 [label="Access variable <Unresolved name: b>#" style="filled" fillcolor=gray];
|
||||
78 [label="Exit when branch condition" style="filled" fillcolor=gray];
|
||||
}
|
||||
79 [label="Synthetic else branch" style="filled" fillcolor=gray];
|
||||
80 [label="Enter when branch result" style="filled" fillcolor=gray];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
81 [label="Enter block" style="filled" fillcolor=gray];
|
||||
82 [label="Jump: break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()] " style="filled" fillcolor=gray];
|
||||
83 [label="Stub" style="filled" fillcolor=gray];
|
||||
84 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
85 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
86 [label="Exit when" style="filled" fillcolor=gray];
|
||||
}
|
||||
78 [label="Synthetic else branch" style="filled" fillcolor=gray];
|
||||
79 [label="Enter when branch result" style="filled" fillcolor=gray];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
80 [label="Enter block" style="filled" fillcolor=gray];
|
||||
81 [label="Jump: break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()] " style="filled" fillcolor=gray];
|
||||
82 [label="Stub" style="filled" fillcolor=gray];
|
||||
83 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
84 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
85 [label="Exit when" style="filled" fillcolor=gray];
|
||||
87 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
86 [label="Exit block" style="filled" fillcolor=gray];
|
||||
88 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
}
|
||||
87 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
89 [label="Exit whileloop"];
|
||||
}
|
||||
88 [label="Exit whileloop"];
|
||||
90 [label="Exit block"];
|
||||
}
|
||||
89 [label="Access variable R|<local>/s|"];
|
||||
90 [label="Enter safe call"];
|
||||
91 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_23 {
|
||||
91 [label="Access variable R|<local>/s|"];
|
||||
92 [label="Enter safe call"];
|
||||
93 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
98 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_24 {
|
||||
100 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_25 {
|
||||
color=blue
|
||||
99 [label="Enter block"];
|
||||
100 [label="Access variable R|<local>/it|"];
|
||||
101 [label="Access variable R|/A.a|"];
|
||||
102 [label="Exit block"];
|
||||
101 [label="Enter block"];
|
||||
102 [label="Access variable R|<local>/it|"];
|
||||
103 [label="Access variable R|/A.a|"];
|
||||
104 [label="Exit block"];
|
||||
}
|
||||
103 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
105 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
92 [label="Call arguments union" style="filled" fillcolor=yellow];
|
||||
93 [label="Postponed exit from lambda"];
|
||||
94 [label="Function call: $subj$.R|kotlin/let|<R|A|, R|kotlin/Int|>(...)"];
|
||||
95 [label="Exit safe call"];
|
||||
96 [label="Exit block"];
|
||||
94 [label="Call arguments union" style="filled" fillcolor=yellow];
|
||||
95 [label="Postponed exit from lambda"];
|
||||
96 [label="Function call: $subj$.R|kotlin/let|<R|A|, R|kotlin/Int|>(...)"];
|
||||
97 [label="Exit safe call"];
|
||||
98 [label="Exit block"];
|
||||
}
|
||||
97 [label="Exit function test_0" style="filled" fillcolor=red];
|
||||
99 [label="Exit function test_0" style="filled" fillcolor=red];
|
||||
}
|
||||
51 -> {52};
|
||||
52 -> {53};
|
||||
@@ -255,52 +260,54 @@ digraph smartcastToNothing_kt {
|
||||
59 -> {60};
|
||||
60 -> {61};
|
||||
61 -> {62};
|
||||
62 -> {88 63};
|
||||
63 -> {64};
|
||||
62 -> {63};
|
||||
63 -> {89 64};
|
||||
64 -> {65};
|
||||
65 -> {66};
|
||||
66 -> {97} [label=onUncaughtException];
|
||||
66 -> {67} [style=dotted];
|
||||
66 -> {67};
|
||||
67 -> {99} [label=onUncaughtException];
|
||||
67 -> {68} [style=dotted];
|
||||
68 -> {69} [style=dotted];
|
||||
69 -> {70} [style=dotted];
|
||||
69 -> {97} [style=dotted] [label=onUncaughtException];
|
||||
70 -> {71} [style=dotted];
|
||||
70 -> {99} [style=dotted] [label=onUncaughtException];
|
||||
71 -> {72} [style=dotted];
|
||||
72 -> {73} [style=dotted];
|
||||
73 -> {74} [style=dotted];
|
||||
74 -> {75} [style=dotted];
|
||||
74 -> {97} [style=dotted] [label=onUncaughtException];
|
||||
75 -> {76} [style=dotted];
|
||||
75 -> {99} [style=dotted] [label=onUncaughtException];
|
||||
76 -> {77} [style=dotted];
|
||||
77 -> {79 78} [style=dotted];
|
||||
78 -> {85} [style=dotted];
|
||||
79 -> {80} [style=dotted];
|
||||
77 -> {78} [style=dotted];
|
||||
78 -> {80 79} [style=dotted];
|
||||
79 -> {86} [style=dotted];
|
||||
80 -> {81} [style=dotted];
|
||||
81 -> {88 82} [style=dotted];
|
||||
82 -> {83} [style=dotted];
|
||||
81 -> {82} [style=dotted];
|
||||
82 -> {89 83} [style=dotted];
|
||||
83 -> {84} [style=dotted];
|
||||
84 -> {85} [style=dotted];
|
||||
85 -> {86} [style=dotted];
|
||||
86 -> {87} [style=dotted];
|
||||
87 -> {59} [color=green style=dotted];
|
||||
88 -> {89};
|
||||
89 -> {90 95};
|
||||
87 -> {88} [style=dotted];
|
||||
88 -> {60} [color=green style=dotted];
|
||||
89 -> {90};
|
||||
90 -> {91};
|
||||
91 -> {98};
|
||||
91 -> {93} [color=red];
|
||||
91 -> {98} [style=dashed];
|
||||
92 -> {94} [color=red];
|
||||
93 -> {94} [color=green];
|
||||
94 -> {95};
|
||||
95 -> {96};
|
||||
91 -> {92 97};
|
||||
92 -> {93};
|
||||
93 -> {100};
|
||||
93 -> {95} [color=red];
|
||||
93 -> {100} [style=dashed];
|
||||
94 -> {96} [color=red];
|
||||
95 -> {96} [color=green];
|
||||
96 -> {97};
|
||||
97 -> {98};
|
||||
98 -> {99};
|
||||
99 -> {100};
|
||||
100 -> {101};
|
||||
101 -> {102};
|
||||
102 -> {103};
|
||||
103 -> {92} [color=red];
|
||||
103 -> {93} [color=green];
|
||||
103 -> {104};
|
||||
104 -> {105};
|
||||
105 -> {94} [color=red];
|
||||
105 -> {95} [color=green];
|
||||
|
||||
}
|
||||
|
||||
@@ -30,14 +30,17 @@ FILE: smartcastToNothing.kt
|
||||
}
|
||||
public final fun test_0(results: R|kotlin/collections/List<kotlin/Nothing>|): R|kotlin/Unit| {
|
||||
lvar s: R|A?| = Null(null)
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>| = R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval result: R|kotlin/Nothing| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()
|
||||
R|<local>/s| = R|<local>/result|
|
||||
when () {
|
||||
R|<local>/result|.<Unresolved name: b># -> {
|
||||
break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()]
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>| = R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval result: R|kotlin/Nothing| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()
|
||||
R|<local>/s| = R|<local>/result|
|
||||
when () {
|
||||
R|<local>/result|.<Unresolved name: b># -> {
|
||||
break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ digraph delayedAssignment_kt {
|
||||
32 [label="Exit when"];
|
||||
}
|
||||
33 [label="Access variable R|<local>/a|"];
|
||||
34 [label="Function call: R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()"];
|
||||
34 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
|
||||
35 [label="Exit block"];
|
||||
}
|
||||
36 [label="Exit function test" style="filled" fillcolor=red];
|
||||
|
||||
@@ -20,5 +20,5 @@ FILE: delayedAssignment.kt
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ digraph smartcastAfterReassignment_kt {
|
||||
40 [label="Const: Null(null)"];
|
||||
41 [label="Assignment: R|<local>/x|"];
|
||||
42 [label="Access variable R|<local>/x|"];
|
||||
43 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
43 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
44 [label="Exit block"];
|
||||
}
|
||||
45 [label="Exit function test_3" style="filled" fillcolor=red];
|
||||
|
||||
@@ -19,5 +19,5 @@ FILE: smartcastAfterReassignment.kt
|
||||
R|<local>/x| = String()
|
||||
R|<local>/x|.R|kotlin/String.length|
|
||||
R|<local>/x| = Null(null)
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@ class Test5<T, B> {
|
||||
|
||||
fun <Z> topLevelFun() {
|
||||
<!INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS!>class Test8<!> : Error()
|
||||
val obj = <!INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS{LT}!><!INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS{PSI}!>object<!> : Throwable() {}<!>
|
||||
val obj = <!INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS!>object<!> : Throwable() {}
|
||||
}
|
||||
|
||||
@@ -9,18 +9,24 @@ FILE: varargInPrimaryConstructor.kt
|
||||
|
||||
}
|
||||
public final fun test_1(foo: R|Foo|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/String>| = R|<local>/foo|.R|/Foo.strings|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out kotlin/String)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval s: R|kotlin/String| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/String|>|()
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/String>| = R|<local>/foo|.R|/Foo.strings|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out kotlin/String)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval s: R|kotlin/String| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/String|>|()
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_2(vararg strings: R|kotlin/Array<out kotlin/String>|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/String>| = R|<local>/strings|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out kotlin/String)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval s: R|kotlin/String| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/String|>|()
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/String>| = R|<local>/strings|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out kotlin/String)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval s: R|kotlin/String| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/String|>|()
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@ class A {
|
||||
companion object Comp {}
|
||||
|
||||
fun foo() {
|
||||
<!HIDDEN!>Comp<!>()
|
||||
<!INVISIBLE_REFERENCE!>Comp<!>()
|
||||
}
|
||||
}
|
||||
|
||||
object B {
|
||||
private val x = <!HIDDEN!>B<!>()
|
||||
private val x = <!INVISIBLE_REFERENCE!>B<!>()
|
||||
}
|
||||
|
||||
class D {
|
||||
|
||||
@@ -19,5 +19,5 @@ abstract class A {
|
||||
// FILE: main.kt
|
||||
|
||||
fun test(b: B): String {
|
||||
return b <!HIDDEN!>foo<!> "hello" // should be an error
|
||||
return b <!INVISIBLE_REFERENCE!>foo<!> "hello" // should be an error
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ FILE: beyoundCalls.kt
|
||||
}
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval x: R|(kotlin/String) -> kotlin/Int| = ::R|/bar|
|
||||
lval y: <ERROR TYPE REF: No result type for initializer> = ::<Unresolved reference: bar>#
|
||||
lval y: R|ERROR CLASS: Ambiguity: bar, [/bar, /bar]| = ::<Ambiguity: bar, [/bar, /bar]>#
|
||||
lval z: R|kotlin/reflect/KFunction1<kotlin/String, kotlin/Int>| = ::R|/baz|
|
||||
lval w: R|(kotlin/String) -> kotlin/Int| = ::R|/foobaz<kotlin/String, kotlin/Int>|
|
||||
::R|/baz|
|
||||
|
||||
@@ -6,7 +6,7 @@ fun <T, R> foobaz(x: T): R = TODO()
|
||||
|
||||
fun foo() {
|
||||
val x: (String) -> Int = ::bar
|
||||
val y = ::<!UNRESOLVED_REFERENCE!>bar<!>
|
||||
val y = ::<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!>
|
||||
val z = ::baz
|
||||
val w: (String) -> Int = ::foobaz
|
||||
|
||||
|
||||
@@ -6,5 +6,5 @@ FILE: ambiguityWhenNoApplicableCallableReferenceCandidate.kt
|
||||
public final fun <T> bar(f: R|(T) -> kotlin/Unit|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/bar|<R|kotlin/Any?|>(::<Unresolved reference: foo>#)
|
||||
R|/bar|<R|kotlin/Any?|>(::<Ambiguity: foo, [/foo, /foo]>#)
|
||||
}
|
||||
|
||||
@@ -4,5 +4,5 @@ fun foo(y: String) {}
|
||||
fun <T> bar(f: (T) -> Unit) {}
|
||||
|
||||
fun test() {
|
||||
bar(::<!UNRESOLVED_REFERENCE!>foo<!>)
|
||||
bar(::<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ FILE: chooseCallableReferenceDependingOnInferredReceiver.kt
|
||||
lval a: R|A| = R|/bar|<R|A|>(::R|/A.foo|)
|
||||
lval b: R|B| = R|/bar|<R|B|>(::R|/B.foo|)
|
||||
lval t3: R|B| = R|/bar|<R|B|>(::R|/B.baz|)
|
||||
^ R|/bar|<R|kotlin/Nothing|>(::<Unresolved reference: foo>#)
|
||||
^ R|/bar|<R|kotlin/Nothing|>(::<Ambiguity: foo, [/B.foo, /B.foo]>#)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ fun test() {
|
||||
|
||||
val t3 = bar(::baz)
|
||||
|
||||
bar(::<!UNRESOLVED_REFERENCE!>foo<!>)
|
||||
bar(::<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ FILE: eagerAndPostponedCallableReferences.kt
|
||||
lval a4: R|B| = R|/foo|<R|B|>(::R|/multiple|, ::R|/singleB|)
|
||||
lval a5: R|A| = R|/foo|<R|A|>(::R|/singleA|, ::R|/singleA|)
|
||||
lval a6: R|it(A & B)| = R|/foo|<R|it(A & B)|>(::R|/singleA|, ::R|/singleB|)
|
||||
R|/foo|<R|kotlin/Nothing|>(::<Unresolved reference: multiple>#, ::<Unresolved reference: multiple>#)
|
||||
R|/foo|<R|kotlin/Nothing|>(::<Ambiguity: multiple, [/multiple, /multiple]>#, ::<Ambiguity: multiple, [/multiple, /multiple]>#)
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user