before_code
stringlengths
30
149k
reviewer_comment
stringlengths
16
20.6k
after_code
stringlengths
30
163k
diff_context
stringlengths
0
22.4k
file_path
stringlengths
6
155
comment_line
int64
0
26
language
stringclasses
19 values
quality_score
float64
0.07
1
comment_type
stringclasses
9 values
comment_length
int64
16
20.6k
before_lines
int64
2
4.61k
after_lines
int64
2
4.4k
is_negative
bool
2 classes
pr_title
stringlengths
7
140
pr_number
int64
18
61.2k
repo_name
stringclasses
29 values
repo_stars
int64
321
56k
repo_language
stringclasses
14 values
reviewer_username
stringclasses
378 values
author_username
stringclasses
739 values
user
stringlengths
361
200k
assistant
stringlengths
16
20.6k
system
stringclasses
1 value
package kotlin.random /** * Random number generator, using Marsaglia's "xorwow" algorithm * * Cycles after 2^192 - 2^32 repetitions. * * For more details, see Marsaglia, George (July 2003). "Xorshift RNGs". Journal of Statistical Software. 8 (14). doi:10.18637/jss.v008.i14 * * Available at https://www.jstatsoft...
No issues found.
package kotlin.random /** * Random number generator, using Marsaglia's "xorwow" algorithm * * Cycles after 2^192 - 2^32 repetitions. * * For more details, see Marsaglia, George (July 2003). "Xorshift RNGs". Journal of Statistical Software. 8 (14). doi:10.18637/jss.v008.i14 * * Available at https://www.jstatsoft...
@@ -15,15 +15,14 @@ package kotlin.random * Available at https://www.jstatsoft.org/v08/i14/paper * */ -internal class XorWowRandom -internal constructor( +internal class XorWowRandom internal constructor( private var x: Int, private var y: Int, private var z: Int, private var w: Int, priv...
libraries/stdlib/src/kotlin/random/XorWowRandom.kt
0
Kotlin
1
none
16
51
51
true
Make random implementations serializable
3,912
JetBrains/kotlin
51,705
Kotlin
CommanderTvis
Review this pull request change. Language: Kotlin File: libraries/stdlib/src/kotlin/random/XorWowRandom.kt PR Title: Make random implementations serializable BEFORE CODE: package kotlin.random /** * Random number generator, using Marsaglia's "xorwow" algorithm * * Cycles after 2^192 - 2^32 repetitions. * * Fo...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} fun IrSimpleFunction.collectRealOverrides( toSkip: (IrSimpleFunction) -> Boolean = { false }, filter: (IrOverridableMember) -> Boolean = { false } ): Set<IrSimpleFunction> { if (isReal && !toSkip(this)) return setOf(this) return this.overriddenSymbols .map { it.owner } .collectAndFil...
No issues found.
} fun IrSimpleFunction.collectRealOverrides( toSkip: (IrSimpleFunction) -> Boolean = { false }, filter: (IrOverridableMember) -> Boolean = { false } ): Set<IrSimpleFunction> { if (isReal && !toSkip(this)) return setOf(this) return this.overriddenSymbols .map { it.owner } .collectAndFil...
@@ -38,15 +38,21 @@ fun IrSimpleFunction.collectRealOverrides( return this.overriddenSymbols .map { it.owner } - .collectAndFilterRealOverrides { - require(it is IrSimpleFunction) { "Expected IrSimpleFunction: ${it.render()}" } - toSkip(it) || filter(it) - } + ...
compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrFakeOverrideUtils.kt
0
Kotlin
1
none
16
51
51
true
Use separate logic for filtering and skipping in collectAndFilterRealOverrides [KT-43487]
3,921
JetBrains/kotlin
51,705
Kotlin
LepilkinaElena
Review this pull request change. Language: Kotlin File: compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrFakeOverrideUtils.kt PR Title: Use separate logic for filtering and skipping in collectAndFilterRealOverrides [KT-43487] BEFORE CODE: } fun IrSimpleFunction.collectRealOverrides( toSkip: (IrSimpleFunc...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/** * Perform a substitution of type parameters occuring in [this]. In order of * precedence, parameter `P` is substituted with... * * 1) `T`, if `srcToDstParameterMap.get(P) == T` * 2) `T`, if `source.typeParameters[i] == P` and * `target.typeParameters[i] == T` * 3) `P` * * If [srcToDstParameter...
No issues found.
/** * Perform a substitution of type parameters occuring in [this]. In order of * precedence, parameter `P` is substituted with... * * 1) `T`, if `srcToDstParameterMap.get(P) == T` * 2) `T`, if `source.typeParameters[i] == P` and * `target.typeParameters[i] == T` * 3) `P` * * If [srcToDstParameter...
@@ -144,7 +144,8 @@ fun IrValueParameter.copyTo( } return factory.createValueParameter( startOffset, endOffset, origin, symbol, - name, index, type, varargElementType, isCrossinline, isNoinline, isAssignable = isAssignable + name, index, type, varargElementType, isCrossinline = isCrossi...
compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrUtils.kt
0
Kotlin
1
none
16
51
51
true
[IR] Make isHidden and isAssignable explicit on IrValueParameter.
3,939
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Kotlin File: compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrUtils.kt PR Title: [IR] Make isHidden and isAssignable explicit on IrValueParameter. BEFORE CODE: /** * Perform a substitution of type parameters occuring in [this]. In order of * prece...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
import java.util.concurrent.Executors; import java.util.function.Consumer; public class D8Checker { private D8Checker() { } public static void check(ClassFileFactory outputFiles) { runD8(builder -> { for (OutputFile file : ClassFileUtilsKt.getClassFiles(outputFiles)) { ...
No issues found.
import java.util.concurrent.Executors; import java.util.function.Consumer; public class D8Checker { private D8Checker() { } public static void check(ClassFileFactory outputFiles) { runD8(builder -> { for (OutputFile file : ClassFileUtilsKt.getClassFiles(outputFiles)) { ...
@@ -40,9 +40,27 @@ public static void checkFilesWithD8(Collection<Pair<byte[], String>> classFiles) }); } + // Compilation with D8 should proceed with no output. There should be no info, warnings, or errors. + static class TestDiagnosticsHandler implements DiagnosticsHandler { + @Override +...
compiler/tests-common/tests/org/jetbrains/kotlin/codegen/D8Checker.java
0
Java
1
none
16
51
51
true
[JVM] Do not put the name of default lambda parameter in LVT.
3,946
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Java File: compiler/tests-common/tests/org/jetbrains/kotlin/codegen/D8Checker.java PR Title: [JVM] Do not put the name of default lambda parameter in LVT. BEFORE CODE: import java.util.concurrent.Executors; import java.util.function.Consumer; public class D8Checker { ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
package capturedReceiverName import kotlin.sequences.* import kotlin.coroutines.* fun builder(c: suspend () -> Unit) { c.startCoroutine(object : Continuation<Unit>{ override val context: CoroutineContext get() = EmptyCoroutineContext override fun resumeWith(result: Result<Unit>) { ...
No issues found.
package capturedReceiverName import kotlin.sequences.* import kotlin.coroutines.* fun builder(c: suspend () -> Unit) { c.startCoroutine(object : Continuation<Unit>{ override val context: CoroutineContext get() = EmptyCoroutineContext override fun resumeWith(result: Result<Unit>) { ...
@@ -0,0 +1,40 @@ +package capturedReceiverName + +import kotlin.sequences.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(object : Continuation<Unit>{ + override val context: CoroutineContext + get() = EmptyCoroutineContext + + override fun resumeWith...
idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt
0
Kotlin
1
none
16
40
40
true
[IR] Align debugging of suspend lambdas with old BE
3,951
JetBrains/kotlin
51,705
Kotlin
kandersen
Review this pull request change. Language: Kotlin File: idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt PR Title: [IR] Align debugging of suspend lambdas with old BE BEFORE CODE: package capturedReceiverName import kotlin.sequences.* import kotlin.corouti...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
import java.lang.instrument.Instrumentation; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.util.List; public class Premain { public static void premain(String agentArgs, Instrumentation inst) { RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean()...
No issues found.
import java.lang.instrument.Instrumentation; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.util.List; public class Premain { public static void premain(String agentArgs, Instrumentation inst) { RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean()...
@@ -0,0 +1,14 @@ +import java.lang.instrument.Instrumentation; +import java.lang.management.ManagementFactory; +import java.lang.management.RuntimeMXBean; +import java.util.List; + +public class Premain { + public static void premain(String agentArgs, Instrumentation inst) { + RuntimeMXBean bean = ManagementF...
compiler/testData/integration/ant/jvm/fork/premain/Premain.java
0
Java
1
none
16
15
15
true
Ant: Add support for fork-mode
3,958
JetBrains/kotlin
51,705
Kotlin
scaventz
Review this pull request change. Language: Java File: compiler/testData/integration/ant/jvm/fork/premain/Premain.java PR Title: Ant: Add support for fork-mode BEFORE CODE: import java.lang.instrument.Instrumentation; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import ja...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
build(RESOLVE_ALL_CONFIGURATIONS_TASK_NAME, options = options) { assertSuccessful() assertTasksExecuted(":${subproject?.let { "$it:" }.orEmpty()}$RESOLVE_ALL_CONFIGURATIONS_TASK_NAME") val unresolvedConfigurations = unresolvedConfigurationRegex.findAll(output).map { it.groupValues[1] }.toLis...
No issues found.
build(RESOLVE_ALL_CONFIGURATIONS_TASK_NAME, options = options) { assertSuccessful() assertTasksExecuted(":${subproject?.let { "$it:" }.orEmpty()}$RESOLVE_ALL_CONFIGURATIONS_TASK_NAME") val unresolvedConfigurations = unresolvedConfigurationRegex.findAll(output).map { it.groupValues[1] }.toLis...
@@ -5,7 +5,6 @@ package org.jetbrains.kotlin.gradle.util -import org.gradle.api.logging.configuration.WarningMode import org.jetbrains.kotlin.gradle.BaseGradleIT import kotlin.test.assertTrue @@ -16,7 +15,7 @@ private val unresolvedConfigurationRegex = "${Regex.escape(UNRESOLVED_MARKER)}(. fun BaseGradleIT.Pr...
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/util/testResolveAllConfigurations.kt
0
Kotlin
1
none
16
51
51
true
Avoid resolving deprecated configurations in tests
3,970
JetBrains/kotlin
51,705
Kotlin
bingranl
Review this pull request change. Language: Kotlin File: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/util/testResolveAllConfigurations.kt PR Title: Avoid resolving deprecated configurations in tests BEFORE CODE: build(RESOLVE_ALL_CONFIGURATIONS_TASK_NAME, op...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl import org.jetbrains.kotlin.ir.expressions.impl.IrVarargImpl import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.isNullableAny import org.jetbrains.kotlin.ir.types.isUnit import org.jetbrains.kotlin.ir.util.isEffectivelyExternal imp...
No issues found.
import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl import org.jetbrains.kotlin.ir.expressions.impl.IrVarargImpl import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.isNullableAny import org.jetbrains.kotlin.ir.types.isUnit import org.jetbrains.kotlin.ir.util.isEffectivelyExternal imp...
@@ -64,41 +64,6 @@ fun List<IrExpression>.toJsArrayLiteral(context: JsIrBackendContext, arrayType: } } -// TODO: support more cases like built-in operator call and so on - -fun IrExpression?.isPure(anyVariable: Boolean, checkFields: Boolean = true): Boolean { - if (this == null) return true - - fun IrExpr...
compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/misc.kt
0
Kotlin
1
none
16
51
51
true
[IR] Fix saving function calls during inlining const properties in PropertyAccessorInlineLowering
3,971
JetBrains/kotlin
51,705
Kotlin
LepilkinaElena
Review this pull request change. Language: Kotlin File: compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/misc.kt PR Title: [IR] Fix saving function calls during inlining const properties in PropertyAccessorInlineLowering BEFORE CODE: import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl impo...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
private org.jetbrains.kotlin.protobuf.LazyStringList emptyPackage_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; private void ensureEmptyPackageIsMutable() { if (!((bitField0_ & 0x00000040) == 0x00000040)) { emptyPackage_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayLis...
No issues found.
private org.jetbrains.kotlin.protobuf.LazyStringList emptyPackage_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; private void ensureEmptyPackageIsMutable() { if (!((bitField0_ & 0x00000040) == 0x00000040)) { emptyPackage_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayLis...
@@ -10,17 +10,21 @@ public static void registerAllExtensions( registry.add(org.jetbrains.kotlin.library.metadata.KlibMetadataProtoBuf.packageFqName); registry.add(org.jetbrains.kotlin.library.metadata.KlibMetadataProtoBuf.classAnnotation); registry.add(org.jetbrains.kotlin.library.metadata.KlibMetadataPr...
compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/KlibMetadataProtoBuf.java
0
Java
1
none
16
51
51
true
Rra/ivanov/kdoc2klib
3,978
JetBrains/kotlin
51,705
Kotlin
knebekaizer
Review this pull request change. Language: Java File: compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/KlibMetadataProtoBuf.java PR Title: Rra/ivanov/kdoc2klib BEFORE CODE: private org.jetbrains.kotlin.protobuf.LazyStringList emptyPackage_ = org.jetbrains.kotlin.protobuf.LazyStringArrayL...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
import java.io.File import java.util.jar.JarFile fun main(args: Array<String>) { val jar = File(args[0]) // if "includeRuntime" is specified to be true var shouldIncludeRuntime = args[1].toBoolean() val hasKotlinPackage = JarFile(jar).entries().toList().any { it.name.startsWith("kotlin/") } if (sho...
No issues found.
import java.io.File import java.util.jar.JarFile fun main(args: Array<String>) { val jar = File(args[0]) // if "includeRuntime" is specified to be true var shouldIncludeRuntime = args[1].toBoolean() val hasKotlinPackage = JarFile(jar).entries().toList().any { it.name.startsWith("kotlin/") } if (sho...
@@ -0,0 +1,15 @@ +import java.io.File +import java.util.jar.JarFile + +fun main(args: Array<String>) { + val jar = File(args[0]) + // if "includeRuntime" is specified to be true + var shouldIncludeRuntime = args[1].toBoolean() + val hasKotlinPackage = JarFile(jar).entries().toList().any { it.name.startsWith...
compiler/testData/integration/ant/jvm/doNotIncludeRuntimeByDefault/test.kt
0
Kotlin
1
none
16
16
16
true
Ant task: do not include runtime by default if destination is a jar
3,990
JetBrains/kotlin
51,705
Kotlin
scaventz
Review this pull request change. Language: Kotlin File: compiler/testData/integration/ant/jvm/doNotIncludeRuntimeByDefault/test.kt PR Title: Ant task: do not include runtime by default if destination is a jar BEFORE CODE: import java.io.File import java.util.jar.JarFile fun main(args: Array<String>) { val jar ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
val javaEnumArray = Type.getType("[Ljava/lang/Enum;") invokestatic(enumJavaType.internalName, "values","()[${enumJavaType.descriptor}", false) checkcast(javaEnumArray) signature.append(javaEnumArray.descriptor) } contextSerializerId...
No issues found.
val javaEnumArray = Type.getType("[Ljava/lang/Enum;") invokestatic(enumJavaType.internalName, "values","()[${enumJavaType.descriptor}", false) checkcast(javaEnumArray) signature.append(javaEnumArray.descriptor) } contextSerializerId...
@@ -7,17 +7,31 @@ package org.jetbrains.kotlinx.serialization.compiler.backend.jvm import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.codegen.* +import org.jetbrains.kotlin.codegen.context.ClassContext import org.jetbrains.kotlin.descriptors.* +import org.jetbrains.kotlin.descriptors.a...
plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/compiler/backend/jvm/JVMCodegenUtil.kt
0
Kotlin
1
none
16
51
51
true
Lazy delegate for serializer in objects, sealed and abstract classes
3,996
JetBrains/kotlin
51,705
Kotlin
shanshin
Review this pull request change. Language: Kotlin File: plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/compiler/backend/jvm/JVMCodegenUtil.kt PR Title: Lazy delegate for serializer in objects, sealed and abstract classes BEFORE CODE: val javaEnumAr...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// WITH_RUNTIME // IGNORE_BACKEND: JVM // !LANGUAGE: +PackagePrivateFileClassesWithAllPrivateMembers private fun f() { } private val a = Unit private val b by lazy { Unit } @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.internal.InlineOnly public fun g() { }
No issues found.
// WITH_RUNTIME // IGNORE_BACKEND: JVM // !LANGUAGE: +PackagePrivateFileClassesWithAllPrivateMembers private fun f() { } private val a = Unit private val b by lazy { Unit } @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.internal.InlineOnly public fun g() { }
@@ -0,0 +1,14 @@ +// WITH_RUNTIME +// IGNORE_BACKEND: JVM +// !LANGUAGE: +PackagePrivateFileClassesWithAllPrivateMembers + +private fun f() { +} + +private val a = Unit +private val b by lazy { Unit } + +@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") +@kotlin.internal.InlineOnly +public fun g() { +}
compiler/testData/codegen/bytecodeListing/fileClassWithPrivateDeclarationsOnly_after.kt
0
Kotlin
1
none
16
15
15
true
[JVM_IR] Make file classes with all private members package-private
4,000
JetBrains/kotlin
51,705
Kotlin
CommanderTvis
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/bytecodeListing/fileClassWithPrivateDeclarationsOnly_after.kt PR Title: [JVM_IR] Make file classes with all private members package-private BEFORE CODE: // WITH_RUNTIME // IGNORE_BACKEND: JVM // !LANGUAGE: +PackagePrivateFileClassesWi...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
//FILE: test.kt fun foo() { fun bar() { } } fun box() { foo() } // Local functions are compiled to private static functions on the class // containing the local funtion. This has a number of consequences observable // from a debugging perspective, for this test specically: // - local functions do not...
No issues found.
//FILE: test.kt fun foo() { fun bar() { } } fun box() { foo() } // Local functions are compiled to private static functions on the class // containing the local funtion. This has a number of consequences observable // from a debugging perspective, for this test specically: // - local functions do not...
@@ -0,0 +1,31 @@ + + +//FILE: test.kt +fun foo() { + fun bar() { + } +} + +fun box() { + foo() +} + +// Local functions are compiled to private static functions on the class +// containing the local funtion. This has a number of consequences observable +// from a debugging perspective, for this test specicall...
compiler/testData/debug/localVariables/localFunUnused.kt
0
Kotlin
1
none
16
31
31
true
[IR+Tests] Improve Local Function Debugging Experience
4,002
JetBrains/kotlin
51,705
Kotlin
kandersen
Review this pull request change. Language: Kotlin File: compiler/testData/debug/localVariables/localFunUnused.kt PR Title: [IR+Tests] Improve Local Function Debugging Experience BEFORE CODE: //FILE: test.kt fun foo() { fun bar() { } } fun box() { foo() } // Local functions are compiled to private s...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
run("hello.run", "-cp", jar, "Hello.Foo", "O", "K"); } public void testHelloAppSuspendMainInMultifileIR() throws Exception { String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xu...
No issues found.
run("hello.run", "-cp", jar, "Hello.Foo", "O", "K"); } public void testHelloAppSuspendMainInMultifileIR() throws Exception { String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xu...
@@ -187,4 +187,18 @@ public void testBuildFile() throws Exception { ); run("buildFile.run", "-cp", tmpdir.getAbsolutePath(), "MainKt"); } + + public void testReflect() throws Exception { + String jar = tmpdir.getAbsolutePath() + File.separator + "reflect.jar"; + assertEquals("com...
compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java
0
Java
1
none
16
51
51
true
kotlinc: Include kotlin-reflect to resulting jar when option -include-runtime is specified and option -no-reflect is not
4,033
JetBrains/kotlin
51,705
Kotlin
scaventz
Review this pull request change. Language: Java File: compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java PR Title: kotlinc: Include kotlin-reflect to resulting jar when option -include-runtime is specified and option -no-reflect is not BEFORE CODE: run("hello.run", "-cp", jar, "Hello.Foo...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// WITH_RUNTIME @file:JvmName("TestKt") package test import kotlinx.parcelize.* import android.os.Parcel import android.os.Parcelable @Parcelize data class Foo(val value: Int) : Parcelable @Parcelize data class Box<T : Parcelable>(val box: T) : Parcelable fun box() = parcelTest { parcel -> val foo = Foo(42) ...
No issues found.
// WITH_RUNTIME @file:JvmName("TestKt") package test import kotlinx.parcelize.* import android.os.Parcel import android.os.Parcelable @Parcelize data class Foo(val value: Int) : Parcelable @Parcelize data class Box<T : Parcelable>(val box: T) : Parcelable fun box() = parcelTest { parcel -> val foo = Foo(42) ...
@@ -0,0 +1,27 @@ +// WITH_RUNTIME + +@file:JvmName("TestKt") +package test + +import kotlinx.parcelize.* +import android.os.Parcel +import android.os.Parcelable + +@Parcelize +data class Foo(val value: Int) : Parcelable + +@Parcelize +data class Box<T : Parcelable>(val box: T) : Parcelable + +fun box() = parcelTest { p...
plugins/parcelize/parcelize-compiler/testData/box/generics.kt
0
Kotlin
1
none
16
27
27
true
KT-42652 parcelize fix codegen for generic classes
4,047
JetBrains/kotlin
51,705
Kotlin
zveznicht
Review this pull request change. Language: Kotlin File: plugins/parcelize/parcelize-compiler/testData/box/generics.kt PR Title: KT-42652 parcelize fix codegen for generic classes BEFORE CODE: // WITH_RUNTIME @file:JvmName("TestKt") package test import kotlinx.parcelize.* import android.os.Parcel import android.os...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// IGNORE_BACKEND_FIR: JVM_IR // FILE: A.kt package a inline class Message(val value: String) class Box { internal fun result(msg: Message): String = msg.value } // FILE: B.kt fun box(): String { return a.Box().result(a.Message("OK")) }
No issues found.
// IGNORE_BACKEND_FIR: JVM_IR // FILE: A.kt package a inline class Message(val value: String) class Box { internal fun result(msg: Message): String = msg.value } // FILE: B.kt fun box(): String { return a.Box().result(a.Message("OK")) }
@@ -0,0 +1,16 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// FILE: A.kt + +package a + +inline class Message(val value: String) + +class Box { + internal fun result(msg: Message): String = msg.value +} + +// FILE: B.kt + +fun box(): String { + return a.Box().result(a.Message("OK")) +}
compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt
0
Kotlin
1
none
16
17
17
true
JVM IR: Fix inline class mangling for calls to internal functions in a different module
4,059
JetBrains/kotlin
51,705
Kotlin
sfs
Review this pull request change. Language: Kotlin File: compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt PR Title: JVM IR: Fix inline class mangling for calls to internal functions in a different module BEFORE CODE: // IGNORE_BACKEND_FIR: JVM_IR // FILE: A.kt package a inline class Message(...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.kapt3.util import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.resolve.DescriptorUtil...
No issues found.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.kapt3.util import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.resolve.DescriptorUtil...
@@ -0,0 +1,54 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.kapt3.util + +import org.jetbrains.kotlin.builtins.KotlinB...
plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/util/typeUtils.kt
0
Kotlin
1
none
16
51
51
true
KT-34838 replace anonymous classes with superclass in delegate properties
4,079
JetBrains/kotlin
51,705
Kotlin
zveznicht
Review this pull request change. Language: Kotlin File: plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/util/typeUtils.kt PR Title: KT-34838 replace anonymous classes with superclass in delegate properties BEFORE CODE: * Use of this source code is governed by the Apache 2.0 license that can be found i...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing ...
No issues found.
* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing ...
@@ -23,13 +23,24 @@ 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 java.io.File +import java.io.FileNotFoundException fun OutputFileCollection.writeAll...
compiler/cli/src/org/jetbrains/kotlin/cli/common/output/outputUtils.kt
0
Kotlin
1
none
16
51
51
true
Kotlinc: catch FNFE caused by problematic destination.
4,080
JetBrains/kotlin
51,705
Kotlin
scaventz
Review this pull request change. Language: Kotlin File: compiler/cli/src/org/jetbrains/kotlin/cli/common/output/outputUtils.kt PR Title: Kotlinc: catch FNFE caused by problematic destination. BEFORE CODE: * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
mode, detectMemoryLeaks ) } } fun getKotlinGeneratedSourcesDirectory(): File? { val value = processingOptions[KAPT_KOTLIN_GENERATED_OPTION_NAME] ?: return null return File(value).takeIf { it.exists() } } } interface KaptFlags { operator fun get(flag:...
No issues found.
mode, detectMemoryLeaks ) } } fun getKotlinGeneratedSourcesDirectory(): File? { val value = processingOptions[KAPT_KOTLIN_GENERATED_OPTION_NAME] ?: return null return File(value).takeIf { it.exists() } } } interface KaptFlags { operator fun get(flag:...
@@ -60,11 +60,8 @@ class KaptOptions( val processingOptions: MutableMap<String, String> = mutableMapOf() val javacOptions: MutableMap<String, String> = mutableMapOf() - val flags: MutableSet<KaptFlag> = mutableSetOf( - KaptFlag.USE_LIGHT_ANALYSIS, - KaptFlag.INCLUDE_COMP...
plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/KaptOptions.kt
0
Kotlin
1
none
16
51
51
true
Kapt: Ensure flag names and default values are consistent
4,083
JetBrains/kotlin
51,705
Kotlin
hungvietnguyen
Review this pull request change. Language: Kotlin File: plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/KaptOptions.kt PR Title: Kapt: Ensure flag names and default values are consistent BEFORE CODE: mode, detectMemoryLeaks ) } } fun getKotlinGeneratedSource...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
visitor.visitOuterClass(info.ownerClassName, info.functionName?.removeSuffix(FOR_INLINE_SUFFIX), info.functionDesc) } private fun inlineMethodAndUpdateGlobalResult( parentRemapper: FieldRemapper, deferringVisitor: MethodVisitor, next: MethodNode, allCapturedParamBuilder:...
No issues found.
visitor.visitOuterClass(info.ownerClassName, info.functionName?.removeSuffix(FOR_INLINE_SUFFIX), info.functionDesc) } private fun inlineMethodAndUpdateGlobalResult( parentRemapper: FieldRemapper, deferringVisitor: MethodVisitor, next: MethodNode, allCapturedParamBuilder:...
@@ -462,6 +462,29 @@ class AnonymousObjectTransformer( val indexToFunctionalArgument = transformationInfo.functionalArguments val capturedParams = HashSet<Int>() + // Possible cases where we need to add each lambda's captures separately: + // + // 1. Top-level object in an inl...
compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt
0
Kotlin
1
none
16
51
51
true
JVM: rename this$0 when regenerating nested objects too
4,084
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt PR Title: JVM: rename this$0 when regenerating nested objects too BEFORE CODE: visitor.visitOuterClass(info.ownerClassName, info.functionName?.removeSuffix(FOR_INLIN...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// CORRECT_ERROR_TYPES // STRICT //FILE: test/ClassRefAnnotation.java package test; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.annotation.ElementType; @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RetentionP...
No issues found.
// CORRECT_ERROR_TYPES // STRICT //FILE: test/ClassRefAnnotation.java package test; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.annotation.ElementType; @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RetentionP...
@@ -0,0 +1,46 @@ +// CORRECT_ERROR_TYPES +// STRICT + +//FILE: test/ClassRefAnnotation.java + +package test; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target({ ElementType.TYPE, ElementType.M...
plugins/kapt3/kapt3-compiler/testData/converter/defaultPackageCorrectErrorTypes.kt
0
Kotlin
1
none
16
47
47
true
[KAPT] KT-36743 Warn about usage of types from default package
4,094
JetBrains/kotlin
51,705
Kotlin
zveznicht
Review this pull request change. Language: Kotlin File: plugins/kapt3/kapt3-compiler/testData/converter/defaultPackageCorrectErrorTypes.kt PR Title: [KAPT] KT-36743 Warn about usage of types from default package BEFORE CODE: // CORRECT_ERROR_TYPES // STRICT //FILE: test/ClassRefAnnotation.java package test; impo...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jetbrains.kotlin.psi2ir.generators import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.dec...
No issues found.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jetbrains.kotlin.psi2ir.generators import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.dec...
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.addMember import org.jetbrains.kotlin.ir.expressions.IrSyntheticBodyKind import org.jetbrains.kotlin.ir.expressions.impl.IrSyntheticBodyImpl +import org.jetbrains.kotlin.ir.util.SYNTHETIC_OFF...
compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/EnumClassMembersGenerator.kt
0
Kotlin
1
none
16
51
51
true
JVM IR: Minor changes to Enum codegen to align with the JVM backend
4,096
JetBrains/kotlin
51,705
Kotlin
sfs
Review this pull request change. Language: Kotlin File: compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/EnumClassMembersGenerator.kt PR Title: JVM IR: Minor changes to Enum codegen to align with the JVM backend BEFORE CODE: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied....
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
private val actionText: String? = null, private val deleteInitializer: Boolean = false ) : KotlinPsiOnlyQuickFixAction<KtValVarKeywordOwner>(element) { override fun getText() = actionText ?: (if (makeVar) KotlinBundleIndependent.message("change.to.var") else KotlinBundleIndependent.message("change....
No issues found.
private val actionText: String? = null, private val deleteInitializer: Boolean = false ) : KotlinPsiOnlyQuickFixAction<KtValVarKeywordOwner>(element) { override fun getText() = actionText ?: (if (makeVar) KotlinBundleIndependent.message("change.to.var") else KotlinBundleIndependent.message("change....
@@ -0,0 +1,86 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.quickfix + +import com.intellij.openapi.editor.Editor...
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/ChangeVariableMutabilityFix.kt
0
Kotlin
1
none
16
51
51
true
FIR IDE: Add quickfix for VAR_OVERRIDDEN_BY_VAL
4,103
JetBrains/kotlin
51,705
Kotlin
punzki
Review this pull request change. Language: Kotlin File: idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/ChangeVariableMutabilityFix.kt PR Title: FIR IDE: Add quickfix for VAR_OVERRIDDEN_BY_VAL BEFORE CODE: private val actionText: String? = null, private val deleteInitializer: Boolean =...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (modifier == ABSTRACT_KEYWORD && (element is KtProperty || element is KtNamedFunction)) { element.containingClass()?.run { if (!hasModifier(ABSTRACT_KEYWORD) && !hasModifier(SEALED_KEYWORD)) { addModifier(ABSTRACT_KEYWORD) } } ...
No issues found.
if (modifier == ABSTRACT_KEYWORD && (element is KtProperty || element is KtNamedFunction)) { element.containingClass()?.run { if (!hasModifier(ABSTRACT_KEYWORD) && !hasModifier(SEALED_KEYWORD)) { addModifier(ABSTRACT_KEYWORD) } } ...
@@ -20,7 +20,6 @@ import com.intellij.codeInsight.intention.IntentionAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiFile -import com.intellij.psi.PsiNameIdentifierOwner import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains....
idea/src/org/jetbrains/kotlin/idea/quickfix/AddModifierFix.kt
0
Kotlin
1
none
16
51
51
true
FIR IDE: move RemoveModifierFix to idea-frontend-independent
4,108
JetBrains/kotlin
51,705
Kotlin
tgeng
Review this pull request change. Language: Kotlin File: idea/src/org/jetbrains/kotlin/idea/quickfix/AddModifierFix.kt PR Title: FIR IDE: move RemoveModifierFix to idea-frontend-independent BEFORE CODE: if (modifier == ABSTRACT_KEYWORD && (element is KtProperty || element is KtNamedFunction)) { e...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
open class Test { open fun getTestNoSuspend(text: String): String { return text } open suspend fun getTest(text: String): String { return text } open fun getTestNoSuspendInvalid(`te xt`: String): String { return `te xt` } open suspend fun getTestInvalid(`te xt`: S...
No issues found.
open class Test { open fun getTestNoSuspend(text: String): String { return text } open suspend fun getTest(text: String): String { return text } open fun getTestNoSuspendInvalid(`te xt`: String): String { return `te xt` } open suspend fun getTestInvalid(`te xt`: S...
@@ -0,0 +1,18 @@ +open class Test { + + open fun getTestNoSuspend(text: String): String { + return text + } + + open suspend fun getTest(text: String): String { + return text + } + + open fun getTestNoSuspendInvalid(`te xt`: String): String { + return `te xt` + } + + open suspe...
plugins/kapt3/kapt3-compiler/testData/converter/suspendArgName.kt
0
Kotlin
1
none
16
19
19
true
[KAPT] KT-43804 take argument names from original descriptor
4,111
JetBrains/kotlin
51,705
Kotlin
zveznicht
Review this pull request change. Language: Kotlin File: plugins/kapt3/kapt3-compiler/testData/converter/suspendArgName.kt PR Title: [KAPT] KT-43804 take argument names from original descriptor BEFORE CODE: open class Test { open fun getTestNoSuspend(text: String): String { return text } open s...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
import org.jetbrains.kotlin.diagnostics.Errors import org.jetbrains.kotlin.idea.caches.resolve.analyze import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny import org.jetbrains.kotlin.idea.refactoring.canRefactor import org.jetbrains.kotlin.idea.util.runOnExpectAndAllActuals import org.jetbrains.kot...
No issues found.
import org.jetbrains.kotlin.diagnostics.Errors import org.jetbrains.kotlin.idea.caches.resolve.analyze import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny import org.jetbrains.kotlin.idea.refactoring.canRefactor import org.jetbrains.kotlin.idea.util.runOnExpectAndAllActuals import org.jetbrains.kot...
@@ -0,0 +1,103 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless requir...
idea/src/org/jetbrains/kotlin/idea/quickfix/AddModifierFixMpp.kt
0
Kotlin
1
none
16
51
51
true
FIR IDE: Split and AddModifierFix to fe-independent
4,115
JetBrains/kotlin
51,705
Kotlin
tgeng
Review this pull request change. Language: Kotlin File: idea/src/org/jetbrains/kotlin/idea/quickfix/AddModifierFixMpp.kt PR Title: FIR IDE: Split and AddModifierFix to fe-independent BEFORE CODE: import org.jetbrains.kotlin.diagnostics.Errors import org.jetbrains.kotlin.idea.caches.resolve.analyze import org.jetbra...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} @TestMetadata("redundantOpenInInterface.kt") public void testRedundantOpenInInterface() throws Exception { runTest("idea/testData/quickfix/modifiers/redundantOpenInInterface.kt"); } @TestMetadata("removeAbstractModifier.kt") public void testRemoveAbstractM...
No issues found.
} @TestMetadata("redundantOpenInInterface.kt") public void testRedundantOpenInInterface() throws Exception { runTest("idea/testData/quickfix/modifiers/redundantOpenInInterface.kt"); } @TestMetadata("removeAbstractModifier.kt") public void testRemoveAbstractM...
@@ -19,6 +19,49 @@ @SuppressWarnings("all") @RunWith(JUnit3RunnerWithInners.class) public class HighLevelQuickFixTestGenerated extends AbstractHighLevelQuickFixTest { + @TestMetadata("idea/testData/quickfix/lateinit") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public stat...
idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java
0
Java
1
none
16
51
51
true
FIR IDE: Add quickfix for INAPPLICABLE_LATEINIT_MODIFIER
4,116
JetBrains/kotlin
51,705
Kotlin
punzki
Review this pull request change. Language: Java File: idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java PR Title: FIR IDE: Add quickfix for INAPPLICABLE_LATEINIT_MODIFIER BEFORE CODE: } @TestMetadata("redundantOpenInInterface.kt") public void testRed...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
other is CharRange && (isEmpty() && other.isEmpty() || first == other.first && last == other.last) override fun hashCode(): Int = if (isEmpty()) -1 else (31 * first.toInt() + last.toInt()) override fun toString(): String = "$first..$last" companion object { /** An empty ra...
No issues found.
other is CharRange && (isEmpty() && other.isEmpty() || first == other.first && last == other.last) override fun hashCode(): Int = if (isEmpty()) -1 else (31 * first.toInt() + last.toInt()) override fun toString(): String = "$first..$last" companion object { /** An empty ra...
@@ -16,6 +16,11 @@ public class CharRange(start: Char, endInclusive: Char) : CharProgression(start, override fun contains(value: Char): Boolean = first <= value && value <= last + /** + * Checks whether the range is empty. + + * The range is empty if its start value is greater than the end val...
core/builtins/src/kotlin/Ranges.kt
0
Kotlin
1
none
16
51
51
true
KT-33783 KDoc: Detail when a range is empty
4,118
JetBrains/kotlin
51,705
Kotlin
shadrina
Review this pull request change. Language: Kotlin File: core/builtins/src/kotlin/Ranges.kt PR Title: KT-33783 KDoc: Detail when a range is empty BEFORE CODE: other is CharRange && (isEmpty() && other.isEmpty() || first == other.first && last == other.last) override fun hashCode(): Int = ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return null } override fun visitExpression(expression: KtExpression, data: Nothing?): Void? { ktExpressions++ expression.acceptChildren(this) return null } ...
No issues found.
return null } override fun visitExpression(expression: KtExpression, data: Nothing?): Void? { ktExpressions++ expression.acceptChildren(this) return null } ...
@@ -52,8 +52,8 @@ class RawFirBuilderTotalKotlinTestCase : AbstractRawFirBuilderTestCase() { println("BASE PATH: $testDataPath") for (file in root.walkTopDown()) { if (file.isDirectory) continue - val path = file.path - if ("testData" in path || "resources" in path |...
compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt
0
Kotlin
1
none
16
51
51
true
FIR checker/IDE: Add checker and quickfix for VAL_WITH_SETTER
4,125
JetBrains/kotlin
51,705
Kotlin
punzki
Review this pull request change. Language: Kotlin File: compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt PR Title: FIR checker/IDE: Add checker and quickfix for VAL_WITH_SETTER BEFORE CODE: return null } ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
NOT_AN_ANNOTATION_CLASS.registerFactory(MakeClassAnAnnotationClassFix) val changeVariableTypeFix = ChangeVariableTypeFix.PropertyOrReturnTypeMismatchOnOverrideFactory RETURN_TYPE_MISMATCH_ON_OVERRIDE.registerFactory(changeVariableTypeFix) PROPERTY_TYPE_MISMATCH_ON_OVERRIDE.registerFact...
No issues found.
NOT_AN_ANNOTATION_CLASS.registerFactory(MakeClassAnAnnotationClassFix) val changeVariableTypeFix = ChangeVariableTypeFix.PropertyOrReturnTypeMismatchOnOverrideFactory RETURN_TYPE_MISMATCH_ON_OVERRIDE.registerFactory(changeVariableTypeFix) PROPERTY_TYPE_MISMATCH_ON_OVERRIDE.registerFact...
@@ -116,14 +116,14 @@ class QuickFixRegistrar : QuickFixContributor { USELESS_ELVIS.registerFactory(RemoveUselessElvisFix) USELESS_ELVIS_RIGHT_IS_NULL.registerFactory(RemoveUselessElvisFix) - val removeRedundantModifierFactory = RemoveModifierFix.createRemoveModifierFactory(true) + val...
idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt
0
Kotlin
1
none
16
51
51
true
FIR IDE: Simplify registerPsiQuickFixes
4,127
JetBrains/kotlin
51,705
Kotlin
tgeng
Review this pull request change. Language: Kotlin File: idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt PR Title: FIR IDE: Simplify registerPsiQuickFixes BEFORE CODE: NOT_AN_ANNOTATION_CLASS.registerFactory(MakeClassAnAnnotationClassFix) val changeVariableTypeFix = ChangeVariableT...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
runTest("idea/testData/quickfix/modifiers/noLateinitOnPrimitive.kt"); } @TestMetadata("notAnAnnotationClass.kt") public void testNotAnAnnotationClass() throws Exception { runTest("idea/testData/quickfix/modifiers/notAnAnnotationClass.kt"); } @TestMetadat...
No issues found.
runTest("idea/testData/quickfix/modifiers/noLateinitOnPrimitive.kt"); } @TestMetadata("notAnAnnotationClass.kt") public void testNotAnAnnotationClass() throws Exception { runTest("idea/testData/quickfix/modifiers/notAnAnnotationClass.kt"); } @TestMetadat...
@@ -19,6 +19,184 @@ @SuppressWarnings("all") @RunWith(JUnit3RunnerWithInners.class) public class HighLevelQuickFixTestGenerated extends AbstractHighLevelQuickFixTest { + @TestMetadata("idea/testData/quickfix/abstract") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public sta...
idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java
0
Java
1
none
16
51
51
true
FIR IDE: register quickfix related to abstract members
4,131
JetBrains/kotlin
51,705
Kotlin
tgeng
Review this pull request change. Language: Java File: idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java PR Title: FIR IDE: register quickfix related to abstract members BEFORE CODE: runTest("idea/testData/quickfix/modifiers/noLateinitOnPrimitive.kt"); } ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
<!WRONG_MODIFIER_TARGET!>external<!> class A <!WRONG_MODIFIER_TARGET!>external<!> val foo: Int = 23 class B { <!WRONG_MODIFIER_TARGET!>external<!> class A <!WRONG_MODIFIER_TARGET!>external<!> val foo: Int = 23 }
No issues found.
<!WRONG_MODIFIER_TARGET!>external<!> class A <!WRONG_MODIFIER_TARGET!>external<!> val foo: Int = 23 class B { <!WRONG_MODIFIER_TARGET!>external<!> class A <!WRONG_MODIFIER_TARGET!>external<!> val foo: Int = 23 }
@@ -1,9 +1,9 @@ -<!WRONG_MODIFIER_TARGET!>external class A<!> +<!WRONG_MODIFIER_TARGET!>external<!> class A -<!WRONG_MODIFIER_TARGET!>external val foo: Int = 23<!> +<!WRONG_MODIFIER_TARGET!>external<!> val foo: Int = 23 class B { - <!WRONG_MODIFIER_TARGET!>external class A<!> + <!WRONG_MODIFIER_TARGET!>exter...
compiler/testData/diagnostics/testsWithStdLib/native/nonFunction.kt
0
Kotlin
1
none
16
10
10
true
Provide quickfix for wrong `external` modifier on declarations
4,133
JetBrains/kotlin
51,705
Kotlin
punzki
Review this pull request change. Language: Kotlin File: compiler/testData/diagnostics/testsWithStdLib/native/nonFunction.kt PR Title: Provide quickfix for wrong `external` modifier on declarations BEFORE CODE: <!WRONG_MODIFIER_TARGET!>external<!> class A <!WRONG_MODIFIER_TARGET!>external<!> val foo: Int = 23 clas...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@TestMetadata("notAnAnnotationClass.kt") public void testNotAnAnnotationClass() throws Exception { runTest("idea/testData/quickfix/modifiers/notAnAnnotationClass.kt"); } @TestMetadata("openCompanionObject.kt") public void testOpenCompanionObject() throws Exception {...
No issues found.
@TestMetadata("notAnAnnotationClass.kt") public void testNotAnAnnotationClass() throws Exception { runTest("idea/testData/quickfix/modifiers/notAnAnnotationClass.kt"); } @TestMetadata("openCompanionObject.kt") public void testOpenCompanionObject() throws Exception {...
@@ -253,6 +253,11 @@ public void testAbstractModifierInEnum() throws Exception { runTest("idea/testData/quickfix/modifiers/abstractModifierInEnum.kt"); } + @TestMetadata("abstractVarWithPrivateSetter.kt") + public void testAbstractVarWithPrivateSetter() throws Exception { + ...
idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java
0
Java
1
none
16
51
51
true
FIR IDE: Add quickfix for PRIVATE_SETTER_FOR_(OPEN|ABSTRACT)_PROPERTY
4,156
JetBrains/kotlin
51,705
Kotlin
tgeng
Review this pull request change. Language: Java File: idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java PR Title: FIR IDE: Add quickfix for PRIVATE_SETTER_FOR_(OPEN|ABSTRACT)_PROPERTY BEFORE CODE: @TestMetadata("notAnAnnotationClass.kt") public void testNotA...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// DON'T // - don't use this to report an error or warning *on* that specific modifier. Use positioning strategies instead. internal sealed class FirModifierList { abstract val modifiers: List<FirModifier<*>> class FirPsiModifierList(val modifierList: KtModifierList) : FirModifierList() { override val ...
No issues found.
// DON'T // - don't use this to report an error or warning *on* that specific modifier. Use positioning strategies instead. internal sealed class FirModifierList { abstract val modifiers: List<FirModifier<*>> class FirPsiModifierList(val modifierList: KtModifierList) : FirModifierList() { override val ...
@@ -12,6 +12,7 @@ import com.intellij.util.diff.FlyweightCapableTreeStructure import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.analysis.checkers.getChildren +import org.jetbrains.kotlin.fir.declarations.FirDeclaration import org.jetbrains.kotlin.lexer.KtModif...
compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierUtils.kt
0
Kotlin
1
none
16
51
51
true
FIR checker/IDE: Add checker and quickfixes for WRONG_MODIFIER_TARGET
4,164
JetBrains/kotlin
51,705
Kotlin
punzki
Review this pull request change. Language: Kotlin File: compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierUtils.kt PR Title: FIR checker/IDE: Add checker and quickfixes for WRONG_MODIFIER_TARGET BEFORE CODE: // DON'T // - don't use this to report an error or warning *on* th...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
import org.jetbrains.kotlin.idea.quickfix.fixes.ChangeTypeQuickFix class MainKtQuickFixRegistrar : KtQuickFixRegistrar() { private val modifiers = KtQuickFixesListBuilder.registerPsiQuickFix { registerPsiQuickFixes(KtFirDiagnostic.RedundantModifier::class, RemoveModifierFix.removeRedundantModifier) ...
No issues found.
import org.jetbrains.kotlin.idea.quickfix.fixes.ChangeTypeQuickFix class MainKtQuickFixRegistrar : KtQuickFixRegistrar() { private val modifiers = KtQuickFixesListBuilder.registerPsiQuickFix { registerPsiQuickFixes(KtFirDiagnostic.RedundantModifier::class, RemoveModifierFix.removeRedundantModifier) ...
@@ -44,6 +44,10 @@ class MainKtQuickFixRegistrar : KtQuickFixRegistrar() { KtFirDiagnostic.PrivateSetterForAbstractProperty::class, RemoveModifierFix.removePrivateModifier ) + registerPsiQuickFixes( + KtFirDiagnostic.NestedClassNotAllowed::class, + AddModi...
idea/idea-fir/src/org/jetbrains/kotlin/idea/quickfix/MainKtQuickFixRegistrar.kt
0
Kotlin
1
none
16
51
51
true
FIR IDE: add quickfix for NESTED_CLASS_NOT_ALLOWED
4,173
JetBrains/kotlin
51,705
Kotlin
tgeng
Review this pull request change. Language: Kotlin File: idea/idea-fir/src/org/jetbrains/kotlin/idea/quickfix/MainKtQuickFixRegistrar.kt PR Title: FIR IDE: add quickfix for NESTED_CLASS_NOT_ALLOWED BEFORE CODE: import org.jetbrains.kotlin.idea.quickfix.fixes.ChangeTypeQuickFix class MainKtQuickFixRegistrar : KtQuic...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: Ann.java import java.lang.annotation.*; @Target({ElementType.CONSTRUCTOR}) @Retention(RetentionPolicy.RUNTIME) public @interface Ann {} // FILE: box.kt fun box(): String { class C(val x: String, val y: String) { @Ann constructor(v: String): this(v, v...
No issues found.
// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: Ann.java import java.lang.annotation.*; @Target({ElementType.CONSTRUCTOR}) @Retention(RetentionPolicy.RUNTIME) public @interface Ann {} // FILE: box.kt fun box(): String { class C(val x: String, val y: String) { @Ann constructor(v: String): this(v, v...
@@ -0,0 +1,19 @@ +// WITH_REFLECT +// TARGET_BACKEND: JVM +// FILE: Ann.java +import java.lang.annotation.*; + +@Target({ElementType.CONSTRUCTOR}) +@Retention(RetentionPolicy.RUNTIME) +public @interface Ann {} + +// FILE: box.kt +fun box(): String { + class C(val x: String, val y: String) { + @Ann + co...
compiler/testData/codegen/box/annotations/javaAnnotationOnSecondaryConstructorOfLocalClass.kt
0
Kotlin
1
none
16
20
20
true
[IR] Move annotations from original to new constructor declarations.
4,175
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/box/annotations/javaAnnotationOnSecondaryConstructorOfLocalClass.kt PR Title: [IR] Move annotations from original to new constructor declarations. BEFORE CODE: // WITH_REFLECT // TARGET_BACKEND: JVM // FILE: Ann.java import java.lang....
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
fun main() { print("ok") }
No issues found.
fun main() { print("ok") }
@@ -0,0 +1,3 @@ +fun main() { + print("ok") +} \ No newline at end of file
compiler/testData/launcher/defaultPackage.kt
0
Kotlin
1
none
16
3
3
true
CLI: Allow running class files with '.class' extension in 'kotlin' script
4,205
JetBrains/kotlin
51,705
Kotlin
scaventz
Review this pull request change. Language: Kotlin File: compiler/testData/launcher/defaultPackage.kt PR Title: CLI: Allow running class files with '.class' extension in 'kotlin' script BEFORE CODE: fun main() { print("ok") } AFTER CODE: fun main() { print("ok") } DIFF: @@ -0,0 +1,3 @@ +fun main() { + p...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
DeprecationResolver.JAVA_DEPRECATED, oldField.annotations ) + irCall(irSymbols.javaLangDeprecatedConstructorWithDeprecatedFlag) } } else oldField.annotations } else { ...
No issues found.
DeprecationResolver.JAVA_DEPRECATED, oldField.annotations ) + irCall(irSymbols.javaLangDeprecatedConstructorWithDeprecatedFlag) } } else oldField.annotations } else { ...
@@ -5,9 +5,8 @@ package org.jetbrains.kotlin.backend.jvm -import org.jetbrains.kotlin.backend.common.ir.copyParameterDeclarationsFrom -import org.jetbrains.kotlin.backend.common.ir.createImplicitParameterDeclarationWithWrappedDescriptor -import org.jetbrains.kotlin.backend.common.ir.createStaticFunctionWithReceive...
compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmCachedDeclarations.kt
0
Kotlin
1
none
16
51
51
true
JVM_IR: remap calls to protected `@JvmStatic` in companions
4,222
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmCachedDeclarations.kt PR Title: JVM_IR: remap calls to protected `@JvmStatic` in companions BEFORE CODE: DeprecationResolver.JAVA_DEPRECATED, ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
get() = 42 set(value) {} override fun equals(other: Any?): Boolean = other is C && token == other.token } var String.topLevel: String get() = this set(value) {} fun checkEqual(a: Any, b: Any) { if (a != b || b != a) throw AssertionError("Objects should be equal") if (a.has...
No issues found.
get() = 42 set(value) {} override fun equals(other: Any?): Boolean = other is C && token == other.token } var String.topLevel: String get() = this set(value) {} fun checkEqual(a: Any, b: Any) { if (a != b || b != a) throw AssertionError("Objects should be equal") if (a.has...
@@ -0,0 +1,69 @@ +// TARGET_BACKEND: JVM +// WITH_REFLECT + +import kotlin.reflect.KMutableProperty1 +import kotlin.reflect.KMutableProperty2 +import kotlin.reflect.full.* + +class C(val token: Int) { + var member = 42 + var String.memberExtension: Int + get() = 42 + set(value) {} + + override fu...
compiler/testData/codegen/box/reflection/methodsFromAny/propertyAccessorEqualsHashCode.kt
0
Kotlin
1
none
16
51
51
true
Provide "equals" and "hashCode" for Getter/Setter to fix KT-13490
4,236
JetBrains/kotlin
51,705
Kotlin
scaventz
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/box/reflection/methodsFromAny/propertyAccessorEqualsHashCode.kt PR Title: Provide "equals" and "hashCode" for Getter/Setter to fix KT-13490 BEFORE CODE: get() = 42 set(value) {} override fun equals(other: Any?): B...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@note This method converts instances of MyException to errors. Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** @note This method converts instances of MyException to errors. Other uncaught ...
No issues found.
@note This method converts instances of MyException to errors. Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** @note This method converts instances of MyException to errors. Other uncaught ...
@@ -518,6 +518,55 @@ __attribute__((swift_name("TestGH3992.B"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end; + +/** + * Summary class [KDocExport]. + * + * @property xyzzy Doc for property xyzzy + * @property zzz See below. + */ +__attribut...
kotlin-native/backend.native/tests/objcexport/expectedLazy.h
0
C/C++
1
none
16
51
51
true
[Native] Add test for -Xexport-kdoc
4,249
JetBrains/kotlin
51,705
Kotlin
knebekaizer
Review this pull request change. Language: C/C++ File: kotlin-native/backend.native/tests/objcexport/expectedLazy.h PR Title: [Native] Add test for -Xexport-kdoc BEFORE CODE: @note This method converts instances of MyException to errors. Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAn...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
override fun <T> visitConstExpression(constExpression: FirConstExpression<T>, data: CheckerContext) { checkers.allBasicExpressionCheckers.check(constExpression, data, reporter) } override fun visitAnnotationCall(annotationCall: FirAnnotationCall, data: CheckerContext) { checkers.allBasicEx...
No issues found.
override fun <T> visitConstExpression(constExpression: FirConstExpression<T>, data: CheckerContext) { checkers.allBasicExpressionCheckers.check(constExpression, data, reporter) } override fun visitAnnotationCall(annotationCall: FirAnnotationCall, data: CheckerContext) { checkers.allBasicEx...
@@ -5,6 +5,7 @@ package org.jetbrains.kotlin.fir.analysis.collectors.components +import org.jetbrains.kotlin.fir.analysis.CheckersComponentInternal import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.expression.ExpressionCheckers import org....
compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ExpressionCheckersDiagnosticComponent.kt
0
Kotlin
1
none
16
51
51
true
FIR checker: fix checker registration
4,250
JetBrains/kotlin
51,705
Kotlin
tgeng
Review this pull request change. Language: Kotlin File: compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ExpressionCheckersDiagnosticComponent.kt PR Title: FIR checker: fix checker registration BEFORE CODE: override fun <T> visitConstExpression(constExpression: FirConstExpressi...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// ALLOW_AST_ACCESS package test annotation class Anno( val value: Array<Bnno> ) annotation class Bnno( val value: String ) @Anno( value = [Bnno("x"), Bnno("y")] ) public class AnnotationInArray
No issues found.
// ALLOW_AST_ACCESS package test annotation class Anno( val value: Array<Bnno> ) annotation class Bnno( val value: String ) @Anno( value = [Bnno("x"), Bnno("y")] ) public class AnnotationInArray
@@ -0,0 +1,16 @@ +// ALLOW_AST_ACCESS + +package test + +annotation class Anno( + val value: Array<Bnno> +) + +annotation class Bnno( + val value: String +) + +@Anno( + value = [Bnno("x"), Bnno("y")] +) +public class AnnotationInArray
compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInArray.kt
0
Kotlin
1
none
16
17
17
true
Support array of annotation in KotlinJvmBinaryClass
4,258
JetBrains/kotlin
51,705
Kotlin
ting-yuan
Review this pull request change. Language: Kotlin File: compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInArray.kt PR Title: Support array of annotation in KotlinJvmBinaryClass BEFORE CODE: // ALLOW_AST_ACCESS package test annotation class Anno( val value: Array<Bnno> ) annotation class Bnno(...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
*/ fun CheckerContext.findClosestClassOrObject(): FirClass<*>? { for (it in containingDeclarations.asReversed()) { if ( it is FirRegularClass || it is FirAnonymousObject ) { return it as FirClass<*> } } return null } /** * Returns the list of f...
No issues found.
*/ fun CheckerContext.findClosestClassOrObject(): FirClass<*>? { for (it in containingDeclarations.asReversed()) { if ( it is FirRegularClass || it is FirAnonymousObject ) { return it as FirClass<*> } } return null } /** * Returns the list of f...
@@ -5,13 +5,11 @@ package org.jetbrains.kotlin.fir.analysis.checkers -import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.descriptors.Visibilit...
compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt
0
Kotlin
1
none
16
51
51
true
[FIR] Add FINAL_UPPER_BOUND diagnostic
4,270
JetBrains/kotlin
51,705
Kotlin
zveznicht
Review this pull request change. Language: Kotlin File: compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt PR Title: [FIR] Add FINAL_UPPER_BOUND diagnostic BEFORE CODE: */ fun CheckerContext.findClosestClassOrObject(): FirClass<*>? { for (it in containingDeclarations.asReversed(...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
) ?: return val irSerializableClass = compilerContext.referenceClass(serializableDescriptor.fqNameSafe)?.owner ?: return val serializableWithAlreadyPresent = irSerializableClass.annotations.any { it.symbol.descriptor.constructedClass.fqNameSafe == annotationMarkerClass.fqNameSafe ...
No issues found.
) ?: return val irSerializableClass = compilerContext.referenceClass(serializableDescriptor.fqNameSafe)?.owner ?: return val serializableWithAlreadyPresent = irSerializableClass.annotations.any { it.symbol.descriptor.constructedClass.fqNameSafe == annotationMarkerClass.fqNameSafe ...
@@ -12,17 +12,12 @@ import org.jetbrains.kotlin.ir.builders.declarations.* import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.ir.expressions.IrExpression -import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin import org...
plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/compiler/backend/ir/SerializableCompanionIrGenerator.kt
0
Kotlin
1
none
16
51
51
true
Fix IR compilation of serialization
4,276
JetBrains/kotlin
51,705
Kotlin
shanshin
Review this pull request change. Language: Kotlin File: plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/compiler/backend/ir/SerializableCompanionIrGenerator.kt PR Title: Fix IR compilation of serialization BEFORE CODE: ) ?: return val irSerializabl...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// "Remove unnecessary non-null assertion (!!)" "true" fun test(value : Int) : Int { return value<caret>!! }
No issues found.
// "Remove unnecessary non-null assertion (!!)" "true" fun test(value : Int) : Int { return value<caret>!! }
@@ -2,5 +2,3 @@ fun test(value : Int) : Int { return value<caret>!! } - -/* IGNORE_FIR */ \ No newline at end of file
idea/testData/quickfix/expressions/unnecessaryNonNullAssertion1.kt
0
Kotlin
1
none
16
5
5
true
FIR IDE: Enable RemoveExclExclCallFix for UNNECESSARY_NON_NULL_ASSERTION
4,303
JetBrains/kotlin
51,705
Kotlin
punzki
Review this pull request change. Language: Kotlin File: idea/testData/quickfix/expressions/unnecessaryNonNullAssertion1.kt PR Title: FIR IDE: Enable RemoveExclExclCallFix for UNNECESSARY_NON_NULL_ASSERTION BEFORE CODE: // "Remove unnecessary non-null assertion (!!)" "true" fun test(value : Int) : Int { return v...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
suspend fun dummy() {} val c: suspend () -> Unit = { dummy() dummy() } fun blackhole(a: Any) {} class A { suspend fun foo(a: A, s: String = "", block: suspend A.() -> Unit) { block() block() blackhole(this) blackhole(a) blackhole(s) blackhole(block) } }...
No issues found.
suspend fun dummy() {} val c: suspend () -> Unit = { dummy() dummy() } fun blackhole(a: Any) {} class A { suspend fun foo(a: A, s: String = "", block: suspend A.() -> Unit) { block() block() blackhole(this) blackhole(a) blackhole(s) blackhole(block) } }...
@@ -23,11 +23,11 @@ class A { // foo, c's lambda and foo's continuation // 3 LOCALVARIABLE \$result Ljava/lang/Object; -// foo and <init> -// 2 LOCALVARIABLE this LA; -// 1 LOCALVARIABLE a LA; -// 1 LOCALVARIABLE s Ljava/lang/String; -// 1 LOCALVARIABLE block Lkotlin/jvm/functions/Function2; +// foo x 3 since we sp...
compiler/testData/codegen/bytecodeText/coroutines/debug/thisAndResultInLvt.kt
0
Kotlin
1
none
16
40
40
true
[JVM] Fix uninitialized locals after coroutine transformation.
4,334
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/bytecodeText/coroutines/debug/thisAndResultInLvt.kt PR Title: [JVM] Fix uninitialized locals after coroutine transformation. BEFORE CODE: suspend fun dummy() {} val c: suspend () -> Unit = { dummy() dummy() } fun blackhole(a...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
runTest("idea/testData/quickfix/modifiers/removeRedundantModifier2.kt"); } @TestMetadata("removeRedundantModifier3.kt") public void testRemoveRedundantModifier3() throws Exception { runTest("idea/testData/quickfix/modifiers/removeRedundantModifier3.kt"); } ...
No issues found.
runTest("idea/testData/quickfix/modifiers/removeRedundantModifier2.kt"); } @TestMetadata("removeRedundantModifier3.kt") public void testRemoveRedundantModifier3() throws Exception { runTest("idea/testData/quickfix/modifiers/removeRedundantModifier3.kt"); } ...
@@ -1311,4 +1311,157 @@ public void testVarHasSetter() throws Exception { runTest("idea/testData/quickfix/addPropertyAccessors/varHasSetter.kt"); } } + + @TestMetadata("idea/testData/quickfix/when") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public...
idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java
0
Java
1
none
16
51
51
true
FIR IDE: add quickfix AddWhenElseBranchFix
4,344
JetBrains/kotlin
51,705
Kotlin
tgeng
Review this pull request change. Language: Java File: idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java PR Title: FIR IDE: add quickfix AddWhenElseBranchFix BEFORE CODE: runTest("idea/testData/quickfix/modifiers/removeRedundantModifier2.kt"); } @...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// IGNORE_BACKEND: JS, JS_IR // The code in this test should be prohibited in the frontend, see KT-36188. // This test fails with an IllegalStateException on the JS(-IR) backend, // but the behavior would probably not match the JVM backend even if // the test passed. Compare with kt46389_jvmDefault. interface I { ...
No issues found.
// IGNORE_BACKEND: JS, JS_IR // The code in this test should be prohibited in the frontend, see KT-36188. // This test fails with an IllegalStateException on the JS(-IR) backend, // but the behavior would probably not match the JVM backend even if // the test passed. Compare with kt46389_jvmDefault. interface I { ...
@@ -0,0 +1,23 @@ +// IGNORE_BACKEND: JS, JS_IR + +// The code in this test should be prohibited in the frontend, see KT-36188. + +// This test fails with an IllegalStateException on the JS(-IR) backend, +// but the behavior would probably not match the JVM backend even if +// the test passed. Compare with kt46389_jvmDe...
compiler/testData/codegen/box/bridges/kt46389.kt
0
Kotlin
1
none
16
24
24
true
JVM IR: Don't generate bridges for default argument stubs (KT-46389)
4,359
JetBrains/kotlin
51,705
Kotlin
sfs
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/box/bridges/kt46389.kt PR Title: JVM IR: Don't generate bridges for default argument stubs (KT-46389) BEFORE CODE: // IGNORE_BACKEND: JS, JS_IR // The code in this test should be prohibited in the frontend, see KT-36188. // This tes...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// TARGET_BACKEND: JVM // WITH_RUNTIME // WITH_COROUTINES import helpers.* import kotlin.coroutines.* import kotlin.coroutines.intrinsics.* fun builder(c: suspend () -> Unit) { c.startCoroutine(EmptyContinuation) } suspend fun <T> suspendHere(x: T): T = suspendCoroutineUninterceptedOrReturn { it.resume(x) ...
No issues found.
// TARGET_BACKEND: JVM // WITH_RUNTIME // WITH_COROUTINES import helpers.* import kotlin.coroutines.* import kotlin.coroutines.intrinsics.* fun builder(c: suspend () -> Unit) { c.startCoroutine(EmptyContinuation) } suspend fun <T> suspendHere(x: T): T = suspendCoroutineUninterceptedOrReturn { it.resume(x) ...
@@ -0,0 +1,38 @@ +// TARGET_BACKEND: JVM +// WITH_RUNTIME +// WITH_COROUTINES +import helpers.* +import kotlin.coroutines.* +import kotlin.coroutines.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +suspend fun <T> suspendHere(x: T): T = suspendCoroutineUninterceptedOr...
compiler/testData/codegen/box/coroutines/jvmStaticAndJvmInline.kt
0
Kotlin
1
none
16
39
39
true
[JVM IR] Do not insert Nothing handling in JvmStatic wrapper.
4,365
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/box/coroutines/jvmStaticAndJvmInline.kt PR Title: [JVM IR] Do not insert Nothing handling in JvmStatic wrapper. BEFORE CODE: // TARGET_BACKEND: JVM // WITH_RUNTIME // WITH_COROUTINES import helpers.* import kotlin.coroutines.* import ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// TARGET_BACKEND: JVM // SKIP_JDK6 // FULL_JDK import java.util.function.Supplier class A { val xLong: Supplier<Long> get() = Supplier { 30 * 30 } val xShort: Supplier<Short> get() = Supplier { 30 * 30 } val xInt: Supplier<Int> get() = Supplier { 30 * 30 } val xByte: Suppli...
No issues found.
// TARGET_BACKEND: JVM // SKIP_JDK6 // FULL_JDK import java.util.function.Supplier class A { val xLong: Supplier<Long> get() = Supplier { 30 * 30 } val xShort: Supplier<Short> get() = Supplier { 30 * 30 } val xInt: Supplier<Int> get() = Supplier { 30 * 30 } val xByte: Suppli...
@@ -0,0 +1,30 @@ +// TARGET_BACKEND: JVM +// SKIP_JDK6 +// FULL_JDK + +import java.util.function.Supplier + +class A { + val xLong: Supplier<Long> + get() = Supplier { 30 * 30 } + + val xShort: Supplier<Short> + get() = Supplier { 30 * 30 } + + val xInt: Supplier<Int> + get() = Supplier { ...
compiler/testData/codegen/box/fullJdk/kt46540.kt
0
Kotlin
1
none
16
31
31
true
[JVM IR] Fix constant folding to use basic types always.
4,367
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/box/fullJdk/kt46540.kt PR Title: [JVM IR] Fix constant folding to use basic types always. BEFORE CODE: // TARGET_BACKEND: JVM // SKIP_JDK6 // FULL_JDK import java.util.function.Supplier class A { val xLong: Supplier<Long> ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (!processDefaultMaskOrMethodHandler(onStack, kind)) { val expectedType = JvmKotlinType(parameterType, irValueParameter.type.toIrBasedKotlinType()) putArgumentOrCapturedToLocalVal(expectedType, onStack, -1, irValueParameter.index, kind) } } } pr...
No issues found.
if (!processDefaultMaskOrMethodHandler(onStack, kind)) { val expectedType = JvmKotlinType(parameterType, irValueParameter.type.toIrBasedKotlinType()) putArgumentOrCapturedToLocalVal(expectedType, onStack, -1, irValueParameter.index, kind) } } } pr...
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.backend.jvm.JvmBackendContext import org.jetbrains.kotlin.backend.jvm.ir.isInlineClassType import org.jetbrains.kotlin.backend.jvm.ir.isInlineParameter import org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.InlineClassAbi +import org.jetbrains.kotlin.backend.jvm.lower...
compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt
0
Kotlin
1
none
16
51
51
true
JVM_IR: box inline class values returned by suspend inline lambdas
4,405
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt PR Title: JVM_IR: box inline class values returned by suspend inline lambdas BEFORE CODE: if (!processDefaultMaskOrMethodHandler(onStack, kind)) { ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
fun test(p: Int?) { if (p != null) { val a = p.toByte() //intValue & I2B val b = p.toShort() //intValue & I2S val c = p.toInt() //intValue val d = p.toLong() //intValue & I2L val e = p.toFloat() //intValue & I2F val f = p.toDouble() //intValue & I2D } } fun test(...
No issues found.
fun test(p: Int?) { if (p != null) { val a = p.toByte() //intValue & I2B val b = p.toShort() //intValue & I2S val c = p.toInt() //intValue val d = p.toLong() //intValue & I2L val e = p.toFloat() //intValue & I2F val f = p.toDouble() //intValue & I2D } } fun test(...
@@ -1,34 +1,34 @@ fun test(p: Int?) { if (p != null) { - p.toByte() //intValue & I2B - p.toShort() //intValue & I2S - p.toInt() //intValue - p.toLong() //intValue & I2L - p.toFloat() //intValue & I2F - p.toDouble() //intValue & I2D + val a = p.toByte() //intValue &...
compiler/testData/codegen/bytecodeText/boxedNotNumberTypeOnUnboxing.kt
0
Kotlin
1
none
16
42
42
true
JVM: be more careful when removing unused constants
4,408
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/bytecodeText/boxedNotNumberTypeOnUnboxing.kt PR Title: JVM: be more careful when removing unused constants BEFORE CODE: fun test(p: Int?) { if (p != null) { val a = p.toByte() //intValue & I2B val b = p.toShort() ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/** @note This method converts instances of MyException to errors. Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** @note This method converts instances of MyException to errors. Other uncaught Kotlin ...
No issues found.
/** @note This method converts instances of MyException to errors. Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** @note This method converts instances of MyException to errors. Other uncaught Kotlin ...
@@ -548,6 +548,44 @@ __attribute__((swift_name("KDocExport"))) @property int32_t yxxyz __attribute__((swift_name("yxxyz"))); @end; +__attribute__((swift_name("SomeClassWithProperty"))) +@interface KtSomeClassWithProperty : KtBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_design...
kotlin-native/backend.native/tests/objcexport/expectedLazy.h
0
C/C++
1
none
16
51
51
true
[Native] Clean up nested comment when exporting kdoc to objc header
4,410
JetBrains/kotlin
51,705
Kotlin
knebekaizer
Review this pull request change. Language: C/C++ File: kotlin-native/backend.native/tests/objcexport/expectedLazy.h PR Title: [Native] Clean up nested comment when exporting kdoc to objc header BEFORE CODE: /** @note This method converts instances of MyException to errors. Other uncaught Kotlin exceptions are fa...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return hit } override fun checkTrueWithMessage(): Boolean { var hit = false val l = { hit = true; true } call { assert(l()) { "BOOYA" } } return hit } override fun checkFalseWithMessage(): Boolean { var hit = false val l = { h...
No issues found.
return hit } override fun checkTrueWithMessage(): Boolean { var hit = false val l = { hit = true; true } call { assert(l()) { "BOOYA" } } return hit } override fun checkFalseWithMessage(): Boolean { var hit = false val l = { h...
@@ -0,0 +1,128 @@ +// NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt + +package test + +inline fun call(crossinline c: () -> Unit) { + c() +} + +// FILE: inlineSite.kt + +import test.* + +interface Checker { + fun checkTrue(): Boolean + fun checkF...
compiler/testData/codegen/boxInline/assert/jvmCrossinlineRedundant.kt
0
Kotlin
1
none
16
51
51
true
JVM_IR: fix a couple issues with inlining JVM assertions
4,481
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/boxInline/assert/jvmCrossinlineRedundant.kt PR Title: JVM_IR: fix a couple issues with inlining JVM assertions BEFORE CODE: return hit } override fun checkTrueWithMessage(): Boolean { var hit = false v...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.backend.jvm.lower import org.jetbrains.kotlin.backend.common.FileLoweringPass import org.jetbrains.kotlin.backend.common.lower.createIrBuilder import org.jetbrains.kotli...
No issues found.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.backend.jvm.lower import org.jetbrains.kotlin.backend.common.FileLoweringPass import org.jetbrains.kotlin.backend.common.lower.createIrBuilder import org.jetbrains.kotli...
@@ -9,31 +9,18 @@ import org.jetbrains.kotlin.backend.common.FileLoweringPass import org.jetbrains.kotlin.backend.common.lower.createIrBuilder import org.jetbrains.kotlin.backend.common.phaser.makeIrFilePhase import org.jetbrains.kotlin.backend.jvm.JvmBackendContext -import org.jetbrains.kotlin.backend.jvm.JvmLowere...
compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/StaticCallableReferenceLowering.kt
0
Kotlin
1
none
16
51
51
true
JVM_IR: generate instance fields even when reification is needed
4,503
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/StaticCallableReferenceLowering.kt PR Title: JVM_IR: generate instance fields even when reification is needed BEFORE CODE: * Use of this source code is governed by the Apache 2.0 license that ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
"build", executedTaskNames = listOf( ":compileKotlin", ) ) } @Test fun testInstantExecutionForJs() = with(Project("instantExecutionToJs")) { testConfigurationCacheOf("assemble", executedTaskNames = asList(":compileKotlin2Js")) ...
No issues found.
"build", executedTaskNames = listOf( ":compileKotlin", ) ) } @Test fun testInstantExecutionForJs() = with(Project("instantExecutionToJs")) { testConfigurationCacheOf("assemble", executedTaskNames = asList(":compileKotlin2Js")) ...
@@ -146,6 +146,21 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() { ) } + @Test + fun testJvmWithJavaConfigurationCache() = + with(Project("mppJvmWithJava", gradleVersionRequirement = GradleVersionRequired.AtLeast("7.1"))) { + setupWorkingDir() + + ...
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ConfigurationCacheIT.kt
0
Kotlin
1
none
16
51
51
true
MPP Gradle - Stop using convention mapping for archive name
4,529
JetBrains/kotlin
51,705
Kotlin
gavra0
Review this pull request change. Language: Kotlin File: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ConfigurationCacheIT.kt PR Title: MPP Gradle - Stop using convention mapping for archive name BEFORE CODE: "build", executedTaskNames = listOf( ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
descriptor: PropertyDescriptor, startOffset: Int, endOffset: Int, call: CallBuilder ): IrExpression { val getMethodDescriptor = descriptor.unwrappedGetMethod val irType = descriptor.type.toIrType() return if (getMethodDescriptor == null) { call.ca...
No issues found.
descriptor: PropertyDescriptor, startOffset: Int, endOffset: Int, call: CallBuilder ): IrExpression { val getMethodDescriptor = descriptor.unwrappedGetMethod val irType = descriptor.type.toIrType() return if (getMethodDescriptor == null) { call.ca...
@@ -89,8 +89,16 @@ class CallGenerator(statementGenerator: StatementGenerator) : StatementGenerator resolvedCall: ResolvedCall<*>?, origin: IrStatementOrigin?, smartCastIrType: IrType? = null - ): IrExpression = - when (descriptor) { + ): IrExpression { + context.fragmentC...
compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt
0
Kotlin
1
none
16
51
51
true
[EE-IR] Fragment Compiler Entrypoint in IR Backend
4,542
JetBrains/kotlin
51,705
Kotlin
kandersen
Review this pull request change. Language: Kotlin File: compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt PR Title: [EE-IR] Fragment Compiler Entrypoint in IR Backend BEFORE CODE: descriptor: PropertyDescriptor, startOffset: Int, endOffset: Int, call: ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
val main2Kt = tmpdir.resolve("main2.kt").apply { writeText(EMPTY_MAIN_FUN) } compileAndCheckMainClass(listOf(main1Kt, main2Kt), expectedMainClass = null) } fun testObjectJvmStaticFunctionMainClass() { val mainKt = tmpdir.resolve("main.kt").apply { writeT...
No issues found.
val main2Kt = tmpdir.resolve("main2.kt").apply { writeText(EMPTY_MAIN_FUN) } compileAndCheckMainClass(listOf(main1Kt, main2Kt), expectedMainClass = null) } fun testObjectJvmStaticFunctionMainClass() { val mainKt = tmpdir.resolve("main.kt").apply { writeT...
@@ -39,6 +39,71 @@ class CustomCliTest : TestCaseWithTmpdir() { compileAndCheckMainClass(listOf(main1Kt, main2Kt), expectedMainClass = null) } + fun testObjectJvmStaticFunctionMainClass() { + val mainKt = tmpdir.resolve("main.kt").apply { + writeText( + """ + ...
compiler/tests/org/jetbrains/kotlin/cli/CustomCliTest.kt
0
Kotlin
1
none
16
51
51
true
JVM Cli: Proper Main-class manifest attribute for JvmStatic entry point.
4,546
JetBrains/kotlin
51,705
Kotlin
ov7a
Review this pull request change. Language: Kotlin File: compiler/tests/org/jetbrains/kotlin/cli/CustomCliTest.kt PR Title: JVM Cli: Proper Main-class manifest attribute for JvmStatic entry point. BEFORE CODE: val main2Kt = tmpdir.resolve("main2.kt").apply { writeText(EMPTY_MAIN_FUN) } ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
fun foo(block: () -> String): String = block() inline fun bar(crossinline f: () -> String) = foo { f() } fun flaf() { val revoked = "A" bar { synchronized (revoked) { "B" } } } // The field $revoked$inlined should be loaded only once and stored in a local // that is used for the monitor enter/exit...
No issues found.
fun foo(block: () -> String): String = block() inline fun bar(crossinline f: () -> String) = foo { f() } fun flaf() { val revoked = "A" bar { synchronized (revoked) { "B" } } } // The field $revoked$inlined should be loaded only once and stored in a local // that is used for the monitor enter/exit...
@@ -0,0 +1,20 @@ +fun foo(block: () -> String): String = block() +inline fun bar(crossinline f: () -> String) = foo { f() } + +fun flaf() { + val revoked = "A" + bar { + synchronized (revoked) { + "B" + } + } +} + +// The field $revoked$inlined should be loaded only once and stored in a local +// that is ...
compiler/testData/codegen/bytecodeText/kt48367.kt
0
Kotlin
1
none
16
21
21
true
[JVM] Force lock object in JVM `synchronized` implementation into local.
4,555
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/bytecodeText/kt48367.kt PR Title: [JVM] Force lock object in JVM `synchronized` implementation into local. BEFORE CODE: fun foo(block: () -> String): String = block() inline fun bar(crossinline f: () -> String) = foo { f() } fun flaf...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
open class Base(parameter: String) fun foo(captured: String) { object : Base(captured) { val x = captured init { println(captured) } } } // JVM_TEMPLATES // 1 final synthetic Ljava/lang/String; \$captured // JVM_IR_TEMPLATES // 0 final synthetic Ljava/lang/String; \$captured
No issues found.
open class Base(parameter: String) fun foo(captured: String) { object : Base(captured) { val x = captured init { println(captured) } } } // JVM_TEMPLATES // 1 final synthetic Ljava/lang/String; \$captured // JVM_IR_TEMPLATES // 0 final synthetic Ljava/lang/String; \$captured
@@ -0,0 +1,14 @@ +open class Base(parameter: String) + +fun foo(captured: String) { + object : Base(captured) { + val x = captured + init { println(captured) } + } +} + +// JVM_TEMPLATES +// 1 final synthetic Ljava/lang/String; \$captured + +// JVM_IR_TEMPLATES +// 0 final synthetic Ljava/lang/Strin...
compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/constructorOnly.kt
0
Kotlin
1
none
16
15
15
true
IR: do not create unused capture fields
4,582
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/constructorOnly.kt PR Title: IR: do not create unused capture fields BEFORE CODE: open class Base(parameter: String) fun foo(captured: String) { object : Base(captured) { val x = captu...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
val startOffset = UNDEFINED_OFFSET val endOffset = UNDEFINED_OFFSET val ctor = irClass.addConstructor { visibility = DescriptorVisibilities.PUBLIC } val ctorBody = context.irFactory.createBlockBody( startOffset, endOffset, listOf( IrDelega...
No issues found.
val startOffset = UNDEFINED_OFFSET val endOffset = UNDEFINED_OFFSET val ctor = irClass.addConstructor { visibility = DescriptorVisibilities.PUBLIC } val ctorBody = context.irFactory.createBlockBody( startOffset, endOffset, listOf( IrDelega...
@@ -5,17 +5,29 @@ package org.jetbrains.kotlinx.serialization.compiler.backend.ir +import org.jetbrains.kotlin.backend.common.ir.createImplicitParameterDeclarationWithWrappedDescriptor +import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.DescriptorVisibilities +import org.jet...
plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/compiler/backend/ir/SerialInfoImplJvmIrGenerator.kt
0
Kotlin
1
none
16
51
51
true
Serialization: Serializable meta annotation
4,583
JetBrains/kotlin
51,705
Kotlin
rsinukov
Review this pull request change. Language: Kotlin File: plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/compiler/backend/ir/SerialInfoImplJvmIrGenerator.kt PR Title: Serialization: Serializable meta annotation BEFORE CODE: val startOffset = UNDEFINED_OFFSET...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@Parcelize sealed class A : Parcelable abstract class B interface J data class AI(val x: String) : A(), I class I1 : J, I { override fun equals(other: Any?): Boolean { return other is I1 } } data class I2(val x: Float) : B(), I object A1 : A() open class A2(val x: Int) : A() { override fun equals...
No issues found.
@Parcelize sealed class A : Parcelable abstract class B interface J data class AI(val x: String) : A(), I class I1 : J, I { override fun equals(other: Any?): Boolean { return other is I1 } } data class I2(val x: Float) : B(), I object A1 : A() open class A2(val x: Int) : A() { override fun equals...
@@ -0,0 +1,74 @@ +// WITH_RUNTIME + +@file:JvmName("TestKt") +package test + +import kotlinx.parcelize.* +import android.os.Parcel +import android.os.Parcelable + +@Parcelize +sealed interface I : Parcelable + +@Parcelize +sealed class A : Parcelable + +abstract class B +interface J + +data class AI(val x: String) : A(...
plugins/parcelize/parcelize-compiler/testData/box/sealedInterface.kt
0
Kotlin
1
none
16
51
51
true
Parcelize: Allow Parcelize annotation on sealed classes
4,596
JetBrains/kotlin
51,705
Kotlin
sfs
Review this pull request change. Language: Kotlin File: plugins/parcelize/parcelize-compiler/testData/box/sealedInterface.kt PR Title: Parcelize: Allow Parcelize annotation on sealed classes BEFORE CODE: @Parcelize sealed class A : Parcelable abstract class B interface J data class AI(val x: String) : A(), I clas...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
visitEnd() } visitMethod(Opcodes.ACC_PUBLIC, "<init>", "()V", null, null).run { visitCode() visitVarInsn(Opcodes.ALOAD, 0) visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false) visitInsn(...
No issues found.
visitEnd() } visitMethod(Opcodes.ACC_PUBLIC, "<init>", "()V", null, null).run { visitCode() visitVarInsn(Opcodes.ALOAD, 0) visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false) visitInsn(...
@@ -214,4 +214,26 @@ class MetadataSmokeTest { KotlinModuleMetadata.Writer().write(mv) } + + @Test + fun jvmClassFlags() { + // Test that we can (de-)serialize the jvmClassFlags extension. All the flags that currently + // exist are controlled by compiler options, so we have to manua...
libraries/kotlinx-metadata/jvm/test/kotlinx/metadata/test/MetadataSmokeTest.kt
0
Kotlin
1
none
16
51
51
true
kotlinx-metadata-jvm: Handle the jvmClassFlags extension
4,614
JetBrains/kotlin
51,705
Kotlin
sfs
Review this pull request change. Language: Kotlin File: libraries/kotlinx-metadata/jvm/test/kotlinx/metadata/test/MetadataSmokeTest.kt PR Title: kotlinx-metadata-jvm: Handle the jvmClassFlags extension BEFORE CODE: visitEnd() } visitMethod(Opcodes.ACC_PUBLIC, "<init>", "()V",...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/* * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.konan.target.LinkerOutputKind /** * ...
No issues found.
/* * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.konan.target.LinkerOutputKind /** * ...
@@ -0,0 +1,31 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.backend.konan + +import org.jetbrains.kotlin.konan.target....
kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/AndroidProgramType.kt
0
Kotlin
1
none
16
31
31
true
[Native] Enable real Android Native executables
4,624
JetBrains/kotlin
51,705
Kotlin
natario1
Review this pull request change. Language: Kotlin File: kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/AndroidProgramType.kt PR Title: [Native] Enable real Android Native executables BEFORE CODE: /* * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Langua...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
addValueParameter("p", getPropertyReferenceClass(mutable, n, impl = false).defaultType) } } } } val javaLangReflectSymbols: JvmReflectSymbols by lazy { JvmReflectSymbols(context) } override val functionAdapter: IrClassSymbol = createClass...
No issues found.
addValueParameter("p", getPropertyReferenceClass(mutable, n, impl = false).defaultType) } } } } val javaLangReflectSymbols: JvmReflectSymbols by lazy { JvmReflectSymbols(context) } override val functionAdapter: IrClassSymbol = createClass...
@@ -60,7 +60,6 @@ class JvmSymbols( private val kotlinReflectPackage: IrPackageFragment = createPackage(FqName("kotlin.reflect")) private val javaLangPackage: IrPackageFragment = createPackage(FqName("java.lang")) private val javaLangInvokePackage: IrPackageFragment = createPackage(FqName("java.lang.invo...
compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmSymbols.kt
0
Kotlin
1
none
16
51
51
true
[IR] Refactor `JvmSymbols` for on-demand `java.lang.reflect` symbols
4,641
JetBrains/kotlin
51,705
Kotlin
kandersen
Review this pull request change. Language: Kotlin File: compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmSymbols.kt PR Title: [IR] Refactor `JvmSymbols` for on-demand `java.lang.reflect` symbols BEFORE CODE: addValueParameter("p", getPropertyReferenceClass(mutable, n, impl = false...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
classDescriptor.thisAsReceiverParameter.type.toIrType() ) generatePrimaryConstructor(irClass) irClass.declarations.add( generateFunctionForFragment(ktFile) ) } } private fun generatePrimaryConstructor(irClass: IrClass) { ...
No issues found.
classDescriptor.thisAsReceiverParameter.type.toIrType() ) generatePrimaryConstructor(irClass) irClass.declarations.add( generateFunctionForFragment(ktFile) ) } } private fun generatePrimaryConstructor(irClass: IrClass) { ...
@@ -19,6 +19,7 @@ import org.jetbrains.kotlin.psi.KtBlockCodeFragment import org.jetbrains.kotlin.psi2ir.generators.Generator import org.jetbrains.kotlin.psi2ir.generators.GeneratorContext import org.jetbrains.kotlin.psi2ir.generators.createBodyGenerator +import org.jetbrains.kotlin.resolve.BindingContextUtils impo...
compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/fragments/FragmentDeclarationGenerator.kt
0
Kotlin
1
none
16
51
51
true
[EE-IR] Support mutations by evaluator fragments
4,647
JetBrains/kotlin
51,705
Kotlin
kandersen
Review this pull request change. Language: Kotlin File: compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/fragments/FragmentDeclarationGenerator.kt PR Title: [EE-IR] Support mutations by evaluator fragments BEFORE CODE: classDescriptor.thisAsReceiverParameter.type.toIrType() ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// TARGET_BACKEND: JVM_IR annotation class Ann1(val value: UByte = 41u) annotation class Ann2(val value: UShort = 42u) annotation class Ann3(val value: UInt = 43u) annotation class Ann4(val value: ULong = 44u) // 1 default=\(byte\)41 // 1 default=\(short\)42 // 1 default=43 // 1 default=44L
No issues found.
// TARGET_BACKEND: JVM_IR annotation class Ann1(val value: UByte = 41u) annotation class Ann2(val value: UShort = 42u) annotation class Ann3(val value: UInt = 43u) annotation class Ann4(val value: ULong = 44u) // 1 default=\(byte\)41 // 1 default=\(short\)42 // 1 default=43 // 1 default=44L
@@ -0,0 +1,11 @@ +// TARGET_BACKEND: JVM_IR + +annotation class Ann1(val value: UByte = 41u) +annotation class Ann2(val value: UShort = 42u) +annotation class Ann3(val value: UInt = 43u) +annotation class Ann4(val value: ULong = 44u) + +// 1 default=\(byte\)41 +// 1 default=\(short\)42 +// 1 default=43 +// 1 default=44...
compiler/testData/codegen/bytecodeText/annotationDefaultValueOfUnsigned.kt
0
Kotlin
1
none
16
11
11
true
JVM_IR: recover accidentally lost backingField (KT-49998)
4,669
JetBrains/kotlin
51,705
Kotlin
scaventz
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/bytecodeText/annotationDefaultValueOfUnsigned.kt PR Title: JVM_IR: recover accidentally lost backingField (KT-49998) BEFORE CODE: // TARGET_BACKEND: JVM_IR annotation class Ann1(val value: UByte = 41u) annotation class Ann2(val value...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
val oldValue = a2.value traceWithSize { "before CAS value = $oldValue" } assertTrue(a2.compareAndSet(oldValue, oldValue * 10)) traceWithSize { "after CAS value = ${a2.value}" } traceWithSize { "before getAndDecrement value = ${a2.value}" } a2.getAndDecrement() ass...
No issues found.
val oldValue = a2.value traceWithSize { "before CAS value = $oldValue" } assertTrue(a2.compareAndSet(oldValue, oldValue * 10)) traceWithSize { "after CAS value = ${a2.value}" } traceWithSize { "before getAndDecrement value = ${a2.value}" } a2.getAndDecrement() ass...
@@ -0,0 +1,106 @@ +import kotlinx.atomicfu.* +import kotlin.test.* + +class TraceTest { + private val defaultTrace = Trace() + private val a1 = atomic(5, defaultTrace) + + private val traceWithSize = Trace(30) + private val a2 = atomic(1, traceWithSize) + + private val traceWithFormat = Trace(format = Tr...
plugins/atomicfu/atomicfu-compiler/testData/box/TraceTest.kt
0
Kotlin
1
none
16
51
51
true
kotlinx.atomicfu compiler plugin (JS): tracing supported.
4,691
JetBrains/kotlin
51,705
Kotlin
mvicsokolova
Review this pull request change. Language: Kotlin File: plugins/atomicfu/atomicfu-compiler/testData/box/TraceTest.kt PR Title: kotlinx.atomicfu compiler plugin (JS): tracing supported. BEFORE CODE: val oldValue = a2.value traceWithSize { "before CAS value = $oldValue" } assertTrue(a2.compare...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
internal fun IrFunctionAccessExpression.getValueArguments() = (0 until valueArgumentsCount).map { i -> getValueArgument(i) } internal fun IrValueParameter.capture() = buildGetValue(UNDEFINED_OFFSET, UNDEFINED_OFFSET, symbol) internal fun IrPluginContext.buildGetterType(valueType: IrType): IrSimpleType...
No issues found.
internal fun IrFunctionAccessExpression.getValueArguments() = (0 until valueArgumentsCount).map { i -> getValueArgument(i) } internal fun IrValueParameter.capture() = buildGetValue(UNDEFINED_OFFSET, UNDEFINED_OFFSET, symbol) internal fun IrPluginContext.buildGetterType(valueType: IrType): IrSimpleType...
@@ -5,19 +5,20 @@ package org.jetbrains.kotlinx.atomicfu.compiler.extensions -import org.jetbrains.kotlin.backend.common.deepCopyWithVariables import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext import org.jetbrains.kotlin.descriptors.DescriptorVisibilities import org.jetbrains.kotlin.ir.IrSta...
plugins/atomicfu/atomicfu-compiler/src/org.jetbrains.kotlinx.atomicfu.compiler/extensions/TransformerUtil.kt
0
Kotlin
1
none
16
51
51
true
kotlinx.atomicfu compiler plugin (JS): delegated properties supported
4,692
JetBrains/kotlin
51,705
Kotlin
mvicsokolova
Review this pull request change. Language: Kotlin File: plugins/atomicfu/atomicfu-compiler/src/org.jetbrains.kotlinx.atomicfu.compiler/extensions/TransformerUtil.kt PR Title: kotlinx.atomicfu compiler plugin (JS): delegated properties supported BEFORE CODE: internal fun IrFunctionAccessExpression.getValueArguments(...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
package app import lib.* fun runAppAndReturnOk(): String { return A.a().b() }
No issues found.
package app import lib.* fun runAppAndReturnOk(): String { return A.a().b() }
@@ -0,0 +1,7 @@ +package app + +import lib.* + +fun runAppAndReturnOk(): String { + return A.a().b() +}
plugins/jvm-abi-gen/testData/compile/privateValueClassConstructor/app/app.kt
0
Kotlin
1
none
16
8
8
true
inlineClassUtils: Fix handling of inline classes without constructors (KT-50992)
4,725
JetBrains/kotlin
51,705
Kotlin
sfs
Review this pull request change. Language: Kotlin File: plugins/jvm-abi-gen/testData/compile/privateValueClassConstructor/app/app.kt PR Title: inlineClassUtils: Fix handling of inline classes without constructors (KT-50992) BEFORE CODE: package app import lib.* fun runAppAndReturnOk(): String { return A.a().b...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@SuppressWarnings("module") // suppress warning about terminal digit module kotlin.stdlib.jdk8 { requires transitive kotlin.stdlib; requires kotlin.stdlib.jdk7; exports kotlin.jvm.optionals; exports kotlin.jvm.jdk8; exports kotlin.collections.jdk8; exports kotlin.streams.jdk8; exports kotli...
No issues found.
@SuppressWarnings("module") // suppress warning about terminal digit module kotlin.stdlib.jdk8 { requires transitive kotlin.stdlib; requires kotlin.stdlib.jdk7; exports kotlin.jvm.optionals; exports kotlin.jvm.jdk8; exports kotlin.collections.jdk8; exports kotlin.streams.jdk8; exports kotli...
@@ -3,6 +3,7 @@ requires transitive kotlin.stdlib; requires kotlin.stdlib.jdk7; + exports kotlin.jvm.optionals; exports kotlin.jvm.jdk8; exports kotlin.collections.jdk8; exports kotlin.streams.jdk8;
libraries/stdlib/jdk8/java9/module-info.java
0
Java
1
none
16
15
15
true
Optionals
4,737
JetBrains/kotlin
51,705
Kotlin
kevin1e100
Review this pull request change. Language: Java File: libraries/stdlib/jdk8/java9/module-info.java PR Title: Optionals BEFORE CODE: @SuppressWarnings("module") // suppress warning about terminal digit module kotlin.stdlib.jdk8 { requires transitive kotlin.stdlib; requires kotlin.stdlib.jdk7; exports ko...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// IGNORE_BACKEND: JS_IR, JS, NATIVE, WASM // IGNORE_BACKEND: JS_IR_ES6 // WITH_REFLECT import kotlin.test.assertEquals inline class S(val value: String) { operator fun plus(other: S): S = S(this.value + other.value) } class C { fun member(a: S, b: S = S("b")): S = a + b } fun topLevel(c: S, d: S = S("d")):...
No issues found.
// IGNORE_BACKEND: JS_IR, JS, NATIVE, WASM // IGNORE_BACKEND: JS_IR_ES6 // WITH_REFLECT import kotlin.test.assertEquals inline class S(val value: String) { operator fun plus(other: S): S = S(this.value + other.value) } class C { fun member(a: S, b: S = S("b")): S = a + b } fun topLevel(c: S, d: S = S("d")):...
@@ -14,33 +14,32 @@ class C { fun topLevel(c: S, d: S = S("d")): S = c + d -/* TODO: support constructors with inline class types in the signature (KT-26765) class D(e: S, f: S = S("f")) { val result = e + f } -*/ fun S.extension(h: S = S("h")): S = this + h fun box(): String { assertEquals(S("ab...
compiler/testData/codegen/box/reflection/callBy/inlineClassFunctionsAndConstructors.kt
0
Kotlin
1
none
16
46
46
true
Partial fix for KT-27598
4,746
JetBrains/kotlin
51,705
Kotlin
k163377
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/box/reflection/callBy/inlineClassFunctionsAndConstructors.kt PR Title: Partial fix for KT-27598 BEFORE CODE: // IGNORE_BACKEND: JS_IR, JS, NATIVE, WASM // IGNORE_BACKEND: JS_IR_ES6 // WITH_REFLECT import kotlin.test.assertEquals inl...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
arg00: Long = 0L, arg01: Long = 0L, arg02: Long = 0L, arg03: Long = 0L, arg04: Long = 0L, arg05: Long = 0L, arg06: Long = 0L, arg07: Long = 0L, arg08: Long = 0L, arg09: Long = 0L, arg10: Long = 0L, arg11: Long = 0L, arg12: Long = 0L, arg13: Long = 0L, arg14: Long = 0L, arg15: Long = 0L, arg16: Long = 0L...
No issues found.
arg00: Long = 0L, arg01: Long = 0L, arg02: Long = 0L, arg03: Long = 0L, arg04: Long = 0L, arg05: Long = 0L, arg06: Long = 0L, arg07: Long = 0L, arg08: Long = 0L, arg09: Long = 0L, arg10: Long = 0L, arg11: Long = 0L, arg12: Long = 0L, arg13: Long = 0L, arg14: Long = 0L, arg15: Long = 0L, arg16: Long = 0L...
@@ -2,10 +2,70 @@ // IGNORE_BACKEND: JS_IR_ES6 // WITH_REFLECT +import kotlin.test.assertEquals + inline class A(val x: Int) -fun test(x: A = A(0)) = "OK" +fun test1(x: A = A(0)) = "OK" + +fun test32( + arg00: Long = 0L, arg01: Long = 0L, arg02: Long = 0L, arg03: Long = 0L, arg04: Long = 0L, + arg05: Long ...
compiler/testData/codegen/box/reflection/callBy/inlineClassDefaultArguments.kt
0
Kotlin
1
none
16
51
51
true
Fix KT-51804
4,779
JetBrains/kotlin
51,705
Kotlin
k163377
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/box/reflection/callBy/inlineClassDefaultArguments.kt PR Title: Fix KT-51804 BEFORE CODE: arg00: Long = 0L, arg01: Long = 0L, arg02: Long = 0L, arg03: Long = 0L, arg04: Long = 0L, arg05: Long = 0L, arg06: Long = 0L, arg07: Long...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
?: receiverType ?: typeMapper.mapClass(callee.parentAsClass) val ownerName = ownerType.internalName val fieldName = callee.name.asString() val calleeIrType = if (callee.isFromJava() && callee.type.isInlineClassType()) callee.type.makeNullable() else callee.type val fieldType ...
No issues found.
?: receiverType ?: typeMapper.mapClass(callee.parentAsClass) val ownerName = ownerType.internalName val fieldName = callee.name.asString() val calleeIrType = if (callee.isFromJava() && callee.type.isInlineClassType()) callee.type.makeNullable() else callee.type val fieldType ...
@@ -40,12 +40,17 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrCompositeImpl import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol +import org.jetbrains.kotlin.ir.symbols.IrValueSymbol import ...
compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt
0
Kotlin
1
none
16
51
51
true
[JVM IR] Limit local variables in do-while conditions.
4,782
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Kotlin File: compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt PR Title: [JVM IR] Limit local variables in do-while conditions. BEFORE CODE: ?: receiverType ?: typeMapper.mapClass(callee.parentAsClass) val...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/* ieee_cbrt(x) * Return cube root of x */ package kotlin.math.fdlibm private const val B1 = 715094163 /* B1 = (682-0.03306235651)*2**20 */ private const val B2 = 696219795 /* B2 = (664-0.03306235651)*2**20 */ private const val C = 5.42857142857142815906e-01 /* 19/35 = 0x3FE15F15, 0xF15F15F1 */ private const v...
No issues found.
/* ieee_cbrt(x) * Return cube root of x */ package kotlin.math.fdlibm private const val B1 = 715094163 /* B1 = (682-0.03306235651)*2**20 */ private const val B2 = 696219795 /* B2 = (664-0.03306235651)*2**20 */ private const val C = 5.42857142857142815906e-01 /* 19/35 = 0x3FE15F15, 0xF15F15F1 */ private const v...
@@ -0,0 +1,76 @@ +/* @(#)s_cbrt.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is f...
libraries/stdlib/wasm/src/kotlin/math/fdlibm/s_cbrt.kt
0
Kotlin
1
none
16
51
51
true
KT-48232: Implement kotlin.math.cbrt() (cubic roots)
4,790
JetBrains/kotlin
51,705
Kotlin
romainguy
Review this pull request change. Language: Kotlin File: libraries/stdlib/wasm/src/kotlin/math/fdlibm/s_cbrt.kt PR Title: KT-48232: Implement kotlin.math.cbrt() (cubic roots) BEFORE CODE: /* ieee_cbrt(x) * Return cube root of x */ package kotlin.math.fdlibm private const val B1 = 715094163 /* B1 = (682-0.0330623...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/* * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.backend.konan enum class ObjCExportSuspendFunctionLaunchThreadRestriction { ...
No issues found.
/* * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.backend.konan enum class ObjCExportSuspendFunctionLaunchThreadRestriction { ...
@@ -0,0 +1,19 @@ +/* + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.backend.konan + +enum class ObjCExportSuspendFunctionLaunc...
kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ObjCExportSuspendFunctionLaunchThreadRestriction.kt
0
Kotlin
1
none
16
20
20
true
KT-51297: Allow suspend from any thread from ObjC
4,827
JetBrains/kotlin
51,705
Kotlin
ahmedre
Review this pull request change. Language: Kotlin File: kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ObjCExportSuspendFunctionLaunchThreadRestriction.kt PR Title: KT-51297: Allow suspend from any thread from ObjC BEFORE CODE: /* * Copyright 2010-2022 JetBrains s.r....
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
import org.jetbrains.kotlin.backend.common.FileLoweringPass import org.jetbrains.kotlin.backend.common.phaser.makeIrFilePhase import org.jetbrains.kotlin.backend.jvm.JvmBackendContext import org.jetbrains.kotlin.backend.jvm.ir.isInlineFunctionCall import org.jetbrains.kotlin.backend.jvm.ir.unwrapInlineLambda import org...
No issues found.
import org.jetbrains.kotlin.backend.common.FileLoweringPass import org.jetbrains.kotlin.backend.common.phaser.makeIrFilePhase import org.jetbrains.kotlin.backend.jvm.JvmBackendContext import org.jetbrains.kotlin.backend.jvm.ir.isInlineFunctionCall import org.jetbrains.kotlin.backend.jvm.ir.unwrapInlineLambda import org...
@@ -0,0 +1,64 @@ +/* + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.backend.jvm.lower + +import org.jetbrains.kotlin.backend.c...
compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/RecordEnclosingMethodsLowering.kt
0
Kotlin
1
none
16
51
51
true
JVM_IR: skip SAM lambdas when computing enclosing method of objects
4,831
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/RecordEnclosingMethodsLowering.kt PR Title: JVM_IR: skip SAM lambdas when computing enclosing method of objects BEFORE CODE: import org.jetbrains.kotlin.backend.common.FileLoweringPass im...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
companion object { fun LambdaInfo.capturedParamDesc(fieldName: String, fieldType: Type, isSuspend: Boolean): CapturedParamDesc { return CapturedParamDesc(lambdaClassType, fieldName, fieldType, isSuspend) } } } enum class NonInlineArgumentForInlineSuspendParameter : FunctionalArgumen...
No issues found.
companion object { fun LambdaInfo.capturedParamDesc(fieldName: String, fieldType: Type, isSuspend: Boolean): CapturedParamDesc { return CapturedParamDesc(lambdaClassType, fieldName, fieldType, isSuspend) } } } enum class NonInlineArgumentForInlineSuspendParameter : FunctionalArgumen...
@@ -140,12 +140,11 @@ class DefaultLambda(info: ExtractedDefaultLambda, sourceCompiler: SourceCompiler val withFakeVariable = MethodNode(originNode.access, originNode.name, originNode.desc, originNode.signature, originNode.exceptions?.toTypedArray()) val fakeVarIndex = originNode.maxLocal...
compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt
0
Kotlin
1
none
16
51
51
true
JVM IR: Start fake variables for default lambdas after initialization
4,849
JetBrains/kotlin
51,705
Kotlin
sfs
Review this pull request change. Language: Kotlin File: compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt PR Title: JVM IR: Start fake variables for default lambdas after initialization BEFORE CODE: companion object { fun LambdaInfo.capturedParamDesc(fieldName: String, fieldType: Ty...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
compileOnly(intellijCore()) compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) compileOnly(project(":compiler:plugin-api")) compileOnly(project(":compiler:cli-common")) compileOnly(project(":compiler:frontend")) compileOnly(project(":compiler:backend")) compileOnly(project...
No issues found.
compileOnly(intellijCore()) compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) compileOnly(project(":compiler:plugin-api")) compileOnly(project(":compiler:cli-common")) compileOnly(project(":compiler:frontend")) compileOnly(project(":compiler:backend")) compileOnly(project...
@@ -68,9 +68,10 @@ dependencies { testRuntimeOnly(commonDependency("org.fusesource.jansi", "jansi")) atomicfuClasspath("org.jetbrains.kotlinx:atomicfu-js:0.16.3") { isTransitive = false } - atomicfuRuntimeForTests(project(":kotlinx-atomicfu-runtime")) { isTransitive = false } - embedded(project(":k...
plugins/atomicfu/atomicfu-compiler/build.gradle.kts
0
Kotlin
1
none
16
51
51
true
Publish kotlinx-atomicfu-runtime module
4,879
JetBrains/kotlin
51,705
Kotlin
mvicsokolova
Review this pull request change. Language: Kotlin File: plugins/atomicfu/atomicfu-compiler/build.gradle.kts PR Title: Publish kotlinx-atomicfu-runtime module BEFORE CODE: compileOnly(intellijCore()) compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) compileOnly(project(":compiler:plug...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/** * Allow a user to choose distribution type. The following distribution types are available: * - light - Doesn't include platform libraries and generates them at the user side. For 1.3 corresponds to the restricted distribution. * - prebuilt - Includes all platform libraries. */ val na...
No issues found.
/** * Allow a user to choose distribution type. The following distribution types are available: * - light - Doesn't include platform libraries and generates them at the user side. For 1.3 corresponds to the restricted distribution. * - prebuilt - Includes all platform libraries. */ val na...
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.gradle.dsl.NativeCacheKind import org.jetbrains.kotlin.gradle.internal.testing.TCServiceMessageOutputStreamHandler.Companion.IGNORE_TCSM_OVERFLOW import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType.Companion.jsCompilerProperty import org.jetbrains.kotlin.gradl...
libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/PropertiesProvider.kt
0
Kotlin
1
none
16
51
51
true
KT-52951
4,881
JetBrains/kotlin
51,705
Kotlin
mpetuska
Review this pull request change. Language: Kotlin File: libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/PropertiesProvider.kt PR Title: KT-52951 BEFORE CODE: /** * Allow a user to choose distribution type. The following distribution types are available: * - ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
var kotlinPropertyA: Int @ObjCName("objCPropertyB", "swiftPropertyB") var kotlinPropertyB: Int @ObjCName("objCPropertyB") var kotlinPropertyC: Int @ObjCName(swiftName ="swiftPropertyB") var kotlinPropertyD: Int var kotlinPropertyE: Int var kotlinPropertyF: Int @ObjCName("objCFun...
No issues found.
var kotlinPropertyA: Int @ObjCName("objCPropertyB", "swiftPropertyB") var kotlinPropertyB: Int @ObjCName("objCPropertyB") var kotlinPropertyC: Int @ObjCName(swiftName ="swiftPropertyB") var kotlinPropertyD: Int var kotlinPropertyE: Int var kotlinPropertyF: Int @ObjCName("objCFun...
@@ -33,16 +33,22 @@ class KotlinSubClass: KotlinClass() { } <!INVALID_OBJC_NAME!>@ObjCName()<!> -val invalidObjCNameA: Int = 0 +val invalidObjCName: Int = 0 -<!INVALID_OBJC_NAME!>@ObjCName("", "")<!> -val invalidObjCNameB: Int = 0 +<!EMPTY_OBJC_NAME!>@ObjCName("", "")<!> +val emptyObjCNameA: Int = 0 -@ObjCName(...
compiler/testData/diagnostics/nativeTests/objCName.fir.kt
0
Kotlin
1
none
16
51
51
true
[K/N] Prohibit empty ObjCNames
4,936
JetBrains/kotlin
51,705
Kotlin
rickclephas
Review this pull request change. Language: Kotlin File: compiler/testData/diagnostics/nativeTests/objCName.fir.kt PR Title: [K/N] Prohibit empty ObjCNames BEFORE CODE: var kotlinPropertyA: Int @ObjCName("objCPropertyB", "swiftPropertyB") var kotlinPropertyB: Int @ObjCName("objCPropertyB") var ko...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} } private val SAM_WRAPPER_SUFFIX = "$0" private val FUNCTION_FIELD_NAME = "function" // Construct a class that wraps an invokable object into an implementation of an interface: // class sam$n(private val invokable: F) : Interface { override fun method(...) = invokable(...) } priv...
No issues found.
} } private val SAM_WRAPPER_SUFFIX = "$0" private val FUNCTION_FIELD_NAME = "function" // Construct a class that wraps an invokable object into an implementation of an interface: // class sam$n(private val invokable: F) : Interface { override fun method(...) = invokable(...) } priv...
@@ -66,6 +66,9 @@ abstract class SingleAbstractMethodLowering(val context: CommonBackendContext) : protected open fun getWrappedFunctionType(klass: IrClass): IrType = klass.defaultType + protected open fun getSuspendFunctionWithoutContinuation(function: IrSimpleFunction): IrSimpleFunction = + ...
compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/SingleAbstractMethodLowering.kt
0
Kotlin
1
none
16
51
51
true
JVM_IR: unwrap suspend views when generating SAM wrappers
4,955
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/SingleAbstractMethodLowering.kt PR Title: JVM_IR: unwrap suspend views when generating SAM wrappers BEFORE CODE: } } private val SAM_WRAPPER_SUFFIX = "$0" private val...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
override val moduleDescriptor: ModuleDescriptor get() = psi2irContext.moduleDescriptor override val symbolTable: ReferenceSymbolTable get() = symbolTable override val typeTranslator: TypeTranslator get() = psi2irContext.typeTranslator ...
No issues found.
override val moduleDescriptor: ModuleDescriptor get() = psi2irContext.moduleDescriptor override val symbolTable: ReferenceSymbolTable get() = symbolTable override val typeTranslator: TypeTranslator get() = psi2irContext.typeTranslator ...
@@ -306,11 +306,14 @@ open class JvmIrCodegenFactory( override fun invokeCodegen(input: CodegenFactory.CodegenInput) { val (state, context, module, notifyCodegenStart) = input as JvmIrCodegenInput - if ((state.diagnosticReporter as? BaseDiagnosticsCollector)?.hasErrors == true) return + fu...
compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt
0
Kotlin
1
none
16
51
51
true
JVM_IR: Prevent writing output after an error is reported
4,969
JetBrains/kotlin
51,705
Kotlin
scaventz
Review this pull request change. Language: Kotlin File: compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt PR Title: JVM_IR: Prevent writing output after an error is reported BEFORE CODE: override val moduleDescriptor: ModuleDescriptor get() = ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return this@Command } var logger: ((() -> String)->Unit)? = null private var stdError: List<String> = emptyList() fun logWith(newLogger: ((() -> String)->Unit)): Command { logger = newLogger return this } open fun runProcess(): Int { stdError = emptyList() ...
No issues found.
return this@Command } var logger: ((() -> String)->Unit)? = null private var stdError: List<String> = emptyList() fun logWith(newLogger: ((() -> String)->Unit)): Command { logger = newLogger return this } open fun runProcess(): Int { stdError = emptyList() ...
@@ -18,12 +18,13 @@ package org.jetbrains.kotlin.konan.exec import org.jetbrains.kotlin.konan.KonanExternalToolFailure import java.io.BufferedReader +import java.io.File import java.io.InputStreamReader import java.lang.ProcessBuilder.Redirect import java.nio.file.Files -open class Command(initialCommand: Li...
kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/exec/ExecuteCommand.kt
0
Kotlin
1
none
16
51
51
true
[KT-54284][Native] Produce deterministic klibs from cinterop.
4,979
JetBrains/kotlin
51,705
Kotlin
mpetrov
Review this pull request change. Language: Kotlin File: kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/exec/ExecuteCommand.kt PR Title: [KT-54284][Native] Produce deterministic klibs from cinterop. BEFORE CODE: return this@Command } var logger: ((() -> String)->Unit)? = null p...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
map.put( PARCELABLE_SHOULD_BE_INSTANTIABLE, "'Parcelable' should not be an 'abstract' class" ) map.put( PARCELABLE_CANT_BE_INNER_CLASS, "'Parcelable' can't be an inner class" ) map.put( PARCELABLE_CANT_BE_LOCAL_CLASS,...
No issues found.
map.put( PARCELABLE_SHOULD_BE_INSTANTIABLE, "'Parcelable' should not be an 'abstract' class" ) map.put( PARCELABLE_CANT_BE_INNER_CLASS, "'Parcelable' can't be an inner class" ) map.put( PARCELABLE_CANT_BE_LOCAL_CLASS,...
@@ -16,11 +16,11 @@ package org.jetbrains.kotlin.parcelize.fir.diagnostics -import org.jetbrains.kotlin.diagnostics.KtDiagnostic import org.jetbrains.kotlin.diagnostics.KtDiagnosticFactoryToRendererMap -import org.jetbrains.kotlin.diagnostics.KtDiagnosticRenderer +import org.jetbrains.kotlin.diagnostics.rendering...
plugins/parcelize/parcelize-compiler/parcelize.k2/src/org/jetbrains/kotlin/parcelize/fir/diagnostics/KtDefaultErrorMessagesParcelize.kt
0
Kotlin
1
none
16
51
51
true
FIR: fix text for Parcelize errors and NON_PUBLIC_CALL_FROM_PUBLIC_INLINE
4,993
JetBrains/kotlin
51,705
Kotlin
pyos
Review this pull request change. Language: Kotlin File: plugins/parcelize/parcelize-compiler/parcelize.k2/src/org/jetbrains/kotlin/parcelize/fir/diagnostics/KtDefaultErrorMessagesParcelize.kt PR Title: FIR: fix text for Parcelize errors and NON_PUBLIC_CALL_FROM_PUBLIC_INLINE BEFORE CODE: map.put( ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
thisAsReceiverParameter.type.toIrType(), context.symbolTable.referenceValueParameter(thisAsReceiverParameter) ) } } private fun createPropertyReference( ktElement: KtElement, type: KotlinType, referencedDescriptor: ...
No issues found.
thisAsReceiverParameter.type.toIrType(), context.symbolTable.referenceValueParameter(thisAsReceiverParameter) ) } } private fun createPropertyReference( ktElement: KtElement, type: KotlinType, referencedDescriptor: ...
@@ -35,13 +35,15 @@ import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol import org.jetbrains.kotlin.ir.util.declareSimpleFunctionWithOverrides import org.jetbrains.kotlin.psi.KtElement +import org.jetbrains.kotlin.psi.KtObjectLiteralExpression import org.jetbrains...
compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt
0
Kotlin
1
none
16
51
51
true
[KAPT+JVM_IR] Do not generate initializers for delegated properties.
5,014
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Kotlin File: compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt PR Title: [KAPT+JVM_IR] Do not generate initializers for delegated properties. BEFORE CODE: thisAsReceiverParameter.type.toIrType(), ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// !LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR // JVM_TARGET: 1.8 // LAMBDAS: INDY class Ctx { val k = "__K__" } class Scope { val o = "O" } fun accept(block: context(Ctx) Scope.(Int) -> String) = 1 fun accept(ref: Any) = 1 val foo: context(Ctx) Scope.(fooParam: Int) -> String = { fooArg -> o + k...
No issues found.
// !LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR // JVM_TARGET: 1.8 // LAMBDAS: INDY class Ctx { val k = "__K__" } class Scope { val o = "O" } fun accept(block: context(Ctx) Scope.(Int) -> String) = 1 fun accept(ref: Any) = 1 val foo: context(Ctx) Scope.(fooParam: Int) -> String = { fooArg -> o + k...
@@ -0,0 +1,24 @@ +// !LANGUAGE: +ContextReceivers +// TARGET_BACKEND: JVM_IR +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +class Ctx { + val k = "__K__" +} + +class Scope { + val o = "O" +} + +fun accept(block: context(Ctx) Scope.(Int) -> String) = 1 +fun accept(ref: Any) = 1 + +val foo: context(Ctx) Scope.(fooParam: ...
compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextAndExtensionLambdaIndy.kt
0
Kotlin
1
none
16
25
25
true
Fix indy lambdas with extension and context receivers
5,021
JetBrains/kotlin
51,705
Kotlin
mcpiroman
Review this pull request change. Language: Kotlin File: compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextAndExtensionLambdaIndy.kt PR Title: Fix indy lambdas with extension and context receivers BEFORE CODE: // !LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR // JVM_TARGET: 1.8 // LAMB...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
prerequisite = setOf(volatilePhase) ) private val functionReferencePhase = createFileLoweringPhase( lowering = ::FunctionReferenceLowering, name = "FunctionReference", description = "Function references lowering", prerequisite = setOf(delegationPhase, localFunctionsPhase) // TOD...
No issues found.
prerequisite = setOf(volatilePhase) ) private val functionReferencePhase = createFileLoweringPhase( lowering = ::FunctionReferenceLowering, name = "FunctionReference", description = "Function references lowering", prerequisite = setOf(delegationPhase, localFunctionsPhase) // TOD...
@@ -321,7 +321,11 @@ private val inlinePhase = createFileLoweringPhase( lowering = { context: NativeGenerationState -> object : FileLoweringPass { override fun lower(irFile: IrFile) { - FunctionInlining(context.context, NativeInlineFunctionResolver(context.conte...
kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/Lowerings.kt
0
Kotlin
1
none
16
51
51
true
Add debug information for inline function parameters
5,050
JetBrains/kotlin
51,705
Kotlin
nikita-nazarov
Review this pull request change. Language: Kotlin File: kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/Lowerings.kt PR Title: Add debug information for inline function parameters BEFORE CODE: prerequisite = setOf(volatilePhase) ) private val fun...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
fun interfaceClashingMethodWithObjCNameInI2(): Int @ObjCName(name = "interfaceClashingMethodWithObjCNameInBoth") fun clashingMethodWithObjCNameInBoth(): Int } fun i1() = object : InterfaceNameManglingI1 { override val clashingProperty: Int get() = 1 override fun clashingMethod(): Int = 2...
No issues found.
fun interfaceClashingMethodWithObjCNameInI2(): Int @ObjCName(name = "interfaceClashingMethodWithObjCNameInBoth") fun clashingMethodWithObjCNameInBoth(): Int } fun i1() = object : InterfaceNameManglingI1 { override val clashingProperty: Int get() = 1 override fun clashingMethod(): Int = 2...
@@ -0,0 +1,73 @@ +@file:OptIn(kotlin.experimental.ExperimentalObjCName::class) + +package objcNameMangling + +interface InterfaceNameManglingI1 { + val clashingProperty: Int + + fun clashingMethod(): Int + + @ObjCName(name = "interfaceClashingMethodWithObjCNameInI1") + fun clashingMethodWithObjCNameInI1(): ...
kotlin-native/backend.native/tests/objcexport/interfaceMethodNameMangling.kt
0
Kotlin
1
none
16
51
51
true
Add flag that disables ObjC method name mangling for methods in different Kotlin Interfaces
5,070
JetBrains/kotlin
51,705
Kotlin
MarkCMann
Review this pull request change. Language: Kotlin File: kotlin-native/backend.native/tests/objcexport/interfaceMethodNameMangling.kt PR Title: Add flag that disables ObjC method name mangling for methods in different Kotlin Interfaces BEFORE CODE: fun interfaceClashingMethodWithObjCNameInI2(): Int @ObjCNa...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (type.isSuspendFunction()) { return mapSuspendFunctionType(type, context, mode, sw, materialized) } if (type.isArrayOrNullableArray()) { return mapArrayType(type, sw, context, mode, materialized) } if (typeConstructor.isCl...
No issues found.
if (type.isSuspendFunction()) { return mapSuspendFunctionType(type, context, mode, sw, materialized) } if (type.isArrayOrNullableArray()) { return mapArrayType(type, sw, context, mode, materialized) } if (typeConstructor.isCl...
@@ -28,15 +28,16 @@ interface TypeMappingContext<Writer : JvmDescriptorTypeWriter<Type>> { object AbstractTypeMapper { fun <Writer : JvmDescriptorTypeWriter<Type>> mapClass( context: TypeMappingContext<Writer>, - typeConstructor: TypeConstructorMarker + typeConstructor: TypeConstructorMarke...
compiler/backend.common.jvm/src/org/jetbrains/kotlin/types/AbstractTypeMapper.kt
0
Kotlin
1
none
16
51
51
true
[JVM_IR] Limit inner class attributes to types in class file
5,081
JetBrains/kotlin
51,705
Kotlin
madsager
Review this pull request change. Language: Kotlin File: compiler/backend.common.jvm/src/org/jetbrains/kotlin/types/AbstractTypeMapper.kt PR Title: [JVM_IR] Limit inner class attributes to types in class file BEFORE CODE: if (type.isSuspendFunction()) { return mapSuspendFunctionType(type...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
val containingDeclaration = descriptor.containingDeclaration if (containingDeclaration is ClassDescriptor && containingDeclaration.isInlineClass()) { kotlinParameterTypes.add(containingDeclaration.defaultType) } } descriptor.va...
No issues found.
val containingDeclaration = descriptor.containingDeclaration if (containingDeclaration is ClassDescriptor && containingDeclaration.isInlineClass()) { kotlinParameterTypes.add(containingDeclaration.defaultType) } } descriptor.va...
@@ -125,16 +125,21 @@ internal class InlineClassAwareCaller<out M : Member?>( val (range, unbox, box) = data @Suppress("UNCHECKED_CAST") - val unboxed = args.copyOf() as Array<Any?> - for (index in range) { - val method = unbox[index] + val unboxed = Array(args.size) ...
core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/InlineClassAwareCaller.kt
0
Kotlin
1
none
16
51
51
true
Fix KT-56650
5,093
JetBrains/kotlin
51,705
Kotlin
k163377
Review this pull request change. Language: Kotlin File: core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/InlineClassAwareCaller.kt PR Title: Fix KT-56650 BEFORE CODE: val containingDeclaration = descriptor.containingDeclaration if (containingDeclaration is ClassDescriptor &&...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
public void testIntrinsicsNullable() throws Exception { runTest("plugins/kotlinx-serialization/testData/boxIr/intrinsicsNullable.kt"); } @Test @TestMetadata("intrinsicsStarProjections.kt") public void testIntrinsicsStarProjections() throws Exception { run...
No issues found.
public void testIntrinsicsNullable() throws Exception { runTest("plugins/kotlinx-serialization/testData/boxIr/intrinsicsNullable.kt"); } @Test @TestMetadata("intrinsicsStarProjections.kt") public void testIntrinsicsStarProjections() throws Exception { run...
@@ -69,6 +69,12 @@ public void testDelegatedInterface() throws Exception { runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedInterface.kt"); } + @Test + @TestMetadata("delegatedProperty.kt") + public void testDelegatedProperty() throws Exception { + r...
plugins/kotlinx-serialization/tests-gen/org/jetbrains/kotlinx/serialization/runners/SerializationFirLightTreeBlackBoxTestGenerated.java
0
Java
1
none
16
51
51
true
Presence of (transient) delegated field in the serialized class breaks deserialization
5,103
JetBrains/kotlin
51,705
Kotlin
AngryGami
Review this pull request change. Language: Java File: plugins/kotlinx-serialization/tests-gen/org/jetbrains/kotlinx/serialization/runners/SerializationFirLightTreeBlackBoxTestGenerated.java PR Title: Presence of (transient) delegated field in the serialized class breaks deserialization BEFORE CODE: public v...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/* low-level APIs */ fun withCompilations(predicate: (KotlinCompilation<*>) -> Boolean) fun withoutCompilations(predicate: (KotlinCompilation<*>) -> Boolean) fun filterCompilations(predicate: (KotlinCompilation<*>) -> Boolean) = withoutCompilations { !predicate(it) } /* Convenient groups *...
No issues found.
/* low-level APIs */ fun withCompilations(predicate: (KotlinCompilation<*>) -> Boolean) fun withoutCompilations(predicate: (KotlinCompilation<*>) -> Boolean) fun filterCompilations(predicate: (KotlinCompilation<*>) -> Boolean) = withoutCompilations { !predicate(it) } /* Convenient groups *...
@@ -28,9 +28,10 @@ interface KotlinTargetHierarchyBuilder { fun withMingw() fun withLinux() fun withAndroidNative() - fun withJs() /* Actual targets */ + fun withJs() + fun withWasm() fun withJvm() fun withAndroid() fun withAndroidNativeX64()
libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinTargetHierarchyBuilder.kt
0
Kotlin
1
none
16
51
51
true
Support WASM in KotlinTargetHierarchyBuilder
5,106
JetBrains/kotlin
51,705
Kotlin
whyoleg
Review this pull request change. Language: Kotlin File: libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinTargetHierarchyBuilder.kt PR Title: Support WASM in KotlinTargetHierarchyBuilder BEFORE CODE: /* low-level APIs */ fun withCompilations(predicate: (Kot...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
+field("type", irTypeType) } val statementContainer: ElementConfig by element(Expression) { ownsChildren = false +listField("statements", statement, mutability = List, isChild = true) } val body: ElementConfig by element(Expression) { transform = true visitorPare...
No issues found.
+field("type", irTypeType) } val statementContainer: ElementConfig by element(Expression) { ownsChildren = false +listField("statements", statement, mutability = List, isChild = true) } val body: ElementConfig by element(Expression) { transform = true visitorPare...
@@ -6,6 +6,7 @@ package org.jetbrains.kotlin.ir.generator import com.squareup.kotlinpoet.FunSpec +import com.squareup.kotlinpoet.PropertySpec import com.squareup.kotlinpoet.KModifier import com.squareup.kotlinpoet.MemberName import org.jetbrains.kotlin.descriptors.ClassKind @@ -15,6 +16,7 @@ import org.jetbrains...
compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/IrTree.kt
0
Kotlin
1
none
16
51
51
true
Autogenerate IrMemberAccessExpression
5,107
JetBrains/kotlin
51,705
Kotlin
mcpiroman
Review this pull request change. Language: Kotlin File: compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/IrTree.kt PR Title: Autogenerate IrMemberAccessExpression BEFORE CODE: +field("type", irTypeType) } val statementContainer: ElementConfig by element(Expression) { ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
fun LookupStorage.update( lookupTracker: LookupTracker, filesToCompile: Iterable<File>, removedFiles: Iterable<File> ) { if (lookupTracker !is LookupTrackerImpl) throw AssertionError("Lookup tracker is expected to be LookupTrackerImpl, got ${lookupTracker::class.java}") removeLookupsFrom(filesToCo...
No issues found.
fun LookupStorage.update( lookupTracker: LookupTracker, filesToCompile: Iterable<File>, removedFiles: Iterable<File> ) { if (lookupTracker !is LookupTrackerImpl) throw AssertionError("Lookup tracker is expected to be LookupTrackerImpl, got ${lookupTracker::class.java}") removeLookupsFrom(filesToCo...
@@ -34,9 +34,6 @@ import org.jetbrains.kotlin.resolve.sam.SAM_LOOKUP_NAME import org.jetbrains.kotlin.utils.addToStdlib.flattenTo import java.io.File import java.nio.file.Files -import java.util.* -import kotlin.collections.HashSet -import kotlin.collections.LinkedHashSet const val DELETE_MODULE_FILE_PROPERTY = "...
build-common/src/org/jetbrains/kotlin/incremental/buildUtil.kt
0
Kotlin
1
none
16
51
51
true
IC: Compute symbols impacted by classpath changes
5,111
JetBrains/kotlin
51,705
Kotlin
hungvietnguyen
Review this pull request change. Language: Kotlin File: build-common/src/org/jetbrains/kotlin/incremental/buildUtil.kt PR Title: IC: Compute symbols impacted by classpath changes BEFORE CODE: fun LookupStorage.update( lookupTracker: LookupTracker, filesToCompile: Iterable<File>, removedFiles: Iterable<...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// KJS_WITH_FULL_RUNTIME // EXPECTED_REACHABLE_NODES: 2002 // MODULE: lib1 // FILE: lib1.kt package lib1 interface A { private fun foo() = "A.foo" fun bar() = foo() } // MODULE: lib2 // FILE: lib2.kt package lib2 interface B { private fun foo() = "B.foo" fun bar() = foo() } // MODULE: main(lib1, l...
No issues found.
// KJS_WITH_FULL_RUNTIME // EXPECTED_REACHABLE_NODES: 2002 // MODULE: lib1 // FILE: lib1.kt package lib1 interface A { private fun foo() = "A.foo" fun bar() = foo() } // MODULE: lib2 // FILE: lib2.kt package lib2 interface B { private fun foo() = "B.foo" fun bar() = foo() } // MODULE: main(lib1, l...
@@ -1,6 +1,6 @@ // IGNORE_FIR // KJS_WITH_FULL_RUNTIME -// EXPECTED_REACHABLE_NODES: 1819 +// EXPECTED_REACHABLE_NODES: 2002 // MODULE: lib1 // FILE: lib1.kt package lib1
js/js.translator/testData/box/multiModule/privateInterfaceNameClash.kt
0
Kotlin
1
none
16
51
51
true
[KT-57607] Fix performance of ArrayList.addAll methods in JS stdlib
5,116
JetBrains/kotlin
51,705
Kotlin
deotimedev
Review this pull request change. Language: Kotlin File: js/js.translator/testData/box/multiModule/privateInterfaceNameClash.kt PR Title: [KT-57607] Fix performance of ArrayList.addAll methods in JS stdlib BEFORE CODE: // KJS_WITH_FULL_RUNTIME // EXPECTED_REACHABLE_NODES: 2002 // MODULE: lib1 // FILE: lib1.kt packag...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@Test fun testComposableReporting039() { check( """ import androidx.compose.runtime.* fun composeInto(l: @Composable ()->Unit) { System.out.println(l) } fun Foo() { composeInto { Baz() } } ...
No issues found.
@Test fun testComposableReporting039() { check( """ import androidx.compose.runtime.* fun composeInto(l: @Composable ()->Unit) { System.out.println(l) } fun Foo() { composeInto { Baz() } } ...
@@ -1800,4 +1800,20 @@ class ComposableCheckerTests(useFir: Boolean) : AbstractComposeDiagnosticsTest(u """ ) } + + @Test + fun keyFunctionWithZeroParams() { + assumeTrue(useFir) + check( + """ + import androidx.compose.runtime.Composable + ...
plugins/compose/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/analysis/ComposableCheckerTests.kt
0
Kotlin
1
none
16
51
51
true
Add a diagnostic for `key` call with no arguments
5,524
JetBrains/kotlin
51,705
Kotlin
ShikaSD
Review this pull request change. Language: Kotlin File: plugins/compose/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/analysis/ComposableCheckerTests.kt PR Title: Add a diagnostic for `key` call with no arguments BEFORE CODE: @Test fun testComposableReporting0...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
gradleVersion = gradleVersion, buildJdk = providedJdk.location, buildOptions = defaultBuildOptions.copy(androidVersion = agpVersion), dependencyManagement = DependencyManagement.DefaultDependencyManagement( additionalRepos = setOf("https://androidx.dev/sna...
No issues found.
gradleVersion = gradleVersion, buildJdk = providedJdk.location, buildOptions = defaultBuildOptions.copy(androidVersion = agpVersion), dependencyManagement = DependencyManagement.DefaultDependencyManagement( additionalRepos = setOf("https://androidx.dev/sna...
@@ -7,9 +7,9 @@ package org.jetbrains.kotlin.gradle import com.android.build.api.variant.ApplicationAndroidComponentsExtension import org.gradle.api.logging.LogLevel -import org.gradle.api.logging.configuration.WarningMode import org.gradle.kotlin.dsl.getByType import org.gradle.util.GradleVersion +import org.jet...
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ComposeIT.kt
0
Kotlin
1
none
16
51
51
true
Add a way to disable Compose mapping tasks from gradle plugin
5,525
JetBrains/kotlin
51,705
Kotlin
ShikaSD
Review this pull request change. Language: Kotlin File: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ComposeIT.kt PR Title: Add a way to disable Compose mapping tasks from gradle plugin BEFORE CODE: gradleVersion = gradleVersion, buildJdk...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} } else { val sourceFiles = environmentForJS.getSourceFiles() if ( sourceFiles.isEmpty() && !configuration.allowNoSourceFiles && !configuration.jsIncrementalCompilationEnabled ) { if (!configuration....
No issues found.
} } else { val sourceFiles = environmentForJS.getSourceFiles() if ( sourceFiles.isEmpty() && !configuration.allowNoSourceFiles && !configuration.jsIncrementalCompilationEnabled ) { if (!configuration....
@@ -143,7 +143,7 @@ object WebFrontendPipelinePhase : PipelinePhase<ConfigurationPipelineArtifact, W incrementalDataProvider: IncrementalDataProvider?, lookupTracker: LookupTracker?, useWasmPlatform: Boolean, - ): FirResult { + ): AllModulesFrontendOutput { for (ktFile in ktFil...
compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/pipeline/web/WebFrontendPipelinePhase.kt
0
Kotlin
1
none
16
51
51
true
FirResult cleanup
5,553
JetBrains/kotlin
51,705
Kotlin
demiurg906
Review this pull request change. Language: Kotlin File: compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/pipeline/web/WebFrontendPipelinePhase.kt PR Title: FirResult cleanup BEFORE CODE: } } else { val sourceFiles = environmentForJS.getSourceFiles() if ( s...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
fun testComposeDefaultParamsInOpenFunctionK1ToK2( gradleVersion: GradleVersion, agpVersion: String, providedJdk: JdkVersions.ProvidedJdk ) { val composeSnapshotId = TestVersions.Compose.composeSnapshotId val composeSnapshotVersion = TestVersions.Compose.composeSnapshotVer...
No issues found.
fun testComposeDefaultParamsInOpenFunctionK1ToK2( gradleVersion: GradleVersion, agpVersion: String, providedJdk: JdkVersions.ProvidedJdk ) { val composeSnapshotId = TestVersions.Compose.composeSnapshotId val composeSnapshotVersion = TestVersions.Compose.composeSnapshotVer...
@@ -662,6 +662,7 @@ class ComposeIT : KGPBaseTest() { appExtension.beforeVariants { if (it.name == "release") { it.isMinifyEnabled = true + it.shrinkResources = true } } } @@ -677,7 +...
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ComposeIT.kt
0
Kotlin
1
none
16
51
51
true
Copy R8 outputs to Compose folder when transforming obfuscation file
5,603
JetBrains/kotlin
51,705
Kotlin
ShikaSD
Review this pull request change. Language: Kotlin File: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ComposeIT.kt PR Title: Copy R8 outputs to Compose folder when transforming obfuscation file BEFORE CODE: fun testComposeDefaultParamsInOpenFunctionK1ToK2( ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.