{"prompt":"package org.jetbrains.kotlin.analysis.test.framework.services.libraries\n\nimport org.jetbrains.kotlin.test.directives.model.SimpleDirectivesContainer\nimport org.jetbrains.kotlin.test.model.TestModule\nimport org.jetbrains.kotlin.test.services.TestService","completion":"import org.jetbrains.kotlin.test.services.TestServices\nimport org.jetbrains.kotlin.test.services.sourceFileProvider\nimport org.jetbrains.kotlin.test.util.KtTestUtil\nimport java.nio.file.Path\nimport kotlin.io.path.createDirectories\nimport kotlin.io.path.createFile<|endoftext|>"} {"prompt":"val overridden = overriddenMemberSymbols.firstOrNull {\n it.lazyResolveToPhase(FirResolvePhase.STATUS)\n visibilityChecker.isVisible(\n it.originalOrSelf().fir,\n context.session,\n file,\n containingDeclarations,\n dispatchReceiver = null,\n skipCheckForContainingClassVisibility = true\n )","completion":"}?.originalOrSelf() ?: return\n val originalContainingClassSymbol = overridden.containingClassLookupTag()?.toSymbol(context.session) as? FirRegularClassSymbol ?: return\n reporter.reportOn(\n member.source,\n FirErrors.VIRTUAL_MEMBER_HIDDEN,\n member,\n originalContainingClassSymbol,\n context<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.fir.analysis.checkers.declaration\n\nimport org.jetbrains.kotlin.KtNodeTypes\nimport org.jetbrains.kotlin.KtSourceElement\nimport org.jetbrains.kotlin.diagnostics.DiagnosticReporter\nimport org.jetbrains.kotlin.diagnostics.reportOn","completion":"import org.jetbrains.kotlin.fir.analysis.checkers.MppCheckerKind\nimport org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors<|endoftext|>"} {"prompt":"else -> \"org.gradle.api.provider.Property<${returnType.withNullability(false)}>\"\n }\n }\n\nprivate val KProperty1<*, *>.gradleLazyReturnTypeInstantiator: String\n get() {\n val returnType = gradleValues.type\n val classifier = returnType.classifier\n return when {","completion":"classifier is KClass<*> && classifier == List::class ->\n \".listProperty(${returnType.arguments.first().type!!.withNullability(false)}::class.java)\"\n classifier is KClass<*> && classifier == Set::class ->\n \".setProperty(${returnType.arguments.first().type!!.withNullability(false)}::class.java)\"<|endoftext|>"} {"prompt":"for (key in previousHashesToAnalyze.keys + currentHashesToAnalyze.keys) {\n val previousHash = previousHashesToAnalyze[key]\n if (previousHash == null) {\n changedClasses.add(key)\n continue\n }\n val currentHash = currentHashesToAnalyze[key]\n if (currentHash == null) {","completion":"changedClasses.add(key)\n continue\n }\n if (!previousHash.contentEquals(currentHash)) {\n changedClasses.add(key)\n }\n }\n\n \/\/ We do not compute structural data for unchanged files of the current snapshot for performance reasons.\n \/\/ That is why we reuse the previous snapshot as that one contains all unchanged entries.<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.descriptorUtil.getAnnotationRetention\nimport org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyExternal\nimport org.jetbrains.kotlin.resolve.source.PsiSourceElement\n\nobject JsRuntimeAnnotationChecker : DeclarationChecker {","completion":"override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {\n for (annotation in descriptor.annotations) {\n val annotationClass = annotation.annotationClass ?: continue\n if (annotationClass.getAnnotationRetention() != KotlinRetention.RUNTIME) continue<|endoftext|>"} {"prompt":".find { it.valueParameters.isEmpty() && it.extensionReceiverParameter == null }\n\n private fun getHashCodeFunction(type: KotlinType): FunctionDescriptor =\n type.memberScope.findHashCodeFunctionOrNull()\n ?: context.irBuiltIns.anyClass.descriptor.unsubstitutedMemberScope.findHashCodeFunctionOrNull()!!","completion":"private fun getHashCodeFunction(\n type: KotlinType,\n symbolResolve: (FunctionDescriptor) -> IrSimpleFunctionSymbol\n ): IrSimpleFunctionSymbol =\n when (val typeConstructorDescriptor = type.constructor.declarationDescriptor) {\n is ClassDescriptor -><|endoftext|>"} {"prompt":"fun addEventListener(type: String, callback: ((Event) -> Unit)?, options: dynamic = definedExternally)\n fun removeEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)\n fun removeEventListener(type: String, callback: ((Event) -> Unit)?, options: dynamic = definedExternally)\n fun dispatchEvent(event: Event): Boolean\n}\n\n\/**","completion":"* Exposes the JavaScript [EventListener](https:\/\/developer.mozilla.org\/en\/docs\/Web\/API\/EventListener) to Kotlin\n *\/\npublic external interface EventListener {\n fun handleEvent(event: Event)\n}<|endoftext|>"} {"prompt":"var returnVariableIndex = -1\n if (returnVariableSize > 0) {\n returnVariableIndex = methodNode.maxLocals\n methodNode.maxLocals += returnVariableSize\n }\n\n for (localReturn in localReturns) {\n localReturn.transform(methodNode.instructions, returnVariableIndex)\n }\n }\n }","completion":"\/\/Place to insert finally blocks from try blocks that wraps inline fun call\n class PointForExternalFinallyBlocks(\n @JvmField val beforeIns: AbstractInsnNode,\n @JvmField val returnType: Type,\n @JvmField val finallyIntervalEnd: LabelNode,\n @JvmField val jumpTarget: Label?\n )\n\n companion object {\n\n @JvmStatic<|endoftext|>"} {"prompt":"scriptFile.path\n ),\n expectedExitCode = 1,\n expectedSomeErrPatterns = listOf(\n \"unrecognized script type: someScript.+\"\n )\n )\n runWithK2JVMCompiler(\n arrayOf(\n \"-cp\", getMainKtsClassPath().joinToString(File.pathSeparator),","completion":"\"-Xdefault-script-extension=.main.kts\",\n \"-script\",\n scriptFile.path\n ),\n expectedExitCode = 1,\n expectedSomeErrPatterns = listOf(\n \"error: invalid argument: -abracadabra\"\n )\n )\n runWithK2JVMCompiler(\n arrayOf(<|endoftext|>"} {"prompt":"data class BuildRegister(val buildId: String, val teamCityUser: String, val teamCityPassword: String,\n val bundleSize: String?, val fileWithResult: String, val buildNumberSuffix: String?) {\n companion object {\n fun create(json: String): BuildRegister {\n val requestDetails = JSON.parse(json)","completion":"\/\/ Parse method doesn't create real instance with all methods. So create it by hands.\n return BuildRegister(\n requestDetails.buildId,\n requestDetails.teamCityUser,\n requestDetails.teamCityPassword,\n requestDetails.bundleSize,\n requestDetails.fileWithResult,\n requestDetails.buildNumberSuffix)\n }\n }<|endoftext|>"} {"prompt":"fieldForScriptThis = null,\n valueParameterForFieldReceiver = null,\n isInScriptConstructor = isInScriptConstructor,\n topLevelDeclaration = topLevelDeclaration\n )\n }\n}\n\ndata class ScriptFixLambdasTransformerContext(\n val insideTopLevelDestructuringDeclaration: Boolean = false,\n val valueParameterToReplaceWithScript: IrValueParameter? = null","completion":")\n\nprivate class ScriptToClassTransformer(\n val irScript: IrScript,\n val irScriptClass: IrClass,\n val typeRemapper: TypeRemapper,\n val context: JvmBackendContext,\n val capturingClasses: Set,\n val earlierScriptsField: IrField?,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.util.hasAnnotation\nimport org.jetbrains.kotlin.ir.util.isEffectivelyExternal\nimport org.jetbrains.kotlin.name.JsStandardClassIds\n\ninternal fun IrAnnotationContainer.isExportedDeclaration(): Boolean {","completion":"return annotations.hasAnnotation(JsStandardClassIds.Annotations.JsExport.asSingleFqName()) && !isExportIgnoreDeclaration()\n}\n\ninternal fun IrAnnotationContainer.isExportIgnoreDeclaration(): Boolean {\n return annotations.hasAnnotation(JsStandardClassIds.Annotations.JsExportIgnore.asSingleFqName())\n}<|endoftext|>"} {"prompt":"putNullabilityAndTypeInfo(resultNullabilityInfo, value, value.immanentNullability, languageVersionSettings)\n return create(this, resultNullabilityInfo, EMPTY_TYPE_INFO, value)\n }\n\n override fun assign(a: DataFlowValue, b: DataFlowValue, languageVersionSettings: LanguageVersionSettings): DataFlowInfo {\n val nullabilityOfB = getStableNullability(b)","completion":"val nullabilityUpdate = mapOf(a to nullabilityOfB)\n\n var typesForB = getStableTypes(b, languageVersionSettings)\n \/\/ Own type of B must be recorded separately, e.g. for a constant\n \/\/ But if its type is the same as A, there is no reason to do it\n \/\/ because own type is not saved in this set\n \/\/ Error types are also not saved<|endoftext|>"} {"prompt":"}\n }\n\n private fun IrExpression.isFoldedSafeCallWithNonNullResult(): Boolean {\n if (this !is IrBlock) return false\n if (this.origin != JvmLoweredStatementOrigin.FOLDED_SAFE_CALL) return false\n val innerWhen = this.statements[0] as? IrWhen ?: return false","completion":"val safeCallResult = innerWhen.branches[0].result\n return !safeCallResult.type.isJvmNullable()\n }\n\n override fun visitCall(expression: IrCall): IrExpression {\n expression.transformChildrenVoid()\n\n if (expression.symbol == context.irBuiltIns.eqeqSymbol) {\n val startOffset = expression.startOffset<|endoftext|>"} {"prompt":"if (!(0F in 1.0F..<3.0F) != !range0.contains(0F)) throw AssertionError()\n if (!(0F !in 1.0F..<3.0F) != range0.contains(0F)) throw AssertionError()\n \/\/ no local optimizations","completion":"if (element1 in 1.0F..<3.0F != range0.contains(element1)) throw AssertionError()\n if (element1 !in 1.0F..<3.0F != !range0.contains(element1)) throw AssertionError()<|endoftext|>"} {"prompt":"addCapturedTypeParameters(status, declarationSource, currentFirTypeParameters)\n return try {\n block()\n } finally {\n context.popFirTypeParameters()\n }\n }\n\n \/**\n * @param isLocal if true [symbol] will be ignored\n *\n * @see Context.containerSymbol\n * @see Context.pushContainerSymbol","completion":"* @see Context.popContainerSymbol\n *\/\n inline fun withContainerSymbol(\n symbol: FirBasedSymbol<*>,\n isLocal: Boolean = false,\n block: () -> T,\n ): T {\n if (!isLocal) {\n context.pushContainerSymbol(symbol)\n }\n\n return try {\n block()\n } finally {<|endoftext|>"} {"prompt":"if (context.mapping.defaultArgumentsOriginalFunction[declaration.parent as IrFunction] == null) {\n declaration.defaultValue = context.irFactory.createExpressionBody(\n IrErrorExpressionImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, declaration.type, \"Default Stub\").apply {\n attributeOwnerId = declaration.defaultValue!!.expression\n }\n )","completion":"}\n } else {\n declaration.defaultValue = null\n }\n }\n return null\n }\n}\n\n\/\/ Sets overriden symbols. Should be used in case `forceSetOverrideSymbols = false`\nclass DefaultParameterPatchOverridenSymbolsLowering(\n val context: CommonBackendContext\n) : DeclarationTransformer {<|endoftext|>"} {"prompt":"open fun visitEnumEntry(enumEntry: FirEnumEntry, data: D): R =\n visitElement(enumEntry, data)\n\n open fun visitFunctionTypeParameter(functionTypeParameter: FirFunctionTypeParameter, data: D): R =\n visitElement(functionTypeParameter, data)\n\n open fun visitClassLikeDeclaration(classLikeDeclaration: FirClassLikeDeclaration, data: D): R =","completion":"visitElement(classLikeDeclaration, data)\n\n open fun visitClass(klass: FirClass, data: D): R =\n visitElement(klass, data)\n\n open fun visitRegularClass(regularClass: FirRegularClass, data: D): R =\n visitElement(regularClass, data)\n\n open fun visitTypeAlias(typeAlias: FirTypeAlias, data: D): R =<|endoftext|>"} {"prompt":"public val isNegated: Boolean get() = withValidityAssertion { _isNegated }\n public fun negated(): KtContractIsInstancePredicateExpression = KtContractIsInstancePredicateExpression(argument, type, !isNegated)\n\n override fun hashCode(): Int = Objects.hashCode(_argument, _type, _isNegated)\n override fun equals(other: Any?): Boolean =","completion":"other is KtContractIsInstancePredicateExpression && other._argument == _argument && other._type == _type && other._isNegated\n && _isNegated\n}\n\n\/**\n * See: [KtContractBooleanExpression].\n *\/\npublic class KtContractIsNullPredicateExpression(\n private val _argument: KtContractParameterValue,\n private val _isNegated: Boolean<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CAST_NEVER_SUCCEEDS\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CATCH_PARAMETER_WITH_DEFAULT_VALUE","completion":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CLASS_CANNOT_BE_EXTENDED_DIRECTLY\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CLASS_INHERITS_JAVA_SEALED_CLASS<|endoftext|>"} {"prompt":"val r1 = o.instance(\"3\", \"4\").foo\n if (r1 != \"13\") return \"FAIL1: $r1\"\n\n val r2 = o.instance(\"5\", \"6\").bar\n if (r2 != \"26\") return \"FAIL2: $r2\"\n\n val r3 = o.staticInstance().qux","completion":"if (r3 != \"12\") return \"FAIL3: $r3\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"0x124e, 0x1250,","completion":"0x1256, 0x125a, 0x125e, 0x1260, 0x1289, 0x128a, 0x128e, 0x1290, 0x12b1, 0x12b2, 0x12b6, 0x12b8, 0x12be, 0x12c2, 0x12c6, 0x12c8, 0x12d7,<|endoftext|>"} {"prompt":"model(\"loadJava\/compiledJavaAndKotlin\", extension = \"txt\", testMethod = \"doTestCompiledJavaAndKotlin\")\n model(\n \"loadJava\/compiledJavaIncludeObjectMethods\",\n extension = \"java\",\n testMethod = \"doTestCompiledJavaIncludeObjectMethods\"\n )","completion":"model(\"loadJava\/compiledKotlin\", testMethod = \"doTestCompiledKotlin\")\n model(\"loadJava\/compiledKotlinWithStdlib\", testMethod = \"doTestCompiledKotlinWithStdlib\")\n model(\"loadJava\/javaAgainstKotlin\", extension = \"txt\", testMethod = \"doTestJavaAgainstKotlin\")\n model(<|endoftext|>"} {"prompt":"private fun generateUnicodeDataHeader(arrayIndex: Int) {\n val file = outputFile.resolveSibling(\"_UnicodeData$arrayIndex.kt\")\n generateFileHeader(file)\n\n writer?.appendLine(\"internal val unicodeData$arrayIndex = arrayOf(\")\n }\n\n private fun generateFileHeader(file: File) {","completion":"writer = FileWriter(file)\n writer?.writeHeader(file, \"test.text.unicodeData\")\n writer?.appendLine()\n }\n}<|endoftext|>"} {"prompt":"println(\"Not traversed ${element.javaClass}: ${element.text}\")\n val traversedParent = element.parents.firstOrNull { it in psiSetViaFir }\n if (traversedParent != null) {\n println(\"(traversed parent: ${traversedParent.javaClass} ${traversedParent.text})\")\n }\n }\n println(firFile.render())","completion":"throw AssertionError()\n }\n counter++\n }\n }\n\n private fun isKnownToBeNotTraversedByFirTree(it: KtElement): Boolean {\n return it is KtPackageDirective || it is KtImportList || it is KtClassBody ||\n it is KtModifierList ||<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1295\npackage foo\n\nfun box(): String {\n val a: dynamic = 12\n var b: dynamic = 33.4\n var c: dynamic = \"text\"\n val d: dynamic = true\n\n testFalse { a > b }\n testTrue { b <= 34 }\n testTrue { c >= \"text\" }","completion":"testFalse { c <= \"abc\" }\n testTrue { d >= 1 }\n testFalse { d <= 0 }\n testTrue { d && true }\n testTrue { false || d }\n testFalse { d && a < c }\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"return if (typeArgumentIds.isEmpty())\n emptyList()\n else typeArgumentIds.memoryOptimizedMap { typeArgumentId ->\n val typeProjection = BinaryTypeProjection.decode(typeArgumentId)\n if (typeProjection.isStarProjection)\n StarProjectionImpl\n else\n TypeProjectionImpl(","completion":"type = deserializeType(typeProjection.typeIndex, typeParameterResolver),\n variance = typeProjection.variance.toAbiVariance()\n )\n }\n }\n\n companion object {\n val ProtoIrDefinitelyNotNullType.underlyingTypeId: Int\n get() = typesList.singleOrNull() ?: error(\"Only DefinitelyNotNull type is now supported\")\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes\nimport org.jetbrains.kotlin.psi.stubs.impl.KotlinClassStubImpl\nimport org.jetbrains.kotlin.psi.stubs.impl.KotlinModifierListStubImpl","completion":"import org.jetbrains.kotlin.psi.stubs.impl.KotlinObjectStubImpl\nimport org.jetbrains.kotlin.psi.stubs.impl.KotlinPlaceHolderStubImpl\nimport org.jetbrains.kotlin.serialization.deserialization.ProtoContainer\nimport org.jetbrains.kotlin.serialization.deserialization.getClassId<|endoftext|>"} {"prompt":"if (this != VALID_CONST) {\n action(this)\n }\n }\n}\n\nprivate class FirConstCheckVisitor(\n private val session: FirSession,\n val calledOnCheckerStage: Boolean,\n) : FirVisitor() {\n companion object {\n \/**","completion":"* During constant evaluation, we can go from kotlin world to java world and back (see the example)\n *\n * Java constants are evaluated using PSI evaluator, which knows nothing about this particular class and no context is provided\n * to its entrypoint. So we should somehow track cases of recursion without any context\n *<|endoftext|>"} {"prompt":"\"\"\", \"c.kt\"\n )\n }\n }\n\n target(\"d\") {\n module {\n source(\n \"\"\"\n package pkg.abcd\n val dummy = \"me\"\n \"\"\", \"abcd.kt\"\n )\n source(\n \"\"\"\n package pkg.cd\n val dummy = \"me\"\n \"\"\", \"cd.kt\"\n )","completion":"source(\n \"\"\"\n package pkg.d\n val dummy = \"me\"\n \"\"\", \"d.kt\"\n )\n }\n }\n }\n\n result.assertCommonized(\"(a,b)\") {\n source(\n \"\"\"\n package pkg.abcd\n expect val dummy: String\n \"\"\", \"abcd.kt\"\n )\n source(<|endoftext|>"} {"prompt":"\/\/ test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1\n\/\/ test.kt:11 box:\n\n\/\/ EXPECTATIONS FIR JVM_IR\n\/\/ test.kt:8 box:\n\/\/ test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$","completion":"\/\/ test.kt:9 box$lambda$0: $this$blockFun:java.lang.String=\"OK\":java.lang.String\n\/\/ test.kt:10 box$lambda$0: $this$blockFun:java.lang.String=\"OK\":java.lang.String\n\/\/ test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$<|endoftext|>"} {"prompt":"module.transformChildrenVoid(this)\n module.patchDeclarationParents()\n }\n\n override fun visitCall(expression: IrCall): IrExpression {\n val original = super.visitCall(expression) as IrCall\n return when (expression.symbol.owner.fqNameForIrSerialization) {","completion":"ComposeCallableIds.composableLambda.asSingleFqName() -> {\n transformComposableLambdaCall(original)\n }\n ComposeCallableIds.composableLambdaInstance.asSingleFqName() -> {\n transformComposableLambdaInstanceCall(original)\n }\n else -> original\n }\n }<|endoftext|>"} {"prompt":"callsInPlace(block, InvocationKind.EXACTLY_ONCE)\n }, contract {\n callsInPlace(block, InvocationKind.EXACTLY_ONCE)\n }\n )\n block()\n}","completion":"inline fun case_2(block: () -> Unit) = contract {\n callsInPlace(block, InvocationKind.EXACTLY_ONCE)\n}\n\nfun case_3(block: () -> Unit) {\n class Class {\n fun innerFun(block2: () -> Unit) {<|endoftext|>"} {"prompt":"Native -> call(llvm.Kotlin_mm_switchThreadStateNative, emptyList())\n Runnable -> call(llvm.Kotlin_mm_switchThreadStateRunnable, emptyList())\n }.let {} \/\/ Force exhaustive.\n }\n\n fun switchThreadStateIfExperimentalMM(state: ThreadState) {\n if (context.memoryModel == MemoryModel.EXPERIMENTAL) {","completion":"switchThreadState(state)\n }\n }\n\n fun memset(pointer: LLVMValueRef, value: Byte, size: Int, isVolatile: Boolean = false) =\n call(llvm.memsetFunction,\n listOf(pointer,\n llvm.int8(value),\n llvm.int32(size),\n llvm.int1(isVolatile)))<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ ### INVALID\n\n\/\/ FILE: invalid_noargs.kt\npackage invalid1\nfun main() {}\nfun main() {}\n\n\/\/ FILE: invalid_array.kt\npackage invalid2","completion":"fun main(args: Array) {}\nfun main(args: Array) {}\n\n\/\/ FILE: invalid_vararg.kt\npackage invalid3\nfun main(vararg args: String) {}<|endoftext|>"} {"prompt":"}\n}\n\nprivate class FlexibleTypeAssociativeCommonizer(\n private val typeCommonizer: TypeCommonizer\n) : NullableSingleInvocationCommonizer {\n override fun invoke(values: List): CirFlexibleType? {\n val lowerBound = typeCommonizer(values.map { it.lowerBound }) ?: return null","completion":"val upperBound = typeCommonizer(values.map { it.upperBound }) ?: return null\n return CirFlexibleType(\n lowerBound = lowerBound as CirSimpleType,\n upperBound = upperBound as CirSimpleType\n )\n }\n}<|endoftext|>"} {"prompt":"assertContains(classifierNames, Name.identifier(\"bar\"))\n }\n }\n\n @Test\n fun `possible callable names`() {\n withKlibScope(source = simpleContentWithCollisions) {\n val callableNames = getPossibleCallableNames()\n assertContains(callableNames, Name.identifier(\"foo\"))","completion":"assertContains(callableNames, Name.identifier(\"bar\"))\n }\n }\n\n private fun withKlibScope(@Language(\"kotlin\") source: String, block: KlibScope.() -> T): T {\n val srcFile = kotlin.io.path.createTempFile(suffix = \".kt\").also { it.writeText(source) }<|endoftext|>"} {"prompt":"contract { returns() implies (value_1 !is Int) }\n if (!(value_1 !is Int)) throw Exception()\n}\n\n\/\/ TESTCASE NUMBER: 3\nfun case_3_1(value_1: Any?) {\n contract { returns() implies (value_1 !is String) }\n if (!(value_1 !is String)) throw Exception()\n}","completion":"fun case_3_2(value_1: Any?) {\n contract { returns() implies (value_1 is String) }\n if (!(value_1 is String)) throw Exception()\n}\n\n\/\/ TESTCASE NUMBER: 4\nfun case_4_1(value_1: Any?) {\n contract { returns() implies (value_1 !is Number?) }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.declarations.FirClassLikeDeclaration\nimport org.jetbrains.kotlin.fir.declarations.FirRegularClass\nimport org.jetbrains.kotlin.fir.resolve.providers.symbolProvider\nimport org.jetbrains.kotlin.fir.scopes.FirPlatformClassMapper","completion":"import org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.name.JvmStandardClassIds\n\n@NoMutableState\nclass FirJavaClassMapper(private val session: FirSession) : FirPlatformClassMapper() {\n override fun getCorrespondingPlatformClass(declaration: FirClassLikeDeclaration): FirRegularClass? {<|endoftext|>"} {"prompt":"public static TargetType LOWER_BOUNDED_WILDCARD() { return new TargetType(); }\n\n }\n\n}\n\n\/\/ FILE: kotlin.kt\n\nfun accept(arg: T) {}\n\nfun test() {\n \/\/ jspecify_nullness_mismatch","completion":"accept(NullMarkedType.TargetType.UNBOUNDED_WILDCARD().produce())\n \/\/ jspecify_nullness_mismatch<|endoftext|>"} {"prompt":"510060, 510061, 510062, 510063, 410064, 410065, 511066, 511067, 520068, 520069, 420070, 520071,\n 530072, 530073, 530074, 430075, 430076, 530077, 540078, 540079, 540080, 540081, 540082, 540083,","completion":"540084, 490085, 540086, 540087, 542088, 544089, 546090, 550091, 550092, 550093, 550094, 590095,\n 590096, 595097, 600098, 600099, 600100, 600101, 600102, 600103, 600104, 550105, 600106, 600107,<|endoftext|>"} {"prompt":"INIT_INSTANCE,\n IS_SUBTYPE,\n IS_EXPERIMENTAL_MM,\n THE_UNIT_INSTANCE,\n \/\/ Enums\n ENUM_VALUES,\n ENUM_VALUE_OF,\n ENUM_ENTRIES,\n \/\/ Coroutines\n GET_CONTINUATION,\n RETURN_IF_SUSPENDED,","completion":"SAVE_COROUTINE_STATE,\n RESTORE_COROUTINE_STATE,\n \/\/ Interop\n INTEROP_READ_BITS,\n INTEROP_WRITE_BITS,\n INTEROP_READ_PRIMITIVE,\n INTEROP_WRITE_PRIMITIVE,\n INTEROP_GET_POINTER_SIZE,<|endoftext|>"} {"prompt":"testClass {\n model(\"codegen\", excludedPattern = excludedFirTestdataPattern)\n }\n testClass {\n model(\"codegen\", excludedPattern = excludedFirTestdataPattern)\n }\n }","completion":"testGroup(\"plugins\/sam-with-receiver\/tests-gen\", \"plugins\/sam-with-receiver\/testData\") {\n testClass {\n model(\"diagnostics\", excludedPattern = excludedFirTestdataPattern)\n }\n testClass {<|endoftext|>"} {"prompt":"public fun CacheQueryOptions(ignoreSearch: Boolean? = false, ignoreMethod: Boolean? = false, ignoreVary: Boolean? = false, cacheName: String? = undefined): CacheQueryOptions { js(\"return { ignoreSearch, ignoreMethod, ignoreVary, cacheName };\") }\n\npublic external interface CacheBatchOperation : JsAny {\n var type: String?\n get() = definedExternally","completion":"set(value) = definedExternally\n var request: Request?\n get() = definedExternally\n set(value) = definedExternally\n var response: Response?\n get() = definedExternally\n set(value) = definedExternally\n var options: CacheQueryOptions?\n get() = definedExternally\n set(value) = definedExternally\n}<|endoftext|>"} {"prompt":"result.assertSuccessful()\n\n val actualWarnings = result.getMessages(BuildMessage.Kind.WARNING).map { it.messageText }\n val expectedWarnings = filesToBeReported.map { \"Classpath entry points to a non-existent location: $it\" }\n\n val expectedText = expectedWarnings.sorted().joinToString(\"\\n\")","completion":"val actualText = actualWarnings.sorted().joinToString(\"\\n\")\n\n Assert.assertEquals(expectedText, actualText)\n }\n\n fun testHelp() {\n initProject()\n\n val result = buildAllModules()\n result.assertSuccessful()\n val warning = result.getMessages(BuildMessage.Kind.WARNING).single()<|endoftext|>"} {"prompt":"source = constructorCall.source\n annotationTypeRef = constructorCall.resolvedType.toFirResolvedTypeRef()\n typeArguments.addAll(constructorCall.typeArguments)\n argumentList = constructorCall.argumentList\n argumentMapping = (argumentList as FirResolvedArgumentList).toAnnotationArgumentMapping()\n calleeReference = constructorCall.calleeReference","completion":"containingDeclarationSymbol = FirErrorFunctionSymbol() \/\/ anyway it will be unused\n }\n visitAnnotationCall(annotationCall, data)\n }\n else -> null\n }\n }\n\n override fun visitPropertyAccessExpression(\n propertyAccessExpression: FirPropertyAccessExpression,\n data: FirToConstantValueTransformerData\n ): ConstantValue<*>? {<|endoftext|>"} {"prompt":"expression.typeArgumentsCount,\n expression.constructorTypeArgumentsCount,\n expression.valueArgumentsCount,\n mapStatementOrigin(expression.origin)\n ).apply {\n copyRemappedTypeArgumentsFrom(expression)\n transformValueArguments(expression)\n }.processAttributes(expression)\n }","completion":"private fun IrMemberAccessExpression<*>.copyRemappedTypeArgumentsFrom(other: IrMemberAccessExpression<*>) {\n assert(typeArgumentsCount == other.typeArgumentsCount) {\n \"Mismatching type arguments: $typeArgumentsCount vs ${other.typeArgumentsCount} \"\n }\n for (i in 0 until typeArgumentsCount) {<|endoftext|>"} {"prompt":"name: String?,\n defaultConstructor: dynamic,\n associatedObjectKey: Number?,\n associatedObjects: dynamic,\n suspendArity: Array?\n): Metadata {\n return createMetadata(METADATA_KIND_OBJECT, name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity)\n}\n\ninternal fun classMeta(\n name: String?,","completion":"defaultConstructor: dynamic,\n associatedObjectKey: Number?,\n associatedObjects: dynamic,\n suspendArity: Array?\n): Metadata {\n return createMetadata(METADATA_KIND_CLASS, name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity)\n}<|endoftext|>"} {"prompt":"internal open fun shouldKeepTypeVariableBasedType(marker: TypeVariableTypeConstructorMarker, isK2: Boolean): Boolean = false\n\n open fun capturedType(ctx: TypeSystemInferenceExtensionContext, type: CapturedTypeMarker): Boolean =\n true \/\/ false means that this type we can leave as is\n\n abstract class AllFlexibleSameValue : TypeApproximatorConfiguration() {","completion":"abstract val allFlexible: Boolean\n\n override val flexible: Boolean get() = allFlexible\n override val dynamic: Boolean get() = allFlexible\n override val rawType: Boolean get() = allFlexible\n }\n\n object LocalDeclaration : AllFlexibleSameValue() {\n override val allFlexible: Boolean get() = true<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol\nimport org.jetbrains.kotlin.fir.symbols.impl.FirAnonymousInitializerSymbol\n\n@FirBuilderDsl\nclass FirAnonymousInitializerBuilder : FirDeclarationBuilder, FirAnnotationContainerBuilder {\n override var source: KtSourceElement? = null","completion":"override var resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR\n override val annotations: MutableList = mutableListOf()\n override lateinit var moduleData: FirModuleData\n override lateinit var origin: FirDeclarationOrigin\n override var attributes: FirDeclarationAttributes = FirDeclarationAttributes()\n var body: FirBlock? = null<|endoftext|>"} {"prompt":"ScriptDefinition.FromTemplate(hostConfiguration, CompileTimeFibonacci::class, ScriptDefinition::class)\n )\n loadScriptingPlugin(this)\n }\n\n val environment = KotlinCoreEnvironment.createForTests(testRootDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES)\n val scriptCompiler = ScriptJvmCompilerFromEnvironment(environment)","completion":"val scriptDefinition = ScriptDefinitionProvider.getInstance(environment.project)!!.findDefinition(script)!!\n\n val scriptCompilationConfiguration = scriptDefinition.compilationConfiguration.with {\n jvm {\n dependenciesFromCurrentContext(wholeClasspath = true)\n }\n }\n\n return scriptCompiler.compile(script, scriptCompilationConfiguration)\n }\n}<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\/\/ !CHECK_TYPE\nclass Controller {\n suspend fun suspendHere(a: String) = 1\n}\n\nclass A {\n suspend fun suspendHere(a: Int) = 1\n}\n\nfun builder(c: suspend Controller.() -> Unit) {}\n\nfun test() {\n builder {","completion":"suspendHere(\"\")\n\n with(A()) {\n suspendHere(\"\")\n \/\/ With the new convention calling a suspension member with receiver different from the one obtained from the coroutine is OK\n suspendHere(1)\n }\n }\n}<|endoftext|>"} {"prompt":"description = \"[Optimization] Inline object instance fields getters whenever it's possible\",\n prerequisite = setOf(purifyObjectInstanceGetters)\n)\n\nval optimizationLoweringList = listOf>(\n es6CollectConstructorsWhichNeedBoxParameterLowering,","completion":"es6CollectPrimaryConstructorsWhichCouldBeOptimizedLowering,\n es6BoxParameterOptimization,\n es6PrimaryConstructorOptimizationLowering,\n es6PrimaryConstructorUsageOptimizationLowering,\n purifyObjectInstanceGetters,\n inlineObjectsWithPureInitialization\n)\n\nval jsOptimizationPhases = SameTypeNamedCompilerPhase(<|endoftext|>"} {"prompt":"if (element17 !in 1L until 3L != !range0.contains(element17)) throw AssertionError()\n if (!(element17 in 1L until 3L) != !range0.contains(element17)) throw AssertionError()\n if (!(element17 !in 1L until 3L) != range0.contains(element17)) throw AssertionError()\n}","completion":"fun testR0xE18() {\n \/\/ with possible local optimizations\n if (3 in 1L until 3L != range0.contains(3)) throw AssertionError()\n if (3 !in 1L until 3L != !range0.contains(3)) throw AssertionError()\n if (!(3 in 1L until 3L) != !range0.contains(3)) throw AssertionError()<|endoftext|>"} {"prompt":"*\/\n@SinceKotlin(\"1.2\")\n@kotlin.internal.InlineOnly\npublic actual inline fun Double.Companion.fromBits(bits: Long): Double = java.lang.Double.longBitsToDouble(bits)\n\n\/**\n * Returns a bit representation of the specified floating-point value as [Int]\n * according to the IEEE 754 floating-point \"single format\" bit layout.\n *\/","completion":"@SinceKotlin(\"1.2\")\n@kotlin.internal.InlineOnly\npublic actual inline fun Float.toBits(): Int = java.lang.Float.floatToIntBits(this)\n\n\/**\n * Returns a bit representation of the specified floating-point value as [Int]\n * according to the IEEE 754 floating-point \"single format\" bit layout,\n * preserving `NaN` values exact layout.\n *\/<|endoftext|>"} {"prompt":"if (rem2.id() != 0.0) return \"Fail 6.2\"\n if (rem3.id() != 1.0) return \"Fail 6.3\"\n if (rem4.id() != 0.0) return \"Fail 6.4\"\n if (rem5.id() != 0.0) return \"Fail 6.5\"","completion":"if (rem6.id() != 0.0) return \"Fail 6.6\"\n if (rem7.id() != 0.0) return \"Fail 6.7\"\n if (rem8.id() != 0.0) return \"Fail 6.8\"\n\n if (unaryPlus1.id() != 1.0) return \"Fail 7.1\"<|endoftext|>"} {"prompt":"val endOffset = expression.endOffset\n\n return buildMap {\n stubFunction.dispatchReceiverParameter?.let { put(it, expression.dispatchReceiver) }\n stubFunction.extensionReceiverParameter?.let { put(it, expression.extensionReceiver) }\n for (i in 0 until expression.valueArgumentsCount) {","completion":"val declaredParameter = stubFunction.valueParameters[i]\n val actualArgument = expression.getValueArgument(i)\n put(declaredParameter, actualArgument ?: nullConst(startOffset, endOffset, declaredParameter))\n }\n\n if (expression is IrCall && stubFunction.hasSuperContextParameter()) {\n put(\n stubFunction.valueParameters[expression.valueArgumentsCount],<|endoftext|>"} {"prompt":"effectExpressionContext: Context,\n effectExpressionA: KmEffectExpression,\n effectExpressionB: KmEffectExpression\n ) {\n compareFlags(effectExpressionContext, effectExpressionA, effectExpressionB, EFFECT_EXPRESSION_FLAGS)\n compareNullableValues(\n containerContext = effectExpressionContext,","completion":"valueA = effectExpressionA.parameterIndex,\n valueB = effectExpressionB.parameterIndex,\n valueKind = EntityKind.EffectExpressionParameterIndex\n )\n compareNullableValues(\n containerContext = effectExpressionContext,\n valueA = effectExpressionA.constantValue,\n valueB = effectExpressionB.constantValue,<|endoftext|>"} {"prompt":"if (annotation.p2 != 32768) return \"fail 2, expected = ${32768}, actual = ${annotation.p2}\"\n if (annotation.p3 != -2147483648) return \"fail 3, expected = ${-2147483648}, actual = ${annotation.p3}\"","completion":"if (annotation.p4 != -2147483648) return \"fail 4, expected = ${-2147483648}, actual = ${annotation.p4}\"\n if (annotation.p5 != 2147483648.toLong()) return \"fail 5, expected = ${2147483648}, actual = ${annotation.p5}\"<|endoftext|>"} {"prompt":"params.singleOrNull { it.isVararg && !it.hasDefaultValue }?.name?.takeIf { name -> args.none { it.name == name } }\n if (missingVarargParameterName == null) args\n else args + KtNamedAnnotationValue(missingVarargParameterName, KtArrayAnnotationValue(emptyList(), null))\n }\n}","completion":"private fun KtEnumEntryAnnotationValue.asPsiReferenceExpression(parent: PsiElement): SymbolPsiReference? {\n val fqName = this.callableId?.asSingleFqName()?.asString() ?: return null\n val psiReference = parent.project.withElementFactorySafe {\n createExpressionFromText(fqName, parent) as? PsiReferenceExpression<|endoftext|>"} {"prompt":"return AbstractStrictEqualityTypeChecker.strictEqualTypes(SimpleClassicTypeSystemContext, a, b)\n }\n\n fun strictEqualTypes(a: SimpleType, b: SimpleType): Boolean {\n return AbstractStrictEqualityTypeChecker.strictEqualTypes(SimpleClassicTypeSystemContext, a, b)\n }\n\n}","completion":"object ErrorTypesAreEqualToAnything : KotlinTypeChecker {\n override fun isSubtypeOf(subtype: KotlinType, supertype: KotlinType): Boolean =\n NewKotlinTypeChecker.Default.run {\n createClassicTypeCheckerState(isErrorTypeEqualsToAnything = true).isSubtypeOf(subtype.unwrap(), supertype.unwrap())\n }<|endoftext|>"} {"prompt":"val irClassSymbol = expression.getTypeArgument(0)!!.classifierOrNull as? IrClassSymbol\n\n if (irClassSymbol == null || irClassSymbol == context.ir.symbols.enum) {\n \/\/ Either a type parameter or a type parameter erased to 'Enum'.\n return data.irCall(context.ir.symbols.throwIllegalStateException)\n }","completion":"val irClass = irClassSymbol.owner\n\n require(irClass.kind == ClassKind.ENUM_CLASS)\n\n fun IrClass.findStaticMethod(name: Name) = simpleFunctions().single {\n it.name == name && it.dispatchReceiverParameter == null\n }\n\n return when (intrinsicType) {\n IntrinsicType.ENUM_VALUES -> {<|endoftext|>"} {"prompt":"var index = 0\n for (item in this) {\n checkIndexOverflow(index)\n if (element == item)\n return index\n index++\n }\n return -1\n \"\"\"\n }\n\n body(ArraysOfObjects) {\n \"\"\"\n if (element == null) {\n for (index in indices) {\n if (this[index] == null) {","completion":"return index\n }\n }\n } else {\n for (index in indices) {\n if (element == this[index]) {\n return index\n }\n }\n }\n return -1\n \"\"\"\n }\n body(ArraysOfPrimitives) {\n \"\"\"\n for (index in indices) {\n if (element == this[index]) {\n return index\n }<|endoftext|>"} {"prompt":"model(\"contextCollector\", pattern = TestGeneratorUtil.KTS)\n }\n\n testClass {\n model(\"resolveExtensionDisposal\")\n }\n }\n\n testGroup(\"analysis\/low-level-api-fir\/tests\", \"analysis\/analysis-api\/testData\") {","completion":"testClass {\n model(\"components\/compilerFacility\/compilation\/codeFragments\/capturing\", pattern = TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME)\n }\n }\n\n testGroup(\n \"analysis\/low-level-api-fir\/tests\",<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinSourceDependency\nimport org.jetbrains.kotlin.gradle.idea.testFixtures.tcs.TestIdeaKotlinInstances\nimport org.jetbrains.kotlin.tooling.core.mutableExtrasOf","completion":"import org.jetbrains.kotlin.tooling.core.toMutableExtras\nimport kotlin.test.Test\n\nclass IdeaKotlinSourceDependencySerializationTest : AbstractSerializationTest() {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.logging\n\nimport org.gradle.api.logging.Logger\nimport org.jetbrains.kotlin.buildtools.api.KotlinLogger\n\ninternal class GradleKotlinLogger(private val log: Logger, private val prefix: String? = null) : KotlinLogger {","completion":"private fun transformMessage(msg: String): String {\n if (prefix.isNullOrBlank()) return msg\n return prefix + msg\n }\n\n override fun debug(msg: String) {\n log.debug(transformMessage(msg))\n }\n\n override fun error(msg: String, throwable: Throwable?) {\n log.error(transformMessage(msg), throwable)\n }<|endoftext|>"} {"prompt":"@kotlin.internal.IntrinsicConstEvaluation\n public open override fun toChar(): kotlin.Char\n\n @kotlin.internal.IntrinsicConstEvaluation\n public open override fun toDouble(): kotlin.Double\n\n @kotlin.internal.IntrinsicConstEvaluation\n public open override fun toFloat(): kotlin.Float","completion":"@kotlin.internal.IntrinsicConstEvaluation\n public open override fun toInt(): kotlin.Int\n\n @kotlin.internal.IntrinsicConstEvaluation\n public open override fun toLong(): kotlin.Long\n\n @kotlin.internal.IntrinsicConstEvaluation\n public open override fun toShort(): kotlin.Short<|endoftext|>"} {"prompt":"import org.w3c.dom.*\n\n\/**\n * Exposes the JavaScript [UIEvent](https:\/\/developer.mozilla.org\/en\/docs\/Web\/API\/UIEvent) to Kotlin\n *\/\npublic external open class UIEvent(type: String, eventInitDict: UIEventInit = definedExternally) : Event {\n open val view: Window?\n open val detail: Int\n\n companion object {","completion":"val NONE: Short\n val CAPTURING_PHASE: Short\n val AT_TARGET: Short\n val BUBBLING_PHASE: Short\n }\n}\n\npublic external interface UIEventInit : EventInit {\n var view: Window? \/* = null *\/\n get() = definedExternally\n set(value) = definedExternally\n var detail: Int? \/* = 0 *\/<|endoftext|>"} {"prompt":"class ErrorValueWithMessage(val message: String) : ErrorValue() {\n override fun toString(): String = message\n }\n\n companion object {\n fun create(message: String): ErrorValue {\n return ErrorValueWithMessage(message)\n }\n }\n}\n\nclass FloatValue(value: Float) : ConstantValue(value) {","completion":"override fun accept(visitor: AnnotationArgumentVisitor, data: D): R = visitor.visitFloatValue(this, data)\n\n override fun toString(): String = \"$value.toFloat()\"\n}\n\nclass IntValue(value: Int) : IntegerValueConstant(value) {<|endoftext|>"} {"prompt":"*\/\n public abstract val hasSpecificClassifierPackageNamesComputation: Boolean\n\n \/**\n * Calculates the set of package names which contain classifiers and can be provided by this declaration provider.\n *\n * The set may contain false positives. `null` may be returned if the package set is too expensive or impossible to compute.\n *\/","completion":"public open fun computePackageNamesWithTopLevelClassifiers(): Set? = computePackageNames()\n\n \/**\n * Whether the declaration provider has a specific implementation of [computePackageNamesWithTopLevelCallables]. This allows the\n * Analysis API backend to determine whether callable package sets are computed and cached separately or with [computePackageNames].\n *\/\n public abstract val hasSpecificCallablePackageNamesComputation: Boolean<|endoftext|>"} {"prompt":"b\n if (a != null) {","completion":" kotlin.Int?)? & (kotlin.Float) -> kotlin.Int? & kotlin.Nothing\")!>a\n }\n }\n}\n\n\/*\n * TESTCASE NUMBER: 24\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-28329\n *\/<|endoftext|>"} {"prompt":"data class DescriptorWithRelation(val descriptor: ClassifierDescriptor, private val relation: RelationToType) {\n fun effectiveVisibility() =\n (descriptor as? ClassDescriptor)?.visibility?.effectiveVisibility(descriptor, false) ?: EffectiveVisibility.Public\n\n override fun toString() = \"$relation ${descriptor.name}\"\n}","completion":"private fun ClassifierDescriptor.dependentDescriptors(ownRelation: RelationToType): Set =\n setOf(DescriptorWithRelation(this, ownRelation)) +\n ((this.containingDeclaration as? ClassifierDescriptor)?.dependentDescriptors(ownRelation.containerRelation()) ?: emptySet())<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.utils.PathUtil\nimport java.io.ByteArrayOutputStream\nimport java.io.File\nimport java.io.FileOutputStream\nimport java.io.PrintStream\nimport java.lang.ref.SoftReference\nimport java.util.regex.Pattern\nimport java.util.zip.ZipOutputStream\nimport kotlin.reflect.KClass","completion":"val PathUtil.kotlinPathsForDistDirectoryForTests: KotlinPaths\n get() = System.getProperty(\"jps.kotlin.home\")?.let(::File)?.let(::KotlinPathsFromHomeDir) ?: kotlinPathsForDistDirectory\n\nobject MockLibraryUtil {\n private var compilerClassLoader = SoftReference(null)<|endoftext|>"} {"prompt":"\"\"\"The LL FIR test data file `${testDataFile.name}` is missing an `LL_FIR_DIVERGENCE` directive. At the beginning of the \n |file, add the following directive:\n |\n |\/\/ LL_FIR_DIVERGENCE\n |\/\/ A comment describing why the LL FIR result is diverging from the compiler result. You must provide a good reason, or","completion":"|\/\/ otherwise the divergence is probably a bug in LL FIR which needs to be fixed. Try to be as specific as possible.\n |\/\/ LL_FIR_DIVERGENCE\n |\"\"\".trimMargin()\n }\n }\n }\n}<|endoftext|>"} {"prompt":"* In particular: all primitives, all arrays, collection-like interfaces, Any, Nothing, Unit, etc.\n *\n * For non-JVM platforms, all \/ almost all built-in classes exist also in the standard library, so this provider works as a fallback.\n * For the JVM platform, some classes are mapped to Java classes and do not exist themselves,","completion":"* so this provider is mandatory for the JVM compiler to work properly even with the standard library in classpath.\n *\/\n@ThreadSafeMutableState\nopen class FirBuiltinSymbolProvider(\n session: FirSession,\n val moduleData: FirModuleData,\n val kotlinScopeProvider: FirKotlinScopeProvider\n) : FirSymbolProvider(session) {\n\n companion object {<|endoftext|>"} {"prompt":"it.putValueArgument(0, key)\n }\n }\n\n fun irEndReplaceGroup(\n currentComposer: IrExpression,\n startOffset: Int = UNDEFINED_OFFSET,\n endOffset: Int = UNDEFINED_OFFSET,\n ): IrExpression {\n return irMethodCall(\n currentComposer,\n endReplaceFunction,","completion":"startOffset,\n endOffset\n )\n }\n\n fun IrStatement.wrap(\n startOffset: Int = this.startOffset,\n endOffset: Int = this.endOffset,\n type: IrType,\n before: List = emptyList(),\n after: List = emptyList()\n ): IrContainerExpression {\n return IrBlockImpl(<|endoftext|>"} {"prompt":"return copyOfRange(indices.start, indices.endInclusive + 1).asList()\n}\n\n\/**\n * Returns a list containing elements at indices in the specified [indices] range.\n *\/\npublic fun CharArray.slice(indices: IntRange): List {\n if (indices.isEmpty()) return listOf()","completion":"return copyOfRange(indices.start, indices.endInclusive + 1).asList()\n}\n\n\/**\n * Returns a list containing elements at specified [indices].\n *\/\npublic fun Array.slice(indices: Iterable): List {\n val size = indices.collectionSizeOrDefault(10)\n if (size == 0) return emptyList()<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ SKIP_TXT\n\n\/*\n * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)\n *\n * SPEC VERSION: 0.1-100\n * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1\n * NUMBER: 1\n * DESCRIPTION: Exhaustive when, without bound value, with else branch.\n *\/","completion":"\/\/ TESTCASE NUMBER: 1\nfun case_1(value_1: Int): String = when {\n value_1 == 0 -> \"\"\n value_1 > 0 && value_1 <= 10 -> \"\"\n value_1 > 10 && value_1 <= 100 -> \"\"\n value_1 > 100 -> \"\"\n else -> \"\"\n}\n\n\/\/ TESTCASE NUMBER: 2<|endoftext|>"} {"prompt":"* list \/\/ get KtTypeScope for it\n * }\n *```\n *\n * Inside the `LIST_KT_ELEMENT.getKtType().getTypeScope()` would contain the `get(i: Int): String` method with substituted type `T = String`\n *","completion":"* @return type scope for the given type if given `KtType` is not error type, `null` otherwise.\n * Returned [KtTypeScope] includes synthetic Java properties.\n *\n * @see KtTypeScope\n * @see KtTypeProviderMixIn.getKtType\n *\/\n public fun KtType.getTypeScope(): KtTypeScope? =<|endoftext|>"} {"prompt":"private val zippedParameters: List>,\n private val packageFqName: FqName,\n private val classFqName: FqName,\n private val createClassTypeRefWithSourceKind: (KtFakeSourceElementKind) -> FirTypeRef,\n private val createParameterTypeRefWithSourceKind: (FirProperty, KtFakeSourceElementKind) -> FirTypeRef,","completion":"private val addValueParameterAnnotations: FirValueParameterBuilder.(T) -> Unit,\n ) {\n fun generate() {\n if (classBuilder.classKind != ClassKind.OBJECT) {\n generateComponentFunctions()\n generateCopyFunction()\n }\n \/\/ Refer to (IR utils or FIR backend) DataClassMembersGenerator for generating equals, hashCode, and toString\n }<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: NATIVE\n\/\/ IGNORE_NATIVE: target=linux_arm64\n\/\/ MODULE: cinterop\n\/\/ FILE: sysstat.def\nheaders = sys\/stat.h\n\n\/\/ MODULE: main(cinterop)\n\/\/ FILE: main.kt\n@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)\n\nimport sysstat.*","completion":"import kotlin.test.*\nimport kotlinx.cinterop.*\n\nfun box(): String {\n val statBuf = nativeHeap.alloc()\n assertEquals(0, stat(\"\/\", statBuf.ptr))\n assertEquals(\"0\", statBuf.st_uid.toString())\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"interface IFoo1 {\n fun foo(): T\n}\n\ninterface IFoo2 {\n fun foo(): Any\n}\n\nobject OK : IQ {\n override fun ok(): String = \"OK\"\n}\n\nclass Test : IFoo1, IFoo2 {\n override fun foo(): X = X(OK)\n}\n\nfun box(): String {","completion":"val t1: IFoo1 = Test()\n val foo1 = t1.foo()\n if (foo1 !is X) {\n throw AssertionError(\"foo1 !is X: $foo1\")\n }\n val ok1 = foo1.ok()\n if (ok1 != \"OK\") {\n throw AssertionError(\"ok1: $ok1\")\n }<|endoftext|>"} {"prompt":"\/\/ allow simple cases like \"actual typealias Foo = FooImpl\", see DeclarationsChecker#checkActualTypeAlias\n (classifier as? TypeAliasDescriptor)?.classDescriptor == actual\n }\n }\n\n fun findClassifiersFromModule(\n classId: ClassId?,\n module: ModuleDescriptor,","completion":"moduleFilter: (ModuleDescriptor) -> Boolean\n ): Collection {\n if (classId == null) return emptyList()\n\n fun MemberScope.getAllClassifiers(name: Name): Collection =\n getDescriptorsFiltered(DescriptorKindFilter.CLASSIFIERS) { it == name }<|endoftext|>"} {"prompt":"override fun getContributedFunctions(name: Name, location: LookupLocation): Collection {\n if (name !in getFunctionNames()) return emptyList()\n return functions(name)\n }\n\n protected abstract fun computeFunctionNames(kindFilter: DescriptorKindFilter, nameFilter: ((Name) -> Boolean)?): Set","completion":"protected abstract fun computeNonDeclaredProperties(name: Name, result: MutableCollection)\n\n protected abstract fun computePropertyNames(kindFilter: DescriptorKindFilter, nameFilter: ((Name) -> Boolean)?): Set\n\n private val properties = c.storageManager.createMemoizedFunction { name: Name ->\n val properties = ArrayList()<|endoftext|>"} {"prompt":"val elementType = varargArgumentsExpression.coneElementTypeOrNull ?: return\n if (elementType is ConeErrorType) {\n reportFirDiagnostic(elementType.diagnostic, varargArgumentsExpression.source, data)\n }\n }\n\n private fun reportFirDiagnostic(\n diagnostic: ConeDiagnostic,\n source: KtSourceElement?,","completion":"context: CheckerContext,\n callOrAssignmentSource: KtSourceElement? = null\n ) {\n \/\/ Will be handled by [FirDestructuringDeclarationChecker]\n if (source?.elementType == KtNodeTypes.DESTRUCTURING_DECLARATION_ENTRY) {\n return\n }\n\n \/\/ Will be handled by [FirDelegatedPropertyChecker]<|endoftext|>"} {"prompt":"fun createSubstitutionOverrideField(\n session: FirSession,\n baseField: FirField,\n derivedClassLookupTag: ConeClassLikeLookupTag,\n newReturnType: ConeKotlinType?,\n origin: FirDeclarationOrigin.SubstitutionOverride,\n ): FirFieldSymbol = buildField {","completion":"val symbol = FirFieldSymbol(CallableId(derivedClassLookupTag.classId, baseField.name))\n moduleData = session.nullableModuleData ?: baseField.moduleData\n this.symbol = symbol\n this.origin = origin\n returnTypeRef = baseField.returnTypeRef.withReplacedConeType(newReturnType)\n\n source = baseField.source<|endoftext|>"} {"prompt":"if (inferred) {\n return\n }\n }\n\n val reportOn =\n if (expression.parent is KtAnnotatedExpression)\n expression.parent as KtExpression\n else expression\n c.trace.report(\n ComposeErrors.TYPE_MISMATCH.on(\n reportOn,\n expectedType,\n expressionTypeWithSmartCast\n )\n )","completion":"}\n return\n } else {\n val nullableAnyType = expectedType.builtIns.nullableAnyType\n val anyType = expectedType.builtIns.anyType\n\n if (anyType == expectedType.lowerIfFlexible() &&\n nullableAnyType == expectedType.upperIfFlexible()\n ) return\n\n val nullableNothingType = expectedType.builtIns.nullableNothingType<|endoftext|>"} {"prompt":"\/\/ CHECK_BYTECODE_LISTING\n\nimport O.d\n\nenum class E { X }\n\nobject O {\n val E.d: Delegate get() = Delegate()\n}\n\nclass Delegate {\n operator fun getValue(thisRef: Any?, property: Any?) =\n if (thisRef == null) \"OK\" else \"Failed\"\n}\n\nval result by E.X.d","completion":"fun box(): String = result<|endoftext|>"} {"prompt":"assertEquals(undefined, bar[\"STR\"])\n assertEquals(undefined, bar[2])\n assertEquals(undefined, bar.obj[\"foo\"])\n assertEquals(undefined, bar[\"obj\"].foo)\n assertEquals(undefined, bar[\"obj\"][\"foo\"])\n assertEquals(undefined, baz[3])","completion":"assertEquals(undefined, baz[\"function\"])\n assertEquals(undefined, arr[\"6\"])\n assertEquals(undefined, arr[7])\n assertEquals(undefined, arr[10])\n assertEquals(undefined, arr[\"name\"])\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"class StubNode(owner: ControlFlowGraph, level: Int) : CFGNode(owner, level) {\n init {\n isDead = true\n }\n\n override val fir: FirStub get() = FirStub\n\n override val flowInitialized: Boolean get() = firstPreviousNode.flowInitialized\n override var flow: PersistentFlow\n get() = firstPreviousNode.flow","completion":"@CfgInternals\n set(_) = throw IllegalStateException(\"can't set flow for stub node\")\n\n override val alternateFlowPaths: Set\n get() = firstPreviousNode.alternateFlowPaths\n\n override fun getAlternateFlow(path: FlowPath): PersistentFlow? {\n return firstPreviousNode.getAlternateFlow(path)\n }<|endoftext|>"} {"prompt":"COMPILE_DAEMON_CUSTOM_RUN_FILES_PATH_FOR_TESTS(\"kotlin.daemon.custom.run.files.path.for.tests\"),\n KOTLIN_COLORS_ENABLED_PROPERTY(\"kotlin.colors.enabled\"),\n LANGUAGE_VERSION_SETTINGS(\"kotlin.language.settings\"),","completion":"OS_NAME(\"os.name\", alwaysDirectAccess = true),\n TMP_DIR(\"java.io.tmpdir\"),\n USER_HOME(\"user.home\", alwaysDirectAccess = true),\n JAVA_VERSION(\"java.specification.version\", alwaysDirectAccess = true),\n JAVA_HOME(\"java.home\", alwaysDirectAccess = true),<|endoftext|>"} {"prompt":"if (ann.c2 != 3.toChar()) return \"fail: annotation parameter c2 should be 3, but was ${ann.i}\"\n return \"OK\"\n}\n\n@Retention(AnnotationRetention.RUNTIME)\nannotation class Ann(\n val i: Int,\n val s: Short,\n val f: Float,\n val d: Double,\n val l: Long,","completion":"val b: Byte,\n val bool: Boolean,\n val c: Char,\n val str: String,\n val i2: Int,\n val c2: Char\n)<|endoftext|>"} {"prompt":"public final val size: kotlin.Int \/* compiled code *\/\n\n public final operator fun get(index: kotlin.Int): kotlin.Int { \/* compiled code *\/ }\n\n public final operator fun iterator(): kotlin.collections.IntIterator { \/* compiled code *\/ }","completion":"public final operator fun set(index: kotlin.Int, value: kotlin.Int): kotlin.Unit { \/* compiled code *\/ }\n}\n\npublic final class Long private constructor() : kotlin.Number, kotlin.Comparable {\n public companion object {\n public const final val MAX_VALUE: kotlin.Long = COMPILED_CODE \/* compiled code *\/<|endoftext|>"} {"prompt":"block.startCoroutineUninterceptedOrReturn(BoxLong(3), EmptyContinuation())\n}\n\nsuspend fun BoxAny.extension(block: suspend BoxAny.() -> Unit) {\n this.block()\n block()\n\n block.startCoroutineUninterceptedOrReturn(this, EmptyContinuation())\n}","completion":"suspend fun BoxInt.extension(block: suspend BoxInt.() -> Unit) {\n this.block()\n block()\n\n block.startCoroutineUninterceptedOrReturn(this, EmptyContinuation())\n}\n\nsuspend fun BoxLong.extension(block: suspend BoxLong.() -> Unit) {\n this.block()\n block()<|endoftext|>"} {"prompt":"assertFailsWith { bytes.copyOf(bytes.size + 1).toKString(startIndex, endIndex, true) }\n } else {\n assertEquals(expected, bytes.toKString(startIndex, endIndex, true))\n assertEquals(expected, bytes.copyOf(bytes.size + 1).toKString(startIndex, endIndex, true))\n }","completion":"}\n\n @Test\n fun toKString() {\n \/\/ Valid strings.\n testToKString(true, \"Hello\", bytes('H'.toInt(), 'e'.toInt(), 'l'.toInt(), 'l'.toInt(), 'o'.toInt()))<|endoftext|>"} {"prompt":"if (spilledVariables != setOf(\"label\" to \"2\", \"L$0\" to continuationName, \"L$1\" to \"[a]\")) return \"FAIL 2: $spilledVariables\"\n c?.resume(Unit)","completion":"if (spilledVariables != setOf(\"label\" to \"2\", \"L$0\" to continuationName, \"L$1\" to \"[a]\")) return \"FAIL 3: $spilledVariables\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"SerializationErrors.INCORRECT_TRANSIENT,\n \"@kotlin.jvm.Transient does not affect @Serializable classes. Please use @kotlinx.serialization.Transient instead.\"\n )\n MAP.put(\n SerializationErrors.REQUIRED_KOTLIN_TOO_HIGH,","completion":"\"Your current Kotlin version is {0}, while kotlinx.serialization core runtime {1} requires at least Kotlin {2}. \" +\n \"Please update your Kotlin compiler and IDE plugin.\",\n CommonRenderers.STRING,\n CommonRenderers.STRING,\n CommonRenderers.STRING\n )\n\n MAP.put(<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.util.collectAndFilterRealOverrides\nimport org.jetbrains.kotlin.ir.util.fileOrNull\nimport org.jetbrains.kotlin.ir.util.isClass\nimport org.jetbrains.kotlin.ir.util.render","completion":"import org.jetbrains.kotlin.resolve.OverridingUtil.OverrideCompatibilityInfo\nimport org.jetbrains.kotlin.types.AbstractTypeChecker\nimport org.jetbrains.kotlin.utils.filterIsInstanceAnd\nimport org.jetbrains.kotlin.utils.memoryOptimizedMap<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\nimport kotlin.coroutines.intrinsics.*\nimport kotlin.coroutines.*\n\nfun myRun(c: () -> Unit) {\n c()\n}\n\n@Suppress(\"INVISIBLE_REFERENCE\", \"INVISIBLE_MEMBER\")\nfun box(): String {\n var contiuation: Continuation? = null","completion":"val c: suspend () -> Unit = {\n suspendCoroutine {\n contiuation = it\n }\n }\n\n var exception: Throwable? = null\n myRun {\n c.startCoroutineUninterceptedOrReturn(Continuation(EmptyCoroutineContext) {\n exception = it.exceptionOrNull()\n })\n }<|endoftext|>"} {"prompt":"object Comanion {\n val foo: String =\"FOO\"\n}\n\n\nval foo: String = \"Foo\"\n\n\nfun bar() = \"Bar\"\n\n@JsExport.Ignore\n\ninline fun A.notExportableReified(): Boolean = this is B\n\n@JsExport.Ignore","completion":"suspend fun notExportableSuspend(): String = \"SuspendResult\"\n\n\n@JsExport.Ignore\nfun notExportableReturn(): List = listOf(\"1\", \"2\")\n\n\n@JsExport.Ignore\nval String.notExportableExentsionProperty: String\n get() = \"notExportableExentsionProperty\"\n\n\n@JsExport.Ignore<|endoftext|>"} {"prompt":"private val dependenciesOutputDirs: List\n get() = mutableListOf().also { result ->\n allDependencies.processModules { module ->\n if (isTests) addDependencyMetaFile(module, result, isTests = true)\n\n \/\/ note: production targets should be also added as dependency to test targets","completion":"addDependencyMetaFile(module, result, isTests = false)\n }\n }\n\n val destination: String\n get() = module.k2MetadataCompilerArguments.destination ?: outputDir.absolutePath\n\n private fun addDependencyMetaFile(\n module: JpsModule,\n result: MutableList,\n isTests: Boolean\n ) {<|endoftext|>"} {"prompt":"irClass.origin != JvmLoweredDeclarationOrigin.FUNCTION_REFERENCE_IMPL\n ) return null\n\n val declaration = when (val callableReference = irClass.attributeOwnerId) {\n is IrPropertyReference -> callableReference.getter?.owner?.correspondingPropertySymbol?.owner\n is IrFunctionReference -> callableReference.symbol.owner\n else -> null","completion":"} ?: return null\n val parent = declaration.parent as? IrClass ?: return null\n val facadeClass = context.multifileFacadeClassForPart[parent.attributeOwnerId]\n\n return if (shouldGeneratePartHierarchy ||\n (declaration is IrProperty && declaration.backingField?.shouldMoveToFacade() == true)\n ) facadeClass else null\n }\n}<|endoftext|>"} {"prompt":"override fun visitFunctionCall(functionCall: FirFunctionCall) {\n processFunctionCall(functionCall)\n super.visitFunctionCall(functionCall)\n }\n\n override fun visitImplicitInvokeCall(implicitInvokeCall: FirImplicitInvokeCall) {\n processImplicitFunctionCall(implicitInvokeCall)\n super.visitImplicitInvokeCall(implicitInvokeCall)","completion":"}\n\n override fun visitComponentCall(componentCall: FirComponentCall) {\n processFunctionCall(componentCall)\n super.visitComponentCall(componentCall)\n }\n\n override fun visitPropertyAccessExpression(propertyAccessExpression: FirPropertyAccessExpression) {\n processPropertyAccessExpression(propertyAccessExpression)\n super.visitPropertyAccessExpression(propertyAccessExpression)<|endoftext|>"} {"prompt":"val FORWARD_DECLARATION_AS_CLASS_LITERAL: KtDiagnosticFactory1 by error1()\n val TWO_OR_LESS_PARAMETERS_ARE_SUPPORTED_HERE: KtDiagnosticFactory0 by error0()","completion":"val PROPERTY_MUST_BE_VAR: KtDiagnosticFactory1 by error1()\n val MUST_NOT_HAVE_EXTENSION_RECEIVER: KtDiagnosticFactory1 by error1()<|endoftext|>"} {"prompt":"v\n v.equals(null)","completion":"v.propT\n v.propAny<|endoftext|>"} {"prompt":"uu = 24, vv = 23, ww = 22, xx = 21, yy = 20, zz = 19, aaa = 18, bbb = 17, ccc = 16, ddd = 15, eee = 14, fff = 13,","completion":"ggg = 12, hhh = 11, iii = 10, jjj = 9, kkk = 8, lll = 7, mmm = 6, nnn = 5, ooo = 4, ppp = 3, qqq = 2, rrr = 1)<|endoftext|>"} {"prompt":"if (isEnum) {\n if (name == \"values\" && desc.startsWith(\"()\")) return null\n if (name == \"valueOf\" && desc.startsWith(\"(Ljava\/lang\/String;)\")) return null\n }\n\n val (member, visitor) = BinaryJavaMethodBase.create(name, access, desc, signature, this, context.copyForMember(), signatureParser)","completion":"when (member) {\n is JavaMethod -> methods.add(member)\n is JavaConstructor -> constructors.add(member)\n else -> error(\"Unexpected member: ${member.javaClass}\")\n }\n\n return visitor\n }\n\n override fun visitInnerClass(name: String, outerName: String?, innerName: String?, access: Int) {<|endoftext|>"} {"prompt":"for (component in total.components) {\n phase(component.key, component.value, total.files, total.lines)\n }\n\n separator()\n phase(\"Total\", total.totalTime(), total.files, total.lines)\n }\n\n }\n\n private fun configureBaseArguments(args: K2JVMCompilerArguments, moduleData: ModuleData, tmp: Path) {","completion":"val originalArguments = moduleData.arguments as? K2JVMCompilerArguments\n if (originalArguments != null) {\n args.apiVersion = originalArguments.apiVersion\n args.noJdk = originalArguments.noJdk\n args.noStdlib = originalArguments.noStdlib\n args.noReflect = originalArguments.noReflect<|endoftext|>"} {"prompt":"super.configure(builder)\n builder.useInlineHandlers()\n }\n}\n\nopen class AbstractFirLightTreeBlackBoxInlineCodegenWithIrInlinerTest : AbstractFirLightTreeBlackBoxCodegenTest() {\n override fun configure(builder: TestConfigurationBuilder) {\n super.configure(builder)\n builder.useInlineHandlers()\n builder.useIrInliner()","completion":"}\n}\n\n@FirPsiCodegenTest\nopen class AbstractFirPsiBlackBoxInlineCodegenWithBytecodeInlinerTest : AbstractFirPsiBlackBoxCodegenTest() {\n override fun configure(builder: TestConfigurationBuilder) {\n super.configure(builder)\n builder.useInlineHandlers()\n }\n}\n\n@FirPsiCodegenTest<|endoftext|>"} {"prompt":"@JvmName(\"plusFir2IrScriptConfiguratorExtension\")\n operator fun ((FirSession) -> Fir2IrScriptConfiguratorExtension).unaryPlus() {\n Fir2IrScriptConfiguratorExtension.Factory { this.invoke(it) }.unaryPlus()\n }\n\n @JvmName(\"plusFunctionTypeKindExtension\")","completion":"operator fun ((FirSession) -> FirFunctionTypeKindExtension).unaryPlus() {\n FirFunctionTypeKindExtension.Factory { this.invoke(it) }.unaryPlus()\n }\n\n @FirExtensionApiInternals\n @JvmName(\"plusMetadataSerializerPlugin\")\n operator fun ((FirSession) -> FirMetadataSerializerPlugin).unaryPlus() {<|endoftext|>"} {"prompt":"override fun toString(): String = arrayToString(array)\n\n @Suppress(\"UNCHECKED_CAST\")\n override fun toArray(array: Array): Array {\n if (array.size < size) {\n return toArray() as Array\n }\n\n (this.array as Array).copyInto(array)","completion":"return terminateCollectionToArray(size, array)\n }\n\n override fun toArray(): Array {\n return js(\"[]\").slice.call(array)\n }\n\n @ExperimentalJsExport\n @ExperimentalJsCollectionsApi\n @SinceKotlin(\"2.0\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.load.kotlin\n\nimport org.jetbrains.kotlin.load.java.lazy.types.RawTypeImpl\nimport org.jetbrains.kotlin.metadata.ProtoBuf\nimport org.jetbrains.kotlin.metadata.jvm.JvmProtoBuf","completion":"import org.jetbrains.kotlin.metadata.jvm.deserialization.JvmProtoBufUtil\nimport org.jetbrains.kotlin.serialization.deserialization.FlexibleTypeDeserializer\nimport org.jetbrains.kotlin.types.*\nimport org.jetbrains.kotlin.types.error.ErrorUtils<|endoftext|>"} {"prompt":"jvmContext.irFactory,\n jvmContext.irBuiltIns,\n jvmContext.ir.symbols,\n jvmContext.ir.symbols.javaLangClass,\n jvmContext.ir.symbols.kClassJavaPropertyGetter.symbol,\n ANNOTATION_IMPLEMENTATION\n )\n\n @Suppress(\"UNUSED_PARAMETER\")","completion":"override fun chooseConstructor(implClass: IrClass, expression: IrConstructorCall) =\n implClass.constructors.single()\n\n override fun visitConstructorCall(expression: IrConstructorCall): IrExpression {\n val constructedClass = expression.type.classOrNull\n if (constructedClass?.owner?.isAnnotationClass == true && inInlineFunctionScope) {<|endoftext|>"} {"prompt":"}\n\n fun createSuperTypeEntry(@NonNls text: String): KtSuperTypeEntry {\n return createClass(\"class A: $text\").superTypeListEntries.first() as KtSuperTypeEntry\n }\n\n fun creareDelegatedSuperTypeEntry(@NonNls text: String): KtConstructorDelegationCall {","completion":"val colonOrEmpty = if (text.isEmpty()) \"\" else \": \"\n return createClass(\"class A { constructor()$colonOrEmpty$text {}\").secondaryConstructors.first().getDelegationCall()\n }\n\n class ClassHeaderBuilder {\n\n enum class State {\n MODIFIERS,\n NAME,\n TYPE_PARAMETERS,\n BASE_CLASS,<|endoftext|>"} {"prompt":"object Default : PlatformDiagnosticSuppressor {\n override fun shouldReportUnusedParameter(parameter: VariableDescriptor, bindingContext: BindingContext): Boolean = true\n\n override fun shouldReportNoBody(descriptor: CallableMemberDescriptor): Boolean = true\n }\n}","completion":"class CompositePlatformDiagnosticSuppressor(private val suppressors: List) : PlatformDiagnosticSuppressor {\n override fun shouldReportUnusedParameter(parameter: VariableDescriptor, bindingContext: BindingContext): Boolean =\n suppressors.all { it.shouldReportUnusedParameter(parameter, bindingContext) }\n\n @Deprecated(\"Use shouldReportUnusedParameter with bindingContext parameter\")<|endoftext|>"} {"prompt":"* Returns a list of all elements sorted according to the specified [comparator].\n *\/\npublic fun IntArray.sortedWith(comparator: Comparator): List {\n return toTypedArray().apply { sortWith(comparator) }.asList()\n}\n\n\/**\n * Returns a list of all elements sorted according to the specified [comparator].\n *\/","completion":"public fun LongArray.sortedWith(comparator: Comparator): List {\n return toTypedArray().apply { sortWith(comparator) }.asList()\n}\n\n\/**\n * Returns a list of all elements sorted according to the specified [comparator].\n *\/\npublic fun FloatArray.sortedWith(comparator: Comparator): List {<|endoftext|>"} {"prompt":"val containerSymbol: FirBasedSymbol<*> get() = _containerSymbolStack.last()\n private val _containerSymbolStack: MutableList> = mutableListOf>()\n\n \/**\n * Add [symbol] to the container symbols stack. Must be paired with [popContainerSymbol].\n *","completion":"* @see containerSymbol\n *\/\n fun pushContainerSymbol(symbol: FirBasedSymbol<*>) {\n \/**\n * Replace [symbol] with [forcedContainerSymbol] if it is the first invocation of [pushContainerSymbol] in the stack\n *\/\n val containerSymbol = forcedContainerSymbol?.takeIf { _containerSymbolStack.isEmpty() } ?: symbol<|endoftext|>"} {"prompt":"\/\/ TODO: Only pass groupedSources, because\n \/\/ we will need to have them separated again\n \/\/ in createSessionsForLegacyMppProject anyway\n ktSourceFiles = groupedSources.commonSources + groupedSources.platformSources,\n libraries = libraries,\n friendLibraries = friendLibraries,\n diagnosticsReporter = diagnosticsReporter,","completion":"incrementalDataProvider = configuration[JSConfigurationKeys.INCREMENTAL_DATA_PROVIDER],\n lookupTracker = lookupTracker,\n useWasmPlatform = arguments.wasm,\n )\n } else {\n compileModuleToAnalyzedFirWithPsi(\n moduleStructure = moduleStructure,\n ktFiles = environmentForJS.getSourceFiles(),\n libraries = libraries,<|endoftext|>"} {"prompt":"val jdkHome = when {\n jvmTarget <= JvmTarget.JVM_1_8 -> KtTestUtil.getJdk8Home()\n jvmTarget <= JvmTarget.JVM_11 -> KtTestUtil.getJdk11Home()\n jvmTarget <= JvmTarget.JVM_17 -> KtTestUtil.getJdk17Home()","completion":"jvmTarget <= JvmTarget.JVM_21 -> KtTestUtil.getJdk21Home()\n else -> error(\"JDK for $jvmTarget is not found\")\n }\n\n addAll(listOf(K2JVMCompilerArguments::jdkHome.cliArgument, jdkHome.toString()))\n }\n }<|endoftext|>"} {"prompt":"@TypedIntrinsic(IntrinsicType.OR)\n public external infix fun or(other: Int): Int\n\n \/** Performs a bitwise XOR operation between the two values. *\/\n @kotlin.internal.IntrinsicConstEvaluation\n @TypedIntrinsic(IntrinsicType.XOR)","completion":"public external infix fun xor(other: Int): Int\n\n \/** Inverts the bits in this value. *\/\n @kotlin.internal.IntrinsicConstEvaluation\n @TypedIntrinsic(IntrinsicType.INV)\n public external fun inv(): Int\n\n \/**\n * Converts this [Int] value to [Byte].\n *<|endoftext|>"} {"prompt":"val bar: String get() = \"default property\"\n fun qux(): String = \"ubdated default method\"\n}\n\ninterface Z {\n fun qux(): String = \"alternative default method\"\n}\n\n\/\/ MODULE: mainLib(lib)\n\/\/ FILE: mainLib.kt\n\nclass Y: X, Z {\n override fun foo(): String = \"overridden method\"","completion":"override val bar: String get() = \"overridden property\"\n override fun qux(): String = \"overridden multiple versions\"\n}\n\nval y = Y()\nval t = object : Z {}\n\nfun lib(): String = when {\n y.foo() != \"overridden method\" -> \"fail 1\"\n y.bar != \"overridden property\" -> \"fail 2\"<|endoftext|>"} {"prompt":"val superClass = context.platform.getRuntimeType(\"CStructVar\")\n require(superClass is ClassifierStubType)\n val rawPtrConstructorParam = FunctionParameterStub(\"rawPtr\", context.platform.getRuntimeType(\"NativePtr\"))\n val origin = StubOrigin.Struct(decl)\n val primaryConstructor = ConstructorStub(\n parameters = listOf(rawPtrConstructorParam),","completion":"isPrimary = true,\n annotations = emptyList(),\n origin = origin\n )\n val superClassInit = SuperClassInit(superClass, listOf(GetConstructorParameter(rawPtrConstructorParam)))\n\n val companionSuper = superClass.nested(\"Type\")<|endoftext|>"} {"prompt":"0xa640, 0xa680, 0xa722, 0xa732, 0xa779, 0xa77d, 0xa77e, 0xa78b, 0xa78d, 0xa790, 0xa796, 0xa7aa, 0xa7ab, 0xa7ac, 0xa7ad, 0xa7ae, 0xa7b0, 0xa7b1, 0xa7b2,","completion":"0xa7b3,<|endoftext|>"} {"prompt":", *, kotlin.collections.Map>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map>>?\")!>a.funT()<|endoftext|>"} {"prompt":"isInner = classWrapper.isInner()\n isFromSealedClass = classWrapper.isSealed() && explicitVisibility !== Visibilities.Private\n isFromEnumClass = classWrapper.isEnum()\n }\n\n val builder = when {\n modifiersIfPresent != null && !hasConstructorKeyword -> createErrorConstructorBuilder(ConeMissingConstructorKeyword)","completion":"isErrorConstructor -> createErrorConstructorBuilder(ConeNoConstructorError)\n else -> FirPrimaryConstructorBuilder()\n }\n builder.apply {\n source = primaryConstructor?.toFirSourceElement()\n ?: selfTypeSource?.fakeElement(KtFakeSourceElementKind.ImplicitConstructor)\n moduleData = baseModuleData\n origin = FirDeclarationOrigin.Source<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.codegen.range\n\nimport org.jetbrains.kotlin.codegen.ExpressionCodegen\nimport org.jetbrains.kotlin.codegen.range.forLoop.ForInProgressionExpressionLoopGenerator\nimport org.jetbrains.kotlin.codegen.range.inExpression.CallBasedInExpressionGenerator","completion":"import org.jetbrains.kotlin.codegen.range.inExpression.InExpressionGenerator\nimport org.jetbrains.kotlin.psi.KtExpression\nimport org.jetbrains.kotlin.psi.KtForExpression\nimport org.jetbrains.kotlin.psi.KtSimpleNameExpression<|endoftext|>"} {"prompt":"if (!(element11 !in objectArray.indices) != range1.contains(element11)) throw AssertionError()\n}\n\nfun testR1xE12() {\n \/\/ with possible local optimizations\n if (2.toByte() in objectArray.indices != range1.contains(2.toByte())) throw AssertionError()","completion":"if (2.toByte() !in objectArray.indices != !range1.contains(2.toByte())) throw AssertionError()\n if (!(2.toByte() in objectArray.indices) != !range1.contains(2.toByte())) throw AssertionError()<|endoftext|>"} {"prompt":"call = test(a = {res += \"K\"; \"K\"}(), c = {res += \"L\"; \"L\"}, b = {res+=\"O\"; \"O\"}())\n if (res != \"KOL\" || call != \"KOL\") return \"fail 2: $res != KOL or $call != KOL\"\n\n\n res = \"\";","completion":"call = test(c = {res += \"L\"; \"L\"}, a = {res += \"K\"; \"K\"}(), b = {res+=\"O\"; \"O\"}())\n if (res != \"KOL\" || call != \"KOL\") return \"fail 3: $res != KOL or $call != KOL\"\n\n return \"OK\"\n\n}<|endoftext|>"} {"prompt":"val ALL_NAME_FILTER: (Name) -> Boolean = { true }\n }\n}\n\nfun MemberScope.computeAllNames() = getClassifierNames()?.let { classifierNames ->\n getFunctionNames().toMutableSet().also {\n it.addAll(getVariableNames())\n it.addAll(classifierNames)\n }\n}","completion":"inline fun MemberScope.findFirstFunction(name: String, predicate: (CallableMemberDescriptor) -> Boolean) =\n getContributedFunctions(Name.identifier(name), NoLookupLocation.FROM_BACKEND).first(predicate)\n\ninline fun MemberScope.findFirstVariable(name: String, predicate: (CallableMemberDescriptor) -> Boolean) =<|endoftext|>"} {"prompt":"get() = extensions.findByName(KOTLIN_PROJECT_EXTENSION_NAME)?.castIsolatedKotlinPluginClassLoaderAware()\n\nval Project.kotlinExtension: KotlinProjectExtension\n get() = extensions.getByName(KOTLIN_PROJECT_EXTENSION_NAME).castIsolatedKotlinPluginClassLoaderAware()","completion":"internal val Project.kotlinJvmExtensionOrNull: KotlinJvmProjectExtension?\n get() = extensions.findByName(KOTLIN_PROJECT_EXTENSION_NAME)?.castIsolatedKotlinPluginClassLoaderAware()\n\ninternal val Project.kotlinJvmExtension: KotlinJvmProjectExtension<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ TARGET_BACKEND: JVM_IR\n\nimport kotlin.reflect.KFunction2\nimport kotlin.reflect.KFunction1\nimport kotlin.reflect.KFunction0\n\nfun box(): String {\n val s: String? = \"OK\"\n val t: Throwable? = Throwable(\"test\", null)","completion":"var thr1: KFunction2 = ::Throwable\n val z = thr1(s, t)\n if (z.message !== s) return \"fail 1: ${z.message}\"\n if (z.cause !== t) return \"fail 2: ${z.cause}\"\n\n var thr2: KFunction1 = ::Throwable<|endoftext|>"} {"prompt":"val z = z\n\n\/\/KT-329 Assertion failure on local function\nfun block(f : () -> Unit) = f()\n\nfun bar3() = block{ foo3() \/\/ <-- missing closing curly bracket","completion":"fun foo3() = block{ bar3() }<|endoftext|>"} {"prompt":"fun mem() {}\n}\n\n\nfun checkEqual(x: Any, y: Any) {\n assertEquals(x, y)\n assertEquals(x.hashCode(), y.hashCode(), \"Elements are equal but their hash codes are not: ${x.hashCode()} != ${y.hashCode()}\")\n}\n\nfun box(): String {\n checkEqual(::top, ::top)","completion":"checkEqual(Int::intExt, Int::intExt)\n checkEqual(A::mem, A::mem)\n\n assertFalse(::top == Int::intExt)\n assertFalse(::top == A::mem)\n assertFalse(A::mem == B::mem)\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.name.FqNameUnsafe\nimport org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.name.SpecialNames\nimport org.jetbrains.kotlin.resolve.DescriptorUtils","completion":"import org.jetbrains.kotlin.resolve.calls.inference.CapturedType\nimport org.jetbrains.kotlin.resolve.constants.IntegerLiteralTypeConstructor\nimport org.jetbrains.kotlin.resolve.descriptorUtil.*\nimport org.jetbrains.kotlin.resolve.scopes.SubstitutingScope<|endoftext|>"} {"prompt":"interface F : A, B(), C, D(), Any() {<|endoftext|>"} {"prompt":"return irCall(createFromParcel).apply {\n dispatchReceiver = creator\n putValueArgument(0, parcel)\n }\n}\n\nfun IrSimpleFunction.isParcelableCreatorIntrinsic(): Boolean =\n dispatchReceiverParameter == null\n && extensionReceiverParameter == null\n && valueParameters.isEmpty()\n && isInline","completion":"&& isTopLevelInPackage(\"parcelableCreator\", FqName(\"kotlinx.parcelize\"))\n && typeParameters.singleOrNull()?.let {\n it.isReified && it.superTypes.singleOrNull()?.classFqName == PARCELABLE_FQN\n } == true\n\n\/\/ Construct an expression to access the parcelable creator field in the given class.<|endoftext|>"} {"prompt":"assert(!typeAlias.expandedType.isError) { \"Incorrect type alias: $typeAlias\" }\n }\n\n private val argumentsMapping = typeAlias.declaredTypeParameters.zip(ktTypeArguments).toMap()\n\n override fun wrongNumberOfTypeArguments(typeAlias: TypeAliasDescriptor, numberOfParameters: Int) {\n \/\/ can't happen in single-step expansion\n }","completion":"override fun conflictingProjection(\n typeAlias: TypeAliasDescriptor,\n typeParameter: TypeParameterDescriptor?,\n substitutedArgument: KotlinType\n ) {\n \/\/ can't happen in single-step expansion\n }\n\n override fun recursiveTypeAlias(typeAlias: TypeAliasDescriptor) {\n \/\/ can't happen in single-step expansion\n }<|endoftext|>"} {"prompt":"@kotlin.SinceKotlin(version = \"1.4\")\npublic final annotation class DeprecatedSinceKotlin : kotlin.Annotation {\n public constructor DeprecatedSinceKotlin(warningSince: kotlin.String = ..., errorSince: kotlin.String = ..., hiddenSince: kotlin.String = ...)\n\n public final val errorSince: kotlin.String { get; }","completion":"public final val hiddenSince: kotlin.String { get; }\n\n public final val warningSince: kotlin.String { get; }\n}\n\npublic final enum class DeprecationLevel : kotlin.Enum {\n enum entry WARNING\n\n enum entry ERROR\n\n enum entry HIDDEN\n}<|endoftext|>"} {"prompt":"typeA: KmType,\n typeB: KmType\n ) {\n compareFlags(typeContext, typeA, typeB, TYPE_FLAGS)\n compareAnnotationLists(typeContext, typeA.annotations, typeB.annotations)\n\n compareValues(typeContext, typeA.classifier, typeB.classifier, EntityKind.Classifier)","completion":"compareUniqueEntityLists(\n containerContext = typeContext,\n entityListA = typeA.arguments,\n entityListB = typeB.arguments,\n entityKind = EntityKind.TypeArgument,\n groupingKeySelector = { index, _ -> index.toString() }\n ) { typeProjectionContext, typeProjectionA, typeProjectionB ->\n compareNullableEntities(<|endoftext|>"} {"prompt":"assertEquals(1, a2.size)\n assertEquals(2, a3.size)\n\n assertEquals(\"[]\", a1.toList().toString())\n assertEquals(\"[foo]\", a2.toList().toString())\n assertEquals(\"[foo, bar]\", a3.toList().toString())\n\n }\n\n @Test fun arrayListFromCollection() {","completion":"var c: Collection = arrayOf(\"A\", \"B\", \"C\").toList()\n var a = ArrayList(c)\n\n assertEquals(3, a.size)\n assertEquals(\"A\", a[0])\n assertEquals(\"B\", a[1])\n assertEquals(\"C\", a[2])\n }\n}<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1286\nvar l = \"\"\n\nfun log(message: String) {\n l += message + \";\"\n}\n\nfun baz(x: String){\n log(\"baz($x)\")\n}\nfun baz(x: String, i: Int) {\n log(\"baz($x, $i)\")\n}\n\ninline fun bar() {","completion":"boo {\n baz(\"AAA\")\n foo()\n }\n}\n\nfun boo(x: () -> Unit) = x()\n\ninline fun foo() {\n log(\"foo()\")\n baz(\"BBB\", 333)\n}\n\n\/\/ CHECK_BREAKS_COUNT: function=box count=0 TARGET_BACKENDS=JS_IR<|endoftext|>"} {"prompt":"value class ZN(val z: Z1?)\n\nOPTIONAL_JVM_INLINE_ANNOTATION\nvalue class ZN2(val z: ZN)\n\nfun wrap1(n: Int): Z1? = if (n < 0) null else Z1(n)\nfun wrap2(n: Int): Z2? = if (n < 0) null else Z2(Z1(n))","completion":"fun wrapN(n: Int): ZN? = if (n < 0) null else ZN(Z1(n))\nfun wrapN2(n: Int): ZN2? = if (n < 0) null else ZN2(ZN(Z1(n)))\n\nfun box(): String {\n if (wrap1(-1) != null) throw AssertionError()<|endoftext|>"} {"prompt":"\"cinterop-MetadataDependencyTransformation\",\n gradleVersion,\n buildOptions = defaultBuildOptions.copy(freeArgs = defaultBuildOptions.freeArgs + \"-PdependencyMode=project\")\n ) {\n resolveIdeDependencies(\":p3\") { dependencies ->\n \/* Check that no compile-tasks are executed *\/\n run {","completion":"val compileTaskRegex = Regex(\".*[cC]ompile.*\")\n val compileTasks = tasks.filter { task -> task.path.matches(compileTaskRegex) }\n if (compileTasks.isNotEmpty()) {\n fail(\"Expected no compile tasks to be executed. Found $compileTasks\")\n }\n }<|endoftext|>"} {"prompt":"Test.foo1(x1, *x3)\n Test.foo1(x2, arrayOf(\"\"))\n Test.foo1(x2, *arrayOf(\"\"))\n\n val i1 = Test({}, arrayOf())","completion":"val i2 = Test({}, *arrayOf())\n val i3 = Test({}, x3)\n val i4 = Test({}, arrayOf(\"\"))<|endoftext|>"} {"prompt":"debugName: String,\n resolutionSubjectForMessage: Any?,\n filter: BindingTraceFilter = BindingTraceFilter.ACCEPT_ALL,\n allowSliceRewrite: Boolean = false\n ) : this(\n parentContext,\n AnalyzingUtils.formDebugNameForBindingTrace(debugName, resolutionSubjectForMessage),\n filter = filter,\n allowSliceRewrite = allowSliceRewrite","completion":")\n\n override fun getBindingContext(): BindingContext = bindingContext\n\n override fun record(slice: WritableSlice, key: K, value: V) {\n map.put(slice, key, value)\n }\n\n override fun record(slice: WritableSlice, key: K) {<|endoftext|>"} {"prompt":"* Interface check: itable[interfaceId & (size - 1)].id == interfaceId\n *\n * Note that we have a fallback to a more conservative version if the size of an itable is too large:\n * just save all interface ids and vtables in sorted order and find the needed one with the binary search.\n * We can signal that using the sign bit of the type info's size field:","completion":"* if (size >= 0) { .. fast path .. }\n * else binary_search(0, -size)\n *\/\n val interfaceColors = assignColorsToInterfaces()\n val maxColor = interfaceColors.values.maxOrNull() ?: 0\n var bitsPerColor = 0\n var x = maxColor\n while (x > 0) {\n ++bitsPerColor<|endoftext|>"} {"prompt":"val NONE: Short\n val CAPTURING_PHASE: Short\n val AT_TARGET: Short\n val BUBBLING_PHASE: Short\n }\n}\n\npublic external interface UnionMessagePortOrServiceWorker\n\npublic external interface UnionClientOrMessagePortOrServiceWorker\n\n\/* please, don't implement this interface! *\/\n@JsName(\"null\")","completion":"@Suppress(\"NESTED_CLASS_IN_EXTERNAL_INTERFACE\")\npublic external interface ServiceWorkerState {\n companion object\n}\n\npublic inline val ServiceWorkerState.Companion.INSTALLING: ServiceWorkerState get() = \"installing\".asDynamic().unsafeCast()<|endoftext|>"} {"prompt":"}\n specialFor(ArraysOfPrimitives, ArraysOfObjects, Iterables, Maps) {\n sample(\"samples.collections.Sequences.Building.sequenceFrom${f.doc.collection.capitalize()}\")\n }\n\n returns(\"Sequence\")\n body {\n \"\"\"\n ${ when(f) {","completion":"ArraysOfObjects, ArraysOfPrimitives -> \"if (isEmpty()) return emptySequence()\"\n CharSequences -> \"if (this is String && isEmpty()) return emptySequence()\"\n else -> \"\"\n }}\n return Sequence { this.iterator() }\n \"\"\"\n }\n\n body(Maps) { \"return entries.asSequence()\" }\n\n specialFor(Sequences) {<|endoftext|>"} {"prompt":"compareAnnotationLists(typeParameterContext, typeParameterA.annotations, typeParameterB.annotations)\n\n compareValues(typeParameterContext, typeParameterA.id, typeParameterB.id, EntityKind.TypeParameterId)\n compareValues(typeParameterContext, typeParameterA.name, typeParameterB.name, EntityKind.TypeParameterName)","completion":"compareValues(typeParameterContext, typeParameterA.variance, typeParameterB.variance, EntityKind.TypeParameterVariance)\n compareOrderInsensitiveTypeLists(typeParameterContext, typeParameterA.upperBounds, typeParameterB.upperBounds, TypeKind.UPPER_BOUND)\n }\n\n @OptIn(ExperimentalContracts::class)\n private fun compareEffectExpressions(<|endoftext|>"} {"prompt":"abstract class ForwardC2 : ForwardC1()\nabstract class ForwardC1 {\n abstract fun getForwardC2(): ForwardC2\n}\n\ninterface TestSR10177Workaround\n\ninterface TestClashes1 {\n val clashingProperty: Int\n}\n\ninterface TestClashes2 {\n val clashingProperty: Any\n val clashingProperty_: Any\n}","completion":"class TestClashesImpl : TestClashes1, TestClashes2 {\n override val clashingProperty: Int\n get() = 1\n\n override val clashingProperty_: Int\n get() = 2\n}\n\nclass TestInvalidIdentifiers {<|endoftext|>"} {"prompt":"\"Actual data differs from file content: ${expectedFile.name}\\nTo overwrite the expected API rerun with -Doverwrite.output=true parameter\\n\"\n }\n )\n }\n}\n\nfun assertEqualsWithFirstLineDiff(expectedText: String, actualText: String, message: String, diffLinesSurround: Int = 1) {","completion":"val actualLinesIterator = actualText.lineSequence().iterator()\n val expectedLinesIterator = expectedText.lineSequence().iterator()\n\n val actualBufferLines = LinkedList()\n val expectedBufferLines = LinkedList()\n\n var diffFound = false\n var diffLine = -1\n var line = 0<|endoftext|>"} {"prompt":"val partFqName: FqName?\n get() = partSimpleName?.relativeToPackage()\n\n val facadeFqName: FqName?\n get() = facadeFqNameString?.let(::FqName)\n\n override fun getPackageFqName(): FqName = FqName(packageName)\n override fun isScript(): Boolean = isScript","completion":"override fun getType(): IStubFileElementType = KtFileElementType.INSTANCE\n\n override fun toString(): String = \"PsiJetFileStubImpl[\" + \"package=\" + getPackageFqName().asString() + \"]\"\n\n override fun findImportsByAlias(alias: String): List {<|endoftext|>"} {"prompt":"if (e != null) this.e.funAny()\n if (e != null) this.e.funNullableT()","completion":"if (e != null) this.e.funNullableAny()\n if (e != null) this.e<|endoftext|>"} {"prompt":"val sizeName = context.getNameForDescriptor(sizeDescriptor)\n val conditionExpression = inequality(indexVar.makeRef(), JsNameRef(sizeName, range)).source(expression)\n\n val incrementExpression = JsPrefixOperation(JsUnaryOperator.INC, indexVar.makeRef()).source(expression)\n\n val body = JsBlock()","completion":"expression.body?.let { body.statements += Translation.translateAsStatement(it, context.innerBlock(body)) }\n\n return JsFor(initExpression, conditionExpression, incrementExpression, body)\n }\n\n fun findIterable() =\n context.currentModule.findClassAcrossModuleDependencies(ClassId.topLevel(StandardNames.FqNames.iterable))!!<|endoftext|>"} {"prompt":"val notFoundTypeVariables = notFixedTypeVariables.keys.toMutableSet().apply { removeAll(result) }\n \"Not all type variables found: $notFoundTypeVariables\"\n }\n\n return result.toList()\n }\n\n private fun fixVariable(\n c: ConstraintSystemCompletionContext,\n variableWithConstraints: VariableWithConstraints,","completion":"topLevelAtoms: List,\n diagnosticsHolder: KotlinDiagnosticsHolder\n ) {\n fixVariable(c, variableWithConstraints, TypeVariableDirectionCalculator.ResolveDirection.UNKNOWN, topLevelAtoms, diagnosticsHolder)\n }\n\n private fun reportWarningIfFixedIntoDeclaredUpperBounds(<|endoftext|>"} {"prompt":"return declarations.singleOrNull() as? FirCodeFragment\n ?: errorWithFirSpecificEntries(\"Code fragment not found in a FirFile\", fir = this)\n }\n\nval FirDeclaration.isGeneratedDeclaration\n get() = realPsi == null\n\ninternal inline fun FirScript.forEachDeclaration(action: (FirDeclaration) -> Unit) {\n for (property in parameters) {","completion":"action(property)\n }\n\n for (statement in declarations) {\n action(statement)\n }\n}\n\ninternal inline fun FirRegularClass.forEachDeclaration(action: (FirDeclaration) -> Unit) {\n declarations.forEach(action)\n}\n\ninternal inline fun FirFile.forEachDeclaration(action: (FirDeclaration) -> Unit) {<|endoftext|>"} {"prompt":"val enabledTypeAliasMetadataCheckers = allTypeAliasMetadataCheckers.filterOutDisabled()\n val enabledClassMetadataCheckers = allClassMetadataCheckers.filterOutDisabled()\n val enabledPackageMetadataCheckers = allPackageMetadataCheckers.filterOutDisabled()\n val enabledMultifileClassFacadeMetadataCheckers = allMultifileClassFacadeMetadataCheckers.filterOutDisabled()","completion":"val enabledMultifileClassPartMetadataCheckers = allMultifileClassPartMetadataCheckers.filterOutDisabled()\n val enabledAllSyntheticClassMetadataCheckers = allSyntheticClassMetadataCheckers.filterOutDisabled()\n val enabledModuleMetadataCheckers = allModuleMetadataCheckers.filterOutDisabled()<|endoftext|>"} {"prompt":"fun generateTemporaryVariable(name: Name, initializer: FirExpression): FirProperty = generateTemporaryVariable(\n moduleData = session.moduleData,\n source = desugaredSource,\n name = name,\n initializer = initializer,\n typeRef = initializer.resolvedType.toFirResolvedTypeRef(desugaredSource),\n )\n\n fun buildAndResolveOperatorCall(","completion":"receiver: FirExpression,\n fakeSourceKind: KtFakeSourceElementKind.DesugaredIncrementOrDecrement,\n ): FirFunctionCall = buildFunctionCall {\n source = incrementDecrementExpression.operationSource\n explicitReceiver = receiver\n calleeReference = buildSimpleNamedReference {\n source = incrementDecrementExpression.operationSource?.fakeElement(fakeSourceKind)<|endoftext|>"} {"prompt":"val publicPackagePrefixes = publicPackages.map { it.replace('.', '\/') + '\/' }\n val publicPackageFilter = { className: String -> publicPackagePrefixes.none { className.startsWith(it) } }\n\n val api = JarFile(jarFile).loadApiFromJvmClasses(publicPackageFilter)\n .filterOutNonPublic(nonPublicPackages)","completion":".filterOutAnnotated(nonPublicAnnotations.toSet())\n\n val target = File(\"reference-public-api\")\n .resolve(testName.methodName.replaceCamelCaseWithDashedLowerCase() + \".txt\")\n\n api.dumpAndCompareWith(target)\n }\n\n private fun getJarPath(base: File, jarPattern: String, kotlinVersion: String?): File {<|endoftext|>"} {"prompt":"\/\/ TESTCASE NUMBER: 1\npackage testPackCase1\nprivate fun Int.boo(x: Int, a: Any = \"\"): String = TODO() \/\/(1.1)\nprivate fun Int.boo(x: Int, a: Any = \"\", b: Any = 1): Unit = TODO() \/\/(1.1)","completion":"private fun Int.boo(x: Long, a: Any = \"\"): Unit = TODO() \/\/(1.2)\nprivate fun Int.boo(x: Long, a: Any = \"\", b: Any = 1): Unit = TODO() \/\/(1.2)\nprivate fun Int.boo(x: Short, a: Any = \"\"): Unit = TODO() \/\/(1.3)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.util.render\nimport org.jetbrains.kotlin.resolve.jvm.JvmClassName\nimport org.jetbrains.org.objectweb.asm.Type\n\n@PhaseDescription(\n name = \"InventNamesForLocalClasses\",\n description = \"Invent names for local classes and anonymous objects\",","completion":"\/\/ MainMethodGeneration introduces lambdas, needing names for their local classes.\n prerequisite = [MainMethodGenerationLowering::class],\n)\ninternal class JvmInventNamesForLocalClasses(context: JvmBackendContext) : JvmInventNamesForLocalClassesImpl(context, false)\n\nopen class JvmInventNamesForLocalClassesImpl(\n protected val context: JvmBackendContext,<|endoftext|>"} {"prompt":"val dispatchReceiverType = descriptor.dispatchReceiverParameter?.type ?: return false\n if (!isPrimitiveRange(dispatchReceiverType)) return false\n\n return true\n}\n\nfun isUnsignedIntegerRangeContains(descriptor: CallableDescriptor): Boolean {\n val dispatchReceiverType = descriptor.dispatchReceiverParameter?.type","completion":"val extensionReceiverType = descriptor.extensionReceiverParameter?.type\n\n when {\n dispatchReceiverType != null && extensionReceiverType == null -> {\n if (descriptor.name.asString() != \"contains\") return false\n return isUnsignedRange(dispatchReceiverType)\n }\n extensionReceiverType != null && dispatchReceiverType == null -> {<|endoftext|>"} {"prompt":"private val contractsDslRemovePhase = createFileLoweringPhase(\n { context: Context -> ContractsDslRemover(context) },\n name = \"RemoveContractsDsl\",\n description = \"Contracts dsl removing\"\n)\n\n\/\/ TODO make all lambda-related stuff work with IrFunctionExpression and drop this phase (see kotlin: dd3f8ecaacd)","completion":"private val provisionalFunctionExpressionPhase = createFileLoweringPhase(\n ::ProvisionalFunctionExpressionLowering,\n name = \"FunctionExpression\",\n description = \"Transform IrFunctionExpression to a local function reference\"\n)\n\nprivate val flattenStringConcatenationPhase = createFileLoweringPhase(\n ::FlattenStringConcatenationLowering,<|endoftext|>"} {"prompt":"firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,\n) : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.EqualityNotApplicableWarning\n\ninternal class IncompatibleEnumComparisonErrorImpl(\n override val leftType: KtType,","completion":"override val rightType: KtType,\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,\n) : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.IncompatibleEnumComparisonError\n\ninternal class IncompatibleEnumComparisonImpl(<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinSourceCoordinates\nimport org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinSourceDependency\nimport org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet","completion":"import org.jetbrains.kotlin.gradle.plugin.ide.IdeDependencyResolver\nimport org.jetbrains.kotlin.gradle.plugin.ide.IdeaKotlinProjectCoordinates\nimport org.jetbrains.kotlin.gradle.plugin.mpp.MetadataDependencyResolution<|endoftext|>"} {"prompt":"type.isUShort -> KtConstantValue.KtUnsignedShortConstantValue((value as Number).toShort().toUShort(), expression)\n type.isInt -> KtConstantValue.KtIntConstantValue((value as Number).toInt(), expression)","completion":"type.isUInt -> KtConstantValue.KtUnsignedIntConstantValue((value as Number).toInt().toUInt(), expression)\n type.isLong -> KtConstantValue.KtLongConstantValue((value as Number).toLong(), expression)<|endoftext|>"} {"prompt":"assertFalse(eqIntChar(1.toInt(), 1.toChar()))\n assertFalse(eqIntCharQ(0.toInt(), 0.toChar()))\n assertFalse(eqIntCharQ(0.toInt(), 1.toChar()))\n assertFalse(eqIntCharQ(0.toInt(), null))\n assertFalse(eqIntCharQ(0.toInt(), undefined))","completion":"assertFalse(eqIntCharQ(1.toInt(), 0.toChar()))\n assertFalse(eqIntCharQ(1.toInt(), 1.toChar()))\n assertFalse(eqIntCharQ(1.toInt(), null))\n assertFalse(eqIntCharQ(1.toInt(), undefined))\n assertFalse(eqIntQChar(0.toInt(), 0.toChar()))<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.idea.KotlinFileType\nimport org.jetbrains.kotlin.parsing.KotlinParserDefinition\nimport org.jetbrains.kotlin.psi.KtFile\nimport org.jetbrains.kotlin.scripting.resolve.KtFileScriptSource","completion":"import org.jetbrains.kotlin.scripting.resolve.VirtualFileScriptSource\nimport kotlin.contracts.ExperimentalContracts\nimport kotlin.contracts.contract\nimport kotlin.script.experimental.api.SourceCode\n\n\ninline fun runReadAction(crossinline runnable: () -> T): T {<|endoftext|>"} {"prompt":"is IrConstructorSymbol -> getReferencedConstructor(symbol)\n else -> error(\"Unexpected symbol $symbol ${symbol.descriptor}\")\n }\n\n override fun getReferencedSimpleFunction(symbol: IrSimpleFunctionSymbol) = when {\n symbol.descriptor.isExpect -> symbol.owner.findActualForExpected().symbol","completion":"symbol.descriptor.propertyIfAccessor.isExpect -> {\n val property = symbol.owner.correspondingPropertySymbol!!.owner\n val actualPropertyDescriptor = property.descriptor.findActualForExpect()\n val accessorDescriptor = when (symbol.owner) {\n property.getter -> actualPropertyDescriptor.getter!!<|endoftext|>"} {"prompt":"package foo\n\nimport org.jetbrains.kotlin.fir.plugin.MyInterfaceSupertype\n\ninterface MyInterface {\n fun foo()\n}\n\n@MyInterfaceSupertype\nabstract class AbstractClass\n\n@MyInterfaceSupertype\nclass FinalClassWithOverride {\n override fun foo() {}\n}\n\n@MyInterfaceSupertype","completion":"class FinalClassWithoutOverride {\n \/\/ should be error\n}\n\nclass NotAnnotatedWithOverride {\n \/\/ should be error\n override fun foo() {}\n}\n\n@MyInterfaceSupertype\nclass AnnotatedClassWithExplicitInheritance : MyInterface {<|endoftext|>"} {"prompt":"val atomicProperty = getPropertyReceiver.getCorrespondingProperty()\n val volatileProperty = atomicfuPropertyToVolatile[atomicProperty]\n ?: error(\"No volatile property was generated for the atomic property ${atomicProperty.render()}\")\n val valueType = volatileProperty.backingField!!.type\n return IrFunctionExpressionImpl(\n UNDEFINED_OFFSET, UNDEFINED_OFFSET,","completion":"type = atomicSymbols.kMutableProperty0GetterType(valueType),\n function = irBuiltIns.irFactory.buildFun {\n name = Name.identifier(\"<${volatileProperty.name.asString()}-getter-${refGetterCounter++}>\")\n origin = AbstractAtomicSymbols.ATOMICFU_GENERATED_FUNCTION<|endoftext|>"} {"prompt":"* The class representing the failure result\n * @param reports diagnostics associated with the failure\n *\/\n data class Failure(\n override val reports: List\n ) : ResultWithDiagnostics() {\n constructor(vararg reports: ScriptDiagnostic) : this(reports.asList())\n }\n}\n\n\/**\n * Chains actions on successful result:","completion":"* If receiver is success - executes [body] and merge diagnostic reports\n * otherwise returns the failure as is\n *\/\ninline fun ResultWithDiagnostics.onSuccess(body: (R1) -> ResultWithDiagnostics): ResultWithDiagnostics =\n when (this) {<|endoftext|>"} {"prompt":"for (i in 1..benchmarkSize) {\n val element = alloc()\n element.floatValue = i + sqrt(i.toDouble()).toFloat()\n element.integer = i.toLong()\n sprintf(element.string, \"%d\", i)\n element.contains = containsFunction\n\n elementsList.add(element)\n }","completion":"val summary = elementsList.map { multiplyElementS(it.readValue(), (0..10).random()) }\n .reduce { acc, it -> sumElementSPtr(acc.ptr, it.ptr)!!.pointed.readValue() }\n val intValue = summary.useContents { integer }\n elementsList.last().contains!!(elementsList.last().ptr, elementsList.first().ptr)<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.testbase\n\nimport java.nio.file.Path\n\nfun Path.applyKotlinCompilerArgsPlugin() {\n applyPlugin(\n \"org.jetbrains.kotlin.test.kotlin-compiler-args-properties\",\n \"org.jetbrains.kotlin:kotlin-compiler-args-properties\",","completion":"\"test_fixes_version\"\n )\n}<|endoftext|>"} {"prompt":"val libraryName = binaryLibrary.libraryFile.nameWithoutExtension.substringAfter(\"lib\")\n val clangResult = compileWithClang(\n clangDistribution = ClangDistribution.Llvm,\n clangMode = clangMode,\n sourceFiles = cSources,\n includeDirectories = includeDirectories,\n outputFile = executableFile,","completion":"libraryDirectories = listOf(binaryLibrary.libraryFile.parentFile),\n libraries = listOf(libraryName),\n additionalClangFlags = getKindSpecificClangFlags(binaryLibrary) + listOf(\"-Wall\", \"-Werror\"),\n ).assertSuccess()\n\n val testExecutable = TestExecutable(\n clangResult.resultingArtifact,<|endoftext|>"} {"prompt":"KotlinTypes.any.makeNullable().toStubIrType(),\n isVararg = true,\n annotations = emptyList()\n )\n }\n return result\n}\n\nprivate class ObjCMethodStubBuilder(\n private val method: ObjCMethod,\n private val container: ObjCContainer,\n private val isDesignatedInitializer: Boolean,","completion":"override val context: StubsBuildingContext,\n) : StubElementBuilder {\n private val isStret: Boolean\n private val stubReturnType: StubType\n val annotations = mutableListOf()\n private val kotlinMethodParameters: List\n private val external: Boolean\n private val receiver: ReceiverParameterStub?<|endoftext|>"} {"prompt":"public static Sub sub;\n\n public static Collection subs;\n public static Collection supers;\n}\n\n\/\/ FILE: k.kt\n\nimport p.*\n\nfun test() {\n val col = if (1 < 2) Other.subs else Other.supers\n col.foo()\n}\n\nfun Collection.foo(): T = null!!","completion":"fun listOf(t: T): List = null!!<|endoftext|>"} {"prompt":"get() = classId ?: ClassId(containingPackage() ?: FqName.ROOT, FqName.topLevel(this.name), isLocal = true)\n\ninternal fun ClassDescriptor.getSupertypesWithAny(): Collection {\n val supertypes = typeConstructor.supertypes\n if (isInterfaceLike) {\n return supertypes\n }","completion":"val hasClassSupertype = supertypes.any { (it.constructor.declarationDescriptor as? ClassDescriptor)?.kind == ClassKind.CLASS }\n return if (hasClassSupertype) supertypes else listOf(builtIns.anyType) + supertypes\n}\n\n\ninternal fun CallableMemberDescriptor.getSymbolPointerSignature(): String {<|endoftext|>"} {"prompt":"secondModifierToken,\n firstModifierToken,\n context\n )\n }\n Compatibility.REVERSE_REDUNDANT -> {\n reporter.reportOn(\n firstModifier.source,\n FirErrors.REDUNDANT_MODIFIER,\n firstModifierToken,\n secondModifierToken,\n context\n )\n }","completion":"Compatibility.DEPRECATED -> {\n reporter.reportOn(\n firstModifier.source,\n FirErrors.DEPRECATED_MODIFIER_PAIR,\n firstModifierToken,\n secondModifierToken,\n context\n )\n reporter.reportOn(\n secondModifier.source,\n FirErrors.DEPRECATED_MODIFIER_PAIR,<|endoftext|>"} {"prompt":"val ref = E::entries\n val refType: (E) -> Int = E::entries","completion":"val refTypeWithAnyExpectedType: Any = E::entries\n}<|endoftext|>"} {"prompt":"if (oldProperty.parentAsClass.visibility == DescriptorVisibilities.PRIVATE) {\n context.createJvmIrBuilder(this.symbol).run {\n annotations = filterOutAnnotations(DeprecationResolver.JAVA_DEPRECATED, annotations) +\n irCall(irSymbols.javaLangDeprecatedConstructorWithDeprecatedFlag)\n }\n }\n }","completion":"}\n}\n\n@PhaseDescription(\n name = \"RemapObjectFieldAccesses\",\n description = \"Make IrGetField\/IrSetField to objects' fields point to the static versions\",\n prerequisite = [JvmPropertiesLowering::class],\n)\ninternal class RemapObjectFieldAccesses(val context: JvmBackendContext) : FileLoweringPass, IrElementTransformerVoid() {<|endoftext|>"} {"prompt":"{","completion":"}<|endoftext|>"} {"prompt":"* insn.next.next.next: INVOKESTATIC voidMagicApiCall\n *\/\n private fun isPluginNext(insn: AbstractInsnNode): Boolean {\n val magicInsn = insn.next?.next?.next ?: return false\n return magicInsn is MethodInsnNode && magicInsn.opcode == Opcodes.INVOKESTATIC","completion":"&& magicInsn.owner == pluginIntrinsicsMarkerOwner\n && magicInsn.name == pluginIntrinsicsMarkerMethod\n && magicInsn.desc == pluginIntrinsicsMarkerSignature\n && magicInsn.previous is LdcInsnNode\n }\n\n private inline fun rewriteNextTypeInsn(\n marker: MethodInsnNode,<|endoftext|>"} {"prompt":"\" private val _a = atomic(initial) \\n\" +\n \" public var a: T by _a \\n\" +\n \" ```\\n\" +\n \" * Directly invoke operations on atomic properties, like this:\\n\" +\n \" ```\\n\" +\n \" val top = atomic(null)\\n\" +","completion":"\" top.compareAndSet(null, Node(1)) \/\/ OK\\n\" +\n \" ```\\n\" +\n \" * Refrain from invoking atomic operations on local variables:\\n\" +\n \" ```\\n\" +\n \" val top = atomic(null)\\n\" +\n \" val tmp = top\\n\" +<|endoftext|>"} {"prompt":") = \"$testTarget${if (debuggable) \"-g\" else \"\"}$cacheKind\"\n }\n}\n\nenum class PipelineType(val mutedOption: MutedOption, val compilerFlags: List) {\n DEFAULT(\n MutedOption.DEFAULT,\n emptyList()\n ),\n K1(\n MutedOption.K1,","completion":"listOf(\"-language-version\", \"1.9\")\n ),\n K2(\n MutedOption.K2,\n listOf(\"-language-version\", if (LanguageVersion.LATEST_STABLE.major < 2) \"2.0\" else LanguageVersion.LATEST_STABLE.toString())\n );<|endoftext|>"} {"prompt":"val x = foo(arr = intArrayOf(1, 2, 3))\n val y = bar(arr = uintArrayOf(1u, 2u, 3u))\n val z = baz(arr = ulongArrayOf(1uL, 2uL, 3uL))\n val q = quas(arr = ushortArrayOf(1u, 2u, 3u))","completion":"val w = wex(arr = ubyteArrayOf(1u, 2u, 3u))\n if (x + y.toInt() + z.toInt() + q.toInt() + w.toInt() == 30) {\n return \"OK\"\n }\n return \"Fail\"\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.extensions\n\nimport com.intellij.openapi.project.Project\nimport org.jetbrains.kotlin.types.DefaultTypeAttributeTranslator\nimport org.jetbrains.kotlin.types.TypeAttributeTranslator\nimport org.jetbrains.kotlin.types.extensions.TypeAttributeTranslators","completion":"interface TypeAttributeTranslatorExtension : TypeAttributeTranslator {\n companion object : ProjectExtensionDescriptor(\n \"org.jetbrains.kotlin.extensions.typeAttributeTranslatorExtension\",\n TypeAttributeTranslatorExtension::class.java\n ) {\n val Default = TypeAttributeTranslators(listOf(DefaultTypeAttributeTranslator))<|endoftext|>"} {"prompt":"val invocationKind = if (proto.hasKind())\n proto.kind.toDescriptorInvocationKind() ?: return null\n else\n EventOccurrencesRange.UNKNOWN\n CallsEffectDeclaration(callable, invocationKind)\n }\n }\n }\n\n private fun deserializeExpression(proto: ProtoBuf.Expression): BooleanExpression? {","completion":"val primitiveType = getPrimitiveType(proto)\n val primitiveExpression = extractPrimitiveExpression(proto, primitiveType)\n\n val complexType = getComplexType(proto)\n val childs: MutableList = mutableListOf()\n childs.addIfNotNull(primitiveExpression)\n\n return when (complexType) {<|endoftext|>"} {"prompt":"kotlin.androidTarget()\n\n val commonMain = kotlin.sourceSets.getByName(\"commonMain\")\n val commonTest = kotlin.sourceSets.getByName(\"commonTest\")\n val jvmMain = kotlin.sourceSets.getByName(\"jvmMain\")\n val jvmTest = kotlin.sourceSets.getByName(\"jvmTest\")","completion":"val androidMain = kotlin.sourceSets.getByName(\"androidMain\")\n val androidUnitTest = kotlin.sourceSets.getByName(\"androidUnitTest\")\n val androidInstrumentedTest = kotlin.sourceSets.getByName(\"androidInstrumentedTest\")\n\n project.evaluate()\n\n for (commonSourceSet in listOf(commonMain, commonTest)) {<|endoftext|>"} {"prompt":"for (i in 1 until (n + 1)) {\n val pName = Name.identifier(\"P$i\")\n\n val pSymbol = descriptorFactory.typeParameterDescriptor(index) {\n irFactory.createTypeParameter(\n startOffset = offset,\n endOffset = offset,\n origin = classOrigin,\n name = pName,\n symbol = it,","completion":"variance = Variance.IN_VARIANCE,\n index = index++,\n isReified = false\n )\n }\n val pDeclaration = pSymbol.owner\n\n pDeclaration.superTypes += irBuiltIns.anyNType\n pDeclaration.parent = this\n typeParametersArray.add(pDeclaration)\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.visitors.FirVisitor\nimport org.jetbrains.kotlin.fir.visitors.transformInplace\nimport org.jetbrains.kotlin.fir.visitors.transformSingle\nimport org.jetbrains.kotlin.name.Name","completion":"import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource\nimport kotlin.contracts.ExperimentalContracts\nimport kotlin.contracts.InvocationKind\nimport kotlin.contracts.contract\nimport kotlin.properties.Delegates\n\nclass FirJavaMethod @FirImplementationDetail constructor(\n override val source: KtSourceElement?,<|endoftext|>"} {"prompt":"type = WasmRefNullType(WasmHeapType.Type(context.referenceFunctionType(it.function.symbol))),\n isMutable = false\n )\n }\n\n return WasmStructDeclaration(\n name = name,\n fields = tableFields,\n superType = superType,\n isFinal = isFinal\n )\n }","completion":"private fun createVTable(metadata: ClassMetadata) {\n val klass = metadata.klass\n val symbol = klass.symbol\n val vtableName = \"${klass.fqNameWhenAvailable}.vtable\"\n val vtableStruct = createVirtualTableStruct(\n metadata.virtualMethods,\n vtableName,<|endoftext|>"} {"prompt":"DescriptorRenderer.withOptions { defaultDecompilerRendererOptions() }\n }\n\n override val metadataStubBuilder: KlibMetadataStubBuilder by lazy {\n Fe10KlibMetadataStubBuilder(stubVersion, fileType, serializerProtocol, ::readFileSafely)\n }\n\n override fun getDecompiledText(","completion":"file: FileWithMetadata.Compatible,\n serializerProtocol: SerializerExtensionProtocol,\n flexibleTypeDeserializer: FlexibleTypeDeserializer\n ): DecompiledText {\n return decompiledText(file, serializerProtocol, flexibleTypeDeserializer, renderer)\n }\n}\n\n\/**<|endoftext|>"} {"prompt":"*\n * Rotating by a multiple of [Long.SIZE_BITS] (64) returns the same number, or more generally\n * `number.rotateRight(n) == number.rotateRight(n % 64)`\n *\/\n@SinceKotlin(\"1.6\")\n@WasExperimental(ExperimentalStdlibApi::class)\n@kotlin.internal.InlineOnly","completion":"public actual inline fun Long.rotateRight(bitCount: Int): Long = java.lang.Long.rotateRight(this, bitCount)<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: WASM\n\n\/\/ RUN_THIRD_PARTY_OPTIMIZER\n\/\/ WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 14_030\n\/\/ WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 5_304\n\/\/ WASM_OPT_EXPECTED_OUTPUT_SIZE: 2_936","completion":"\/\/ FILE: test.kt\n\n@JsExport\nfun add(a: Int, b: Int) = a + b\n\n\/\/ FILE: entry.mjs\nimport { add } from \".\/index.mjs\"\n\nconst r = add(2, 3);\nif (r != 5) throw Error(\"Wrong result: \" + r);<|endoftext|>"} {"prompt":"dirtySources.addAll(complementaryFiles)\n caches.platformCache.markDirty(dirtySources)\n caches.inputsCache.removeOutputForSourceFiles(dirtySources)\n\n val lookupTracker = LookupTrackerImpl(getLookupTrackerDelegate())\n val expectActualTracker = ExpectActualTrackerImpl()","completion":"val (sourcesToCompile, removedKotlinSources) = dirtySources.partition { it.exists() && allKotlinSources.contains(it) }\n\n icContext.fragmentContext?.let {\n if (it.dirtySetTouchesNonLeafFragments(sourcesToCompile)) {\n throw RequireRebuildForCorrectnessInKMPException()\n }\n }<|endoftext|>"} {"prompt":"declareByDeclaration: SymbolTableSlice.(D, () -> Symbol, OwnerFactory) -> SymbolOwner,\n crossinline symbolFactory: (IdSignature?) -> Symbol,\n noinline ownerFactory: OwnerFactory,\n specificCalculateSignature: (D) -> IdSignature?\n ): SymbolOwner {","completion":"return when (val signature = specificCalculateSignature(declaration)) {\n null -> slice.declareByDeclaration(declaration, { symbolFactory(signature) }, ownerFactory)\n else -> table.declareBySignature(signature, { symbolFactory(signature) }, ownerFactory)\n }\n }<|endoftext|>"} {"prompt":"var isReceiver = true\n var hasQuestionMarkAtLHS = false\n var firReceiverExpression: FirExpression? = null\n lateinit var namedReference: FirNamedReference\n callableReferenceExpression.forEachChildren {\n when (it.tokenType) {\n COLONCOLON -> isReceiver = false\n QUEST -> hasQuestionMarkAtLHS = true","completion":"else -> if (it.isExpression()) {\n if (isReceiver) {\n firReceiverExpression = getAsFirExpression(it, \"Incorrect receiver expression\")\n } else {\n namedReference = createSimpleNamedReference(it.toFirSourceElement(), it)\n }\n }\n }\n }\n\n return buildCallableReferenceAccess {<|endoftext|>"} {"prompt":"val declaration = declarationDescriptor\n if (declaration == null) {\n val errorArguments = arguments.map { TypeProjectionImpl(it as KotlinType) }\n return ErrorUtils.createErrorTypeWithArguments(ErrorTypeKind.UNRESOLVED_TYPE, errorArguments, this.toString())\n }","completion":"val substitutions = LinkedHashMap(parameters.size)\n for (index in parameters.indices) {\n val parameterTypeConstructor = parameters[index].typeConstructor\n substitutions[parameterTypeConstructor] = TypeProjectionImpl(arguments[index] as KotlinType)\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.symbols.psiSafe\nimport org.jetbrains.kotlin.psi.KtDeclaration\nimport org.jetbrains.kotlin.sir.SirCallableKind\n\ninternal val KtCallableSymbol.sirCallableKind: SirCallableKind\n get() = when (symbolKind) {","completion":"KtSymbolKind.TOP_LEVEL -> {\n val isRootPackage = callableIdIfNonLocal?.packageName?.isRoot\n if (isRootPackage == true) {\n SirCallableKind.FUNCTION\n } else {\n SirCallableKind.STATIC_METHOD\n }\n }<|endoftext|>"} {"prompt":"constructor.signature?.let {\n appendCommentedLine(\"signature: \", it)\n }\n }\n\n override fun Printer.appendSignatures(function: KmFunction) {\n function.signature?.let {\n appendCommentedLine(\"signature: \", it)\n }\n }\n\n override fun Printer.appendSignatures(property: KmProperty) {","completion":"property.fieldSignature?.let {\n appendCommentedLine(\"field: \", it)\n }\n property.getterSignature?.let {\n appendCommentedLine(\"getter: \", it)\n }\n property.setterSignature?.let {\n appendCommentedLine(\"setter: \", it)\n }\n }<|endoftext|>"} {"prompt":"}\n\n @Test\n fun flatten() {\n assertEquals(listOf(0, 1, 2, 3, 0, 1, 2, 3), data.map { 0..it.length }.flatten())\n }\n\n @Test\n fun mapIndexed() {\n val shortened = data.mapIndexed { index, value -> value.substring(0..index) }","completion":"assertEquals(2, shortened.size)\n assertEquals(listOf(\"f\", \"ba\"), shortened)\n }\n\n @Test\n fun withIndex() {\n val indexed = data.withIndex().map { it.value.substring(0..it.index) }\n assertEquals(2, indexed.size)\n assertEquals(listOf(\"f\", \"ba\"), indexed)\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.symbols.IrReturnableBlockSymbol\nimport org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol\nimport org.jetbrains.kotlin.ir.symbols.impl.IrAnonymousInitializerSymbolImpl\nimport org.jetbrains.kotlin.ir.types.IrSimpleType","completion":"import org.jetbrains.kotlin.ir.types.IrType\nimport org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid\nimport org.jetbrains.kotlin.ir.visitors.acceptVoid\nimport org.jetbrains.kotlin.utils.memoryOptimizedMap<|endoftext|>"} {"prompt":"class ComplexExternalDeclarationsUsageLowering(val context: WasmBackendContext) : FileLoweringPass {\n private val nestedExternalToNewTopLevelFunctions = context.mapping.wasmNestedExternalToNewTopLevelFunction\n private val objectToGetInstanceFunctions = context.mapping.wasmExternalObjectToGetInstanceFunction\n\n override fun lower(irFile: IrFile) {","completion":"irFile.acceptVoid(declarationTransformer)\n }\n\n private val declarationTransformer = object : IrElementVisitorVoid {\n override fun visitElement(element: IrElement) {\n element.acceptChildrenVoid(this)\n }\n\n override fun visitFile(declaration: IrFile) {\n process(declaration)\n }<|endoftext|>"} {"prompt":"* (See `KotlinMultiplatformExtension.applyDefaultHierarchyTemplate`):\n * ```kotlin\n * kotlin {\n * applyHierarchyTemplate(KotlinHierarchyTemplate.default)\n * iosX64()\n * iosArm64()\n * iosSimulatorArm64()\n * linuxX64()\n * \/\/ ...","completion":"* }\n * ```\n *\/\n fun applyHierarchyTemplate(template: KotlinHierarchyTemplate)\n\n \/**\n * Similar to [applyHierarchyTemplate], but allows extension of the provided template.\n *\n * *Examples:*\n *\n * - Add custom groups (Experimental) to additionally share code between Linux and Apple (unixLike):\n *<|endoftext|>"} {"prompt":"if (!(x !is Class.NestedClass?) || x is Class.NestedClass? || x !is Class.NestedClass?) {\n if (!!(x !is Class.NestedClass?)) {\n x","completion":"x.prop_4\n }\n }\n}\n\n\/\/ TESTCASE NUMBER: 6\nfun case_6(x: Any?) {<|endoftext|>"} {"prompt":"inner class InterfaceToAbstractClassInnerImpl : InterfaceToAbstractClass\n}\nclass InterfaceToOpenClassContainer {\n open class InterfaceToOpenClassImpl : InterfaceToOpenClass\n class InterfaceToOpenClassImpl2 : InterfaceToOpenClassImpl()\n inner class InterfaceToOpenClassInnerImpl : InterfaceToOpenClass\n}\nclass InterfaceToFinalClassContainer {\n open class InterfaceToFinalClassImpl : InterfaceToFinalClass","completion":"class InterfaceToFinalClassImpl2 : InterfaceToFinalClassImpl()\n inner class InterfaceToFinalClassInnerImpl : InterfaceToFinalClass\n}\n\nfun getInterfaceToAbstractClassImpl() = InterfaceToAbstractClassImpl()\ninline fun getInterfaceToAbstractClassImplInline() = InterfaceToAbstractClassImpl()\nfun getInterfaceToAbstractClassImplAsAny(): Any = InterfaceToAbstractClassImpl()<|endoftext|>"} {"prompt":"assertFalse(eqFloatQFloatQ(null, 1.toFloat()))\n assertTrue(eqFloatQFloatQ(null, null))\n assertTrue(eqFloatQFloatQ(null, undefined))\n assertFalse(eqFloatQFloatQ(undefined, 0.toFloat()))\n assertFalse(eqFloatQFloatQ(undefined, 1.toFloat()))","completion":"assertTrue(eqFloatQFloatQ(undefined, null))\n assertTrue(eqFloatQFloatQ(undefined, undefined))\n assertTrue(eqFloatDouble(0.toFloat(), 0.toDouble()))\n assertFalse(eqFloatDouble(0.toFloat(), 1.toDouble()))\n assertFalse(eqFloatDouble(1.toFloat(), 0.toDouble()))<|endoftext|>"} {"prompt":"val functionType = functionSymbol.fir.returnTypeRef.probablyJavaTypeRefToConeType()\n functionType.isSubtypeOf(propertyType, session)\n }\n gettersAreSame\n }\n\n if (getterDescriptorMatches && this.isVal) return true","completion":"val setterDescriptorMatches = accessorDescriptors.any { (_, setterJvmDescriptor) ->\n currentJvmDescriptor == setterJvmDescriptor\n }\n\n if (!setterDescriptorMatches) return false\n\n val (getterOverride, setterOverride) = when (getterDescriptorMatches) {<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_VARIABLE\n\/\/ FILE: A.java\npublic class A {\n static byte foo = 1;\n static int bar = 2;\n}\n\n\/\/ FILE: B.java\npublic class B extends A {}\n\n\/\/ FILE: C.java\npublic class C {\n static long bar = 3;\n}\n\n\/\/ FILE: 1.kt","completion":"import A.foo\nimport B.bar\n\nclass E: A() {\n init {\n foo\n bar\n }\n}\n\nclass F: B() {\n init {\n foo\n bar\n }\n}\n\n\/\/ FILE: 2.kt\nimport C.bar\n\nclass Z: A() {\n init {\n val a: Int = bar\n }\n}<|endoftext|>"} {"prompt":"binaryOperation(SHORT, SHORT, \"plus\", { a, b -> a.plus(b) }, { a, b -> a.add(b) }),\n binaryOperation(SHORT, BYTE, \"div\", { a, b -> a.div(b) }, { a, b -> a.divide(b) }),","completion":"binaryOperation(SHORT, DOUBLE, \"div\", { a, b -> a.div(b) }, emptyBinaryFun),\n binaryOperation(SHORT, FLOAT, \"div\", { a, b -> a.div(b) }, emptyBinaryFun),<|endoftext|>"} {"prompt":"* Skip reachability check, can lead to mysterious crashes in an application.\n * USE UNSAFE MODE ONLY IF ABSOLUTELY SURE WHAT YOU'RE DOING!!!\n *\/\n UNSAFE(1)\n}\n\n\/**\n * Detached object graph encapsulates transferrable detached subgraph which cannot be accessed\n * externally, until it is attached with the [attach] extension function.\n *\/\n@Frozen","completion":"@FreezingIsDeprecated\n@ObsoleteWorkersApi\npublic class DetachedObjectGraph internal constructor(pointer: NativePtr) {\n @PublishedApi\n internal val stable: AtomicNativePtr = AtomicNativePtr(pointer)\n\n \/**\n * Creates stable pointer to object, ensuring associated object subgraph is disjoint in specified mode\n * ([TransferMode.SAFE] by default).<|endoftext|>"} {"prompt":"continuationBlock(context.ir.symbols.throwable.owner.defaultType, endLocationInfoFromScope()) {\n genHandler(it.value)\n }\n }\n }\n\n private fun endLocationInfoFromScope(): LocationInfo? {\n val functionScope = currentCodeContext.functionScope()\n val irFunction = functionScope?.let {\n (functionScope as FunctionScope).declaration","completion":"}\n return irFunction?.endLocation\n }\n\n private fun FunctionGenerationContext.jumpToHandler(exception: LLVMValueRef) {\n jump(handler, exception)\n }\n\n \/**\n * Generates the LLVM `landingpad` that catches C++ exception with type `KotlinException`,\n * unwraps the Kotlin exception object and jumps to [handler].\n *<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: -OverloadResolutionByLambdaReturnType\n\/\/ ALLOW_KOTLIN_PACKAGE\n\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION\n\/\/ ISSUE: KT-11265\n\n\/\/ FILE: OverloadResolutionByLambdaReturnType.kt\n\npackage kotlin","completion":"annotation class OverloadResolutionByLambdaReturnType\n\n\/\/ FILE: main.kt\n\nimport kotlin.OverloadResolutionByLambdaReturnType\n\n@OverloadResolutionByLambdaReturnType\nfun create(f: (Int) -> Int): Int = 1\nfun create(f: (Int) -> String): String = \"\"\n\nfun takeString(s: String) {}<|endoftext|>"} {"prompt":"override fun bar(): X = X('K')\n}\n\nfun box(): String {\n val t: IFoo = TestX()\n val tFoo = t.foo()\n if (tFoo !is X) {\n throw AssertionError(\"X expected: $tFoo\")\n }","completion":"return (t.foo() as X).x.toString() + t.bar().x.toString()\n}<|endoftext|>"} {"prompt":"if (w != null || this.w != null) this.w.funNullableAny()","completion":"if (w != null || this.w != null) this.w\n\n s = null<|endoftext|>"} {"prompt":"\/** Subtracts the other value from this value. *\/\n @kotlin.internal.InlineOnly\n public inline operator fun minus(other: UShort): UInt = this.minus(other.toUInt())\n \/** Subtracts the other value from this value. *\/\n @kotlin.internal.InlineOnly","completion":"public inline operator fun minus(other: UInt): UInt = UInt(this.data.minus(other.data))\n \/** Subtracts the other value from this value. *\/\n @kotlin.internal.InlineOnly\n public inline operator fun minus(other: ULong): ULong = this.toULong().minus(other)\n\n \/** Multiplies this value by the other value. *\/<|endoftext|>"} {"prompt":"package kotlin.reflect.jvm.internal.calls\n\nimport java.lang.reflect.Type\n\ninternal object ThrowingCaller : Caller {\n override val member: Nothing?\n get() = null\n\n override val parameterTypes: List\n get() = emptyList()\n\n override val returnType: Type\n get() = Void.TYPE","completion":"override fun call(args: Array<*>): Any? {\n throw UnsupportedOperationException(\"call\/callBy are not supported for this declaration.\")\n }\n}<|endoftext|>"} {"prompt":"printer.println()\n }\n printer.popIndent()\n printer.println(\">\")\n }\n\n override fun visitConditionalEffectDeclaration(conditionalEffect: KtConditionalEffectDeclaration, data: Nothing?) {\n conditionalEffect.effect.accept(this, data)\n printer.print(\" -> \")","completion":"conditionalEffect.condition.accept(this, data)\n }\n\n override fun visitReturnsEffectDeclaration(returnsEffect: KtReturnsEffectDeclaration, data: Nothing?) {\n printer.print(\"Returns(\")\n returnsEffect.value.accept(this, data)\n printer.print(\")\")\n }<|endoftext|>"} {"prompt":"environment.getSourceFiles(),\n irProviders = listOf(irDeserializer),\n linkerExtensions = pluginExtensions,\n )\n\n irDeserializer.postProcess(inOrAfterLinkageStep = true)\n\n \/\/ Enable lazy IR genration for newly-created symbols inside BE\n stubGenerator.unboundSymbolGeneration = true","completion":"messageLogger.checkNoUnboundSymbols(symbolTable, \"at the end of IR linkage process\")\n\n mainModule.acceptVoid(ManglerChecker(KonanManglerIr, Ir2DescriptorManglerAdapter(KonanManglerDesc)))\n\n val modules = if (isProducingLibrary) emptyMap() else (irDeserializer as KonanIrLinker).modules<|endoftext|>"} {"prompt":"* The following restrictions are imposed:\n *\n * - The only allowed non-time designator is days (`D`). `Y` (years), `W` (weeks), and `M` (months) are not supported.\n * - Day is considered to be exactly 24 hours (24-hour clock time scale).\n * - Alternative week-based representation `[\"P\"][number][\"W\"]` is not supported.","completion":"*\n * @throws IllegalArgumentException if the string doesn't represent a duration in ISO-8601 format.\n * @sample samples.time.Durations.parseIsoString\n *\/\n public fun parseIsoString(value: String): Duration = try {\n parseDuration(value, strictIso = true)\n } catch (e: IllegalArgumentException) {<|endoftext|>"} {"prompt":"* but when it comes to the platform originated member, it's more correct to use platform specific rules, too\n *\n * Initial reason for that checker introduction is smart-cast to raw type:\n * it makes initial type's member incompatible with raw-type's one when regular overridability rules are used,\n * while in Java class they would be treated equally.\n *\/","completion":"class FirIntersectionScopeOverrideChecker(session: FirSession) : FirOverrideChecker {\n private val standardOverrideChecker = session.firOverrideChecker\n private val platformSpecificOverridabilityRules = session.platformSpecificOverridabilityRules\n\n override fun isOverriddenFunction(overrideCandidate: FirSimpleFunction, baseDeclaration: FirSimpleFunction): Boolean {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType\nimport org.jetbrains.kotlin.gradle.plugin.ide.IdeDependencyResolver\nimport org.jetbrains.kotlin.gradle.plugin.usageByName\nimport org.jetbrains.kotlin.gradle.utils.named","completion":"import org.jetbrains.kotlin.gradle.utils.setAttribute\n\n\/**\n * Resolves dependencies of jvm and Android source sets from the perspective jvm\n *\/\ninternal fun IdeJvmAndAndroidPlatformBinaryDependencyResolver(project: Project): IdeDependencyResolver =\n IdeBinaryDependencyResolver(<|endoftext|>"} {"prompt":"if (value_5.case_6_4(value_6) == null) {\n println(value_5.inv())","completion":"println(value_6.toByte())\n }\n}\n\n\/\/ TESTCASE NUMBER: 7<|endoftext|>"} {"prompt":"fun call0(f: (String) -> String, x: String): String = f(x)\nfun call1(f: (String, String) -> String, x: String, y: String): String = f(x, y)\nfun call2(f: (String, String, String) -> String, x: String, y: String, z: String): String = f(x, y, z)\n\nfun box(): String {","completion":"var s = \"1\"\n\n fun foo(x: String, y: String = \"5\", z: String = \"4\"): String = s + x + y + z\n\n val r = call1(::foo, \"2\", \"3\")\n if (r != \"1234\") return \"FAIL $r\"<|endoftext|>"} {"prompt":"val f: Boolean = true\nprivate fun doUpdateRegularTasks() {\n try {\n while (f) {\n val xmlText = getText()\n if (xmlText == null) {}\n else {\n xmlText.value = 0 \/\/ !!!\n }\n }","completion":"}\n finally {\n fun execute() {}\n }\n}<|endoftext|>"} {"prompt":"suspend fun fooReturnLong(x: T): Long = 1L\nsuspend fun Int.suspendToString(): String = toString()\n\nsuspend inline fun check(x: T, y: R, f: suspend (T) -> R, tType: String, rType: String) {\n assertEquals(tType, T::class.simpleName)","completion":"assertEquals(rType, R::class.simpleName)\n}\n\nsuspend inline fun check(f: suspend (T) -> R, g: suspend (T) -> R, tType: String, rType: String) {\n assertEquals(tType, T::class.simpleName)\n assertEquals(rType, R::class.simpleName)\n}<|endoftext|>"} {"prompt":"open class AChar(vararg val x: Char)\nclass BChar : AChar()\n\nopen class ALong(vararg val x: Long)\nclass BLong : ALong()\n\nopen class AFloat(vararg val x: Float)\nclass BFloat : AFloat()\n\nopen class ADouble(vararg val x: Double)\nclass BDouble : ADouble()","completion":"open class AUByte(vararg val x: UByte)\nclass BUByte : AUByte()\n\nopen class AUShort(vararg val x: UShort)\nclass BUShort : AUShort()\n\nopen class AUInt(vararg val x: UInt)\nclass BUInt : AUInt()\n\nopen class AULong(vararg val x: ULong)\nclass BULong : AULong()<|endoftext|>"} {"prompt":"@Test\n fun readDifferentOffsetAndLength() {\n val repeat = 10_000\n val symbols = \"Zm9vYmFy\".repeat(repeat) + \"Zm8=\"\n val expected = \"foobar\".repeat(repeat) + \"fo\"\n\n val bytes = ByteArray(expected.length)\n\n symbols.byteInputStream().decodingWith(Base64).use { input ->","completion":"var read = 0\n repeat(6) {\n bytes[read++] = input.read().toByte()\n }\n\n var toRead = 1\n while (read < bytes.size) {\n val length = minOf(toRead, bytes.size - read)\n val result = input.read(bytes, read, length)\n\n assertEquals(length, result)\n\n read += result<|endoftext|>"} {"prompt":"}\n *\/\n\n\n @Test fun split() = withOneCharSequenceArg { arg1 ->\n operator fun String.unaryPlus(): CharSequence = arg1(this)\n\n assertEquals(listOf(\"\"), (+\"\").split(\";\"))\n assertEquals(listOf(\"test\"), (+\"test\").split(*charArrayOf()), \"empty list of delimiters, none matched -> entire string returned\")","completion":"assertEquals(listOf(\"test\"), (+\"test\").split(*arrayOf()), \"empty list of delimiters, none matched -> entire string returned\")\n\n assertEquals(listOf(\"abc\", \"def\", \"123;456\"), (+\"abc;def,123;456\").split(';', ',', limit = 3))<|endoftext|>"} {"prompt":"require(cBoolType != null) { renderCompilerError(location) }\n BooleanValuePassing(cBoolType, irBuiltIns)\n }\n\n type.isByte() -> TrivialValuePassing(irBuiltIns.byteType, CTypes.signedChar)\n type.isShort() -> TrivialValuePassing(irBuiltIns.shortType, CTypes.short)","completion":"type.isInt() -> TrivialValuePassing(irBuiltIns.intType, CTypes.int)\n type.isLong() -> TrivialValuePassing(irBuiltIns.longType, CTypes.longLong)\n type.isFloat() -> TrivialValuePassing(irBuiltIns.floatType, CTypes.float)<|endoftext|>"} {"prompt":"if (a.x != null === true) {","completion":"if (a.x !== null === true !is Boolean == true) {<|endoftext|>"} {"prompt":"try {\n if (restricted.setReadable(false)) {\n if (File(basedir, \"7.txt\").setReadable(false)) {\n assertFalse(basedir.deleteRecursively(), \"Expected incomplete recursive deletion.\")\n restricted.setReadable(true)\n File(basedir, \"7.txt\").setReadable(true)\n var i = 0","completion":"for (file in basedir.walkTopDown()) {\n i++\n }\n assertEquals(6, i)\n }\n }\n } finally {\n restricted.setReadable(true)\n File(basedir, \"7.txt\").setReadable(true)\n basedir.deleteRecursively()\n }\n }<|endoftext|>"} {"prompt":"if (e != null || this.e != null) this.e.propNullableAny","completion":"if (e != null || this.e != null) this.e.funT()<|endoftext|>"} {"prompt":"&& receiver?.canInline(visibleScopes) != false\n }\n is IrCall -> {\n \/\/ Same applies to reads of properties with default getters, but non-final properties may be overridden by `var`s:\n val callee = symbol.owner\n callee.isFinalDefaultValGetter && callee.fileParentOrNull.let { it != null && it in visibleScopes }","completion":"&& dispatchReceiver?.canInline(visibleScopes) != false\n && extensionReceiver?.canInline(visibleScopes) != false\n }\n else -> {\n \/\/ Constants and singleton object accesses are always stable:\n isTrivial()\n }\n }\n\n private val IrSimpleFunction.isFinalDefaultValGetter: Boolean<|endoftext|>"} {"prompt":"element: FirDeclaration,\n containingMemberDeclaration: FirMemberDeclaration?,\n context: CheckerContext,\n reporter: DiagnosticReporter\n ) = checkElementAndReport(\n element,\n element.implicitVisibility(context),\n containingMemberDeclaration,\n context,\n reporter\n )\n\n private fun checkElementAndReport(\n element: FirDeclaration,","completion":"implicitVisibility: Visibility,\n containingMemberDeclaration: FirMemberDeclaration?,\n context: CheckerContext,\n reporter: DiagnosticReporter\n ) {\n if (element.source?.kind is KtFakeSourceElementKind) {\n return\n }\n\n if (element !is FirMemberDeclaration) {\n return\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.DescriptorUtils\nimport org.jetbrains.kotlin.resolve.constants.*\nimport org.jetbrains.kotlin.types.error.ErrorUtils\nimport org.jetbrains.kotlin.types.KotlinType","completion":"class AnnotationDeserializer(private val module: ModuleDescriptor, private val notFoundClasses: NotFoundClasses) {\n private val builtIns: KotlinBuiltIns\n get() = module.builtIns\n\n fun deserializeAnnotation(proto: Annotation, nameResolver: NameResolver): AnnotationDescriptor {<|endoftext|>"} {"prompt":"PARAGRAPH_SEPARATOR(Character.DIRECTIONALITY_PARAGRAPH_SEPARATOR.toInt()),\n\n \/**\n * Neutral bidirectional character type \"S\" in the Unicode specification.\n *\/\n SEGMENT_SEPARATOR(Character.DIRECTIONALITY_SEGMENT_SEPARATOR.toInt()),\n\n \/**","completion":"* Neutral bidirectional character type \"WS\" in the Unicode specification.\n *\/\n WHITESPACE(Character.DIRECTIONALITY_WHITESPACE.toInt()),\n\n \/**\n * Neutral bidirectional character type \"ON\" in the Unicode specification.\n *\/\n OTHER_NEUTRALS(Character.DIRECTIONALITY_OTHER_NEUTRALS.toInt()),<|endoftext|>"} {"prompt":"return dependenciesToAdd[declaration.name]?.toList() ?: listOf()\n }\n\n fun getNamedDeclarationsToAdd(fileName: String): List {\n return namedDeclarationsToAdd[fileName]?.toList() ?: listOf()\n }\n\n private fun processUnionType(unionType: IDLUnionTypeDeclaration) {","completion":"val newDependenciesToAdd: MutableMap> = mutableMapOf()\n for (member in unionType.unionMembers) {\n when (member) {\n is IDLUnionTypeDeclaration -> {\n if (member.name !in resolvedUnionTypes && member.name !in failedToResolveUnionTypes) {\n processUnionType(member)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.expressions.FirAnnotation\nimport org.jetbrains.kotlin.fir.expressions.FirExpression\nimport org.jetbrains.kotlin.fir.expressions.FirPropertyAccessExpression\nimport org.jetbrains.kotlin.fir.expressions.UnresolvedExpressionTypeAccess","completion":"import org.jetbrains.kotlin.fir.references.FirReference\nimport org.jetbrains.kotlin.fir.types.ConeKotlinType\nimport org.jetbrains.kotlin.fir.types.FirTypeProjection\nimport org.jetbrains.kotlin.fir.visitors.FirTransformer<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.backend.js.generateModuleFragmentWithPlugins\nimport org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsIrLinker\nimport org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsManglerDesc","completion":"import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsManglerIr\nimport org.jetbrains.kotlin.ir.declarations.IrFactory\nimport org.jetbrains.kotlin.ir.declarations.IrModuleFragment\nimport org.jetbrains.kotlin.ir.linkage.partial.partialLinkageConfig<|endoftext|>"} {"prompt":"private fun FirSymbolProvider.findPropertyCandidates(property: KtProperty): List =\n findCallableCandidates(property, property.isTopLevel).filterIsInstance()\n\n private fun FirSymbolProvider.findCallableCandidates(\n declaration: KtCallableDeclaration,\n isTopLevel: Boolean,","completion":"): List> {\n val shortName = declaration.nameAsSafeName\n\n if (isTopLevel) {\n val packageFqName = declaration.containingKtFile.packageFqName\n\n @OptIn(FirSymbolProviderInternals::class)\n return when (this) {\n is LLFirModuleWithDependenciesSymbolProvider -> buildList {<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_VARIABLE\n\nfun myRun(b: () -> R): R = b()\n\nfun materialize(): T = TODO()\n\nfun foo(x: String?) {\n val r = myRun {\n val y = x ?: return@myRun materialize()\n y.length\n }\n\n r.minus(1)","completion":"}<|endoftext|>"} {"prompt":"* The result is either zero or has the same sign as the _divisor_ and has the absolute value less than the absolute value of the divisor.\n *\/\n@SinceKotlin(\"1.5\")\n@kotlin.internal.InlineOnly\n@kotlin.internal.IntrinsicConstEvaluation\npublic inline fun Byte.mod(other: Long): Long =","completion":"this.toLong().mod(other)\n\n\/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. *\/\n@SinceKotlin(\"1.5\")\n@kotlin.internal.InlineOnly\n@kotlin.internal.IntrinsicConstEvaluation\npublic inline fun Short.floorDiv(other: Byte): Int =<|endoftext|>"} {"prompt":"public inline fun kotlin.UIntArray.foldRightIndexed(initial: R, operation: (index: kotlin.Int, kotlin.UInt, acc: R) -> R): R\n\n@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly","completion":"public inline fun kotlin.ULongArray.foldRightIndexed(initial: R, operation: (index: kotlin.Int, kotlin.ULong, acc: R) -> R): R\n\n@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"\/\/ FILE: foo\/Super.java\npackage foo\n\npublic abstract class Super {\n protected abstract String getName();\n protected abstract void setName(String s);\n\n protected abstract String getName2();\n protected abstract void setName2(String s);\n\n protected abstract void doSomething();\n protected abstract void doSomething2();\n}\n\n\/\/ FILE: bar\/Sub.kt\npackage bar","completion":"abstract class Sub: foo.Super() {\n abstract override fun getName(): String\n abstract override fun setName(s: String)\n abstract override fun doSomething()\n}\n\n\/\/ FILE: foo\/test.kt\npackage foo\n\nfun test(s: bar.Sub) {\n s.name<|endoftext|>"} {"prompt":"assert(rangeLiteral.isLowInclusive && rangeLiteral.isHighInclusive) { \"Floating point range literal bounds should be inclusive\" }\n }\n\n private val isNotIn = operatorReference.getReferencedNameElementType() == KtTokens.NOT_IN\n\n override fun generate(argument: StackValue): BranchedValue =","completion":"gen(argument).let { if (isNotIn) Invert(it) else it }\n\n private fun gen(argument: StackValue): BranchedValue =\n object : BranchedValue(argument, null, comparisonGenerator.comparedType, Opcodes.IFEQ) {\n override fun condJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {<|endoftext|>"} {"prompt":"warnAboutTargetFromPresetDeprecation()\n return targetFromPresetInternal(\n preset = preset,\n name = name,\n configure = configure,\n )\n }\n\n @DeprecatedTargetPresetApi\n @Deprecated(\n KotlinToolingDiagnostics.TargetFromPreset.DEPRECATION_MESSAGE,\n level = DeprecationLevel.WARNING","completion":")\n fun targetFromPreset(\n preset: KotlinTargetPreset,\n name: String,\n configure: Action,\n ): T {\n warnAboutTargetFromPresetDeprecation()\n return targetFromPresetInternal(\n preset = preset,\n name = name,\n configure = configure,\n )\n }<|endoftext|>"} {"prompt":"useSiteSession,\n scopeSession,\n memberRequiredPhase = FirResolvePhase.TYPES,\n )\n\n fun getStaticScope() = JavaScopeProvider.getStaticScope(firJavaClass, useSiteSession, scopeSession)\n\n val firScope = when (kind) {","completion":"\/\/ `FirExcludingNonInnerClassesScope` is a workaround for non-static member scopes containing static classes (see KT-61900).\n DeclaredMemberScopeKind.NON_STATIC -> FirExcludingNonInnerClassesScope(getBaseUseSiteScope())\n\n DeclaredMemberScopeKind.STATIC -> getStaticScope() ?: return null<|endoftext|>"} {"prompt":"public fun maxOf(a: kotlin.ULong, b: kotlin.ULong): kotlin.ULong\n\n@kotlin.SinceKotlin(version = \"1.5\")\n@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class})\n@kotlin.internal.InlineOnly","completion":"public inline fun maxOf(a: kotlin.ULong, b: kotlin.ULong, c: kotlin.ULong): kotlin.ULong\n\n@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.ExperimentalUnsignedTypes<|endoftext|>"} {"prompt":"fun case_2() {\n val x = object> { }\n}\n\nfun case_3() {","completion":"val x = object where T :<|endoftext|>"} {"prompt":"\/\/ Do not report NAME_SHADOWING on lambda destructured parameter, the same way as for common parameters\n foo { (a, b) ->\n a checkType { _() }\n b checkType { _() }\n }\n\n foo { (c, d) ->\n c checkType { _() }\n d checkType { _() }","completion":"foo { (a, c) ->\n a checkType { _() }\n c checkType { _() }\n d checkType { _() }\n }\n }\n}<|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-53752\n\/\/ INFERENCE_HELPERS\n\ninterface A\ninterface B {\n fun fooB(x: Int): String\n}\n\nclass Foo\n\nfun test(ab: A) {\n if (ab is B) {\n var z = id(ab) \/\/ materialize smartcast","completion":"z = Foo() \/\/ unsafe assignment\n z.fooB(1)\n }\n}<|endoftext|>"} {"prompt":"val RENDERBUFFER_INTERNAL_FORMAT: Int\n val RENDERBUFFER_RED_SIZE: Int\n val RENDERBUFFER_GREEN_SIZE: Int\n val RENDERBUFFER_BLUE_SIZE: Int\n val RENDERBUFFER_ALPHA_SIZE: Int\n val RENDERBUFFER_DEPTH_SIZE: Int","completion":"val RENDERBUFFER_STENCIL_SIZE: Int\n val FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: Int\n val FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: Int\n val FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: Int\n val FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: Int<|endoftext|>"} {"prompt":"operator fun get(x: Any, y: Any, z: Any): Any {\n return x\n }\n}\n\nclass C() {\n operator fun get(function: () -> Any): Any {\n return function()\n }\n}\n\nfun box() : String{\n val a = A1(4444)\n val c = a [C()[{ 1 + 900 }]]","completion":"val x = a[a[a[a[B()[A1(100500)[ C()[{ 1 + 900 }] ], 'c', false]]]]]\n\n if (c == 901 && x == 901)\n return \"OK\"\n return \"NOK\"\n}<|endoftext|>"} {"prompt":"private val IrClass.needsOfBoxParameter by context.mapping.esClassWhichNeedBoxParameters\n\n override fun lower(irBody: IrBody, container: IrDeclaration) {\n if (!context.es6mode) return\n\n val containerFunction = container as? IrFunction\n\n val shouldRemoveBoxRelatedDeclarationsAndStatements =","completion":"containerFunction?.isEs6ConstructorReplacement == true && !containerFunction.parentAsClass.requiredToHaveBoxParameter()\n\n if (containerFunction != null && shouldRemoveBoxRelatedDeclarationsAndStatements && irBody is IrBlockBody) {\n containerFunction.valueParameters = containerFunction.valueParameters.memoryOptimizedFilterNot { it.isBoxParameter }\n }<|endoftext|>"} {"prompt":"group = BenchmarkingPlugin.BENCHMARKING_GROUP\n description = \"Builds the benchmarking report for Kotlin\/Native.\"\n doLast { println(\"JVM run isn't supported\") }\n jvmRun.finalizedBy(this)\n }\n }\n \n override fun apply(target: Project): Unit = with(target) {\n addTimeListener(this)","completion":"val benchmarkExtension = extensions.create(\n COMPILE_BENCHMARK_EXTENSION_NAME,\n CompileBenchmarkExtension::class.java,\n this\n )\n\n \/\/ Create tasks.\n configureUtilityTasks()\n configureKonanRun(benchmarkExtension)\n configureJvmRun()\n }\n\n companion object {<|endoftext|>"} {"prompt":"internal class HashMapValuesDefault(private val backingMap: AbstractMutableMap) : AbstractMutableCollection() {\n override fun add(element: V): Boolean = throw UnsupportedOperationException(\"Add is not supported on values\")\n override fun clear() = backingMap.clear()\n\n override operator fun contains(element: V): Boolean = backingMap.containsValue(element)","completion":"override operator fun iterator(): MutableIterator {\n val entryIterator = backingMap.entries.iterator()\n return object : MutableIterator {\n override fun hasNext(): Boolean = entryIterator.hasNext()\n override fun next(): V = entryIterator.next().value\n override fun remove() = entryIterator.remove()\n }\n }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.low.level.api.fir.lazy.resolve\n\nimport org.jetbrains.kotlin.analysis.low.level.api.fir.util.forEachDeclaration\nimport org.jetbrains.kotlin.fir.declarations.FirFile","completion":"import org.jetbrains.kotlin.fir.declarations.FirRegularClass\nimport org.jetbrains.kotlin.fir.declarations.FirScript\n\n\/**\n * In opposite to [NonLocalAnnotationVisitor] processes not only the target declaration,\n * but also its nested declarations.\n *\n * @see NonLocalAnnotationVisitor\n *\/<|endoftext|>"} {"prompt":"* This class contains Java-related overridability conditions that may force incompatibility\n *\/\nclass JavaIncompatibilityRulesOverridabilityCondition : ExternalOverridabilityCondition {\n override fun isOverridable(\n superDescriptor: CallableDescriptor,\n subDescriptor: CallableDescriptor,\n subClassDescriptor: ClassDescriptor?\n ): Result {","completion":"if (isIncompatibleInAccordanceWithBuiltInOverridabilityRules(superDescriptor, subDescriptor, subClassDescriptor)) {\n return Result.INCOMPATIBLE\n }\n\n if (doesJavaOverrideHaveIncompatibleValueParameterKinds(superDescriptor, subDescriptor)) {\n return Result.INCOMPATIBLE\n }\n\n return Result.UNKNOWN\n }<|endoftext|>"} {"prompt":"var a: Int\n fun foo(): Int\n fun bar(o: Int)\n}\n\ninterface KotlinInterface2 {\n var a: Int\n fun foo(): Any\n fun bar(o: Any)\n}\n\nfun test(a: A, b: B, c: C, d: D, e: E, f: F, g: G) {\n val k1: Int = a.foo()","completion":"val k2: Unit = a.bar(1)\n val k3: Unit = a.bar(\"\")\n val k4: Unit = a.bar(null)\n val k5: Int = b.foo()\n val k6: Unit = b.bar(1)\n val k7: Unit = b.bar(\"\")\n val k8: Unit = b.bar(null)<|endoftext|>"} {"prompt":"x[1] += {\n someCallInsideLambda()\n \"please choose String\"\n }\n}\n\n\/\/ only plus, no set. 3 indices in get\/set\nclass G {\n operator fun get(i: Int, j: Int, k: Int): G = this","completion":"operator fun set(i: Int, j: Int, k: Int, x: G) {}\n operator fun plus(v: () -> Unit): G = this\n}\n\nfun test_7(x: G) {\n x[1, 2, 3] += {\n someCallInsideLambda()\n x[1, 2, 3] += {\n someCallInsideLambda()\n Unit\n }<|endoftext|>"} {"prompt":"fun withAssertion(j: J) = generic(j)\n\nfun generic(j: J) = j.nullT()\n\n\/\/ FILE: J.java\nimport org.jetbrains.annotations.NotNull;\n\npublic class J {\n @NotNull\n public T nullT() {\n return null;\n }\n\n public void test() {","completion":"TestKt.withAssertion(this);\n }\n}<|endoftext|>"} {"prompt":"interface IBar {\n suspend fun bar(): I\n}\n\nclass Test() : IBar {\n override suspend fun bar(): IC = IC(Wrapper(\"OK\"))\n\n suspend fun test1(): String {\n val b: IBar = this\n return ((b.bar() as IC).i as Wrapper).s\n }","completion":"suspend fun test2(): String = ((bar() as IC).i as Wrapper).s\n}\n\nfun box(): String {\n var result = \"FAIL 1\"\n builder {\n result = Test().test1()\n }\n if (result != \"OK\") return \"FAIL 1 $result\"\n\n result = \"FAIL2 \"\n builder {\n result = Test().test2()\n }<|endoftext|>"} {"prompt":"0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, \n 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL,","completion":"0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, \n 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.metadata.deserialization.VersionRequirement\n\nclass K1JvmVersionRequirementTest : AbstractJvmVersionRequirementTest() {\n fun testAllJvmDefault() {\n doTest(\n VersionRequirement.Version(1, 4, 0), DeprecationLevel.ERROR, null,","completion":"ProtoBuf.VersionRequirement.VersionKind.COMPILER_VERSION, null,\n analysisFlags = mapOf(JvmAnalysisFlags.jvmDefaultMode to JvmDefaultMode.ALL),\n fqNamesWithRequirements = listOf(\n \"test.Base\",\n \"test.Derived\",\n \"test.BaseWithProperty\",\n \"test.DerivedWithProperty\",\n \"test.Empty\",<|endoftext|>"} {"prompt":"this.inferenceSession = inferenceSession\n return try {\n inferenceSession.block()\n } finally {\n this.inferenceSession = oldSession\n }\n }\n\n @OptIn(PrivateForInline::class)\n inline fun withAnonymousFunctionTowerDataContext(symbol: FirAnonymousFunctionSymbol, f: () -> T): T {","completion":"return withTemporaryRegularContext(specialTowerDataContexts.getAnonymousFunctionContext(symbol), f)\n }\n\n @OptIn(PrivateForInline::class)\n inline fun withCallableReferenceTowerDataContext(access: FirCallableReferenceAccess, f: () -> T): T {<|endoftext|>"} {"prompt":"\"Do not sort class members in output abi.jar. Legacy flag that allows tools that rely on methods\/fields order in the source\" +\n \" to keep working. Flipping this to true reduces stability of the ABI.\",\n false,\n )\n\n val REMOVE_PRIVATE_CLASSES_OPTION: CliOption =\n CliOption(\n \"removePrivateClasses\",","completion":"\"true\/false\",\n \"Remove private classes from ABI. False by default due to backwards compatibility. If enabled, \" +\n \"private top-level classes will no longer be available from Java classes in the same package.\",\n false,\n )\n val TREAT_INTERNAL_AS_PRIVATE_OPTION: CliOption =\n CliOption(\n \"treatInternalAsPrivate\",<|endoftext|>"} {"prompt":"override fun lower(irFile: IrFile) {\n addContinuationObjectAndContinuationParameterToSuspendFunctions(irFile)\n addContinuationParameterToSuspendCalls(irFile)\n }\n\n private fun addContinuationParameterToSuspendCalls(irFile: IrFile) {\n irFile.transformChildrenVoid(object : IrElementTransformerVoid() {","completion":"val functionStack = mutableListOf()\n\n override fun visitFunction(declaration: IrFunction): IrStatement {\n functionStack.push(declaration)\n return super.visitFunction(declaration).also { functionStack.pop() }\n }\n\n override fun visitFunctionReference(expression: IrFunctionReference): IrExpression {<|endoftext|>"} {"prompt":"val podLibrary = projectPath.resolve(customPodLibraryName)\n val privateSpecGit = projectPath.resolve(privateSpecGitRepo)\n val privateSpecGitUri = privateSpecGit.toUri().toString()\n\n buildGradleKts.addSpecRepo(privateSpecGitUri)\n\n fun podInstallSynthetic(version: String) {","completion":"buildGradleKts.addPod(customPodLibraryName, \"version = \\\"$version\\\"\")\n build(defaultPodGenTaskName) {\n assertTasksExecuted(defaultPodGenTaskName)\n }\n\n build(defaultPodInstallSyntheticTaskName) {\n assertTasksExecuted(defaultPodInstallSyntheticTaskName)\n }<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\nenum class A {\n W(1), X(1, 2), Y(3.0), Z(\"\"), E();\n\n constructor()\n constructor(x: Int)\n constructor(x: Int, y: Int): this(x+y)\n constructor(x: Double): this(x.toInt(), 1)","completion":"constructor(x: String): super(x, 1)\n}\n\nenum class B(x: Int) {\n W(1), X(1, 2), Y(3.0), Z(\"\");\n\n constructor(x: Int, y: Int): this(x+y)<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.incremental.storage\n\nimport com.intellij.util.io.DataExternalizer\nimport org.jetbrains.kotlin.incremental.IncrementalCompilationContext\nimport org.jetbrains.kotlin.name.FqName\nimport java.io.DataInput\nimport java.io.DataOutput\nimport java.io.File","completion":"internal data class ICClassesAttributes(val isSealed: Boolean)\n\ninternal object ICClassesAttributesExternalizer : DataExternalizer {\n override fun read(input: DataInput): ICClassesAttributes {\n return ICClassesAttributes(input.readBoolean())\n }\n\n override fun save(output: DataOutput, value: ICClassesAttributes) {<|endoftext|>"} {"prompt":"assertFalse(\"str\u00f6\".endsWith(\"R\u00d6\", ignoreCase = false))\n assertTrue(\"str\u00f6\".endsWith(\"R\u00d6\", ignoreCase = true))\n assertFalse(\"\".endsWith(\"a\"))\n assertTrue(\"some\".endsWith(\"\"))\n assertTrue(\"\".endsWith(\"\"))\n }","completion":"@Test fun endsWithStringForCharSequence() = withTwoCharSequenceArgs { arg1, arg2 ->\n fun String.endsWithCs(suffix: String, ignoreCase: Boolean = false): Boolean =\n arg1(this).endsWith(arg2(suffix), ignoreCase)\n\n assertTrue(\"abcd\".endsWithCs(\"d\"))\n assertTrue(\"abcd\".endsWithCs(\"abcd\"))<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.config.JVMConfigurationKeys\nimport org.jetbrains.kotlin.config.JvmTarget\nimport org.jetbrains.kotlin.test.compileJavaFilesExternally\nimport org.jetbrains.kotlin.test.directives.CodegenTestDirectives","completion":"import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.USE_JAVAC_BASED_ON_JVM_TARGET\nimport org.jetbrains.kotlin.test.model.TestModule\nimport org.jetbrains.kotlin.test.services.*\nimport org.jetbrains.kotlin.test.services.jvm.compiledClassesManager<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: +AllowContractsForCustomFunctions +ReadDeserializedContracts\n\/\/ !OPT_IN: kotlin.contracts.ExperimentalContracts\n@file:Suppress(\"INVISIBLE_MEMBER\", \"INVISIBLE_REFERENCE\")\n\npackage test\n\nimport kotlin.contracts.*\n\nfun foo(x: Any?): Boolean {\n contract {","completion":"returns() implies (x is String)\n }\n return bar(x)\n}\n\nfun bar(x: Any?): Boolean {\n contract {\n returns() implies (x is Int)\n }\n return foo(x)\n}<|endoftext|>"} {"prompt":"IS_NOINLINE.toFlags(isNoinline) or\n IS_CROSSINLINE.toFlags(isCrossinline)\n\n override val isVararg get() = IS_VARARG.get(flags)\n override val hasDefaultArg get() = HAS_DEFAULT_ARG.get(flags)\n override val isNoinline get() = IS_NOINLINE.get(flags)","completion":"override val isCrossinline get() = IS_CROSSINLINE.get(flags)\n\n companion object {\n private val IS_VARARG = FlagField.booleanFirst()\n private val HAS_DEFAULT_ARG = FlagField.booleanAfter(IS_VARARG)\n private val IS_NOINLINE = FlagField.booleanAfter(HAS_DEFAULT_ARG)<|endoftext|>"} {"prompt":"session, scopeSession, declaration, Interner(typeParameters), extension,\n typeTable, versionRequirementTable, serializeTypeTableToFunction = false,\n typeApproximator, languageVersionSettings, produceHeaderKlib\n )\n\n val stringTable: FirElementAwareStringTable\n get() = extension.stringTable\n\n private fun useTypeTable(): Boolean = extension.shouldUseTypeTable()","completion":"private fun MutableVersionRequirementTable.serializeVersionRequirements(container: FirAnnotationContainer): List =\n serializeVersionRequirements(container.annotations)\n\n private fun MutableVersionRequirementTable.serializeVersionRequirements(annotations: List): List =\n annotations\n .filter {<|endoftext|>"} {"prompt":"\/\/ WITH_COROUTINES\n\/\/ NO_CHECK_LAMBDA_INLINING\n\/\/ WITH_STDLIB\n\/\/ FILE: inlined.kt\n\nsuspend inline fun inlineMe(c: suspend () -> Unit) {\n c()\n c()\n c()\n c()\n c()\n}\nsuspend inline fun noinlineMe(noinline c: suspend () -> Unit) {\n c()","completion":"c()\n c()\n c()\n c()\n}\nsuspend inline fun crossinlineMe(crossinline c: suspend () -> Unit) {\n c()\n c()\n c()\n c()\n c()\n}\n\n\/\/ FILE: inlineSite.kt\nimport kotlin.coroutines.*\nimport helpers.*\n\nfun builder(c: suspend () -> Unit) {<|endoftext|>"} {"prompt":"assertTrue(!bs.bitSet(1))\n assertTrue(!bs.bitSet(0))\n\n assertTrue(bs[0])\n assertTrue(bs.bitClear(0))\n assertTrue(!bs.bitClear(0))\n\n assertTrue(bs[1])\n }\n}\n\nclass LockFreeIntBits {\n private val bits = atomic(0)","completion":"private fun Int.mask() = 1 shl this\n\n operator fun get(index: Int): Boolean = bits.value and index.mask() != 0\n\n \/\/ User-defined private inline function\n private inline fun bitUpdate(check: (Int) -> Boolean, upd: (Int) -> Int): Boolean {\n bits.update {\n if (check(it)) return false\n upd(it)\n }<|endoftext|>"} {"prompt":"sealed interface SI1 {\n class A : SI1\n class B : SI1\n}\n\nsealed class SC1 {\n class A: SC1()\n class B: SC1()\n}\n\nenum class E1 {\n A, B\n}\n\nenum class E2 {\n A, B\n}\n\nsealed interface SI2 {\n class ClassToObject : SI2","completion":"object ObjectToClass : SI2\n}\n\nsealed class SC2 {\n class ClassToObject : SC2()\n object ObjectToClass : SC2()\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.inline.isInlineOnly\nimport org.jetbrains.kotlin.resolve.source.KotlinSourceElement\nimport org.jetbrains.kotlin.types.*\nimport org.jetbrains.kotlin.types.checker.KotlinTypeChecker","completion":"import org.jetbrains.kotlin.types.typeUtil.constituentTypes\nimport org.jetbrains.kotlin.types.typeUtil.contains\nimport org.jetbrains.kotlin.types.typeUtil.isArrayOfNothing\nimport org.jetbrains.kotlin.types.typeUtil.isNothing\n\ninternal class DeclarationsCheckerBuilder(<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.builder.FirBuilderDsl\nimport org.jetbrains.kotlin.fir.builder.toMutableOrEmpty\nimport org.jetbrains.kotlin.fir.contracts.FirContractDescription\nimport org.jetbrains.kotlin.fir.declarations.*","completion":"import org.jetbrains.kotlin.fir.declarations.impl.FirPrimaryConstructor\nimport org.jetbrains.kotlin.fir.expressions.FirAnnotation\nimport org.jetbrains.kotlin.fir.expressions.FirBlock\nimport org.jetbrains.kotlin.fir.expressions.FirDelegatedConstructorCall<|endoftext|>"} {"prompt":"eatEverythingUntilLevel = numberOfNestedBlocks\n addInstruction(op, location, immediates)\n return\n }\n }\n\n if (lastInstructionIndex == -1) {\n addInstruction(op, location, immediates)\n return\n }\n\n val lastInstruction = expression[lastInstructionIndex]\n val lastOperator = lastInstruction.operator","completion":"\/\/ droppable instructions + drop\/unreachable -> nothing\n if ((op == WasmOp.DROP || op == WasmOp.UNREACHABLE) && lastOperator.pureStacklessInstruction()) {\n trimInstructionsUntil(lastInstructionIndex)\n (lastInstruction.location as? SourceLocation.Location)?.let(::buildNop)\n return\n }<|endoftext|>"} {"prompt":"fun test_2(base: Base): String {\n return when (base) {\n is A -> \"Fail A\"\n is B.C -> \"Fail B.C\"\n is B.D -> \"K\"\n E.First -> \"Fail E.First\"\n E.Second -> \"Fail E.Second\"\n }\n}\n\nclass MyD : B.D\n\nfun box(): String {","completion":"return test_1(E.First) + test_2(MyD())\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.project.structure.impl\n\nimport com.intellij.ide.highlighter.JavaFileType\nimport com.intellij.psi.PsiFileSystemItem\nimport com.intellij.psi.PsiManager","completion":"import org.jetbrains.kotlin.analysis.api.standalone.base.project.structure.KtStaticProjectStructureProvider\nimport org.jetbrains.kotlin.analysis.project.structure.builder.*\nimport org.jetbrains.kotlin.analyzer.common.CommonPlatformAnalyzerServices<|endoftext|>"} {"prompt":"protected abstract val multiplatformInfoProviderImpl: KtMultiplatformInfoProvider\n\n internal val originalPsiProvider: KtOriginalPsiProvider get() = originalPsiProviderImpl\n protected abstract val originalPsiProviderImpl: KtOriginalPsiProvider\n\n internal val symbolInfoProvider: KtSymbolInfoProvider get() = symbolInfoProviderImpl\n protected abstract val symbolInfoProviderImpl: KtSymbolInfoProvider","completion":"internal val analysisScopeProvider: KtAnalysisScopeProvider get() = analysisScopeProviderImpl\n protected abstract val analysisScopeProviderImpl: KtAnalysisScopeProvider\n\n internal val referenceResolveProvider: KtReferenceResolveProvider get() = referenceResolveProviderImpl\n protected abstract val referenceResolveProviderImpl: KtReferenceResolveProvider<|endoftext|>"} {"prompt":"AbstractList.checkRangeIndexes(destinationOffset, destinationOffset + rangeSize, destination.size)\n kotlin.wasm.internal.copyWasmArray(this.storage, destination.storage, startIndex, destinationOffset, rangeSize)\n return destination\n \"\"\"\n }\n }\n }\n }\n }","completion":"val f_copyOfRangeJvmImpl = fn(\"copyOfRangeImpl(fromIndex: Int, toIndex: Int)\") {\n include(InvariantArraysOfObjects, ArraysOfPrimitives)\n platforms(Platform.JVM)\n } builderWith { _ ->\n since(\"1.3\")\n visibility(\"internal\")\n annotation(\"@PublishedApi\")<|endoftext|>"} {"prompt":"+field(\"varargElementType\", irTypeType, nullable = true)\n +field(\"isCrossinline\", boolean)\n +field(\"isNoinline\", boolean)\n +field(\"isHidden\", boolean) {\n additionalImports.add(idSignatureType)\n kDoc = \"\"\"\n If `true`, the value parameter does not participate in [IdSignature] computation.","completion":"This is a workaround that is needed for better support of compiler plugins.\n Suppose you have the following code and some IR plugin that adds a value parameter to functions\n marked with the `@PluginMarker` annotation.\n ```kotlin\n @PluginMarker\n fun foo(defined: Int) { \/* ... *\/ }\n ```\n\n Suppose that after applying the plugin the function is changed to:<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\/\/ WITH_COROUTINES\n\nimport helpers.*\nimport kotlin.coroutines.*\n\ninline class IC(val s: Int?)\n\nfun Int?.toResultString() =\n if (this == 42) \"OK\" else \"!! $this\"\n\ninterface Base {\n suspend fun generic(): T\n}\n\nclass Derived : Base {","completion":"override suspend fun generic(): IC = suspendCoroutine { it.resume(IC(42)) }\n}\n\nfun builder(c: suspend () -> Unit) {\n c.startCoroutine(EmptyContinuation)\n}\n\nfun box(): String {\n var res: String? = null\n builder {\n val base: Base<*> = Derived()<|endoftext|>"} {"prompt":"strategy.compatibilityRules.add(KotlinCinteropCompatibility::class.java)\n strategy.disambiguationRules.add(KotlinCinteropDisambiguation::class.java)\n\n if (isKotlinGranularMetadata) {\n strategy.compatibilityRules.add(KotlinMetadataCompatibility::class.java)","completion":"strategy.disambiguationRules.add(KotlinMetadataDisambiguation::class.java)\n }\n\n \/\/ Only enable resources compatibility rule when resources configuration is used, so that for variant reselection klibs aren't selected\n if (isKotlinResourcesCompatibilityRuleEnabled) {\n strategy.compatibilityRules.add(KotlinResourcesCompatibility::class.java)\n }\n }<|endoftext|>"} {"prompt":"takeByte(2.rem(1))\n takeByte(2 shl 1)\n takeByte(2 shr 1)","completion":"takeByte(2 ushr 1)\n\n takeByte(2 and 1)\n takeByte(2 or 1)<|endoftext|>"} {"prompt":"makeTypeProjection(type, variance)\n ), annotations = emptyList()\n )\n }\n\n internal fun IrClass.addCachedChildSerializersProperty(cacheableSerializers: List): IrProperty? {\n \/\/ if all child serializers are null (non-cacheable) we don't need to create a property","completion":"cacheableSerializers.firstOrNull { it != null } ?: return null\n\n val kSerializerClass = compilerContext.kSerializerClass\n ?: error(\"Serializer class '$KSERIALIZER_NAME_FQ' not found. Check that the kotlinx.serialization runtime is connected correctly\")<|endoftext|>"} {"prompt":"if (!(element5 !in charSequence.indices) != range0.contains(element5)) throw AssertionError()\n}\n\nfun testR0xE6() {\n \/\/ with possible local optimizations\n if (0 in charSequence.indices != range0.contains(0)) throw AssertionError()","completion":"if (0 !in charSequence.indices != !range0.contains(0)) throw AssertionError()\n if (!(0 in charSequence.indices) != !range0.contains(0)) throw AssertionError()\n if (!(0 !in charSequence.indices) != range0.contains(0)) throw AssertionError()\n \/\/ no local optimizations<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.cli.metadata\n\nimport org.jetbrains.kotlin.metadata.builtins.BuiltInsBinaryVersion\nimport org.jetbrains.kotlin.serialization.ApproximatingStringTable\nimport org.jetbrains.kotlin.serialization.KotlinSerializerExtensionBase","completion":"import org.jetbrains.kotlin.serialization.deserialization.builtins.BuiltInSerializerProtocol\n\nclass MetadataSerializerExtension(\n override val metadataVersion: BuiltInsBinaryVersion\n) : KotlinSerializerExtensionBase(BuiltInSerializerProtocol) {\n override fun shouldUseTypeTable(): Boolean = true\n override val stringTable = ApproximatingStringTable()\n}<|endoftext|>"} {"prompt":"\"b\", \"\"\"\n typealias X = Int\n fun x(x: X) {}\n \"\"\".trimIndent()\n )\n }\n\n result.assertCommonized(\n \"(a, b)\", \"\"\"\n typealias X = Int\n expect fun x(x: X)\n \"\"\".trimIndent()\n )\n }","completion":"fun `test inlined underscored typealias - both platforms`() {\n val result = commonize {\n outputTarget(\"(a, b)\")\n simpleSingleSourceTarget(\n \"a\", \"\"\"\n typealias X = Int\n typealias __X = X\n fun x(x: __X) {}\n \"\"\".trimIndent()\n )\n\n simpleSingleSourceTarget(<|endoftext|>"} {"prompt":"protected fun createSingleTestRun(testCase: TestCase, executable: TestExecutable): TestRun = createTestRun(\n testCase = testCase,\n executable = executable,\n testRunName = \/* Unimportant. Used only in dynamic tests. *\/ \"\",\n testName = null\n )","completion":"private fun getTestRunParameters(testCase: TestCase, testName: TestName?): List = buildList {\n addIfNotNull(testCase.checks.outputDataFile?.file?.let(TestRunParameter::WithExpectedOutputData))\n\n when (testCase.kind) {\n TestKind.STANDALONE_LLDB -> {\n assertTrue(testName == null)<|endoftext|>"} {"prompt":"fun valuesNotNull(map: MutableMap) {\n map.compute(1) { k, v -> null }\n}\n\nfun valuesNullable(map: MutableMap) {\n map.compute(1) { k, v -> v?.let { it + k } }\n}","completion":"fun valuesT(map: MutableMap, newValue: T) {\n map.compute(1) { k, v -> null }\n}\n\nfun valuesTNotNull(map: MutableMap, newValue: T) {\n map.compute(1) { k, v -> null }\n}<|endoftext|>"} {"prompt":"returns(\"R\")\n\n sample(\"samples.collections.Collections.Transformations.firstNotNullOf\")\n\n doc {\n \"\"\"\n Returns the first non-null value produced by [transform] function being applied to ${f.element.pluralize()} of this ${f.collection} in iteration order,\n or throws [NoSuchElementException] if no non-null value was produced.\n \"\"\"","completion":"}\n body {\n \"\"\"\n return firstNotNullOfOrNull(transform) ?: throw NoSuchElementException(\"No element of the ${f.collection} was transformed to a non-null value.\")\n \"\"\"\n }\n }\n\n}<|endoftext|>"} {"prompt":"+if (dynamic) \"$libGcc\/crtbeginS.o\" else \"$libGcc\/crtbegin.o\"\n +\"-L$libGcc\"\n +\"--hash-style=gnu\"\n +specificLibs\n if (optimize) +linkerOptimizationFlags\n if (!debug) +linkerNoDebugFlags\n if (dynamic) +linkerDynamicFlags","completion":"+objectFiles\n +libraries\n +linkerArgs\n if (mimallocEnabled) +mimallocLinkerDependencies\n \/\/ See explanation about `-u__llvm_profile_runtime` here:<|endoftext|>"} {"prompt":"B.foo()\n\n P.foo()","completion":"M.bar()\n}\n\nclass A() {\n companion object {\n class B() {\n companion object {\n fun foo() {}\n }\n }\n\n object P {\n fun foo() {}\n }\n }\n}<|endoftext|>"} {"prompt":"fun getBeforeInlineDescriptor(afterInlineMarker: AbstractInsnNode): SavedStackDescriptor {\n val beforeInlineMarker = context.openingInlineMethodMarker[afterInlineMarker]\n return allocatedHandles[beforeInlineMarker]!!.savedStackDescriptor\n }","completion":"fun markAfterInlineMarkerEmitted(afterInlineMarker: AbstractInsnNode) {\n val beforeInlineMarker = context.openingInlineMethodMarker[afterInlineMarker]\n markEmitted(beforeInlineMarker!!)\n }\n\n private fun markEmitted(saveStackMarker: AbstractInsnNode) {\n val allocatedHandle = allocatedHandles[saveStackMarker]!!<|endoftext|>"} {"prompt":"\/\/ To simplify skipping this constructor when scanning call stack in Kotlin_getCurrentStackTrace.\n return true\n }\n }\n if (irFunction.symbol == context.ir.symbols.entryPoint) {\n return true\n }\n\n return false\n}\n\nprivate fun inferFunctionAttributes(contextUtils: ContextUtils, irFunction: IrFunction): List =","completion":"mutableListOf().apply {\n if (irFunction.returnType.isNothing()) {\n require(!irFunction.isSuspend) { \"Suspend functions should be lowered out at this point\"}\n add(LlvmFunctionAttribute.NoReturn)\n }\n if (mustNotInline(contextUtils.context, irFunction)) {<|endoftext|>"} {"prompt":"* Exposes the JavaScript [CDATASection](https:\/\/developer.mozilla.org\/en\/docs\/Web\/API\/CDATASection) to Kotlin\n *\/\npublic external open class CDATASection : Text {\n companion object {\n val ELEMENT_NODE: Short\n val ATTRIBUTE_NODE: Short\n val TEXT_NODE: Short","completion":"val CDATA_SECTION_NODE: Short\n val ENTITY_REFERENCE_NODE: Short\n val ENTITY_NODE: Short\n val PROCESSING_INSTRUCTION_NODE: Short\n val COMMENT_NODE: Short\n val DOCUMENT_NODE: Short\n val DOCUMENT_TYPE_NODE: Short<|endoftext|>"} {"prompt":"assertEquals(S(\"ef\"), nonNull_nonNullMemExt.call(c, S(\"e\")))\n assertEquals(S(\"ef\"), nonNull_nonNullMemExt.getter.call(c, S(\"e\")))","completion":"val nonNull_nullableMemExt = C::class.members.single { it.name == \"nonNull_nullableMemExt\" } as KMutableProperty2\n assertEquals(Unit, nonNull_nullableMemExt.setter.call(c, S(\"\"), S(\"f\")))<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() {}","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {}<|endoftext|>"} {"prompt":") {\n val expectDeclaration = expectSymbol.owner as IrDeclaration\n val actualDeclaration = actualSymbol.owner as IrDeclaration\n at(expectDeclaration).report(\n IrActualizationErrors.EXPECT_ACTUAL_MISMATCH,\n expectDeclaration.getNameWithAssert().asString(),\n actualDeclaration.getNameWithAssert().asString(),","completion":"incompatibility\n )\n}\n\ninternal fun IrDiagnosticReporter.reportActualAnnotationsNotMatchExpect(\n expectSymbol: IrSymbol,\n actualSymbol: IrSymbol,\n incompatibilityType: ExpectActualAnnotationsIncompatibilityType,\n reportOn: IrSymbol,\n) {<|endoftext|>"} {"prompt":"} else { ::foo2 }","completion":"inv()\n }\n}\n\nfun poll11(flag: Boolean): Flow {\n return flow {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.signatures.KtCallableSignature\nimport org.jetbrains.kotlin.analysis.api.signatures.KtFunctionLikeSignature\nimport org.jetbrains.kotlin.analysis.api.signatures.KtVariableLikeSignature\nimport org.jetbrains.kotlin.psi.KtExpression\n\n\/**","completion":"* Call information at call site.\n *\/\npublic sealed class KtCallInfo : KtLifetimeOwner\n\n\/**\n * Successfully resolved call.\n *\/\npublic class KtSuccessCallInfo(private val _call: KtCall) : KtCallInfo() {\n override val token: KtLifetimeToken\n get() = _call.token<|endoftext|>"} {"prompt":"consumeInt(super@KotlinSubclassOfJavaQualifiers.missingField)\n }\n\n fun testPrivateField() {\n consumeString(super@KotlinSubclassOfJavaQualifiers.privateField)","completion":"consumeInt(super@KotlinSubclassOfJavaQualifiers.privateField)\n }\n\n fun testPrivateFieldViaInnerClass() {\n val inner = Inner()\n inner.testPrivateField()\n }\n\n fun testMissingFieldViaInnerClass() {\n val inner = Inner()<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.noarg.diagnostic\n\nimport com.intellij.psi.PsiElement\nimport org.jetbrains.kotlin.descriptors.*\nimport org.jetbrains.kotlin.extensions.AnnotationBasedExtension\nimport org.jetbrains.kotlin.noarg.diagnostic.ErrorsNoArg.*","completion":"import org.jetbrains.kotlin.psi.KtClass\nimport org.jetbrains.kotlin.psi.KtDeclaration\nimport org.jetbrains.kotlin.psi.KtModifierListOwner\nimport org.jetbrains.kotlin.resolve.DescriptorUtils\nimport org.jetbrains.kotlin.resolve.checkers.DeclarationChecker<|endoftext|>"} {"prompt":"val flagProperties = CompilerArgumentsContentProspector.getFlagCompilerArgumentProperties(K2MetadataCompilerArguments::class)\n val stringProperties = CompilerArgumentsContentProspector.getStringCompilerArgumentProperties(K2MetadataCompilerArguments::class)","completion":"val arrayProperties = CompilerArgumentsContentProspector.getArrayCompilerArgumentProperties(K2MetadataCompilerArguments::class)\n\n assertContentEquals(flagProperties, k2MetadataCompilerArgumentsFlagProperties)\n assertContentEquals(stringProperties, k2MetadataCompilerArgumentsStringProperties)<|endoftext|>"} {"prompt":"expect(null, { listOf().maxWithOrNull(naturalOrder()) })\n expect(1, { listOf(1).maxWithOrNull(naturalOrder()) })\n expect(\"B\", { listOf(\"a\", \"B\").maxWithOrNull(STRING_CASE_INSENSITIVE_ORDER) })","completion":"expect(\"B\", { listOf(\"a\", \"B\").asSequence().maxWithOrNull(STRING_CASE_INSENSITIVE_ORDER) })\n }\n\n @Test fun minByOrNull() {\n expect(null, { listOf().minByOrNull { it } })\n expect(1, { listOf(1).minByOrNull { it } })<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.util.buildProject\nimport org.jetbrains.kotlin.gradle.util.enableDefaultStdlibDependency\nimport org.jetbrains.kotlin.gradle.util.enableDependencyVerification\nimport org.junit.Test\n\nclass IdeOriginalMetadataDependencyResolverTest {\n\n @Test","completion":"fun `test kotlin-test-common`() {\n val lastLegacyMetadataKotlinTestVersion = \"1.9.20\"\n val project = buildProject {\n enableDependencyVerification(false)\n enableDefaultStdlibDependency(false)\n applyMultiplatformPlugin()\n repositories.mavenLocal()<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.idea.KotlinLanguage\nimport org.jetbrains.kotlin.light.classes.symbol.SymbolFakeFile\nimport org.jetbrains.kotlin.light.classes.symbol.analyzeForLightClasses\nimport org.jetbrains.kotlin.utils.addToStdlib.ifFalse\nimport javax.swing.Icon","completion":"abstract class SymbolLightClassBase protected constructor(val ktModule: KtModule, manager: PsiManager) :\n LightElement(manager, KotlinLanguage.INSTANCE), PsiClass, KtExtensibleLightClass {\n\n private val myInnersCache by lazyPub {\n ClassInnerStuffCache(\n \/* aClass = *\/ this,\n \/* generateEnumMethods = *\/ false,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.resolve.ScopeSession\n\nclass FirExplicitSimpleImportingScope(\n imports: List,\n session: FirSession,\n scopeSession: ScopeSession\n) : FirAbstractSimpleImportingScope(session, scopeSession) {\n override val simpleImports =\n imports.filterIsInstance()","completion":".filter { !it.isAllUnder && it.importedName != null }\n .groupBy { it.aliasName ?: it.importedName!! }\n}<|endoftext|>"} {"prompt":"IrBranchImpl(startOffset, irResult.endOffset, convertToIrExpression(condition), irResult)\n }\n }\n }\n\n override fun visitWhenSubjectExpression(whenSubjectExpression: FirWhenSubjectExpression, data: Any?): IrElement {\n val lastSubjectVariable = conversionScope.lastWhenSubject()","completion":"return whenSubjectExpression.convertWithOffsets { startOffset, endOffset ->\n IrGetValueImpl(startOffset, endOffset, lastSubjectVariable.type, lastSubjectVariable.symbol)\n }\n }\n\n private val loopMap = mutableMapOf()<|endoftext|>"} {"prompt":"assertEquals(\"kotlin.jvm.functions.Function0\", getSuperInterface { null as Nothing? })\n assertEquals(\"interface kotlin.jvm.functions.Function0\", getSuperInterfaceGeneric { null })\n\n \/\/ Test WithExpectedType resolution mode","completion":"assertEquals(\"kotlin.jvm.functions.Function0\", renderSuperInterface(lambdaEmpty))\n assertEquals(\"kotlin.jvm.functions.Function0\", renderSuperInterface(lambdaUnit))\n assertEquals(\"kotlin.jvm.functions.Function0\", renderSuperInterface(lambdaMyUnit))<|endoftext|>"} {"prompt":"fqName?.let(visitor::visitFqName)\n }\n}\n\ninternal class KlibModuleFragmentExtension : KlibModuleFragmentExtensionVisitor(), KmModuleFragmentExtension {\n\n val moduleFragmentFiles: MutableList = ArrayList()\n var fqName: String? = null","completion":"val className: MutableList = ArrayList()\n\n override fun visitFile(file: KlibSourceFile) {\n moduleFragmentFiles += file\n }\n\n override fun visitFqName(fqName: String) {\n this.fqName = fqName\n }\n\n override fun visitClassName(className: ClassName) {<|endoftext|>"} {"prompt":"abstract var c3: Int = 0; set(v: Int) { field = v }\n\n val e: Int get() = a\n val e1: Int = 0; get() = a","completion":"abstract val e2: Int get() = a\n abstract val e3: Int = 0; get() = a\n\n \/\/methods\n fun f()\n fun g() {}<|endoftext|>"} {"prompt":"}\n }\n\n if (method.isSuspend && method.overriddenDescriptors.isEmpty()) {\n return implicitSuspendThrows\n }\n\n return null\n }\n\n private val implicitSuspendThrows = sequenceOf(ClassId.topLevel(KonanFqNames.cancellationException))\n\n private fun mapReturnType(","completion":"returnBridge: MethodBridge.ReturnValue,\n method: FunctionDescriptor,\n objCExportScope: ObjCExportScope,\n ): ObjCType = when (returnBridge) {\n MethodBridge.ReturnValue.Suspend,\n MethodBridge.ReturnValue.Void,\n -> ObjCVoidType\n MethodBridge.ReturnValue.HashCode -> ObjCPrimitiveType.NSUInteger<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !CHECK_TYPE\n\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\n\/\/ T is the immutable type\ninterface Builder {\n fun build(): T\n}\n\n\/\/ T is the immutable type, U is the builder\ninterface Copyable> {\n fun builder(): U\n}","completion":"fun , U : Builder> T.copy(fn: U.() -> Unit): T = throw Exception()\n\nopen class Foo(val x: Int, val y: Int) : Copyable {\n override fun builder(): FooBuilder = FooBuilder(x, y)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.diagnostics.PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT\nimport org.jetbrains.kotlin.diagnostics.Severity\nimport org.jetbrains.kotlin.psi.KtCallableReferenceExpression\nimport org.jetbrains.kotlin.psi.KtExpression","completion":"import org.jetbrains.kotlin.types.KotlinType\n\nobject ComposeErrors {\n\n \/\/ error goes on the composable call in a non-composable function\n @JvmField\n val COMPOSABLE_INVOCATION =\n DiagnosticFactory0.create(\n Severity.ERROR\n )<|endoftext|>"} {"prompt":"\/\/ Just a sanity check to avoid creating invalid [InvalidInheritance]s.\n check(superClassSymbols.isNotEmpty())\n }\n }\n\n \/**\n * The annotation class has unacceptable classifier as one of its parameters: not one of permitted classes ([String], [KClass]),\n * primitives, etc. This may happen if the class representing this parameter was an annotation class before, but later it was","completion":"* converted to a non-annotation class.\n *\/\n data class AnnotationWithUnacceptableParameter(\n override val symbol: IrClassSymbol,\n val unacceptableClassifierSymbol: IrClassifierSymbol\n ) : CanBeRootCause\n\n \/**\n * The classifier depends on another unusable classifier. Thus, it is considered unusable too.\n *\/<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.parcelize.ParcelizeNames.PARCELABLE_FQN\nimport org.jetbrains.kotlin.parcelize.ParcelizeNames.PARCELER_FQN\nimport org.jetbrains.kotlin.parcelize.ParcelizeNames.WRITE_TO_PARCEL_NAME","completion":"import org.jetbrains.kotlin.parcelize.serializers.ParcelizeExtensionBase\nimport org.jetbrains.kotlin.types.Variance\n\n\/\/ true if the class should be processed by the parcelize plugin\nfun IrClass.isParcelize(parcelizeAnnotations: List): Boolean =<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.BindingTrace\n\nobject PublishedApiUsageChecker {\n fun check(\n declaration: KtDeclaration,\n descriptor: DeclarationDescriptor,\n trace: BindingTrace\n ) {\n if (descriptor !is DeclarationDescriptorWithVisibility || descriptor.visibility == DescriptorVisibilities.INTERNAL) return","completion":"\/\/ Don't report the diagnostic twice\n if (descriptor is PropertyAccessorDescriptor) return\n\n for (entry in declaration.annotationEntries) {\n val annotationDescriptor = trace.get(BindingContext.ANNOTATION, entry) ?: continue\n if (annotationDescriptor.fqName == StandardNames.FqNames.publishedApi) {<|endoftext|>"} {"prompt":"}\n })\n}\n\ninline fun PsiElement.anyDescendantOfType(noinline predicate: (T) -> Boolean = { true }): Boolean {\n return findDescendantOfType(predicate) != null\n}\n\ninline fun PsiElement.anyDescendantOfType(","completion":"crossinline canGoInside: (PsiElement) -> Boolean,\n noinline predicate: (T) -> Boolean = { true }\n): Boolean {\n return findDescendantOfType(canGoInside, predicate) != null\n}\n\ninline fun PsiElement.findDescendantOfType(noinline predicate: (T) -> Boolean = { true }): T? {<|endoftext|>"} {"prompt":"constructor() : this(\"s\")\n}\nclass SecondaryWithDefaults(val s: String) {\n constructor(x: Int = 0) : this(x.toString())\n}\nclass SecondaryWithDefaultsNoPrimary {\n constructor(x: Int) {}\n constructor(s: String = \"\") {}\n}\n\n\/\/ Bad classes\n\nclass NoNoArgConstructor(val s: String) {","completion":"constructor(x: Int) : this(x.toString())\n}\nclass NoArgAndDefault() {\n constructor(x: Int = 0) : this()\n}\nclass DefaultPrimaryAndDefaultSecondary(val s: String = \"\") {\n constructor(x: Int = 0) : this(x.toString())\n}\nclass SeveralDefaultSecondaries {\n constructor(x: Int = 0) {}<|endoftext|>"} {"prompt":".appendText(\"\\ndependencies { \\\"jvmAndJsMainCompileOnly\\\"(kotlin(\\\"test\\\")) }\")\n projectPath.resolve(\"my-lib-foo\/src\/jvmAndJsMain\/kotlin\/UseCompileOnlyDependency.kt\").writeText(\n \"\"\"\n import kotlin.test.Test\n \n class UseCompileOnlyDependency {","completion":"@Test\n fun myTest() = Unit\n }\n \"\"\".trimIndent()\n )\n\n build(\":my-lib-foo:compileJvmAndJsMainKotlinMetadata\")\n }\n\n @GradleTestVersions(minVersion = TestVersions.Gradle.G_7_0)\n @GradleTest\n @DisplayName(\"HMPP dependencies in js tests\")<|endoftext|>"} {"prompt":"\/\/ NB: We can't expand typealiases (`toAnnotationClassId`), because it\n \/\/ requires `lookupTag.tySymbol()`, but we can have cycles in annotations.\n \/\/ See the commit message for an example.\n\n val annotations = session.annotationPlatformSupport.deprecationAnnotationsWithOverridesPropagation\n .flatMap { (classId, shouldPropagateToOverrides) ->","completion":"this.filter {\n it.unexpandedClassId == classId\n }.map {\n it to shouldPropagateToOverrides\n }\n }\n\n return buildDeprecationAnnotationInfoPerUseSiteStorage {\n for ((deprecated, shouldPropagateToOverrides) in annotations) {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.ir.backend.js.lower.calls\n\nimport org.jetbrains.kotlin.ir.declarations.IrSimpleFunction\nimport org.jetbrains.kotlin.ir.expressions.IrExpression\nimport org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression","completion":"import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol\nimport org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol\nimport org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol\nimport org.jetbrains.kotlin.ir.types.*<|endoftext|>"} {"prompt":"class Foo {\n val x = 1\n\n fun abc() = x\n\n fun cba() = abc()\n}\n\nclass Bar {\n val x = \"\"\n\n \/\/ NB: unused\n fun Foo.abc() = x\n\n fun bar(): Bar = this\n\n \/\/ NB: unused\n operator fun String.plus(bar: Bar): String {\n return \"\"\n }","completion":"\/\/ NB! abc() here is resolved to member Foo.abc(), and not to extension member of Bar\n fun Foo.check() = abc() + bar()\n\n \/\/ NB! + here is resolved to member String.plus (not to extension member above)\n fun Foo.check2() = \"\" + bar()\n}\n\nfun Foo.ext() = x<|endoftext|>"} {"prompt":"descriptor.runtimeElementsPublished.configure?.invoke(decorated, runtimeElementsPublishedConfiguration)\n descriptor.sourcesElementsPublished.configure?.invoke(decorated, sourcesElementsPublishedConfiguration)\n descriptor.configureIdeImport?.invoke(project.kotlinIdeMultiplatformImport)\n\n targets.add(decorated)","completion":"decorated.logger.info(\"Created ${descriptor.platformType} target\")\n return decorated\n}\n\n\/**\n * @see createExternalKotlinTarget\n *\/\n@ExternalKotlinTargetApi\nfun KotlinMultiplatformExtension.createExternalKotlinTarget(<|endoftext|>"} {"prompt":"diagnosticHandler = { if (it.isError()) errors.add(it) }\n )\n try {\n if (errors.isNotEmpty()) {\n val errorMessage = errors.take(10).joinToString(\"\\n\") { it.format }\n throw Error(errorMessage)\n }\n\n translationUnit.ensureNoCompileErrors()","completion":"indexTranslationUnit(index, translationUnit, 0, object : Indexer {\n override fun importedASTFile(info: CXIdxImportedASTFileInfo) {\n result += info.file!!.canonicalPath\n }\n })\n } finally {\n clang_disposeTranslationUnit(translationUnit)\n }\n return result.toList()\n}\n\nprivate fun getModulesHeaders(<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: -ProhibitProtectedCallFromInline\n\/\/ TARGET_BACKEND: JVM\n\/\/ The non-IR backend attempts to call a non-existent accessor in class Test.\n\/\/ IGNORE_BACKEND: JVM\n\n\/\/ FILE: Test.java\n\npublic class Test {\n protected static String testStatic() {\n return \"OK\";\n }\n}\n\n\/\/ FILE: test.kt","completion":"class Test2 {\n inline fun test() = Test.testStatic()\n}\n\n\/\/ FILE: test2.kt\n\npackage anotherPackage\n\nimport Test2\n\nfun box() = Test2().test()<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\/\/ WORKS_WHEN_VALUE_CLASS\n\/\/ LANGUAGE: +ValueClasses, +GenericInlineClassParameter\n\nvar setterInvoked = 0\nvar backing = 42\n\nOPTIONAL_JVM_INLINE_ANNOTATION\nvalue class Delegate(val ignored: T) {\n\n operator fun getValue(thisRef: Any?, prop: Any?) =","completion":"backing\n\n operator fun setValue(thisRef: Any?, prop: Any?, newValue: Int) {\n setterInvoked++\n backing = newValue\n }\n}\n\nvar topLevelD by Delegate(0)\n\nfun box(): String {\n if (topLevelD != 42) AssertionError()\n\n topLevelD = 1234<|endoftext|>"} {"prompt":"private fun wrapEsModule(function: JsFunction): List {\n val (alreadyPresentedImportStatements, restStatements) = function.body.statements\n .flatMap { if (it is JsCompositeBlock) it.statements else listOf(it) }\n .partitionIsInstance()","completion":"val (multipleElementsImport, defaultImports) = alreadyPresentedImportStatements.partition { it.target is JsImport.Target.Elements }\n\n val mergedImports = multipleElementsImport\n .groupBy { it.module }\n .map { (module, import) -><|endoftext|>"} {"prompt":"val type: WasmType,\n val values: List,\n val mode: Mode,\n) : WasmNamedModuleField() {\n sealed class Mode {\n object Passive : Mode()\n class Active(val table: WasmTable, val offset: List) : Mode()\n object Declarative : Mode()\n }\n}\n\nclass WasmTag(","completion":"val type: WasmFunctionType,\n val importPair: WasmImportDescriptor? = null\n) : WasmNamedModuleField() {\n init {\n assert(type.resultTypes.isEmpty()) { \"Must have empty return as per current spec\" }\n }\n}\n\nclass WasmLocal(\n val id: Int,\n val name: String,\n val type: WasmType,<|endoftext|>"} {"prompt":"\/\/ No implicit bodies here\n }\n else -> throwUnexpectedFirElementError(target)\n }\n\n @Suppress(\"USELESS_CAST\") \/\/ K2 warning suppression, TODO: KT-62472\n (target as FirDeclaration).forEachDeclarationWhichCanHavePostponedSymbols(::publishPostponedSymbols)\n }","completion":"private fun publishPostponedSymbols(target: FirCallableDeclaration) {\n val postponedSymbols = llImplicitBodyResolveComputationSession.postponedSymbols(target)\n if (postponedSymbols.isNotEmpty()) {\n target.postponedSymbolsForAnnotationResolution = postponedSymbols\n }\n }<|endoftext|>"} {"prompt":"if (element21 !in 1L..<3L != !range0.contains(element21)) throw AssertionError()\n if (!(element21 in 1L..<3L) != !range0.contains(element21)) throw AssertionError()\n if (!(element21 !in 1L..<3L) != range0.contains(element21)) throw AssertionError()\n}","completion":"fun testR0xE22() {\n \/\/ with possible local optimizations\n if (4 in 1L..<3L != range0.contains(4)) throw AssertionError()\n if (4 !in 1L..<3L != !range0.contains(4)) throw AssertionError()<|endoftext|>"} {"prompt":"public abstract int hashCode();\n @Override\n public abstract String toString();\n}\n\n\/\/ FILE: JC2.java\npublic abstract class JC2 extends JC {\n}\n\n\/\/ FILE: box.kt\n\ninterface KI : JI\nclass X : KI {\n override fun equals(other: Any?): Boolean = true\n override fun hashCode(): Int = 0","completion":"override fun toString(): String = \"\"\n}\n\nabstract class KC : JC()\nclass Y : KC() {\n override fun equals(other: Any?): Boolean = true\n override fun hashCode(): Int = 0\n override fun toString(): String = \"\"\n}\n\nabstract class KC2 : JC2()\nclass Z : KC2() {<|endoftext|>"} {"prompt":"specificityComparator,\n inferenceComponents,\n transformerComponents,\n considerMissingArgumentsInSignatures = false,\n) {\n\n override fun chooseMaximallySpecificCandidates(\n candidates: Set,\n discriminateAbstracts: Boolean,\n ): Set = chooseMaximallySpecificCandidates(\n candidates,\n discriminateAbstracts,","completion":"\/\/ We don't discriminate against generics for callable references because, other than in regular calls,\n \/\/ there is no syntax for specifying generic type arguments.\n discriminateGenerics = candidates.first().callInfo.callSite !is FirCallableReferenceAccess\n )\n\n \/**<|endoftext|>"} {"prompt":"const val aa = \"INT \" + uint\nconst val bb = \"BYTE \" + ubyte\nconst val cc = \"LONG \" + ulong\n\n\nfun box(): String {\n if (a != \"INT 2415919103\") {\n return \"FAIL 0: $a\"\n }\n if (aa != \"INT 2415919103\") {\n return \"FAIL 1: $aa\"\n }","completion":"if (b != \"BYTE 2303\") {\n return \"FAIL 2: $b\"\n }\n if (bb != \"BYTE 2303\") {\n return \"FAIL 3: $bb\"\n }\n\n\n if (c != \"LONG 281474976710655\") {\n return \"FAIL 4: $c\"\n }<|endoftext|>"} {"prompt":"* Convert types which do not have members - kotlin.Nothing and `dynamic` - to kotlin.Any.\n *\/\n private fun ConeKotlinType.coerceToAny(): ConeKotlinType {\n return when {\n this.isNothingOrNullableNothing -> session.builtinTypes.anyType.type","completion":"this is ConeDynamicType -> session.builtinTypes.anyType.type\n else -> this\n }\n }\n\n fun generateDispatchReceiverParameter(irFunction: IrFunction) =\n irFunction.declareThisReceiverParameter(\n c,\n irClass.defaultType,\n IrDeclarationOrigin.DEFINED,\n UNDEFINED_OFFSET,<|endoftext|>"} {"prompt":"fun objcReleaseFromNativeThreadState(objCReference: LLVMValueRef) {\n \/\/ It is nounwind, so no exception handler is required.\n call(objCExportCodegen.objcRelease, listOf(objCReference), exceptionHandler = ExceptionHandler.None)\n }\n\n override fun processReturns() {\n \/\/ Do nothing.\n }","completion":"val terminatingExceptionHandler = object : ExceptionHandler.Local() {\n override val unwind: LLVMBasicBlockRef by lazy {\n val result = basicBlockInFunction(\"fatal_landingpad\", endLocation)\n appendingTo(result) {\n val landingpad = gxxLandingpad(0)\n LLVMSetCleanup(landingpad, 1)<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\/\/ WORKS_WHEN_VALUE_CLASS\n\/\/ LANGUAGE: +ValueClasses\n\nfun underlying(a: IC): T = bar(a) {\n it.value as T\n}\n\nfun extension(a: IC): T = bar(a) {\n it.extensionValue()\n}","completion":"fun dispatch(a: IC): T = bar(a) {\n it.dispatchValue()\n}\n\nfun normal(a: IC): T = bar(a) {\n normalValue(it)\n}\n\nfun interface FunIFace {\n fun call(ic: T): R\n}<|endoftext|>"} {"prompt":"val specificCapturedType = AbstractTypeChecker.prepareType(context, specificType)\n .let { if (captureFromArgument) context.captureFromExpression(it) ?: it else it }\n addSubtypeConstraint(specificCapturedType, substitutedGeneralType)\n }\n }\n\n return true\n}","completion":"fun SimpleConstraintSystem.isSignatureNotLessSpecific(\n specific: FlatSignature,\n general: FlatSignature,\n callbacks: SpecificityComparisonCallbacks,\n specificityComparator: TypeSpecificityComparator,\n useOriginalSamTypes: Boolean = false\n): Boolean {\n if (specific.hasExtensionReceiver != general.hasExtensionReceiver) return false<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.scripting.compiler.plugin.repl.JvmReplCompilerState\nimport org.jetbrains.kotlin.scripting.ide_services.compiler.impl.IdeLikeReplCodeAnalyzer\nimport org.jetbrains.kotlin.scripting.ide_services.compiler.impl.KotlinResolutionFacadeForRepl","completion":"import org.jetbrains.kotlin.scripting.ide_services.compiler.impl.getKJvmCompletion\nimport org.jetbrains.kotlin.scripting.ide_services.compiler.impl.prepareCodeForCompletion\nimport kotlin.script.experimental.api.*\nimport kotlin.script.experimental.host.ScriptingHostConfiguration<|endoftext|>"} {"prompt":"fun box(): String {\n val b = A().B()\n if (b.test1() != \"A.bar\") return \"test1 ${b.test1()}\"\n if (b.test2() != \"B.bar\") return \"test2 ${b.test2()}\"\n if (b.test3() != \"B.bar\") return \"test3 ${b.test3()}\"","completion":"if (b.test4() != \"A.bar\") return \"test4 ${b.test4()}\"\n if (b.test5() != \"B.bar\") return \"test5 ${b.test5()}\"\n if (b.test6() != \"B.bar\") return \"test6 ${b.test6()}\"\n \n return \"OK\"\n}<|endoftext|>"} {"prompt":"produceHeaderKlib: Boolean = false,\n) : KlibMetadataSerializer(languageVersionSettings, metadataVersion, project, exportKDoc, skipExpects, includeOnlyModuleContent, allowErrorTypes, produceHeaderKlib) {\n\n private fun serializePackageFragment(fqName: FqName, module: ModuleDescriptor): List {","completion":"val fragments = if (includeOnlyModuleContent) {\n module.packageFragmentProviderForModuleContentWithoutDependencies.packageFragments(fqName)\n } else {\n module.getPackage(fqName).fragments.filter { it.module == module }\n }\n\n if (fragments.isEmpty()) return emptyList()<|endoftext|>"} {"prompt":"public inline val RequestCredentials.Companion.SAME_ORIGIN: RequestCredentials get() = \"same-origin\".asDynamic().unsafeCast()\n\npublic inline val RequestCredentials.Companion.INCLUDE: RequestCredentials get() = \"include\".asDynamic().unsafeCast()\n\n\/* please, don't implement this interface! *\/","completion":"@JsName(\"null\")\n@Suppress(\"NESTED_CLASS_IN_EXTERNAL_INTERFACE\")\npublic external interface RequestCache {\n companion object\n}\n\npublic inline val RequestCache.Companion.DEFAULT: RequestCache get() = \"default\".asDynamic().unsafeCast()<|endoftext|>"} {"prompt":"return \"OK\"\n}\n\nopen class A {\n open fun group(): A {\n return null!!\n }\n fun apply(instance: A, function: (F) -> R): A {\n return null!!\n }\n companion object {","completion":"fun create(a: (A) -> A) {}\n }\n}<|endoftext|>"} {"prompt":"for(i in 1..10) {\n y += \"\"\n y = x\n x.length\n y.length\n }\n}\n\nfun test29() {\n val x: Any? = materialize()\n var y = x\n require(y is Int)\n for(i in 1..10) {","completion":"y++\n y = x\n x.inc()\n y.inc()\n }\n}\n\n\/\/Nested loop\n\nfun test30() {\n var x: Any? = materialize()\n require(x is String)\n for (i in 1..10) {<|endoftext|>"} {"prompt":"val FORCE_PARAMETER = Name.identifier(\"\\$force\")\n val STABILITY_FLAG = Name.identifier(\"\\$stable\")\n val STABILITY_PROP_FLAG = Name.identifier(\"\\$stableprop\")\n val DEFAULT_PARAMETER = Name.identifier(\"\\$default\")\n val JOINKEY = Name.identifier(\"joinKey\")","completion":"val STARTRESTARTGROUP = Name.identifier(\"startRestartGroup\")\n val ENDRESTARTGROUP = Name.identifier(\"endRestartGroup\")\n val UPDATE_SCOPE = Name.identifier(\"updateScope\")\n val SOURCEINFORMATION = \"sourceInformation\"\n val SOURCEINFORMATIONMARKERSTART = \"sourceInformationMarkerStart\"<|endoftext|>"} {"prompt":"if (!(element3 !in collection.indices) != range0.contains(element3)) throw AssertionError()\n}\n\nfun testR0xE4() {\n \/\/ with possible local optimizations\n if (0.toByte() in collection.indices != range0.contains(0.toByte())) throw AssertionError()","completion":"if (0.toByte() !in collection.indices != !range0.contains(0.toByte())) throw AssertionError()\n if (!(0.toByte() in collection.indices) != !range0.contains(0.toByte())) throw AssertionError()<|endoftext|>"} {"prompt":"* @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].\n *\/\n@SinceKotlin(\"1.3\")\n@Suppress(\"ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS\")\npublic actual fun ShortArray.fill(element: Short, fromIndex: Int = 0, toIndex: Int = size): Unit {","completion":"AbstractList.checkRangeIndexes(fromIndex, toIndex, size)\n for (index in fromIndex until toIndex) {\n this[index] = element \n }\n}\n\n\/**\n * Fills this array or its subrange with the specified [element] value.\n * \n * @param fromIndex the start of the range (inclusive) to fill, 0 by default.<|endoftext|>"} {"prompt":"public fun maxOf(a: kotlin.UInt, b: kotlin.UInt): kotlin.UInt\n\n@kotlin.SinceKotlin(version = \"1.5\")\n@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class})\n@kotlin.internal.InlineOnly","completion":"public inline fun maxOf(a: kotlin.UInt, b: kotlin.UInt, c: kotlin.UInt): kotlin.UInt\n\n@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.ExperimentalUnsignedTypes<|endoftext|>"} {"prompt":"functionTypeConstructor: ConeClassLikeLookupTag,\n arguments: Array,\n isNullable: Boolean,\n attributes: ConeAttributes\n ): ConeClassLikeType {\n val result =\n when ((functionTypeConstructor.toSymbol(moduleData.session)?.fir as FirTypeParameterRefsOwner).typeParameters.size - arguments.size) {","completion":"0 -> createSuspendFunctionTypeForBasicCase(functionTypeConstructor, arguments, isNullable, attributes)\n 1 -> {\n val arity = arguments.size - 1\n if (arity >= 0) {\n val kind = FunctionTypeKind.SuspendFunction\n ConeClassLikeTypeImpl(\n ClassId(kind.packageFqName, kind.numberedClassName(arity)).toLookupTag(),<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol\nimport org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol\nimport org.jetbrains.kotlin.ir.symbols.IrSymbol\nimport org.jetbrains.kotlin.ir.symbols.impl.IrFakeOverrideSymbolBase","completion":"import org.jetbrains.kotlin.ir.util.SymbolRemapper\nimport org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid\nimport org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid\nimport org.jetbrains.kotlin.ir.visitors.acceptVoid\n\n\/**<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.descriptors.FunctionDescriptor\nimport org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor\nimport org.jetbrains.kotlin.js.translate.context.TranslationContext\nimport org.jetbrains.kotlin.js.translate.reference.ReferenceTranslator","completion":"import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter\n\nclass RangeToIntrinsic(function: FunctionDescriptor) : FunctionIntrinsicWithReceiverComputed() {\n val rangeTypeDescriptor = function.returnType!!.constructor.declarationDescriptor as ClassDescriptor<|endoftext|>"} {"prompt":"\/\/ NOTE: This method is used for presenting positions to the user\n override fun toString(): String = if (line < 0) \"(offset: $column line unknown)\" else \"($line,$column)\"\n\n companion object {\n val NONE = KtSourceFileDiagnosticPos(-1, -1, null)\n }\n}","completion":"private class SequentialFilePositionFinder private constructor(private val reader: InputStreamReader)\n : Closeable, SequentialPositionFinder(reader)\n{\n constructor(file: File) : this(file.reader(\/* TODO: select proper charset *\/))\n\n override fun close() {\n reader.close()\n }\n}\n\n\/\/ public only for tests<|endoftext|>"} {"prompt":"generateCheckersComponents(generationPath, declarationPackage, \"FirDeclarationChecker\") {\n alias(\"BasicDeclarationChecker\")\n alias(\"CallableDeclarationChecker\")\n alias(\"FunctionChecker\")\n alias(\"SimpleFunctionChecker\")\n alias(\"PropertyChecker\")","completion":"alias(\"ClassLikeChecker\")\n alias(\"ClassChecker\")\n alias(\"RegularClassChecker\")\n alias(\"ConstructorChecker\")\n alias(\"FileChecker\")\n alias(\"ScriptChecker\")<|endoftext|>"} {"prompt":"}\n }\n\n private fun reportAlternativeSignatureErrors() {\n val bc = analysisResult.bindingContext\n val descriptorsWithErrors = bc.getKeys(JvmBindingContextSlices.LOAD_FROM_JAVA_SIGNATURE_ERRORS)\n if (!descriptorsWithErrors.isEmpty()) {","completion":"val message = StringBuilder(\"The following Java entities have annotations with wrong Kotlin signatures:\\n\")\n for (descriptor in descriptorsWithErrors) {\n val declaration = DescriptorToSourceUtils.descriptorToDeclaration(descriptor)\n assert(declaration is PsiModifierListOwner)<|endoftext|>"} {"prompt":"val backingFieldVal: String = \"no\"\n var backingFieldVar: String = \"no\"\n\n val customAccessorVal: String","completion":"get() = \"no\"\n var customAccessorVar: String\n get() = \"no\"\n set(value) {}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor\nimport org.jetbrains.kotlin.descriptors.impl.AnonymousFunctionDescriptor\n\nval CallableDescriptor.isSuspendLambda get() = this is AnonymousFunctionDescriptor && this.isSuspend","completion":"val ValueParameterDescriptor.hasSuspendFunctionType get() = returnType?.isSuspendFunctionType == true\n\nval ValueParameterDescriptor.hasFunctionOrSuspendFunctionType get() = returnType?.isFunctionOrSuspendFunctionType == true<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.resolve.toSymbol\nimport org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator\nimport org.jetbrains.kotlin.fir.scopes.getDeclaredConstructors\nimport org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol","completion":"import org.jetbrains.kotlin.fir.symbols.lazyDeclarationResolver\nimport org.jetbrains.kotlin.fir.types.*\nimport org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef\nimport org.jetbrains.kotlin.metadata.ProtoBuf<|endoftext|>"} {"prompt":"if (!(-1.0 in 3.0..1.0) != !range1.contains(-1.0)) throw AssertionError()\n if (!(-1.0 !in 3.0..1.0) != range1.contains(-1.0)) throw AssertionError()\n \/\/ no local optimizations","completion":"if (element1 in 3.0..1.0 != range1.contains(element1)) throw AssertionError()\n if (element1 !in 3.0..1.0 != !range1.contains(element1)) throw AssertionError()\n if (!(element1 in 3.0..1.0) != !range1.contains(element1)) throw AssertionError()<|endoftext|>"} {"prompt":"extends AbstractAssertWithOriginWithColumnsAndRows implements OriginWithColumnsAndRows {\n\n}\n\n\/\/ FILE: AbstractValueAssert.java","completion":"public abstract class AbstractValueAssert, A extends AbstractDbAssert, S extends AbstractSubAssert, V extends AbstractValueAssert, C extends AbstractColumnAssert"} {"prompt":"expect(1) { intArrayOf(1, 2, 3).indexOf(2) }\n expect(2) { intArrayOf(1, 2, 3).indexOf(3) }\n\n expect(-1) { longArrayOf(1, 2, 3).indexOf(0) }\n expect(0) { longArrayOf(1, 2, 3).indexOf(1) }","completion":"expect(1) { longArrayOf(1, 2, 3).indexOf(2) }\n expect(2) { longArrayOf(1, 2, 3).indexOf(3) }\n\n\/\/ expect(-1) { floatArrayOf(1.0f, 2.0f, 3.0f).indexOf(0f) }<|endoftext|>"} {"prompt":"* HELPERS: enumClasses, contractFunctions\n *\/\n\n\/\/ TESTCASE NUMBER: 1\nfun case_1(value_1: EnumClass?) {\n val value_2: Int\n\n when (value_1) {\n EnumClass.NORTH -> funWithExactlyOnceCallsInPlace { value_2 = 1 }","completion":"EnumClass.SOUTH -> funWithExactlyOnceCallsInPlace { value_2 = 2 }\n EnumClass.WEST -> funWithExactlyOnceCallsInPlace { value_2 = 3 }\n EnumClass.EAST -> funWithExactlyOnceCallsInPlace { value_2 = 4 }\n null -> funWithExactlyOnceCallsInPlace { value_2 = 5 }\n }<|endoftext|>"} {"prompt":"arguments: List,\n): SymbolLightAbstractAnnotationParameterList = if (arguments.isNotEmpty()) {\n SymbolLightLazyAnnotationParameterList(this, lazyOf(arguments))\n} else {\n symbolLightAnnotationParameterList()\n}\n\ninternal inline fun SymbolLightAbstractAnnotation.symbolLightAnnotationParameterList(","completion":"crossinline argumentsComputer: () -> List,\n): SymbolLightAbstractAnnotationParameterList = SymbolLightLazyAnnotationParameterList(this, lazyPub { argumentsComputer() })<|endoftext|>"} {"prompt":"class FirPlaceholderProjectionBuilder {\n var source: KtSourceElement? = null\n\n fun build(): FirPlaceholderProjection {\n return FirPlaceholderProjectionImpl(\n source,\n )\n }\n\n}\n\n@OptIn(ExperimentalContracts::class)\ninline fun buildPlaceholderProjection(init: FirPlaceholderProjectionBuilder.() -> Unit = {}): FirPlaceholderProjection {","completion":"contract {\n callsInPlace(init, InvocationKind.EXACTLY_ONCE)\n }\n return FirPlaceholderProjectionBuilder().apply(init).build()\n}<|endoftext|>"} {"prompt":"if (!(3L !in 1..3) != range0.contains(3L)) throw AssertionError()\n \/\/ no local optimizations\n if (element19 in 1..3 != range0.contains(element19)) throw AssertionError()\n if (element19 !in 1..3 != !range0.contains(element19)) throw AssertionError()","completion":"if (!(element19 in 1..3) != !range0.contains(element19)) throw AssertionError()\n if (!(element19 !in 1..3) != range0.contains(element19)) throw AssertionError()\n}\n\nfun testR0xE20() {\n \/\/ with possible local optimizations<|endoftext|>"} {"prompt":"abstract class Test3 : IStr by CStr(), IInt by CInt()\n\nabstract class Test4 : IStr by CStr(), IGeneric\n\nabstract class Test5 : IStr by CStr(), IGeneric","completion":"abstract class Test6 : IStr by CStr(), IGeneric\n\nabstract class Test7 : IGeneric by CGeneric(), IStr<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.load.java.NULLABILITY_ANNOTATIONS\nimport org.jetbrains.kotlin.load.java.descriptors.JavaCallableMemberDescriptor\nimport org.jetbrains.kotlin.platform.PlatformSpecificDiagnosticComponents\n\nclass JvmDiagnosticComponents(\n private val typeQualifierResolver: AnnotationTypeQualifierResolver","completion":") : PlatformSpecificDiagnosticComponents {\n override fun isNullabilityAnnotation(\n annotationDescriptor: AnnotationDescriptor,\n containingDeclaration: DeclarationDescriptor\n ): Boolean {\n if (containingDeclaration !is JavaCallableMemberDescriptor) {\n return false\n }<|endoftext|>"} {"prompt":"val enhancePrimitiveArrays: Boolean\n\n object Default : JavaResolverSettings {\n override val correctNullabilityForNotNullTypeParameter: Boolean\n get() = false\n\n override val typeEnhancementImprovementsInStrictMode: Boolean\n get() = false\n\n override val ignoreNullabilityForErasedValueParameters: Boolean\n get() = false","completion":"override val enhancePrimitiveArrays: Boolean\n get() = false\n }\n\n companion object {\n fun create(\n correctNullabilityForNotNullTypeParameter: Boolean,\n typeEnhancementImprovementsInStrictMode: Boolean,\n ignoreNullabilityForErasedValueParameters: Boolean,\n enhancePrimitiveArrays: Boolean,\n ): JavaResolverSettings =<|endoftext|>"} {"prompt":"* DESCRIPTION: 'When' with different variants of the arithmetic expressions (additive expression and multiplicative expression) in 'when condition'.\n * HELPERS: typesProvider, classes, functions\n *\/\n\n\/\/ TESTCASE NUMBER: 1\nfun case_1(value_1: Any?) {\n when (value_1) {\n true, 100, -.09f -> {}\n '.', \"...\", null -> {}","completion":"}\n}\n\n\/\/ TESTCASE NUMBER: 2\nfun case_2(value_1: Number, value_2: Int) {\n when (value_1) {\n -.09 % 10L, value_2 \/ -5, getByte() - 11 + 90 -> {}\n }\n}\n\n\/\/ TESTCASE NUMBER: 4<|endoftext|>"} {"prompt":"workingDirFromAnnotation ?: getTestName(false)\n )\n originalProjectDir = projDirPath.toFile()\n workDir = copyTestDataToTmpDir(originalProjectDir)\n orCreateProjectDir\n }\n\n protected open fun copyTestDataToTmpDir(testDataDir: File): File {","completion":"assert(testDataDir.exists()) { \"Cannot find source folder \" + testDataDir.absolutePath }\n val tmpDir = FileUtil.createTempDirectory(\"kjbtb-jps-build\", null)\n FileUtil.copyDir(testDataDir, tmpDir)\n return tmpDir\n }\n\n override fun tearDown() {\n RunAll(<|endoftext|>"} {"prompt":"swap(i++, j--)\n }\n\n return i\n}\n\nfun check(array: UIntArray, resultAsInt: String, resultAsInner: String) {\n val actualAsInt = StringBuilder()\n val actualAsInner = StringBuilder()\n for (n in array) {\n actualAsInt.append(\"${n.asInt()} \")","completion":"actualAsInner.append(n.toString() + \" \")\n }\n\n if (actualAsInt.toString() != resultAsInt) {\n throw IllegalStateException(\"wrong result as int (actual): $actualAsInt ; expected: $resultAsInt\")\n }\n\n if (actualAsInner.toString() != resultAsInner) {<|endoftext|>"} {"prompt":"if (ann.s != 1.toShort()) return \"fail: annotation parameter s should be 1, but was ${ann.s}\"\n if (ann.i != 1) return \"fail: annotation parameter i should be 1, but was ${ann.i}\"\n if (ann.f != 1.toFloat()) return \"fail: annotation parameter f should be 1, but was ${ann.f}\"","completion":"if (ann.d != 1.0) return \"fail: annotation parameter d should be 1, but was ${ann.d}\"\n if (ann.l != 1.toLong()) return \"fail: annotation parameter l should be 1, but was ${ann.l}\"\n if (ann.c != 'c') return \"fail: annotation parameter c should be 1, but was ${ann.c}\"<|endoftext|>"} {"prompt":"public actual operator fun CharArray.plus(elements: Collection): CharArray {\n var index = size\n val result = this.copyOf(size + elements.size)\n for (element in elements) result[index++] = element\n return result\n}\n\n\/**\n * Returns an array containing all elements of the original array and then all elements of the given [elements] array.\n *\/","completion":"@Suppress(\"ACTUAL_WITHOUT_EXPECT\", \"NOTHING_TO_INLINE\")\npublic actual inline operator fun Array.plus(elements: Array): Array {\n return this.asDynamic().concat(elements)\n}\n\n\/**\n * Returns an array containing all elements of the original array and then all elements of the given [elements] array.<|endoftext|>"} {"prompt":"constructor.transformDelegatedConstructor(transformer, data)\n context.forConstructorBody(constructor, session) {\n constructor.transformBody(transformer, data)\n }\n }\n\n val controlFlowGraphReference = dataFlowAnalyzer.exitFunction(constructor)\n constructor.replaceControlFlowGraphReference(controlFlowGraphReference)\n return constructor\n }","completion":"override fun transformMultiDelegatedConstructorCall(\n multiDelegatedConstructorCall: FirMultiDelegatedConstructorCall,\n data: ResolutionMode,\n ): FirStatement {\n multiDelegatedConstructorCall.transformChildren(this, data)\n return super.transformMultiDelegatedConstructorCall(multiDelegatedConstructorCall, data)\n }<|endoftext|>"} {"prompt":"* Returns whether this [FirScope] is a scope wider than [another] based on the above [PartialOrderOfScope] or not.\n *\/\n private fun FirScope.isWiderThan(another: FirScope): Boolean =\n toPartialOrder().scopeDistanceLevel > another.toPartialOrder().scopeDistanceLevel\n\n \/**","completion":"* Assuming that all scopes in this List and [base] are surrounding [from], returns whether an element of\n * this List is closer than [base] based on the distance from [from].\n *\/\n private fun List.hasScopeCloserThan(base: FirScope, from: KtElement) = any { scope -><|endoftext|>"} {"prompt":"\"kotlin.arrayOf\", \"kotlin.byteArrayOf\", \"kotlin.charArrayOf\", \"kotlin.shortArrayOf\", \"kotlin.intArrayOf\",\n \"kotlin.longArrayOf\", \"kotlin.floatArrayOf\", \"kotlin.doubleArrayOf\", \"kotlin.booleanArrayOf\"\n )\n }","completion":"override fun evaluate(irFunction: IrFunction, environment: IrInterpreterEnvironment) {\n val elementsSymbol = irFunction.valueParameters.single().symbol\n val varargVariable = environment.callStack.loadState(elementsSymbol)\n environment.callStack.pushState(varargVariable)\n }\n}\n\ninternal object ArrayOfNulls : IntrinsicBase() {<|endoftext|>"} {"prompt":"add(FirJsErrors.JS_NAME_ON_PRIMARY_CONSTRUCTOR_PROHIBITED) { firDiagnostic ->\n JsNameOnPrimaryConstructorProhibitedImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }","completion":"add(FirJsErrors.JS_NAME_ON_ACCESSOR_AND_PROPERTY) { firDiagnostic ->\n JsNameOnAccessorAndPropertyImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }<|endoftext|>"} {"prompt":"private fun ExportModelGenerator.generateExportWithExternals(irFiles: Collection): List {\n return irFiles.map { irFile ->\n val exports = generateExport(irFile)\n val additionalExports = backendContext.externalPackageFragment[irFile.symbol]?.let { generateExport(it) } ?: emptyList()","completion":"val allExports = additionalExports + exports\n val tsDeclarations = runIf(shouldGenerateTypeScriptDefinitions) {\n allExports.ifNotEmpty { toTypeScriptFragment(moduleKind) }\n }\n IrFileExports(irFile, allExports, tsDeclarations)\n }\n }<|endoftext|>"} {"prompt":"\/\/ Enable when callable references to builtin members and using lambdas as extension lambdas (KT-13312) is supported\n\/\/ FILE: 1.kt\n\npackage test\n\ninline fun call(p: String, s: String.() -> Int): Int {\n return p.s()\n}\n\n\/\/ FILE: 2.kt\n\nimport test.*\n\nfun box() : String {","completion":"return if (call(\"123\", String::length) == 3) \"OK\" else \"fail\"\n}<|endoftext|>"} {"prompt":"\/\/ library.kt:13 box: $i$f$foo\\1\\64:int=0:int, array\\1:java.lang.Integer[]=java.lang.Integer[], myClass\\1:MyClass=MyClass, this_\\43:MyClass=MyClass, $i$f$f2\\43\\477:int=0:int","completion":"\/\/ library.kt:56 box: $i$f$foo\\1\\64:int=0:int, array\\1:java.lang.Integer[]=java.lang.Integer[], myClass\\1:MyClass=MyClass, this_\\43:MyClass=MyClass, $i$f$f2\\43\\477:int=0:int, $i$f$test\\44\\491:int=0:int<|endoftext|>"} {"prompt":"val matchResult = moduleDirectiveRegex.matchEntire(moduleDirectiveString)\n ?: error(\"\\\"$moduleDirectiveString\\\" doesn't matches with pattern \\\"moduleName(dep1, dep2)\\\"\")\n val (name, _, dependencies, _, friends, _, dependsOn) = matchResult.destructured","completion":"var dependenciesNames = dependencies.takeIf { it.isNotBlank() }?.split(\" \") ?: emptyList()\n globalDirectives?.let { directives ->\n \/*\n * In old tests coroutine helpers was added as separate module named `support`\n * instead of additional files for current module. So to safe compatibility with\n * old testdata we need to filter this dependency\n *\/<|endoftext|>"} {"prompt":"enhanceConeKotlinType(session, qualifiers, 0, mutableListOf().apply { computeSubtreeSizes(this) }, convertErrorsToWarnings = false)\n\n\/\/ The index in the lambda is the position of the type component in a depth-first walk of the tree.","completion":"\/\/ Example: A, E> - 0<1<2, 3>, 4<5>>. For flexible types, some arguments in the lower bound\n\/\/ may be replaced with star projections in the upper bound, but otherwise corresponding arguments<|endoftext|>"} {"prompt":"public external abstract class SVGMaskElement : SVGElement, SVGUnitTypes, JsAny {\n open val maskUnits: SVGAnimatedEnumeration\n open val maskContentUnits: SVGAnimatedEnumeration\n open val x: SVGAnimatedLength\n open val y: SVGAnimatedLength\n open val width: SVGAnimatedLength\n open val height: SVGAnimatedLength\n\n companion object {","completion":"val SVG_UNIT_TYPE_UNKNOWN: Short\n val SVG_UNIT_TYPE_USERSPACEONUSE: Short\n val SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: Short\n val ELEMENT_NODE: Short\n val ATTRIBUTE_NODE: Short\n val TEXT_NODE: Short\n val CDATA_SECTION_NODE: Short<|endoftext|>"} {"prompt":"* Parses the string as an [UInt] number and returns the result\n * or `null` if the string is not a valid representation of a number.\n *\n * @throws IllegalArgumentException when [radix] is not a valid radix for string to number conversion.\n *\/\n@SinceKotlin(\"1.5\")\n@WasExperimental(ExperimentalUnsignedTypes::class)","completion":"public fun String.toUIntOrNull(radix: Int): UInt? {\n checkRadix(radix)\n\n val length = this.length\n if (length == 0) return null\n\n val limit: UInt = UInt.MAX_VALUE\n val start: Int\n\n val firstChar = this[0]\n if (firstChar < '0') {<|endoftext|>"} {"prompt":"return callee.valueParameters.singleOrNull()?.type in progressionElementTypes &&\n callee.extensionReceiverParameter?.type in progressionElementTypes &&\n callee.kotlinFqName == FqName(\"kotlin.ranges.until\")\n }\n\n override fun build(expression: IrCall, data: ProgressionType, scopeOwner: IrSymbol): HeaderInfo? =","completion":"with(context.createIrBuilder(scopeOwner, expression.startOffset, expression.endOffset)) {\n ProgressionHeaderInfo(\n data,\n first = expression.extensionReceiver!!,\n last = expression.getValueArgument(0)!!,\n step = irInt(1),\n canOverflow = false,\n isLastInclusive = false,<|endoftext|>"} {"prompt":"\"\\u1F0A\\u0399\", \"\\u1F0B\\u0399\", \"\\u1F0C\\u0399\",","completion":"\"\\u1F0D\\u0399\", \"\\u1F0E\\u0399\", \"\\u1F0F\\u0399\", \"\\u1F08\\u0399\", \"\\u1F09\\u0399\", \"\\u1F0A\\u0399\", \"\\u1F0B\\u0399\", \"\\u1F0C\\u0399\",<|endoftext|>"} {"prompt":"byteBufferStartIndex += 1\n resetByteBufferIfEmpty()\n return byte\n }\n return when (read(singleByteBuffer, 0, 1)) {\n -1 -> -1\n 1 -> singleByteBuffer[0].toInt() and 0xFF\n else -> error(\"Unreachable\")\n }\n }","completion":"override fun read(destination: ByteArray, offset: Int, length: Int): Int {\n if (offset < 0 || length < 0 || offset + length > destination.size) {\n throw IndexOutOfBoundsException(\"offset: $offset, length: $length, buffer size: ${destination.size}\")\n }\n if (isClosed) {\n throw IOException(\"The input stream is closed.\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.ir.overrides\n\nimport org.jetbrains.kotlin.descriptors.DescriptorVisibilities\nimport org.jetbrains.kotlin.descriptors.DescriptorVisibility\nimport org.jetbrains.kotlin.descriptors.Modality\nimport org.jetbrains.kotlin.ir.declarations.*","completion":"import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol\nimport org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol\nimport org.jetbrains.kotlin.ir.symbols.IrSymbol\nimport org.jetbrains.kotlin.ir.types.*<|endoftext|>"} {"prompt":"fun eqIntFloat(a: A, b: B) = a == b\nfun eqIntFloatQ(a: A, b: B) = a == b\nfun eqIntQFloat(a: A, b: B) = a == b","completion":"fun eqIntQFloatQ(a: A, b: B) = a == b\nfun eqIntDouble(a: A, b: B) = a == b\nfun eqIntDoubleQ(a: A, b: B) = a == b<|endoftext|>"} {"prompt":"print(\"forEach { it\")\n if (child.baseType.nullable) {\n print(\"?\")\n }\n println(\".accept(visitor, data) }\")\n }\n }\n }\n }\n } else {\n println()\n }\n }\n\n if (element.hasTransformChildrenMethod) {\n printTransformChildrenMethod(\n element = element,","completion":"transformerClass = elementTransformerType,\n returnType = StandardTypes.unit,\n override = !element.isRootElement,\n )\n if (!element.isRootElement) {\n printBlock {\n for (child in element.transformableChildren) {\n print(child.name)\n when (child) {\n is SingleField -> {<|endoftext|>"} {"prompt":"UBInfo(0x1100, 0x11FF, \"HangulJamo\"), \/\/ Character.UnicodeBlock.HANGUL_JAMO\n \/* 1200; 137F; Ethiopic *\/\n UBInfo(0x1200, 0x137F, \"Ethiopic\"), \/\/ Character.UnicodeBlock.ETHIOPIC\n \/* 13A0; 13FF; Cherokee *\/","completion":"UBInfo(0x13A0, 0x13FF, \"Cherokee\"), \/\/ Character.UnicodeBlock.CHEROKEE\n \/* 1400; 167F; Unified Canadian Aboriginal Syllabics *\/<|endoftext|>"} {"prompt":"* Decodes a string from the bytes in UTF-8 encoding in this array or its subrange.\n *\n * @param startIndex the beginning (inclusive) of the subrange to decode, 0 by default.\n * @param endIndex the end (exclusive) of the subrange to decode, size of this array by default.","completion":"* @param throwOnInvalidSequence specifies whether to throw an exception on malformed byte sequence or replace it by the replacement char `\\uFFFD`.\n *\n * @throws IndexOutOfBoundsException if [startIndex] is less than zero or [endIndex] is greater than the size of this array.\n * @throws IllegalArgumentException if [startIndex] is greater than [endIndex].<|endoftext|>"} {"prompt":"\/\/ This file was generated automatically. See compiler\/fir\/tree\/tree-generator\/Readme.md.\n\/\/ DO NOT MODIFY IT MANUALLY.\n\npackage org.jetbrains.kotlin.fir.expressions\n\nimport org.jetbrains.kotlin.KtSourceElement\nimport org.jetbrains.kotlin.fir.FirElement","completion":"import org.jetbrains.kotlin.fir.FirTarget\nimport org.jetbrains.kotlin.fir.FirTargetElement\nimport org.jetbrains.kotlin.fir.types.ConeKotlinType\nimport org.jetbrains.kotlin.fir.visitors.FirTransformer<|endoftext|>"} {"prompt":"val CompilerOutputKind.isHeaderCache: Boolean\n get() = this == CompilerOutputKind.HEADER_CACHE\n\nval CompilerOutputKind.isCache: Boolean\n get() = this.isFullCache || this.isHeaderCache\n\ninternal fun produceCStubs(generationState: NativeGenerationState) {\n generationState.cStubsManager.compile(\n generationState.config.clang,","completion":"generationState.messageCollector,\n generationState.inVerbosePhase\n ).forEach {\n parseAndLinkBitcodeFile(generationState, generationState.llvm.module, it.absolutePath)\n }\n}\n\nprivate data class LlvmModules(\n val runtimeModules: List,\n val additionalModules: List\n)\n\n\/**<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ FIR_IDENTICAL\n\/\/ FILE: JavaAnn.java\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n@Retention(RetentionPolicy.RUNTIME)\n@interface JavaAnn {\n String value() default \"\";\n int i() default 0;\n}\n\n\/\/ FILE: javaAnnotation.kt","completion":"@JavaAnn fun test1() {}\n\n@JavaAnn(value=\"abc\", i=123) fun test2() {}\n\n@JavaAnn(i=123, value=\"abc\") fun test3() {}<|endoftext|>"} {"prompt":"to.autoCacheDir = from.autoCacheDir\n to.autoCacheableFrom = from.autoCacheableFrom?.copyOf()\n to.backendThreads = from.backendThreads\n to.binaryOptions = from.binaryOptions?.copyOf()\n to.bundleId = from.bundleId\n to.cacheDirectories = from.cacheDirectories?.copyOf()","completion":"to.cachedLibraries = from.cachedLibraries?.copyOf()\n to.checkDependencies = from.checkDependencies\n to.checkExternalCalls = from.checkExternalCalls\n to.clangOptions = from.clangOptions?.copyOf()\n to.compileFromBitcode = from.compileFromBitcode\n to.debug = from.debug<|endoftext|>"} {"prompt":"y\n y.length\n }\n }\n constructor(y: Int?) : this() {\n println(y)","completion":"}\n constructor(y: Int?, z: Int?) : this() {\n println(y)\n }\n}\n\n\/*\n * TESTCASE NUMBER: 8\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-17694\n *\/\nclass Case8 {\n init {\n var y: String? = \"xyz\"\n y!!<|endoftext|>"} {"prompt":"* Available at https:\/\/www.jstatsoft.org\/v08\/i14\/paper\n *\n *\/\ninternal class XorWowRandom internal constructor(\n private var x: Int,\n private var y: Int,\n private var z: Int,\n private var w: Int,\n private var v: Int,\n private var addend: Int\n) : Random(), Serializable {","completion":"internal constructor(seed1: Int, seed2: Int) :\n this(seed1, seed2, 0, 0, seed1.inv(), (seed1 shl 10) xor (seed2 ushr 4))\n\n init {\n require((x or y or z or w or v) != 0) { \"Initial state must have at least one non-zero element.\" }<|endoftext|>"} {"prompt":"import kotlin.script.experimental.dependencies.impl.makeExternalDependenciesResolverOptions\n\nclass ResolverOptionsTest : TestCase() {\n fun testValueInMapAppearsIfPresent() {\n val map = mapOf(\"option\" to \"value\")\n val options = makeExternalDependenciesResolverOptions(map)\n\n assertEquals(options.value(\"option\"), \"value\")\n }","completion":"fun testFlagInMapAppearsIfPresent() {\n val map = mapOf(\"option\" to \"true\")\n val options = makeExternalDependenciesResolverOptions(map)\n\n assertEquals(options.value(\"option\"), \"true\")\n assertEquals(options.flag(\"option\"), true)\n }\n\n fun testValueInMapDoesNotAppearsIfPresent() {<|endoftext|>"} {"prompt":"\/\/ FIR_IGNORE\n\/\/ KNM_K2_IGNORE\n\/\/ Ignore reason: FIR does not support nested typealiases (especially inside inner classes)\npackage test\n\nimport dependency.*\nimport kotlin.annotation.AnnotationTarget\n\nclass Outer {\n inner class Inner {\n @Suppress(\"TOPLEVEL_TYPEALIASES_ONLY\")","completion":"typealias TA = Map, Map>\n }\n}\n\n@Target(AnnotationTarget.TYPEALIAS)\nannotation class Ann\n\nclass TypeAliases {\n\n class OrderB\n\n @Suppress(\"TOPLEVEL_TYPEALIASES_ONLY\")\n typealias B = (A) -> Unit<|endoftext|>"} {"prompt":"* UNEXPECTED BEHAVIOUR\n * ISSUES: KT-37179\n *\/\npackage testsCase2\nimport libPackageCase2.*\nimport libPackageCase2Explicit.emptyArray\n\nclass Case2(){\n\n fun case1_0() {\n fun Case2.emptyArray(): Array = TODO()","completion":"emptyArray()\n\n fun case1_1() {\n fun Case2.emptyArray(): Array = TODO()<|endoftext|>"} {"prompt":"final override fun visitElseBranch(branch: IrElseBranch): IrElseBranch = super.visitElseBranch(branch)\n final override fun visitLoop(loop: IrLoop) = super.visitLoop(loop)\n final override fun visitWhileLoop(loop: IrWhileLoop) = super.visitWhileLoop(loop)","completion":"final override fun visitDoWhileLoop(loop: IrDoWhileLoop) = super.visitDoWhileLoop(loop)\n final override fun visitTry(aTry: IrTry) = super.visitTry(aTry)\n final override fun visitCatch(aCatch: IrCatch): IrCatch = super.visitCatch(aCatch)<|endoftext|>"} {"prompt":"* Time marks returned by this time source can be compared for difference with other time marks\n * obtained from the same time source.\n *\n * @property unit The unit in which this time source's readings are expressed.\n *\/\n@SinceKotlin(\"1.9\")\n@WasExperimental(ExperimentalTime::class)\npublic abstract class AbstractLongTimeSource(protected val unit: DurationUnit) : TimeSource.WithComparableMarks {\n \/**","completion":"* This protected method should be overridden to return the current reading of the time source expressed as a [Long] number\n * in the unit specified by the [unit] property.\n *\n * Note that the value returned by this method when [markNow] is called the first time is used as \"zero\" reading\n * and the difference from this \"zero\" reading is calculated for subsequent values.<|endoftext|>"} {"prompt":"else ->\n return super.visitFunctionAccess(expression)\n }\n return super.visitExpression(modifyFunctionAccessExpression(expression, accessor))\n }\n\n private fun handleLambdaMetafactoryIntrinsic(call: IrCall, thisSymbol: IrClassSymbol?): IrExpression {","completion":"val implFunRef = call.getValueArgument(1) as? IrFunctionReference\n ?: throw AssertionError(\"'implMethodReference' is expected to be 'IrFunctionReference': ${call.dump()}\")\n val implFunSymbol = implFunRef.symbol\n\n if (implFunSymbol.isAccessibleFromSyntheticProxy(thisSymbol))\n return call<|endoftext|>"} {"prompt":"val v = InstructionAdapter(node)\n val returnLabel = Label()\n\n \/\/ if (!condition)\n v.load(0, Type.BOOLEAN_TYPE)\n v.ifne(returnLabel)\n if (functionDescriptor.isBuiltinAlwaysEnabledAssertWithLambda()) {\n \/\/ val err = AssertionError(lambda())","completion":"v.load(1, Type.getObjectType(LAMBDA_INTERNAL_NAME))\n v.invokeinterface(LAMBDA_INTERNAL_NAME, \"invoke\", \"()Ljava\/lang\/Object;\")\n v.store(2, AsmTypes.OBJECT_TYPE)\n v.anew(Type.getObjectType(ASSERTION_ERROR_INTERNAL_NAME))<|endoftext|>"} {"prompt":"\/\/ FILE: b.kt\npackage p\n\npublic interface B {\n public fun foo(a: Int, b: String, c: Int = 0): B?\n}\n\n\/\/ MODULE: m4(m3, m2)\n\/\/ FILE: c.kt\nimport p.*\n\nfun test(b: B?) {\n if (b is C) {","completion":"b?.foo(1, \"\")\n }\n}<|endoftext|>"} {"prompt":"runWithKotlinc(\"$TEST_DATA_DIR\/integration\/intResult.kts\", listOf(\"10\"))\n }\n\n @Test\n fun testStandardScriptWithDeps() {\n runWithK2JVMCompiler(\n \"$TEST_DATA_DIR\/integration\/withDependencyOnCompileClassPath.kts\", listOf(\"Hello from standard kts!\"),","completion":"classpath = getMainKtsClassPath()\n )\n }\n\n @Test\n fun testStandardScriptWithDepsViaKotlinc() {\n runWithKotlinc(\n \"$TEST_DATA_DIR\/integration\/withDependencyOnCompileClassPath.kts\", listOf(\"Hello from standard kts!\"),\n classpath = getMainKtsClassPath()\n )<|endoftext|>"} {"prompt":"expect fun f1()\n\nexpect fun f2(name: String)\n\nexpect fun f3(name: String)\nexpect fun String.f3ext()\n\nexpect fun f4(name: String)\n\nexpect fun String.f5()\n\nexpect fun f6(p1: String, p2: Int)\n\nexpect fun f7()\n\ninternal expect fun f8()","completion":"public expect fun f10()\n\nexpect fun f11()\nexpect fun > f12()\nexpect fun > f13()\n\nexpect inline fun f14()\nexpect inline fun f15()\n\nexpect fun f16(s: String)<|endoftext|>"} {"prompt":"fun `test - default resources task names are consistent`() {\n val project = buildProjectWithJvm()\n val jvmTarget = project.kotlinExtension.targets.single()\n val expectedProcessResourceTaskNames = setOf(\"processResources\", \"processTestResources\")\n val actualProcessResourceTaskNames = project.tasks.withType().names","completion":"val kotlinReportedProcessResourceTaskNames = hashSetOf()\n for (compilation in jvmTarget.compilations) {\n val processResourcesTaskName = (compilation as? InternalKotlinCompilation<*>)?.processResourcesTaskName\n if (processResourcesTaskName != null) {\n kotlinReportedProcessResourceTaskNames.add(processResourcesTaskName)\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.visitors.IrElementTransformer\n\n@PhaseDescription(\n name = \"Assertion\",\n description = \"Lower assert calls depending on the assertions mode\",\n \/\/ Necessary to place the `$assertionsDisabled` field into the reference's class, not the\n \/\/ class that contains it.\n prerequisite = [FunctionReferenceLowering::class]\n)","completion":"internal class AssertionLowering(private val context: JvmBackendContext) :\n FileLoweringPass,\n IrElementTransformer {\n \/\/ Keeps track of the $assertionsDisabled field, which we generate lazily for classes containing\n \/\/ assertions when compiled with -Xassertions=jvm.<|endoftext|>"} {"prompt":"* @param endIndex the end (exclusive) of the subrange to copy, size of this array by default.\n * \n * @throws IndexOutOfBoundsException or [IllegalArgumentException] when [startIndex] or [endIndex] is out of range of this array indices or when `startIndex > endIndex`.","completion":"* @throws IndexOutOfBoundsException when the subrange doesn't fit into the [destination] array starting at the specified [destinationOffset],\n * or when that index is out of the [destination] array indices range.\n * \n * @return the [destination] array.\n *\/\n@SinceKotlin(\"1.3\")\n@ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"public interface KotlinCompositeProvider

: KotlinComposableProvider {\n public val providers: List

\n}\n\npublic interface KotlinComposableProviderMerger

{\n \/**\n * Merges the given [providers] into a single provider. When possible, mergers will try to create a provider that is more efficient","completion":"* compared to the naive sequential composite provider. Not all providers might be mergeable, or there might be multiple separate sets\n * of providers that can be merged individually, so the resulting provider may be a composite provider.\n *\/\n public fun merge(providers: List

): P\n}<|endoftext|>"} {"prompt":"val OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION_FQ_NAME = OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION_CLASS_ID.asSingleFqName()\n\n\/\/ @HidesMembers annotation only has effect for members with these names","completion":"val HIDES_MEMBERS_NAME_LIST = setOf(Name.identifier(\"forEach\"), Name.identifier(\"addSuppressed\"))<|endoftext|>"} {"prompt":"return analyze(module) {\n val sirSession = StandaloneSirSession(this) { _, _ ->\n SirSingleModuleProvider(swiftModuleName = input.name, bridgeModuleName = bridgeModuleName)\n }\n with(sirSession) {\n module.sirModule().also {\n scopeProvider(this@analyze).flatMap { scope ->\n scope.extractDeclarations()","completion":"}.forEach { topLevelDeclaration ->\n val parent = topLevelDeclaration.parent as? SirMutableDeclarationContainer\n ?: error(\"top level declaration can contain only module or extension to package as a parent\")\n parent.addChild { topLevelDeclaration }\n }\n }\n }\n }\n}\n\nprivate data class ModuleWithScopeProvider(\n val ktModule: KtModule,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.expressions.IrBody\nimport org.jetbrains.kotlin.ir.expressions.IrConstructorCall\nimport org.jetbrains.kotlin.ir.expressions.IrExpression\nimport org.jetbrains.kotlin.ir.util.constructedClass\nimport org.jetbrains.kotlin.ir.visitors.transformChildrenVoid","completion":"class WasmArrayConstructorLowering(val context: WasmBackendContext) : BodyLoweringPass {\n override fun lower(irBody: IrBody, container: IrDeclaration) {\n irBody.transformChildrenVoid(WasmArrayConstructorTransformer(context, container as IrSymbolOwner))\n }\n}\n\nprivate class WasmArrayConstructorTransformer(<|endoftext|>"} {"prompt":"fun renderValueParameter(valueParameter: KmValueParameter, printer: Printer): Unit = with(printer) {\n appendAnnotations(valueParameter.hasAnnotations, getAnnotations(valueParameter), onePerLine = false)\n appendFlags(\n valueParameter.isCrossinline to \"crossinline\",\n valueParameter.isNoinline to \"noinline\"\n )","completion":"val varargElementType = valueParameter.varargElementType\n if (varargElementType != null) {\n append(\"vararg \", valueParameter.name, \": \").appendType(varargElementType)\n append(\" \/* \").appendType(valueParameter.type).append(\" *\/\")\n } else {\n append(valueParameter.name, \": \").appendType(valueParameter.type)\n }<|endoftext|>"} {"prompt":"infix operator fun plusAssign(c: C) {\n f1 = true\n print(\"1\")\n }\n\n infix operator fun plus(c: C): C {\n f2 = true\n print(\"2\")\n return c\n }\n}\n\ninfix operator fun B?.plusAssign(c: C) {\n f3 = true\n print(\"3\")\n}","completion":"infix operator fun B?.plusAssign(c: Any) {\n f4 = true\n print(\"4\")\n}\n\n\nclass C<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\/\/ WORKS_WHEN_VALUE_CLASS\n\/\/ LANGUAGE: +ValueClasses, +GenericInlineClassParameter\n\nimport kotlin.test.assertEquals\n\ninterface IFoo {\n fun foo(s: String): String\n}\n\nOPTIONAL_JVM_INLINE_ANNOTATION\nvalue class Z(val x: T) : IFoo {","completion":"override fun foo(s: String): String = x.toString() + s\n}\n\nclass Test(x: Int) : IFoo by Z(x)\n\nfun box(): String {\n assertEquals(\"1OK\", Test(1).foo(\"OK\"))\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"body.buildInstr(WasmOp.CALL_REF, location, WasmImmediate.TypeIdx(context.referenceFunctionType(function.symbol)))\n body.commentGroupEnd()\n } else {\n val symbol = klass.symbol\n if (symbol in hierarchyDisjointUnions) {\n generateExpression(call.dispatchReceiver!!)","completion":"body.commentGroupStart { \"interface call: ${function.fqNameWhenAvailable}\" }\n body.buildStructGet(context.referenceGcType(irBuiltIns.anyClass), WasmSymbol(1), location)\n\n val classITableReference = context.referenceClassITableGcType(symbol)\n body.buildRefCastStatic(classITableReference, location)<|endoftext|>"} {"prompt":"val facadeNameToId = mutableMapOf()\n writePartsWithinPackage(partsWithinPackage, facadeNameToId)\n writePartsOutsidePackage(partsOutsidePackage, facadeNameToId, builder)\n writeMultifileFacadeNames(facadeNameToId)\n })\n }\n\n if (metadataParts.isNotEmpty()) {","completion":"builder.addMetadataParts(JvmModuleProtoBuf.PackageParts.newBuilder().apply {\n packageFqName = this@PackageParts.packageFqName\n addAllShortClassName(metadataParts.sorted())\n })\n }\n }\n\n private fun JvmModuleProtoBuf.PackageParts.Builder.writePartsWithinPackage(\n parts: List,<|endoftext|>"} {"prompt":"}\n\nfun test() {\n val lf1: context(C) R.(Param) -> Unit = { _ ->\n r\n c\n }\n val lf2: context(C) (Param) -> Unit = { _ ->\n c\n }\n val lf3: context(C) R.() -> Unit = {\n r\n c\n }","completion":"val lf4: context(C) () -> Unit = {\n c\n }\n\n with(C()) {\n with(R()) {\n f1(lf1)\n f1 { _ ->\n r\n c\n }\n\n f2(lf2)\n f2 { _ ->\n c\n }\n\n f3(lf3)\n f3 {\n r<|endoftext|>"} {"prompt":"return ConeSubstitutorByMap.create(mapping, session)\n}\n\nfun FirRegularClassSymbol.getSuperClassSymbolOrAny(session: FirSession): FirRegularClassSymbol {\n for (superType in resolvedSuperTypes) {\n val symbol = superType.fullyExpandedType(session).toRegularClassSymbol(session) ?: continue","completion":"if (symbol.classKind == ClassKind.CLASS) return symbol\n }\n return session.builtinTypes.anyType.type.toRegularClassSymbol(session) ?: error(\"Symbol for Any not found\")\n}\n\nfun FirClassLikeSymbol<*>.getSuperTypes(\n useSiteSession: FirSession,\n recursive: Boolean = true,\n lookupInterfaces: Boolean = true,<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\n\/*\n * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)\n *\n * SPEC VERSION: 0.1-213\n * MAIN LINK: type-system, type-kinds, built-in-types, kotlin.nothing -> paragraph 1 -> sentence 1\n * NUMBER: 1\n * DESCRIPTION: todo\n *\/\n\nfun box(): String {","completion":"val b : Nothing?= null\n try {\n val a: Int = b!!\n } catch (e: NullPointerException) {\n return \"OK\"\n }\n return \"NOK\"\n}<|endoftext|>"} {"prompt":"context.irBuiltIns.intType,\n context.irBuiltIns.longType,\n context.irBuiltIns.floatType,\n context.irBuiltIns.doubleType,\n context.irBuiltIns.nothingType,\n context.irBuiltIns.nothingNType,\n context.wasmSymbols.voidType -> null\n else -> when {","completion":"isBuiltInWasmRefType(this) -> null\n erasedUpperBound?.isExternal == true -> null\n else -> when (val ic = context.inlineClassesUtils.getInlinedClass(this)) {\n null -> this\n else -> context.inlineClassesUtils.getInlineClassUnderlyingType(ic).getInlinedValueTypeIfAny()\n }\n }\n }<|endoftext|>"} {"prompt":"fun bindWhen(r: Option): Option {\n return when (r) {\n is Some -> {\n \/\/ Works correctly\n if (true) None() else r\n }\n else -> r\n }\n}\n\ninterface SimpleOption\nclass SimpleSome : SimpleOption\nclass SimpleNone : SimpleOption\n\nfun bindNoGeneric(r: SimpleOption): SimpleOption {","completion":"return if (r is SimpleSome) {\n (if (true) SimpleNone() else r) checkType { _() }\n if (true) SimpleNone() else r\n }\n else r\n}<|endoftext|>"} {"prompt":"$i$f$x2\\2\\41:int=0:int","completion":"\/\/ library.kt:19 box: m:int=1:int, $i$f$foo:int=0:int, fooVar$iv:int=100:int, x1Var\\1$iv:int=1:int, $i$f$x1\\1\\7:int=0:int, y1\\1$iv:int=1:int, x2Var\\2$iv:int=2:int,<|endoftext|>"} {"prompt":"var sourceSetTreeClassifier: SourceSetTreeClassifier = SourceSetTreeClassifier.Default\n var sourceSetTreeClassifierV2: KotlinSourceSetTreeClassifier? = null\n\n\n internal var configure: ((T) -> Unit)? = null\n\n fun configure(action: (T) -> Unit) = apply {\n val configure = this.configure\n if (configure == null) this.configure = action","completion":"else this.configure = { configure(it); action(it) }\n }\n}\n\nprivate data class ExternalKotlinCompilationDescriptorImpl(\n override val compilationName: String,\n override val compileTaskName: String?,\n override val compileAllTaskName: String?,\n override val defaultSourceSet: KotlinSourceSet,<|endoftext|>"} {"prompt":"return \"${typeTranslator.translateType(signature[0])} (*${signature[0].name})(${signature.drop(1).map { \"${typeTranslator.translateType(it)} ${it.name}\" }.joinToString(\", \")});\"\n }\n\n fun makeTopLevelFunctionString(): Pair {\n val signature = makeCFunctionSignature(false)","completion":"val name = signature[0].name\n return (name to\n \"extern ${typeTranslator.translateType(signature[0])} $name(${signature.drop(1).map { \"${typeTranslator.translateType(it)} ${it.name}\" }.joinToString(\", \")});\")\n }\n\n fun makeFunctionDeclaration(): String {\n assert(isFunction)<|endoftext|>"} {"prompt":"final override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {\n if (descriptor !is ClassDescriptor) return\n\n checkMetaSerializableApplicable(descriptor, context.trace)\n checkInheritableSerialInfoNotRepeatable(descriptor, context.trace)\n checkEnum(descriptor, declaration, context.trace)","completion":"checkExternalSerializer(descriptor, declaration, context.trace)\n\n if (!canBeSerializedInternally(descriptor, declaration, context.trace)) return\n if (declaration !is KtPureClassOrObject) return\n if (!isIde) {\n \/\/ In IDE, BindingTrace is recreated each time code is modified, effectively resulting in JAR manifest read every time user types<|endoftext|>"} {"prompt":"\/\/ Only if a subject for memory management.\n .forEach { irField ->\n if (irField.type.binaryTypeIsReference() && irField.storageKind(context) != FieldStorageKind.THREAD_LOCAL) {\n val address = staticFieldPtr(irField, functionGenerationContext)\n storeHeapRef(codegen.kNullObjHeaderPtr, address)\n }\n }","completion":"state.globalSharedObjects.forEach { address ->\n storeHeapRef(codegen.kNullObjHeaderPtr, address)\n }\n state.globalInitState?.let {\n store(llvm.int32(FILE_NOT_INITIALIZED), it)\n }\n ret(null)\n }\n }\n }\n }\n\n \/\/-------------------------------------------------------------------------\/\/<|endoftext|>"} {"prompt":"builder.configureForKotlinxSerialization(target = TargetBackend.JS_IR)\n }\n}\n\nopen class AbstractSerializationFirJsBoxTest : AbstractFirJsTest(\n pathToTestDir = \"plugins\/kotlinx-serialization\/testData\/boxIr\/\",\n testGroupOutputDirPrefix = \"codegen\/serializationBoxFir\/\"\n) {","completion":"override fun configure(builder: TestConfigurationBuilder) {\n super.configure(builder)\n builder.configureForKotlinxSerialization(target = TargetBackend.JS_IR)\n }\n}<|endoftext|>"} {"prompt":"val compilerArguments = makeScriptCompilerArguments(scriptDefinition.compilerOptions.toList())\n val commandLineProcessors = listOf(AssignmentCommandLineProcessor())\n val compilerConfiguration = CompilerConfiguration()\n processCompilerPluginsOptions(\n compilerConfiguration, compilerArguments.pluginOptions?.asIterable() ?: emptyList(), commandLineProcessors\n )","completion":"val extensionRegistrar = FirScriptingCompilerExtensionIdeRegistrar(\n project,\n hostConfiguration,\n scriptDefinitionSources = emptyList(),\n scriptDefinitions = listOf(scriptDefinition)\n )\n\n registerExtensions(extensionRegistrar.configure())\n registerExtensions(FirScriptingSamWithReceiverExtensionRegistrar().configure())<|endoftext|>"} {"prompt":"while (matcher.find()) {\n val effectiveOffset = matcher.start() - offsetCompensation\n val matchedText = matcher.group()\n if (matchedText == \"\") {\n opened.pop().end = effectiveOffset\n } else {\n val diagnosticTypeMatcher = individualDiagnosticPattern.matcher(matchedText)\n val range = DiagnosedRange(effectiveOffset)","completion":"while (diagnosticTypeMatcher.find())\n range.addDiagnostic(diagnosticTypeMatcher.group())\n opened.push(range)\n ranges.add(range)\n }\n offsetCompensation += matchedText.length\n }\n\n assert(opened.isEmpty()) { \"Stack is not empty\" }\n\n matcher.reset()<|endoftext|>"} {"prompt":"typealias DiagnosticsMap = Multimap>\n\ndata class DiagnosticWithKmpCompilationMode(val diagnostic: KtDiagnostic, val kmpCompilationMode: KmpCompilationMode)\n\n\/**\n * There are two types of checkers (represented by [MppCheckerKind]):","completion":"* 1. Common checker. When a common checker analyzes a code, the checker doesn't see what are the actualizations for the `expect` declarations.\n * 2. Platform checker. When a platform checker analyzes a code, the checker sees what are the actualizations for the `expect` declarations\n * instead of the `expect` declarations themselves.\n *<|endoftext|>"} {"prompt":"if (position != -1) { \/\/If this is a string with a package after\n if (completionText[position - 1] == ' ') {\n position -= 2\n }\n \/\/if this is a method without args\n if (completionText[position + 1] == ')') {\n position++\n }\n completionText = completionText.substring(0, position + 1)\n }","completion":"position = completionText.indexOf(\":\")\n if (position != -1) {\n completionText = completionText.substring(0, position - 1)\n }\n }\n\n return DescriptorPresentation(\n rawDescriptorName,\n presentableText,\n tailText,\n completionText\n )\n }\n }\n}<|endoftext|>"} {"prompt":"val project = Project(projectName, wrapperVersion, directoryPrefix = directoryPrefix)\n project.setupWorkingDir()\n project.configureSingleNativeTarget()\n project.gradleProperties().apply {\n configureJvmMemory()\n disableKotlinNativeCaches()\n }\n return project\n }\n\n internal fun transformNativeTestProjectWithPluginDsl(\n projectName: String,","completion":"wrapperVersion: GradleVersionRequired = defaultGradleVersion,\n directoryPrefix: String? = null,\n ): BaseGradleIT.Project {\n val project = transformProjectWithPluginsDsl(projectName, wrapperVersion, directoryPrefix = directoryPrefix)\n project.configureSingleNativeTarget()\n project.gradleProperties().apply {\n configureJvmMemory()<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.resolve.jvm.modules.JavaModule\nimport org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleResolver\n\nclass CliJavaModuleResolver(\n private val moduleGraph: JavaModuleGraph,","completion":"private val userModules: List,\n private val systemModules: List,\n private val project: Project\n) : JavaModuleResolver {\n init {\n assert(userModules.count(JavaModule::isSourceModule) <= 1) {\n \"Modules computed by ClasspathRootsResolver cannot have more than one source module: $userModules\"\n }<|endoftext|>"} {"prompt":"\/\/ TODO: Replace with IrValidator validator when upstream is compatible with PluginContext\nclass IrValidator(val irBuiltIns: IrBuiltIns, val config: IrValidatorConfig) :\n IrElementVisitorVoid {\n\n var currentFile: IrFile? = null\n\n override fun visitFile(declaration: IrFile) {\n currentFile = declaration\n super.visitFile(declaration)","completion":"if (config.checkScopes) {\n ScopeValidator(this::error).check(declaration)\n }\n }\n\n private fun error(element: IrElement, message: String) {\n throw Error(\n \"Validation error ($message) for ${element.dumpSrc()}... ${element.render()} in\" +\n \" ${currentFile?.name ?: \"???\"}\"<|endoftext|>"} {"prompt":"var IdeaKotlinBinaryDependency.isCommonized by isCommonizedKey.readWriteProperty.notNull(false)\n\n\n\/**\n * @see isOpaqueFileDependencyKey\n *\/\nval isOpaqueFileDependencyKey = extrasKeyOf(\"isOpaqueFileDependencyKey\")\n\n\/**","completion":"* Marks a dependency as 'opaque' (meaning that we cannot really know about the actual binary coordiantes)\n *\n * Example: File dependencies are 'opaque'\n * ```kotlin\n * kotlin {\n * sourceSets.jvmMain.dependencies {\n * implementation(files(\"libs\/foo.jar\")) \/\/ <- OPAQUE<|endoftext|>"} {"prompt":"writeCollection(x.arguments) { writeExpression(it) }\n }\n\n override fun visitYield(x: JsYield) {\n writeByte(ExpressionIds.YIELD)\n ifNotNull(x.expression) { writeExpression(it) }\n }\n }\n\n withComments(expression) {\n withLocation(expression) {","completion":"expression.accept(visitor)\n }\n }\n\n writeBoolean(expression.synthetic)\n writeByte(expression.sideEffects.ordinal)\n ifNotNull(expression.localAlias) { writeImportedModule(it) }\n }\n\n private fun DataWriter.writeImportedModule(module: JsImportedModule) {\n writeInt(internalizeString(module.externalName))<|endoftext|>"} {"prompt":"fun case_17(x: T?, f: Boolean) {\n while (f) {\n if (x === implicitNullableNothingProperty || false) { break }\n x\n x.equals(null)","completion":"x.propT\n x.propAny\n x.propNullableT<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.fir.builder\n\nimport org.jetbrains.kotlin.psi.KtFile\n\nabstract class AbstractRawFirBuilderLazyBodiesByAstTest : AbstractRawFirBuilderLazyBodiesTestCase() {\n override fun createKtFile(filePath: String): KtFile {","completion":"val file = super.createKtFile(filePath)\n file.calcTreeElement()\n assertNotNull(\"Ast tree for the file must be not null\", file.treeElement)\n return file\n }\n}<|endoftext|>"} {"prompt":"constructor(arg: Invariant)\n }","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse(arg: Invariant) where T: UserInterfaceB {}\n\n\n class TestIdenticalPrivateVisibility {<|endoftext|>"} {"prompt":"@file:Suppress(\"FunctionName\")\n\npackage org.jetbrains.kotlin.gradle.regressionTests\n\nimport org.gradle.api.Project\nimport org.gradle.api.Task\nimport org.gradle.api.file.FileCollection\nimport org.jetbrains.kotlin.gradle.plugin.KotlinCompilation","completion":"import org.jetbrains.kotlin.gradle.plugin.KotlinTarget\nimport org.jetbrains.kotlin.gradle.util.assertNoCircularTaskDependencies\nimport org.jetbrains.kotlin.gradle.util.buildProjectWithMPP\nimport org.jetbrains.kotlin.gradle.util.kotlin\nimport kotlin.test.Test<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: +AllowAssigningArrayElementsToVarargsInNamedFormForFunctions\n\/\/ ISSUE: KT-63514\n\/\/ WITH_STDLIB\n\nfun foo(vararg arr: Int): Int {\n return arr.sum()\n}\n\nfun bar(vararg arr: UInt): UInt {\n return arr.sum()\n}","completion":"fun baz(vararg arr: ULong): ULong {\n return arr.sum()\n}\n\nfun quas(vararg arr: UShort): UInt {\n return arr.sum()\n}\n\nfun wex(vararg arr: UByte): UInt {\n return arr.sum()\n}\n\nfun box(): String {<|endoftext|>"} {"prompt":"fun minBySelectorEvaluateOnce() {\n val source = listOf(\"a\", \"bcd\", \"e\")\n var c = 0\n source.minBy { c++ }\n assertEquals(3, c)\n c = 0\n source.minByOrNull { c++ }\n assertEquals(3, c)\n }\n\n @Test","completion":"fun maxBySelectorEvaluateOnce() {\n val source = listOf(\"a\", \"bcd\", \"e\")\n var c = 0\n source.maxBy { c++ }\n assertEquals(3, c)\n c = 0\n source.maxByOrNull { c++ }\n assertEquals(3, c)\n }<|endoftext|>"} {"prompt":"val params: MutableMap = mutableMapOf(\"required\" to null)\n assertFailsWith { printRequiredParam(params) }\n assertFailsWith { printRequiredParamByUpperCase(params) }\n\n params[\"required\"] = \"non-empty-param\"","completion":"printRequiredParam(params) \/\/ prints \"non-empty-param\"\n printRequiredParamByUpperCase(params) \/\/ prints \"NON-EMPTY-PARAM\"\n }\n\n @Sample\n fun failCheckWithLazyMessage() {\n\n var someState: String? = null\n fun getStateValue(): String {<|endoftext|>"} {"prompt":"if (spilledVariables != setOf(\"label\" to \"4\", \"I$0\" to \"1\", \"L$0\" to \"null\", \"L$1\" to \"null\")) return \"FAIL 8: $spilledVariables\"\n c?.resume(Unit)","completion":"if (spilledVariables != setOf(\"label\" to \"4\", \"I$0\" to \"1\", \"L$0\" to \"null\", \"L$1\" to \"null\")) return \"FAIL 9: $spilledVariables\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"\/\/ parameter is NOT suspend\n\/\/ Block is allowed to be called inside the body of owner inline function\n\/\/ Block is allowed to be called from nested classes\/lambdas (as common crossinlines)\n\/\/ It is NOT possible to call startCoroutine on the parameter\n\/\/ suspend calls NOT possible inside lambda matching to the parameter\n\ninline fun test(crossinline c: () -> Unit) {\n c()\n val o = object: Runnable {","completion":"override fun run() {\n c()\n }\n }\n val l = { c() }\n c.startCoroutine(EmptyContinuation)\n}\n\nsuspend fun calculate() = \"OK\"\n\nfun box() {\n test {<|endoftext|>"} {"prompt":"val statements = rootBlock.getStatements()\n\n statements.add(0, JsStringLiteral(\"use strict\").makeStmt())\n if (!isBuiltinModule(fragments)) {\n defineModule(program, statements, moduleId)\n }\n\n \/\/ Invoke function passing modules as arguments\n \/\/ This should help minifier tool to recognize references to these modules as local variables and make them shorter.","completion":"for (importedModule in importedModules) {\n rootFunction.parameters.add(JsParameter(importedModule.internalName))\n }\n\n statements.add(JsReturn(internalModuleName.makeRef()))\n\n val block = program.globalBlock\n block.statements.addAll(\n ModuleWrapperTranslation.wrapIfNecessary(<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.js.checkers.isEffectivelyExternal\nimport org.jetbrains.kotlin.fir.analysis.js.checkers.isOverridingExternalWithOptionalParams\nimport org.jetbrains.kotlin.fir.declarations.FirClass\nimport org.jetbrains.kotlin.fir.declarations.FirDeclaration","completion":"import org.jetbrains.kotlin.fir.declarations.FirFunction\nimport org.jetbrains.kotlin.fir.declarations.utils.isExpect\n\nsealed class FirJsInheritanceFunctionChecker(mppKind: MppCheckerKind) : FirFunctionChecker(mppKind) {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.load.java\n\nimport org.jetbrains.kotlin.builtins.StandardNames\nimport org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap\nimport org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.name.FqNameUnsafe","completion":"import org.jetbrains.kotlin.name.Name\n\nobject BuiltinSpecialProperties {\n val PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP: Map = mapOf(\n StandardNames.FqNames._enum.childSafe(\"name\") to StandardNames.NAME,<|endoftext|>"} {"prompt":"generateSerializerForType(type, this, intrinsicType)\n }\n signature.append(kSerializerArrayType.descriptor)\n }\n }\n\n referenceArraySerializerId -> {\n \/\/ a special way to instantiate reference array serializer -- need an element KClass reference","completion":"aconst(typeMapper.mapTypeCommon(typeArgumentsAsTypes.first(), TypeMappingMode.GENERIC_ARGUMENT))\n AsmUtil.wrapJavaClassIntoKClass(this)\n signature.append(AsmTypes.K_CLASS_TYPE.descriptor)\n \/\/ Reference array serializer still needs serializer for its argument type<|endoftext|>"} {"prompt":"namedFunctions[name] = Pair(FunctionWithWrapper(x, null), x)\n }\n super.visitFunction(x)\n }\n })\n\n return namedFunctions\n}\n\ndata class FunctionWithWrapper(val function: JsFunction, val wrapperBody: JsBlock?)\n\nfun collectAccessors(scope: JsNode): Map {","completion":"val accessors = hashMapOf()\n\n scope.accept(object : RecursiveJsVisitor() {\n override fun visitInvocation(invocation: JsInvocation) {\n InlineMetadata.decompose(invocation)?.let {\n accessors[it.tag.value] = it.function\n }\n super.visitInvocation(invocation)<|endoftext|>"} {"prompt":"* MAIN LINK: overload-resolution, receivers -> paragraph 5 -> sentence 5\n * PRIMARY LINKS: overload-resolution, receivers -> paragraph 5 -> sentence 4\n * overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2\n * NUMBER: 1\n * DESCRIPTION: Superclass companion object receivers are prioritized according to the inheritance order\n *\/","completion":"\/\/ FILE: TestCase1.kt\n\/\/ TESTCASE NUMBER: 1\npackage testsCase1\n\nopen class A {\n operator fun invoke() = print(\"invoke\")\n}\n\ninterface Super_0 {\n companion object values : A()\n\n private fun case() {<|endoftext|>"} {"prompt":"}\n}\n})()\"\"\"\n)\nprivate external fun externrefHashCode(ref: ExternalInterfaceType): Int\n\nprivate fun externrefToString(ref: ExternalInterfaceType): String =\n js(\"String(ref)\")\n\nprivate fun externrefToUByte(ref: ExternalInterfaceType): UByte =\n js(\"Number(ref)\")","completion":"private fun externrefToUShort(ref: ExternalInterfaceType): UShort =\n js(\"Number(ref)\")\n\nprivate fun externrefToUInt(ref: ExternalInterfaceType): UInt =\n js(\"Number(ref)\")\n\nprivate fun externrefToULong(ref: ExternalInterfaceType): ULong =\n js(\"BigInt(ref)\")<|endoftext|>"} {"prompt":"override val suiteFun = getFunctions(FqName(\"kotlin.test.suite\")).singleOrNull()?.let {\n symbolTable.descriptorExtension.referenceSimpleFunction(it)\n }\n override val testFun = getFunctions(FqName(\"kotlin.test.test\")).singleOrNull()?.let {","completion":"symbolTable.descriptorExtension.referenceSimpleFunction(it)\n }\n\n val throwableConstructors by lazy2 { throwableClass.owner.declarations.filterIsInstance().map { it.symbol } }\n val defaultThrowableCtor by lazy2 { throwableConstructors.single { !it.owner.isPrimary && it.owner.valueParameters.size == 0 } }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.plugin.sources\n\nimport org.gradle.api.NamedDomainObjectFactory\nimport org.gradle.api.Project\nimport org.gradle.api.artifacts.Configuration\nimport org.gradle.api.attributes.Category\nimport org.gradle.api.attributes.Usage","completion":"import org.jetbrains.kotlin.gradle.dsl.metadataTarget\nimport org.jetbrains.kotlin.gradle.dsl.multiplatformExtensionOrNull\nimport org.jetbrains.kotlin.gradle.plugin.*\nimport org.jetbrains.kotlin.gradle.plugin.mpp.KotlinUsages<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext\nimport org.jetbrains.kotlin.ir.backend.js.lower.PropertyLazyInitLowering\nimport org.jetbrains.kotlin.ir.declarations.IrDeclaration\nimport org.jetbrains.kotlin.ir.declarations.IrVariable","completion":"import org.jetbrains.kotlin.ir.expressions.*\nimport org.jetbrains.kotlin.ir.util.fileOrNull\nimport org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid\nimport org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid\nimport org.jetbrains.kotlin.ir.visitors.acceptVoid<|endoftext|>"} {"prompt":"fun testRenamedPackage() = withRootDir(File(\"$TEST_SUITE_PATH\/renameFileOrPackage\")) {\n val lib = compileLibrary(\"lib\") { \"lib\/lib.kt\" copyTo \"lib.kt\" }\n val main = compileToExecutable(\"main\", lib) { \"main\/main.kt\" copyTo \"main.kt\" }","completion":"\/\/ Check, has been compiled to cache.\n assertTrue(main.executableFile.exists())\n val libKtCacheDir = getLibraryFileCache(\"lib\", \"lib\/lib.kt\", \"test\")\n assertTrue(libKtCacheDir.exists())\n runExecutableAndVerify(main.testCase, main.testExecutable)<|endoftext|>"} {"prompt":"private val any = components.session.builtinTypes.anyType.type\n private val nullableNothing = components.session.builtinTypes.nullableNothingType.type\n\n \/\/ ----------------------------------- Requests -----------------------------------\n\n \/**\n * When variable access resolution encounters a variable access which has smartcast information, assignments associated with that\n * variable are checked to determine variable stability, and therefore smartcast stability. These assignments are tracked by","completion":"* [FirLocalVariableAssignmentAnalyzer], which knows how each assignment may limit variable stability, like assignments within or after\n * a non-in-place lambda body. So for a given lexical scope (function body, lambda body, and even local class init) and a given\n * variable, [FirLocalVariableAssignmentAnalyzer] knows all associated assignments (past and\/or future) which could limit stability.\n *<|endoftext|>"} {"prompt":"\/\/ test.kt:-1 create\n\/\/ test.kt:15 empty\n\/\/ test.kt:21 invokeSuspend\n\/\/ test.kt:22 invokeSuspend\n\/\/ Continuation.kt:... resumeWith\n\/\/ test.kt:11 resumeWith\n\/\/ test.kt:12 resumeWith\n\/\/ Continuation.kt:... resumeWith\n\/\/ test.kt:13 builder\n\/\/ test.kt:23 invokeSuspend","completion":"\/\/ Continuation.kt:... resumeWith\n\/\/ test.kt:11 resumeWith\n\/\/ test.kt:12 resumeWith\n\/\/ Continuation.kt:... resumeWith\n\/\/ test.kt:13 builder\n\/\/ test.kt:24 box\n\n\/\/ EXPECTATIONS WASM<|endoftext|>"} {"prompt":"class ConeTypeRendererForDebugging() : ConeTypeRenderer() {\n\n constructor(builder: StringBuilder) : this() {\n this.builder = builder\n this.idRenderer = ConeIdRendererForDebugging()\n idRenderer.builder = builder\n }\n\n override fun renderAsPossibleFunctionType(\n type: ConeKotlinType,","completion":"functionClassKindExtractor: (ConeKotlinType) -> FunctionTypeKind?,\n renderType: ConeTypeProjection.() -> Unit\n ) {\n builder.append(\"R|\")\n super.renderAsPossibleFunctionType(type, functionClassKindExtractor, renderType)\n builder.append(\"|\")\n }\n}<|endoftext|>"} {"prompt":"ifNotNull(case as? JsCase) {\n writeExpression(it.caseExpression)\n }\n }\n writeCollection(case.statements) { part ->\n writeStatement(part)\n }\n }\n }\n\n override fun visitWhile(x: JsWhile) {\n writeByte(StatementIds.WHILE)\n writeExpression(x.condition)","completion":"writeStatement(x.body)\n }\n\n override fun visitDoWhile(x: JsDoWhile) {\n writeByte(StatementIds.DO_WHILE)\n writeExpression(x.condition)\n writeStatement(x.body)\n }\n\n override fun visitFor(x: JsFor) {\n writeByte(StatementIds.FOR)<|endoftext|>"} {"prompt":"private fun deserializeMultiFieldValueClassRepresentation(proto: ProtoIrMultiFieldValueClassRepresentation): MultiFieldValueClassRepresentation {\n val names = proto.underlyingPropertyNameList.memoryOptimizedMap { deserializeName(it) }\n val types = proto.underlyingPropertyTypeList.memoryOptimizedMap { deserializeIrType(it) as IrSimpleType }","completion":"return MultiFieldValueClassRepresentation(names memoryOptimizedZip types)\n }\n\n private fun computeMissingInlineClassRepresentationForCompatibility(irClass: IrClass): InlineClassRepresentation {\n \/\/ For inline classes compiled with 1.5.20 or earlier, try to reconstruct inline class representation from the single parameter of<|endoftext|>"} {"prompt":"private val settings: AbiRenderingSettings,\n private val output: Appendable\n) {\n fun render() {\n printHeader()\n\n if (settings.renderDeclarations)\n printTopLevelDeclarations(libraryAbi.topLevelDeclarations, Printer(output, settings))\n }\n\n private fun printHeader() {\n output.appendLine(\n \"\"\"\n \/\/ Rendering settings:","completion":"\/\/ - Signature version: ${settings.renderedSignatureVersion.versionNumber}\n \/\/ - Show manifest properties: ${settings.renderManifest}\n \/\/ - Show declarations: ${settings.renderDeclarations}\n \n \/\/ Library unique name: <${libraryAbi.uniqueName}>\n \"\"\".trimIndent()\n )\n\n if (settings.renderManifest) {<|endoftext|>"} {"prompt":"testServices.assertions.assertEquals(expectedLines, actualLines) { generatedCode }\n }\n}\n\nfun createIrJsLineNumberHandler(testServices: TestServices): JsBinaryArtifactHandler {\n return JsLineNumberHandler(FrontendKinds.ClassicFrontend, testServices)\n}","completion":"fun createFirJsLineNumberHandler(testServices: TestServices): JsBinaryArtifactHandler {\n return JsLineNumberHandler(FrontendKinds.FIR, testServices)\n}<|endoftext|>"} {"prompt":"assertEquals(listOf(1, 2, 3, 4, 5), intList)\n\n val longList = mutableListOf()\n for (i in 1L until 7L step 2L step 1L) {\n longList += i\n }\n assertEquals(listOf(1L, 2L, 3L, 4L, 5L), longList)","completion":"val charList = mutableListOf()\n for (i in 'a' until 'g' step 2 step 1) {\n charList += i\n }\n assertEquals(listOf('a', 'b', 'c', 'd', 'e'), charList)\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"builder.append(args.joinToString(\", \"))\n builder.append(\");\\n\")\n\n if (!isVoidReturned) {\n val result = translateArgument(\n \"result\", cfunction[0], Direction.KOTLIN_TO_C, builder)\n builder.append(\" return $result;\\n\")\n }\n builder.append(\" } catch (...) {\")","completion":"builder.append(\" SetCurrentFrame(reinterpret_cast(frame));\\n\")\n builder.append(\" HandleCurrentExceptionWhenLeavingKotlinCode();\\n\")\n builder.append(\" } \\n\")\n\n builder.append(\"}\\n\")\n\n return builder.toString()\n }<|endoftext|>"} {"prompt":"JAVAX_PARAMETERS_ARE_NULLABLE_BY_DEFAULT_ANNOTATION_FQ_NAME to\n JavaDefaultQualifiers(\n NullabilityQualifierWithMigrationStatus(NullabilityQualifier.NULLABLE),\n APPLICABILITY_OF_JAVAX_DEFAULTS\n ),\n)","completion":"val BUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATIONS = JSPECIFY_DEFAULT_ANNOTATIONS + JAVAX_DEFAULT_ANNOTATIONS<|endoftext|>"} {"prompt":"endOffset: Int,\n origin: IrDeclarationOrigin,\n private val firAccessor: FirPropertyAccessor?,\n private val isSetter: Boolean,\n private val firParentProperty: FirProperty,\n firParentClass: FirRegularClass?,\n symbol: IrSimpleFunctionSymbol,\n parent: IrDeclarationParent,\n isFakeOverride: Boolean,","completion":"override var correspondingPropertySymbol: IrPropertySymbol?\n) : AbstractFir2IrLazyFunction(c, startOffset, endOffset, origin, symbol, parent, isFakeOverride) {\n init {\n symbol.bind(this)\n }\n\n override val fir: FirCallableDeclaration\n get() = firAccessor ?: firParentProperty<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.constants.*\nimport org.jetbrains.kotlin.resolve.descriptorUtil.annotationClass\nimport org.jetbrains.kotlin.resolve.descriptorUtil.classId\nimport org.jetbrains.kotlin.resolve.isInlineClassType","completion":"import org.jetbrains.kotlin.resolve.needsMfvcFlattening\nimport org.jetbrains.kotlin.serialization.deserialization.DeserializationContext\nimport org.jetbrains.kotlin.serialization.deserialization.MemberDeserializer\nimport java.lang.reflect.Field\nimport java.lang.reflect.Method\nimport java.lang.reflect.Type<|endoftext|>"} {"prompt":"override fun visitThrow(expression: IrThrow) {\n thrownValues += expression.value\n super.visitThrow(expression)\n }\n\n override fun visitCatch(aCatch: IrCatch) {\n catchParameters.add(aCatch.catchParameter)\n super.visitCatch(aCatch)\n }","completion":"override fun visitSetValue(expression: IrSetValue) {\n super.visitSetValue(expression)\n assignValue(expression.symbol.owner, expression.value)\n }\n\n override fun visitVariable(declaration: IrVariable) {\n variableValues.addEmpty(declaration, currentLoop)\n super.visitVariable(declaration)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles\nimport org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment\nimport org.jetbrains.kotlin.cli.jvm.config.JvmClasspathRoot\nimport org.jetbrains.kotlin.cli.jvm.config.addJvmClasspathRoots","completion":"import org.jetbrains.kotlin.cli.jvm.config.configureJdkClasspathRoots\nimport org.jetbrains.kotlin.cli.jvm.config.jvmClasspathRoots\nimport org.jetbrains.kotlin.cli.jvm.plugins.PluginCliParser\nimport org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar<|endoftext|>"} {"prompt":"): IrExpression {\n \/\/ The rule for SAM conversions is: the argument must be a subtype of the required function type.\n \/\/ We handle intersection types, captured types, etc. by approximating both expected and actual types.\n var approximatedConeKotlinFunctionType = getFunctionTypeForPossibleSamType(samType)?.approximateForIrOrSelf(c) ?: return argument","completion":"\/\/ This line is not present in the K1 counterpart because there is InsertImplicitCasts::cast that effectively removes\n \/\/ such unnecessary casts. At the same time, many IR lowerings assume that there are no such redundant casts and many\n \/\/ tests from FirBlackBoxCodegenTestGenerated relevant to INDY start failing once this line is removed.<|endoftext|>"} {"prompt":"if (x !== null == null) x.propNullableT","completion":"if (x !== null == null) x.propNullableAny<|endoftext|>"} {"prompt":"* @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.\n * @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].\n *\/\n@SinceKotlin(\"1.4\")\npublic fun DoubleArray.reverse(fromIndex: Int, toIndex: Int): Unit {","completion":"AbstractList.checkRangeIndexes(fromIndex, toIndex, size)\n val midPoint = (fromIndex + toIndex) \/ 2\n if (fromIndex == midPoint) return\n var reverseIndex = toIndex - 1\n for (index in fromIndex until midPoint) {\n val tmp = this[index]\n this[index] = this[reverseIndex]\n this[reverseIndex] = tmp<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.backend.common\n\nimport com.intellij.openapi.application.ApplicationManager\nimport com.intellij.openapi.progress.ProcessCanceledException\nimport com.intellij.openapi.project.Project\nimport com.intellij.psi.PsiElement\nimport org.jetbrains.kotlin.util.SourceCodeAnalysisException","completion":"import org.jetbrains.kotlin.descriptors.*\nimport org.jetbrains.kotlin.diagnostics.DiagnosticSink\nimport org.jetbrains.kotlin.diagnostics.Errors\nimport org.jetbrains.kotlin.incremental.components.NoLookupLocation\nimport org.jetbrains.kotlin.name.Name<|endoftext|>"} {"prompt":"override fun report(severity: CompilerMessageSeverity, message: String, location: CompilerMessageSourceLocation?) =\n super.report(adjustSeverity(severity, message, location), message, location)\n\n private fun adjustSeverity(severity: CompilerMessageSeverity, message: String, location: CompilerMessageSourceLocation?) =\n when {\n !severity.isWarning -> {","completion":"\/\/ Don't adjust severity for non-warnings.\n severity\n }\n location != null -> {\n \/\/ Don't adjust severity for any syntax and semantic warnings.\n severity\n }\n isPreReleaseBinariesWarning(message)\n || isUnsafeCompilerArgumentsWarning(message)\n || isLibraryIncludedMoreThanOnceWarning(message)\n || isK2Experimental(message)<|endoftext|>"} {"prompt":"val returnTargetSymbolType = type(symbols, \"IrReturnTargetSymbol\")\nval functionSymbolType = type(symbols, \"IrFunctionSymbol\")\nval constructorSymbolType = type(symbols, \"IrConstructorSymbol\")\nval simpleFunctionSymbolType = type(symbols, \"IrSimpleFunctionSymbol\")","completion":"val returnableBlockSymbolType = type(symbols, \"IrReturnableBlockSymbol\")\nval propertySymbolType = type(symbols, \"IrPropertySymbol\")\nval localDelegatedPropertySymbolType = type(symbols, \"IrLocalDelegatedPropertySymbol\")\nval typeAliasSymbolType = type(symbols, \"IrTypeAliasSymbol\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.utils\n\n\/**\n * Sorts [nodes] topologically collecting direct edges via [dependencies]. [nodes] and [dependencies] must form a directed, acyclic graph.\n * [topologicalSort] will throw an [IllegalStateException] if it encounters a cycle.\n *","completion":"* The algorithm is based on depth-first search, starting in order from each node in [nodes]. Kahn's algorithm is harder to apply to the\n * ad-hoc dependency structure because it's not easily apparent whether a node has no other incoming edges.\n *\n * For example, consider the following structure: `C -> A, C -> B, B -> A`. The resulting order should be `[C, B, A]`. However, `A` is<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.lombok.k2.generators\n\nimport org.jetbrains.kotlin.KtFakeSourceElementKind\nimport org.jetbrains.kotlin.descriptors.Modality\nimport org.jetbrains.kotlin.fakeElement\nimport org.jetbrains.kotlin.fir.FirSession","completion":"import org.jetbrains.kotlin.fir.containingClassForStaticMemberAttr\nimport org.jetbrains.kotlin.fir.declarations.FirFunction\nimport org.jetbrains.kotlin.fir.declarations.builder.buildConstructedClassTypeParameterRef\nimport org.jetbrains.kotlin.fir.declarations.builder.buildTypeParameterCopy<|endoftext|>"} {"prompt":"return 1.0\n return 2.0\n}\nfun blockReturnValueTypeMatch6() : Int {\n if (1 > 2)","completion":"else return 1.0\n return 2.0\n}\nfun blockReturnValueTypeMatch7() : Int {\n if (1 > 2)\n 1.0\n else 2.0<|endoftext|>"} {"prompt":"COMPLETED SKIPPED \/\/ jsTest\/\/my\/company\/product\/MyTest\/MyTestNested\/my.company.product.MyTest.MyTestNested.myTest6\n STARTED SUITE my.company.product.MyTest.MyTestNested.MyTestNestedNested \/\/ jsTest\/\/my\/company\/product\/MyTest\/MyTestNested\/MyTestNestedNested","completion":"STARTED TEST displayName: myTest7, classDisplayName: MyTestNestedNested, className: my.company.product.MyTest.MyTestNestedNested, name: myTest7 \/\/ jsTest\/\/my\/company\/product\/MyTest\/MyTestNested\/MyTestNestedNested\/my.company.product.MyTest.MyTestNestedNested.myTest7<|endoftext|>"} {"prompt":"\/\/ a redundant jump after the call when generating the machine code, ruining the expected code pattern.\n \/\/\n \/\/ To workaround this, we generate the call and the pattern after it as a separate noinline function (\"outlined\"),\n \/\/ and catch the exceptions in the caller of this function.\n \/\/ So, no exception handler in \"outlined\" => no redundant jump => the optimized return works properly.","completion":"val functionIsPassedAsLastParameter = !function.isConstant\n\n val valuesToPass = args + if (functionIsPassedAsLastParameter) listOf(function.asCallback()) else emptyList()\n val outlinedType = LlvmFunctionSignature(\n signature.returnType,<|endoftext|>"} {"prompt":"if (declaration !is KtClassOrObject) {\n diagnosticHolder.report(ErrorsParcelize.PARCELABLE_SHOULD_BE_CLASS.on(declaration))\n return\n }\n\n if (declaration is KtClass && (declaration.isAnnotation() || declaration.isInterface() && !declaration.isSealed())) {","completion":"val reportElement = declaration.nameIdentifier ?: declaration\n diagnosticHolder.report(ErrorsParcelize.PARCELABLE_SHOULD_BE_CLASS.on(reportElement))\n return\n }\n\n for (companion in declaration.companionObjects) {\n if (companion.name == \"CREATOR\") {\n val reportElement = companion.nameIdentifier ?: companion<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.scopes.receivers.ImplicitReceiver\nimport org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue\nimport org.jetbrains.kotlin.types.KotlinType\nimport org.jetbrains.kotlin.types.TypeUtils","completion":"import org.jetbrains.kotlin.types.UnwrappedType\nimport org.jetbrains.kotlin.types.expressions.OperatorConventions\nimport org.jetbrains.kotlin.types.typeUtil.contains\nimport org.jetbrains.kotlin.util.OperatorNameConventions\nimport org.jetbrains.kotlin.utils.addToStdlib.safeAs<|endoftext|>"} {"prompt":"* |\n * +----+----+\n * | |\n * iosX64Main iosArm64Main\n *\/\n @Test\n fun `test - diamond hierarchy from documentation example`() {\n kotlin.applyHierarchyTemplate {\n common {\n group(\"ios\") {\n withIos()\n }\n group(\"frontend\") {","completion":"withJvm()\n group(\"ios\") \/\/ <- ! We can again reference the 'ios' group\n }\n group(\"apple\") {\n withMacos()\n group(\"ios\") \/\/ <- ! We can again reference the 'ios' group\n }\n }\n }\n\n kotlin.iosX64()\n kotlin.iosArm64()\n kotlin.macosX64()<|endoftext|>"} {"prompt":".setPrettyPrinting()\n .disableHtmlEscaping()\n .serializeNulls()\n .registerTypeAdapterFactory(PackageJsonTypeAdapter())\n .create()\n\n packageJsonFile.ensureParentDirsCreated()\n val jsonTree = gson.toJsonTree(this)\n val previous = if (packageJsonFile.exists()) {","completion":"packageJsonFile.reader().use {\n JsonParser.parseReader(it)\n }\n } else null\n\n if (jsonTree != previous) {\n packageJsonFile.writer().use {\n gson.toJson(jsonTree, it)\n }\n }\n }\n}\n\nfun fromSrcPackageJson(packageJson: File?): PackageJson? =<|endoftext|>"} {"prompt":"assertMaturity(DEV, \"1.8.0-one-two-three-2022\")\n assertMaturity(DEV, \"1.8.0-one-a1-b2-2022\")\n assertMaturity(DEV, \"1.8.0-temporary-999\")","completion":"assertMaturity(DEV, \"1.8.0-snapshot-42\", \"Looks strange but snapshot is rather special to allow more usages\")\n assertMaturity(DEV, \"1.8.0-dev-\")\n assertMaturity(DEV, \"1.8.0-t-1000\")\n assertMaturity(DEV, \"1.8.0-no-1\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.konan.test.blackbox\n\nimport com.intellij.openapi.util.text.StringUtilRt\nimport com.intellij.testFramework.TestDataFile\nimport org.jetbrains.kotlin.konan.target.Family\nimport org.jetbrains.kotlin.konan.target.KonanTarget","completion":"import org.jetbrains.kotlin.konan.test.blackbox.support.TestCInteropArgs\nimport org.jetbrains.kotlin.konan.test.blackbox.support.TestCompilerArgs\nimport org.jetbrains.kotlin.konan.test.blackbox.support.compilation.TestCompilationResult<|endoftext|>"} {"prompt":"private fun convertReceiverType(receiverType: LighterASTNode): FirTypeRef {\n receiverType.forEachChildren {\n when (it.tokenType) {\n TYPE_REFERENCE -> return convertType(it)\n }\n }\n\n \/\/TODO specify error\n throw Exception()\n }\n\n \/**","completion":"* @see org.jetbrains.kotlin.parsing.KotlinParsing.parseNullableTypeSuffix\n *\/\n private fun convertNullableType(\n typeRefSource: KtSourceElement,\n nullableType: LighterASTNode,\n allTypeModifiers: MutableList,\n isNullable: Boolean = true\n ): FirTypeRef {<|endoftext|>"} {"prompt":"val TEXTURE_2D: Int\n val TEXTURE: Int\n val TEXTURE_CUBE_MAP: Int\n val TEXTURE_BINDING_CUBE_MAP: Int\n val TEXTURE_CUBE_MAP_POSITIVE_X: Int\n val TEXTURE_CUBE_MAP_NEGATIVE_X: Int","completion":"val TEXTURE_CUBE_MAP_POSITIVE_Y: Int\n val TEXTURE_CUBE_MAP_NEGATIVE_Y: Int\n val TEXTURE_CUBE_MAP_POSITIVE_Z: Int\n val TEXTURE_CUBE_MAP_NEGATIVE_Z: Int\n val MAX_CUBE_MAP_TEXTURE_SIZE: Int\n val TEXTURE0: Int<|endoftext|>"} {"prompt":"arg25: Long = 0L, arg26: Long = 0L, arg27: Long = 0L, arg28: Long = 0L, arg29: Long = 0L,\n arg30: Long = 0L, arg31: Long = 0L, x: A = A(0)\n) = \"OK\"\n\nfun test64(","completion":"arg00: Long = 0L, arg01: Long = 0L, arg02: Long = 0L, arg03: Long = 0L, arg04: Long = 0L,\n arg05: Long = 0L, arg06: Long = 0L, arg07: Long = 0L, arg08: Long = 0L, arg09: Long = 0L,<|endoftext|>"} {"prompt":"f.remove(null)\n\n i.size\n i.remove(null)\n i.remove(true)\n i.remove(\"\")\n\n j.size\n j.remove(null)\n j.remove(true)\n j.remove(\"\")\n\n k.size\n k.remove(null)\n k.remove(true)\n k.remove(\"\")","completion":"l.size\n l.remove(null)\n l.remove(true)\n l.remove(\"\")\n\n m.size\n m.remove(null)\n m.remove(true)\n m.remove(\"\")\n\n n.size\n n.remove(null)\n n.remove(true)\n n.remove(\"\")\n}<|endoftext|>"} {"prompt":"* Note that some types have platform-specific counterparts, i.e. kotlin.String is mapped to java.lang.String,\n * such types (and all their sub- and supertypes) are related too.\n *\n * Due to limitations in PlatformToKotlinClassMap, we only consider mapping of platform classes to Kotlin classed","completion":"* (i.e. java.lang.String -> kotlin.String) and ignore mappings that go the other way.\n *\/\n private fun isRelated(a: KotlinType, b: KotlinType, platformToKotlinClassMapper: PlatformToKotlinClassMapper): Boolean {\n val aClasses = mapToPlatformIndependentClasses(a, platformToKotlinClassMapper)<|endoftext|>"} {"prompt":"import org.junit.jupiter.api.io.TempDir\nimport java.nio.file.Path\nimport kotlin.io.path.appendText\nimport kotlin.io.path.readText\nimport kotlin.test.assertEquals\n\n@MppGradlePluginTests\n@DisplayName(\"Multiplatform metadata for tooling\")","completion":"class KotlinToolingMetadataMppIT : KGPBaseTest() {\n private val TestProject.defaultKotlinToolingMetadataJsonPath\n get() = projectPath.resolve(\"build\/kotlinToolingMetadata\/kotlin-tooling-metadata.json\")\n\n\n private val buildKotlinToolingMetadataTaskName<|endoftext|>"} {"prompt":"defaultValue: TResult? = null,\n required: Boolean = false,\n val multiple: Boolean = false,\n val delimiter: String? = null,\n deprecatedWarning: String? = null) : Descriptor(type, fullName, description, defaultValue,\n required, deprecatedWarning) {\n\n override val textDescription: String","completion":"get() = \"option $optionFullFormPrefix$fullName\"\n\n override val helpMessage: String\n get() {\n val result = StringBuilder()\n result.append(\" $optionFullFormPrefix$fullName\")\n shortName?.let { result.append(\", $optionShortFromPrefix$it\") }\n valueDescription(defaultValue)?.let {\n result.append(it)<|endoftext|>"} {"prompt":"fun isEqual(l: Any?, r: Any?) = if (l == r) true else null\n\nfun box(stepId: Int): String {\n when (stepId) {\n 0, 8, 15, 16 -> isEqual(foo(), 42) ?: return \"Fail\"\n 1 -> isEqual(foo(), false) ?: return \"Fail\"","completion":"2 -> isEqual(foo(), 3.14) ?: return \"Fail\"\n 3, 5, 6, 12 -> isEqual(foo(), \"string\") ?: return \"Fail\"\n 4 -> isEqual(foo(), null) ?: return \"Fail\"\n 7 -> {\n foo() \/\/ Unit\n return \"OK\"\n }<|endoftext|>"} {"prompt":"11.0.calcDouble(fun (a: Int, b: Double) = a + b)\n }\n return inlineX.doWorkWithDouble(11.0)\n}\n\nfun box(): String {\n if (test1() != 25) return \"test1: ${test1()}\"\n if (test2() != 25) return \"test2: ${test2()}\"","completion":"if (test3() != 20) return \"test3: ${test3()}\"\n if (test4() != 20.0) return \"test4: ${test4()}\"\n if (test5() != 20.0) return \"test5: ${test5()}\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.directives.JsEnvironmentConfigurationDirectives.GENERATE_INLINE_ANONYMOUS_FUNCTIONS\nimport org.jetbrains.kotlin.test.directives.JsEnvironmentConfigurationDirectives.MODULE_KIND\nimport org.jetbrains.kotlin.test.directives.JsEnvironmentConfigurationDirectives.NO_INLINE","completion":"import org.jetbrains.kotlin.test.directives.JsEnvironmentConfigurationDirectives.PROPERTY_LAZY_INITIALIZATION\nimport org.jetbrains.kotlin.test.directives.JsEnvironmentConfigurationDirectives.SOURCE_MAP_EMBED_SOURCES<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ WITH_STDLIB\n\/\/ FULL_JDK\n\/\/ SKIP_JDK6\n\nimport java.lang.annotation.Documented\n\nannotation class NoDocumented\n\n@MustBeDocumented\nannotation class ExplicitMustBeDocumented\n\n@Documented\nannotation class ExplicitJavaDocumented\n\n@MustBeDocumented\n@Documented\nannotation class ExplicitBoth","completion":"inline fun isDocumented(): Boolean =\n A::class.java.getDeclaredAnnotation(Documented::class.java) != null\n\nfun box(): String {\n if (isDocumented()) return \"Fail NoDocumented\"\n if (!isDocumented()) return \"Fail ExplicitMustBeDocumented\"<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.checkSinceKotlinVersionAccessibility\n\n\/\/ TODO: consider combining with DeprecatedCallChecker somehow\nobject ApiVersionCallChecker : CallChecker {\n override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) {","completion":"check(resolvedCall.resultingDescriptor, context, reportOn)\n }\n\n private fun check(targetDescriptor: CallableDescriptor, context: CallCheckerContext, element: PsiElement) {\n \/\/ Objects will be checked by ApiVersionClassifierUsageChecker\n if (targetDescriptor is FakeCallableDescriptorForObject) return<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_VARIABLE\n\n\/\/ FILE: Function.java\n\npublic interface Function {\n Result fun(Param param);\n}\n\n\/\/ FILE: AdapterProcessor.java\n\npublic class AdapterProcessor {\n public AdapterProcessor(Function conversion) {}\n}","completion":"\/\/ FILE: main.kt\n\ninterface PsiMethod {\n val containingClass: PsiClass?\n}\n\ninterface PsiClass\n\nfun test() {\n val processor = AdapterProcessor(\n Function { method: PsiMethod? -> method?.containingClass }\n )\n}<|endoftext|>"} {"prompt":"File(srcDir, \"Foo$i.kt\").writeText(code)\n }\n }\n\n generateFiles()\n initProject(JVM_MOCK_RUNTIME)\n\n var checkCancelledCalledCount = 0\n val countingCancelledStatus = CanceledStatus {\n checkCancelledCalledCount++\n false\n }","completion":"val logger = TestProjectBuilderLogger()\n val buildResult = BuildResult()\n\n buildCustom(countingCancelledStatus, logger, buildResult)\n\n buildResult.assertSuccessful()\n assert(checkCancelledCalledCount > classCount) {\n \"isCancelled should be called at least once per class. Expected $classCount, but got $checkCancelledCalledCount\"\n }<|endoftext|>"} {"prompt":"module.serializer().checkSerialName(\"Container.NestedEnum\")?.let { return it }\n module.serializer().checkSerialName(\"custom|EnumWithCustom\")?.let { return it }","completion":"module.serializer().checkSerialName(\"custom|Container.NestedEnumWithCustom\")?.let { return it }\n module.serializer().checkSerialName(\"custom|EnumWithCustomCl\")?.let { return it }<|endoftext|>"} {"prompt":"isLVReference = (kind == CXType_LValueReference),\n spelling = type.name\n )\n }\n\n CXType_ConstantArray -> {\n val elementType = convertType(clang_getArrayElementType(type))\n val length = clang_getArraySize(type)\n ConstArrayType(elementType, length)\n }","completion":"CXType_IncompleteArray -> {\n val elementType = convertType(clang_getArrayElementType(type))\n IncompleteArrayType(elementType)\n }\n\n CXType_VariableArray -> {\n val elementType = convertType(clang_getArrayElementType(type))\n VariableArrayType(elementType)\n }\n\n CXType_FunctionProto -> {<|endoftext|>"} {"prompt":"class E : D() {\n protected override fun willRemainProtected() {\n }\n\n public override fun willBecomePublic() {\n }\n}\n\nenum class F private constructor(val x: Int) {\n FIRST(42)\n}","completion":"sealed class G constructor(val y: Int) {\n private constructor(): this(42)\n\n object H : G()\n}\n\ninterface I {\n fun bar()\n}\n\npublic var baz = 0\n\nopen class J {<|endoftext|>"} {"prompt":"@OptIn(kotlin.experimental.ExperimentalTypeInference::class)\n@OverloadResolutionByLambdaReturnType\n@kotlin.internal.InlineOnly\npublic inline fun LongArray.maxOf(selector: (Long) -> Float): Float {\n if (isEmpty()) throw NoSuchElementException()\n var maxValue = selector(this[0])","completion":"for (i in 1..lastIndex) {\n val v = selector(this[i])\n maxValue = maxOf(maxValue, v)\n }\n return maxValue\n}\n\n\/**\n * Returns the largest value among all values produced by [selector] function\n * applied to each element in the array.\n *<|endoftext|>"} {"prompt":"val c = loader.loadClass(if (v) \"nonLocalReturn.ShouldBeEnabled\" else \"nonLocalReturn.ShouldBeDisabled\")\n return c.newInstance() as Checker\n}\n\nfun box(): String {\n var c = setDesiredAssertionStatus(false)\n if (c.checkTrueWithMessage()) return \"FAIL 2\"","completion":"if (c.checkFalseWithMessage()) return \"FAIL 4\"\n c = setDesiredAssertionStatus(true)\n if (!c.checkTrueWithMessage()) return \"FAIL 6\"\n if (!c.checkFalseWithMessage()) return \"FAIL 8\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"open fun transformResolvedDeclarationStatus(resolvedDeclarationStatus: FirResolvedDeclarationStatus, data: D): FirDeclarationStatus {\n return transformElement(resolvedDeclarationStatus, data)\n }\n\n final override fun visitResolvedDeclarationStatus(resolvedDeclarationStatus: FirResolvedDeclarationStatus, data: D): FirDeclarationStatus {","completion":"return transformResolvedDeclarationStatus(resolvedDeclarationStatus, data)\n }\n\n open fun transformControlFlowGraphOwner(controlFlowGraphOwner: FirControlFlowGraphOwner, data: D): FirControlFlowGraphOwner {\n return transformElement(controlFlowGraphOwner, data)\n }<|endoftext|>"} {"prompt":"return java.util.Arrays.copyOfRange(this, fromIndex, toIndex)\n}\n\n@SinceKotlin(\"1.3\")\n@PublishedApi\n@JvmName(\"copyOfRange\")\ninternal fun ShortArray.copyOfRangeImpl(fromIndex: Int, toIndex: Int): ShortArray {\n copyOfRangeToIndexCheck(toIndex, size)","completion":"return java.util.Arrays.copyOfRange(this, fromIndex, toIndex)\n}\n\n@SinceKotlin(\"1.3\")\n@PublishedApi\n@JvmName(\"copyOfRange\")\ninternal fun IntArray.copyOfRangeImpl(fromIndex: Int, toIndex: Int): IntArray {\n copyOfRangeToIndexCheck(toIndex, size)<|endoftext|>"} {"prompt":"expectFailure(linkage(\"Can not get instance of singleton 'EnumClassWithDisappearingEntry.REMOVED': No enum entry found for symbol '\/EnumClassWithDisappearingEntry.REMOVED'\")) { getAnnotationClassWithRemovedEnumEntryParameterOfParameter() }","completion":"expectFailure(linkage(\"Can not get instance of singleton 'EnumClassWithDisappearingEntry.REMOVED': No enum entry found for symbol '\/EnumClassWithDisappearingEntry.REMOVED'\")) { getAnnotationClassWithRemovedEnumEntryParameterOfParameterInline() }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.fir.java.declarations\n\nimport org.jetbrains.kotlin.KtSourceElement\nimport org.jetbrains.kotlin.fir.FirImplementationDetail\nimport org.jetbrains.kotlin.fir.FirModuleData\nimport org.jetbrains.kotlin.fir.builder.FirBuilderDsl","completion":"import org.jetbrains.kotlin.fir.contracts.FirContractDescription\nimport org.jetbrains.kotlin.fir.declarations.*\nimport org.jetbrains.kotlin.fir.declarations.builder.FirConstructorBuilder\nimport org.jetbrains.kotlin.fir.expressions.FirAnnotation<|endoftext|>"} {"prompt":"val explicitVisibility = element.source?.explicitVisibility\n val isHidden = explicitVisibility.isEffectivelyHiddenBy(containingMemberDeclaration)\n if (isHidden) {\n reportElement(element, context, reporter)\n return\n }\n\n \/\/ In explicit API mode, `public` is explicitly required.","completion":"val explicitApiMode = context.languageVersionSettings.getFlag(AnalysisFlags.explicitApiMode)\n if (explicitApiMode != ExplicitApiMode.DISABLED && explicitVisibility == Visibilities.Public) {\n return\n }\n\n if (explicitVisibility == implicitVisibility) {\n reportElement(element, context, reporter)\n }\n }<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1319\n\/\/ MODULE: lib\n\/\/ FILE: lib.kt\n\npackage test\n\nvar a = 0\n\ninline var p1: Int\n get() = a + 10000\n set(v) {\n a = v + 100\n }\n\nvar p2: Int\n inline get() = a + 20000\n set(v) {","completion":"a = v + 200\n }\n\nvar p3: Int\n get() = a + 30000\n inline set(v) {\n a = v + 300\n }\n\ninline var Int.p4: Int\n get() = this * 100 + a + 40000\n set(v) {\n a = this + v + 400\n }\n\nvar Int.p5: Int<|endoftext|>"} {"prompt":"suspend fun run()\n}\n\n\/\/ Function is NOT suspend\n\/\/ parameter is noinline\n\/\/ parameter is suspend\n\/\/ Block is NOT allowed to be called inside the body of owner inline function\n\/\/ Block is allowed to be called from nested classes\/lambdas (as common crossinlines)\n\/\/ It is possible to call startCoroutine on the parameter\n\/\/ suspend calls possible inside lambda matching to the parameter","completion":"inline fun test(noinline c: suspend () -> Unit) {\n c()\n val o = object : SuspendRunnable {\n override suspend fun run() {\n c()\n }\n }\n val l: suspend () -> Unit = { c() }\n c.startCoroutine(EmptyContinuation)<|endoftext|>"} {"prompt":"\/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \"O\" + kValue()","completion":"\/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]\n \/\/A lot of blank lines [Don't delete]<|endoftext|>"} {"prompt":"\/\/ FILE: Test.java\npublic class Test {\n public static final String FOO = \"test\";\n}\n\n\/\/ FILE: test.kt\nfun ff() {\n val a = Test.FOO\n val b = Test?.FOO\n System.out.println(a + b)","completion":"System?.out.println(a + b)\n}<|endoftext|>"} {"prompt":"assertEquals(\"Amsterdam\", readOnlyNativeFooWrapperN?.nativeFoo?.s)\n\n nativeFooNWrapper = NativeFooNWrapper(NativeFoo(\"Saint-Petersburg\"))\n assertEquals(\"Saint-Petersburg\", readOnlyNativeFooNWrapper.nativeFooN?.s)\n nativeFooNWrapper = NativeFooNWrapper(null)","completion":"assertEquals(null, readOnlyNativeFooNWrapper.nativeFooN?.s)\n\n assertEquals(null, readOnlyNativeFooNWrapperN?.nativeFooN?.s)\n nativeFooNWrapperN = NativeFooNWrapper(NativeFoo(\"Boston\"))<|endoftext|>"} {"prompt":"@Deprecated(\"Use Kotlin compiler 1.4 to avoid deprecation warning.\")\n@SinceKotlin(\"1.1\")\n@DeprecatedSinceKotlin(hiddenSince = \"1.4\")\npublic fun CharArray.contentHashCode(): Int {\n return this.contentHashCode()\n}\n\n\/**\n * Returns a hash code based on the contents of this array as if it is [List].\n *\/","completion":"@SinceKotlin(\"1.4\")\npublic actual fun Array?.contentHashCode(): Int {\n if (this === null) return 0\n var result = 1\n for (element in this)\n result = 31 * result + element.hashCode()\n return result\n}\n\n\/**\n * Returns a hash code based on the contents of this array as if it is [List].\n *\/<|endoftext|>"} {"prompt":"}\n }\n }\n}\n\nclass ES6PrimaryConstructorUsageOptimizationLowering(private val context: JsIrBackendContext) : BodyLoweringPass {\n override fun lower(irBody: IrBody, container: IrDeclaration) {\n irBody.transformChildrenVoid(object : IrElementTransformerVoid() {\n override fun visitCall(expression: IrCall): IrExpression {","completion":"val callee = expression.symbol.owner\n return when {\n !callee.shouldBeConvertedToPlainConstructor(context) -> super.visitCall(expression)\n expression.isSyntheticDelegatingReplacement -> {<|endoftext|>"} {"prompt":"val propertyCache: FirCache, Nothing?> =\n cachesFactory.createCache { name -> generateMemberProperties(name) }\n\n val constructorCache: FirLazyValue> =\n cachesFactory.createLazyValue { generateConstructors() }\n\n val allCallableNames: Set","completion":"get() = extensionsByCallableName.keys\n\n private val classSymbol: FirClassSymbol<*>\n get() = generationContext.owner\n\n private fun generateMemberFunctions(name: Name): List {\n if (name == SpecialNames.INIT) return emptyList()\n return extensionsByCallableName[name].orEmpty()<|endoftext|>"} {"prompt":"ANNOTATION_PROCESSORS_OPTION(\n \"processors\",\n \"\",\n \"Annotation processor qualified names\",\n true,\n cliToolOption = CliToolOption(\"-Kapt-processors\", VALUE)\n ),\n\n APT_OPTION_OPTION(\n \"apOption\",","completion":"\":=\",\n \"Annotation processor options\",\n cliToolOption = CliToolOption(\"-Kapt-option\", KEY_VALUE)\n ),\n\n JAVAC_OPTION_OPTION(\n \"javacOption\",\n \":=\",\n \"Javac options\",<|endoftext|>"} {"prompt":"DiagnosticKind.MissingStdlibClass -> FirErrors.MISSING_STDLIB_CLASS\n DiagnosticKind.IntLiteralOutOfRange -> FirErrors.INT_LITERAL_OUT_OF_RANGE\n DiagnosticKind.FloatLiteralOutOfRange -> FirErrors.FLOAT_LITERAL_OUT_OF_RANGE","completion":"DiagnosticKind.WrongLongSuffix -> FirErrors.WRONG_LONG_SUFFIX\n DiagnosticKind.UnsignedNumbersAreNotPresent -> FirErrors.UNSIGNED_LITERAL_WITHOUT_DECLARATIONS_ON_CLASSPATH\n DiagnosticKind.IncorrectCharacterLiteral -> FirErrors.INCORRECT_CHARACTER_LITERAL<|endoftext|>"} {"prompt":"if (isLambda) ((function as FirAnonymousFunction).typeRef as? FirResolvedTypeRef)?.type?.isSuspendOrKSuspendFunctionType(session) == true\n else function.isSuspend\n val created = function.convertWithOffsets { startOffset, endOffset ->\n classifierStorage.preCacheTypeParameters(function)\n irFactory.createSimpleFunction(","completion":"startOffset = if (updatedOrigin == IrDeclarationOrigin.DELEGATED_MEMBER) SYNTHETIC_OFFSET else startOffset,\n endOffset = if (updatedOrigin == IrDeclarationOrigin.DELEGATED_MEMBER) SYNTHETIC_OFFSET else endOffset,\n origin = updatedOrigin,\n name = name,<|endoftext|>"} {"prompt":"\/\/ !API_VERSION: 1.0\n\n@SinceKotlin(\"1.1\")\nopen class Foo\n\nclass Bar @SinceKotlin(\"1.1\") constructor()\n\n@SinceKotlin(\"1.0\")\nclass Baz @SinceKotlin(\"1.1\") constructor()\n\n@SinceKotlin(\"1.1\")\nclass Quux @SinceKotlin(\"1.0\") constructor()","completion":"fun t1(): Foo = Foo()\n\n\/\/ TODO: do not report API_NOT_AVAILABLE twice<|endoftext|>"} {"prompt":"override val psiTypeProviderImpl: KtPsiTypeProvider = KtFe10PsiTypeProvider(this)\n override val typeProviderImpl: KtTypeProvider = KtFe10TypeProvider(this)\n override val typeInfoProviderImpl: KtTypeInfoProvider = KtFe10TypeInfoProvider(this)","completion":"override val subtypingComponentImpl: KtSubtypingComponent = KtFe10SubtypingComponent(this)\n override val expressionInfoProviderImpl: KtExpressionInfoProvider = KtFe10ExpressionInfoProvider(this)\n override val compileTimeConstantProviderImpl: KtCompileTimeConstantProvider = KtFe10CompileTimeConstantProvider(this)<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.resolve.checkers\n\nimport org.jetbrains.kotlin.config.LanguageFeature\nimport org.jetbrains.kotlin.descriptors.*\nimport org.jetbrains.kotlin.diagnostics.Errors\nimport org.jetbrains.kotlin.lexer.KtTokens","completion":"import org.jetbrains.kotlin.psi.KtDeclaration\n\nobject SealedInterfaceAllowedChecker : DeclarationChecker {\n override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {\n if (descriptor !is ClassDescriptor) return\n if (descriptor.kind != ClassKind.INTERFACE) return<|endoftext|>"} {"prompt":"val mainClassAndArguments = testServices.jvmBoxMainClassProvider?.getMainClassNameAndAdditionalArguments() ?: run {\n val mainFile = module.files.firstOrNull {\n it.name == MainFunctionForBlackBoxTestsSourceProvider.BOX_MAIN_FILE_NAME && it.isAdditional\n } ?: error(\"No file with main function was generated. Please check TODO source provider\")","completion":"val mainFqName = listOfNotNull(\n MainFunctionForBlackBoxTestsSourceProvider.detectPackage(mainFile),\n \"${mainFile.nameWithoutExtension}Kt\"\n ).joinToString(\".\")\n\n listOf(mainFqName)\n }\n\n val process = launchSeparateJvmProcess(javaExe, module, classPath, mainClassAndArguments)<|endoftext|>"} {"prompt":"if (element6 !in 1.0..<3.0 != !range0.contains(element6)) throw AssertionError()\n if (!(element6 in 1.0..<3.0) != !range0.contains(element6)) throw AssertionError()","completion":"if (!(element6 !in 1.0..<3.0) != range0.contains(element6)) throw AssertionError()\n}\n\nfun testR0xE7() {\n \/\/ with possible local optimizations\n if (2.0 in 1.0..<3.0 != range0.contains(2.0)) throw AssertionError()<|endoftext|>"} {"prompt":"engine.runBackend(backendContext, psiToIrOutput.irModule)\n }\n\n private fun produceCLibrary(engine: PhaseEngine, config: KonanConfig, environment: KotlinCoreEnvironment) {\n val frontendOutput = engine.runFrontend(config, environment) ?: return","completion":"val (psiToIrOutput, cAdapterElements) = engine.runPsiToIr(frontendOutput, isProducingLibrary = false) {\n if (config.cInterfaceGenerationMode == CInterfaceGenerationMode.V1) {\n it.runPhase(BuildCExports, frontendOutput)\n } else {\n null\n }\n }<|endoftext|>"} {"prompt":"0xc02a058678adc34fUL, 0x7ff8000000000000UL, 0xbfe193ea7aad030bUL, 0x7ff8000000000000UL, \n 0xbfd058aefa811452UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL,","completion":"0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x3ff0f2eb07023068UL, \n 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL,<|endoftext|>"} {"prompt":"private sealed class ChangeType {\n object OutOfBlock : ChangeType()\n object Invisible : ChangeType()\n\n class InBlock(val blockOwner: KtAnnotated, val project: Project) : ChangeType() {\n val ktModule: KtModule by lazy(LazyThreadSafetyMode.NONE) {\n ProjectStructureProvider.getModule(project, blockOwner, contextualModule = null)\n }","completion":"override fun equals(other: Any?): Boolean = other === this || other is InBlock && other.blockOwner == blockOwner\n override fun hashCode(): Int = blockOwner.hashCode()\n }\n}\n\n\/**\n * The purpose of this property as user data is to avoid FIR building in case the [KtAnnotated]\n * doesn't have an associated FIR with body.\n *<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\n\/\/ FILE: J.java\n\nimport java.util.*;\n\npublic class J {\n\n private static class MyList extends A {}\n\n public static String foo() {\n MyList myList = new MyList();\n List list = (List) myList;\n\n if (!list.remove((Integer) 1)) return \"fail 1\";","completion":"if (list.remove((int) 1) != 123) return \"fail 2\";\n\n if (!myList.remove((Integer) 1)) return \"fail 3\";\n if (myList.remove((int) 1) != 123) return \"fail 4\";\n\n if (myList.removeAt(1) != 123) return \"fail 5\";\n return \"OK\";\n }\n}\n\n\/\/ FILE: test.kt<|endoftext|>"} {"prompt":"assertEquals(b.lastTrueIndex, -1)\n assertContainsOnly(b, setOf(), 71)\n\n \/\/ Test set and clear operations for ranges.\n \/\/ Set false and clear.\n b = BitSet(2)\n assertContainsOnly(b, setOf(), 2)\n b.set(0..70, true)\n assertNotContainsOnly(b, setOf(), 71)","completion":"b.set(0..2, false)\n assertNotContainsOnly(b, setOf(0, 1, 2), 71)\n b.set(63..65, false)\n assertNotContainsOnly(b, setOf(0, 1, 2, 63, 64, 65), 71)\n b.set(68..70, false)<|endoftext|>"} {"prompt":"private const val SOURCE_SET_CINTEROP_METADATA_NODE_NAME = \"sourceSetCInteropMetadataDirectory\"\nprivate const val DEPENDS_ON_NODE_NAME = \"dependsOn\"\nprivate const val MODULE_DEPENDENCY_NODE_NAME = \"moduleDependency\"\nprivate const val BINARY_LAYOUT_NODE_NAME = \"binaryLayout\"","completion":"private const val HOST_SPECIFIC_NODE_NAME = \"hostSpecific\"<|endoftext|>"} {"prompt":"\/**\n * Returns a random element from this array.\n * \n * @throws NoSuchElementException if this array is empty.\n *\/\n@SinceKotlin(\"1.3\")\n@kotlin.internal.InlineOnly\npublic inline fun ByteArray.random(): Byte {\n return random(Random)\n}\n\n\/**\n * Returns a random element from this array.\n *","completion":"* @throws NoSuchElementException if this array is empty.\n *\/\n@SinceKotlin(\"1.3\")\n@kotlin.internal.InlineOnly\npublic inline fun ShortArray.random(): Short {\n return random(Random)\n}\n\n\/**\n * Returns a random element from this array.\n * \n * @throws NoSuchElementException if this array is empty.\n *\/<|endoftext|>"} {"prompt":"enum entry EXPRESSION\n\n enum entry FILE\n\n @kotlin.SinceKotlin(version = \"1.1\")\n enum entry TYPEALIAS\n}\n\n@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.ANNOTATION_CLASS})\npublic final annotation class MustBeDocumented : kotlin.Annotation {\n public constructor MustBeDocumented()\n}","completion":"@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.ANNOTATION_CLASS})\npublic final annotation class Repeatable : kotlin.Annotation {\n public constructor Repeatable()\n}\n\n@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.ANNOTATION_CLASS})\npublic final annotation class Retention : kotlin.Annotation {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ABSTRACT_PROPERTY_IN_PRIMARY_CONSTRUCTOR_PARAMETERS","completion":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ABSTRACT_PROPERTY_WITH_GETTER\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ABSTRACT_PROPERTY_WITH_INITIALIZER<|endoftext|>"} {"prompt":"c.components.javaResolverCache.recordField(field, propertyDescriptor)\n\n return propertyDescriptor\n }\n\n private fun createPropertyDescriptor(field: JavaField): PropertyDescriptorImpl {\n val isVar = !field.isFinal\n val annotations = c.resolveAnnotations(field)\n\n return JavaPropertyDescriptor.create(","completion":"ownerDescriptor, annotations, Modality.FINAL, field.visibility.toDescriptorVisibility(), isVar, field.name,\n c.components.sourceElementFactory.source(field), \/* isConst = *\/ field.isFinalStatic\n )\n }\n\n private val JavaField.isFinalStatic: Boolean\n get() = isFinal && isStatic<|endoftext|>"} {"prompt":"for ((qualifier, isExpected) in qualifiersToCheck) {\n val actual = modifierList.hasAnnotation(qualifier)\n testServices.assertions.assertEquals(expected = isExpected, actual = actual) {\n \"$qualifier isExpected: $isExpected, but $actual is found\"\n }\n\n val psiAnnotation = modifierList.findAnnotation(qualifier)","completion":"if (isExpected) {\n testServices.assertions.assertNotNull(psiAnnotation)\n }\n\n psiAnnotation?.let(annotationsFromFindAnnotation::add)\n }\n\n testServices.assertions.assertEquals(expected = expectedAnnotations.size, actual = annotationsFromFindAnnotation.size)\n val annotations = modifierList.annotations.toList()<|endoftext|>"} {"prompt":"override val fqName: FqName\n get() = klass.classId.asSingleFqName()\n\n override val outerClass: ReflectJavaClass?\n get() = klass.declaringClass?.let(::ReflectJavaClass)\n\n override val supertypes: Collection\n get() {","completion":"if (klass == Any::class.java) return emptyList()\n return listOf(klass.genericSuperclass ?: Any::class.java, *klass.genericInterfaces).map(::ReflectJavaClassifierType)\n }\n\n override val methods: List\n get() = klass.declaredMethods\n .asSequence()\n .filter { method -><|endoftext|>"} {"prompt":"relativeRootPath: String,\n excludeDirsRecursively: List = listOf(),\n excludedPattern: String? = null,\n) {\n model(\n relativeRootPath = relativeRootPath,\n extension = data.defaultExtension(),\n excludeDirsRecursively = excludeDirsRecursively,\n excludedPattern = excludedPattern,\n )\n}","completion":"private fun TestGroup.analysisApiTestClass(\n data: AnalysisApiTestConfiguratorFactoryData,\n testClass: Class<*>,\n init: TestGroup.TestClass.(data: AnalysisApiTestConfiguratorFactoryData) -> Unit\n) {\n val factory = AnalysisApiConfiguratorFactoryProvider.getFactory(data) ?: return\n\n val fullPackage = getPackageName(data, testClass)<|endoftext|>"} {"prompt":") { it, _ -> args[it] }\n patchSerializableClassWithMarkerAnnotation(serializer.owner)\n +irReturn(requireNotNull(expr))\n }\n generateSerializerFactoryIfNeeded(methodDescriptor)\n }\n\n private fun getOrCreateSerializerVarargFactory(): IrSimpleFunction {\n irClass.findDeclaration {","completion":"it.name == SerialEntityNames.SERIALIZER_PROVIDER_NAME\n && it.valueParameters.size == 1\n && it.valueParameters.first().isVararg\n && it.returnType.isKSerializer()\n && it.isFromPlugin(compilerContext.afterK2)\n }?.let { return it }<|endoftext|>"} {"prompt":"const val equalsInt1 = 1.equals(2)\nconst val equalsInt2 = 2 == 2\nconst val equalsInt3 = 1.equals(\"1\")","completion":"const val equalsInt4 = 1 == \"1\"\n\nconst val equalsLong1 = 1L.equals(2L)\nconst val equalsLong2 = 2L == 2L<|endoftext|>"} {"prompt":"class TestIdenticalReturnTypesReverse {\n constructor()\n}\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun TestIdenticalReturnTypesReverse(): TestIdenticalReturnTypesReverse = TestIdenticalReturnTypesReverse()\n\n\nclass TestFunctionWithReifiedTypeParameterVsConstructorA {","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor()\n}\ninline fun TestFunctionWithReifiedTypeParameterVsConstructorA() {}\n\nclass TestFunctionWithReifiedTypeParameterVsConstructorAReverse {\n constructor()\n}<|endoftext|>"} {"prompt":"_seed.value = seed\n }\n\n override fun nextBits(bitCount: Int): Int {\n update((seed * MULTIPLIER + 0xbL) and ((1L shl 48) - 1))\n return (seed ushr (48 - bitCount)).toInt()\n }\n\n override fun nextInt(): Int = nextBits(32)\n}","completion":"internal actual fun defaultPlatformRandom(): Random = NativeRandom\n\ninternal actual fun doubleFromParts(hi26: Int, low27: Int): Double =\n (hi26.toLong().shl(27) + low27) \/ (1L shl 53).toDouble()<|endoftext|>"} {"prompt":"@kotlin.internal.InlineOnly\npublic inline operator fun DoubleArray.component2(): Double {\n return get(1)\n}\n\n\/**\n * Returns 2nd *element* from the array.\n * \n * If the size of this array is less than 2, throws an [IndexOutOfBoundsException] except in Kotlin\/JS\n * where the behavior is unspecified.\n *\/","completion":"@kotlin.internal.InlineOnly\npublic inline operator fun BooleanArray.component2(): Boolean {\n return get(1)\n}\n\n\/**\n * Returns 2nd *element* from the array.\n * \n * If the size of this array is less than 2, throws an [IndexOutOfBoundsException] except in Kotlin\/JS\n * where the behavior is unspecified.\n *\/<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.bindingContextUtil.getDataFlowInfoBefore\nimport org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowValueFactory\nimport org.jetbrains.kotlin.resolve.calls.smartcasts.SmartCastManager\nimport org.jetbrains.kotlin.resolve.deprecation.DeprecationResolver","completion":"import org.jetbrains.kotlin.resolve.descriptorUtil.isExtension\nimport org.jetbrains.kotlin.resolve.scopes.*\nimport org.jetbrains.kotlin.resolve.scopes.receivers.ClassQualifier\nimport org.jetbrains.kotlin.resolve.scopes.utils.collectAllFromMeAndParent<|endoftext|>"} {"prompt":"* applied to elements of the given array.\n * \n * If any of two pairs would have the same key the last one gets added to the map.\n * \n * The returned map preserves the entry iteration order of the original array.\n * \n * @sample samples.collections.Arrays.Transformations.associateArrayOfPrimitives\n *\/","completion":"public inline fun FloatArray.associate(transform: (Float) -> Pair): Map {\n val capacity = mapCapacity(size).coerceAtLeast(16)\n return associateTo(LinkedHashMap(capacity), transform)\n}\n\n\/**\n * Returns a [Map] containing key-value pairs provided by [transform] function<|endoftext|>"} {"prompt":"\/\/ JVM_ABI_K1_K2_DIFF: KT-63864\n\/\/ WITH_STDLIB\n\nimport kotlin.test.*\n\nval sb = StringBuilder()\n\nabstract class A {\n abstract fun foo(x: T)\n}\n\nclass B : A() {\n override fun foo(x: Int) {","completion":"sb.appendLine(\"B: $x\")\n }\n}\n\nclass C : A() {\n override fun foo(x: Any) {\n sb.appendLine(\"C: $x\")\n }\n}\n\nfun foo(arg: A) {\n arg.foo(42)\n}\n\nfun box(): String {\n foo(B())\n foo(C())<|endoftext|>"} {"prompt":"if (\"0\".hashCode() == 42) return@l\n return@l null\n }\n}","completion":"val expectedNullableUnitExplicitReturnUnitAndString: () -> Unit? = ; kotlin.Function0\")!>l@ {\n if (\"0\".hashCode() == 42) return@l Unit\n \"\"\n}<|endoftext|>"} {"prompt":"reifiedAsFailsWithCCE>(\n x, \"x as Function8<*, *, *, *, *, *, *, *, *>\")\n}\n\nobject TestFn9 : TestFnBase {\n override fun testGood(x: Any) =","completion":"reifiedAsSucceeds>(\n x, \"x as Function9<*, *, *, *, *, *, *, *, *, *>\")\n override fun testBad(x: Any) =<|endoftext|>"} {"prompt":"val b = data.getOrPut(\"foo\") { 3 }\n assertEquals(2, b)\n\n assertEquals(1, data.size)\n }\n\n @Test fun emptyMapGet() {\n val map = emptyMap()\n assertEquals(null, map.get(\"foo\"), \"\"\"failed on map.get(\"foo\")\"\"\")","completion":"assertEquals(null, map[\"bar\"], \"\"\"failed on map[\"bar\"]\"\"\")\n }\n\n @Test fun mapGet() {\n val map = createTestMap()\n for (i in KEYS.indices) {\n assertEquals(VALUES[i], map.get(KEYS[i]), \"\"\"failed on map.get(KEYS[$i])\"\"\")<|endoftext|>"} {"prompt":"* Returns the value for the given [key] or throws an exception if there is no such key in the map.\n *\n * If the map was created by [withDefault], resorts to its `defaultValue` provider function\n * instead of throwing an exception.\n *\n * @throws NoSuchElementException when the map doesn't contain a value for the specified key and\n * no implicit default value was provided for that map.\n *\/","completion":"@SinceKotlin(\"1.1\")\npublic fun Map.getValue(key: K): V = getOrImplicitDefault(key)\n\n\/**\n * Returns the value for the given [key] if the value is present and not `null`.\n * Otherwise, calls the [defaultValue] function,\n * puts its result into the map under the given key and returns the call result.\n *<|endoftext|>"} {"prompt":"assertEquals(0.0, subject.nextDouble(0.0.nextUp()))\n }\n\n assertTrue(subject.nextDouble(Double.POSITIVE_INFINITY).isFinite(), \"Infinity is exclusive\")\n\n for (bound in listOf(1.0, 100.0, 1024.0, Double.MAX_VALUE)) {\n repeat(1000) {","completion":"val d = subject.nextDouble(bound)\n if (!(d >= 0.0 && d < bound)) {\n fail(\"Random double $d is out of range [0, $bound)\")\n }\n }\n }\n }\n\n @Test\n fun nextDoubleFromUntil() {<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\nconst val u1: UByte = 0xFFu\nconst val u2: UShort = 0xFFFFu\nconst val u3: UInt = 0xFFFF_FFFFu\nconst val u4: ULong = 0xFFFF_FFFF_FFFF_FFFFu\nconst val u5: ULong = 18446744073709551615u","completion":"const val u6 = 0xFFFF_FFFF_FFFF_FFFFu\nconst val u7 = 18446744073709551615u\n\nval u8: Comparable<*> = 0xFFFF_FFFF_FFFF_FFFFu\n\nconst val u9 = 0xFFFF_FFFF_FFFF_FFFFUL\n\nfun takeUByte(ubyte: UByte) {}\n\nfun test() {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.services.TestServices\n\nobject StandaloneModeConfigurator : StandaloneModeConfiguratorBase() {\n\n override fun configureTest(builder: TestConfigurationBuilder, disposable: Disposable) {\n sourceConfigurator.configureTest(builder, disposable)","completion":"\/\/ `StandaloneModeConfiguratorBase` is ordered last so that it overrules the source test configuration.\n super.configureTest(builder, disposable)\n }\n\n private val sourceConfigurator = AnalysisApiFirSourceTestConfigurator(analyseInDependentSession = false)\n\n override val serviceRegistrars: List<|endoftext|>"} {"prompt":"assertEquals(Long.MIN_VALUE, minOf(Long.MAX_VALUE, Long.MIN_VALUE))\n assertEquals(Long.MIN_VALUE, minOf(Long.MAX_VALUE, Long.MIN_VALUE, 0))\n assertEquals(Long.MIN_VALUE, minOf(Long.MAX_VALUE, Long.MIN_VALUE, 0, -1))","completion":"assertEquals(Double.NEGATIVE_INFINITY, minOf(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY))\n assertEquals(Double.MIN_VALUE, minOf(Double.POSITIVE_INFINITY, Double.MAX_VALUE, Double.MIN_VALUE))<|endoftext|>"} {"prompt":"visitElement(anonymousObject)\n }\n\n final override fun visitAnonymousObjectExpression(anonymousObjectExpression: FirAnonymousObjectExpression, data: Nothing?) {\n visitAnonymousObjectExpression(anonymousObjectExpression)\n }\n\n open fun visitAnonymousObjectExpression(anonymousObjectExpression: FirAnonymousObjectExpression) {\n visitElement(anonymousObjectExpression)\n }","completion":"final override fun visitDiagnosticHolder(diagnosticHolder: FirDiagnosticHolder, data: Nothing?) {\n visitDiagnosticHolder(diagnosticHolder)\n }\n\n open fun visitDiagnosticHolder(diagnosticHolder: FirDiagnosticHolder) {\n visitElement(diagnosticHolder)\n }<|endoftext|>"} {"prompt":"override val op = 5\n override val ap = 5\n }\n\n interface C {\n val c: Int\n }\n\n interface D : C {\n override val c: Int\n }\n\n interface E\n class G : B(), C, D, E\n\n\n class InheritAny {\n interface SomeTrait\n interface SomeTrait2","completion":"class ImplicitAny\n\n class ExplicitAny : Any()\n\n class OnlyTrait : SomeTrait\n class OnlyTraits : SomeTrait, SomeTrait2\n\n class TraitWithExplicitAny : Any(), SomeTrait\n class TraitsWithExplicitAny : SomeTrait2, Any(), SomeTrait\n }\n\n abstract class InheritFunctionType : ((Int, String) -> Int)<|endoftext|>"} {"prompt":"if (isEqualAnyNullableLeft(A(0), A(1))) return \"Fail 25\"\n if (!isEqualAnyNullableRight(null, null)) return \"Fail 26\"\n if (!isEqualAnyNullableRight(A(0), A(0))) return \"Fail 27\"\n if (isEqualAnyNullableRight(0, A(0))) return \"Fail 28\"","completion":"if (isEqualAnyNullableRight(0, null)) return \"Fail 29\"\n if (isEqualAnyNullableRight(null, A(0))) return \"Fail 30\"\n if (isEqualAnyNullableRight(A(0), A(1))) return \"Fail 31\"\n if (isEqualNullableUnboxedLeft(A(0), A(1))) return \"Fail 32\"<|endoftext|>"} {"prompt":"@JavaAnn(value = \"value\")\nfun test4() {}\n\n@JavaAnn(\"value\", path = arrayOf(\"path\"))\nfun test5() {}\n\n@JavaAnn(\"value\", path = [\"path\"])","completion":"fun test6() {}<|endoftext|>"} {"prompt":"val (major, minor, patch) = message?.version ?: VersionRequirement.Version.INFINITY\n v.version = KmVersion(major, minor, patch)\n return v\n}\n\n@ExperimentalContracts\nprivate fun ProtoBuf.Contract.toKmContract(c: ReadContext): KmContract {\n val v = KmContract()\n for (effect in effectList) {","completion":"if (!effect.hasEffectType()) continue\n\n val effectType = when (requireNotNull(effect.effectType)) {\n ProtoBuf.Effect.EffectType.RETURNS_CONSTANT -> KmEffectType.RETURNS_CONSTANT\n ProtoBuf.Effect.EffectType.CALLS -> KmEffectType.CALLS<|endoftext|>"} {"prompt":"y.uppercase()\n}\n\n\/*\n * TESTCASE NUMBER: 8\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-13650\n *\/\nfun case_8(x: Class?, y: String?) {","completion":"x?.prop_12 = if (y === null) throw Exception() else \"\"\n y\n y.uppercase()\n}<|endoftext|>"} {"prompt":"assertEquals(J.FLOAT_NULL == null, true)\n assertEquals(J.DOUBLE_NULL == null, true)\n\n return \"OK\"\n}\n\n\/\/ FILE: J.java\npublic class J {\n public static Boolean BOOL_NULL = null;\n public static Character CHAR_NULL = null;\n public static Byte BYTE_NULL = null;","completion":"public static Short SHORT_NULL = null;\n public static Integer INT_NULL = null;\n public static Long LONG_NULL = null;\n public static Float FLOAT_NULL = null;\n public static Double DOUBLE_NULL = null;\n}<|endoftext|>"} {"prompt":"listOf(\"E\", \"D\", \"C\", \"B\", \"A\")\n )\n }\n\n fun testRepeatedEdges() {\n checkGraph(\n \"\"\"\n A; B; C\n C > B; C > B; B > A; C > A\n \"\"\".trimIndent(),\n listOf(\"C\", \"B\", \"A\")\n )\n }","completion":"fun testSelfLoopReport() {\n val graph = parseFromString(\n \"\"\"\n A\n A > A\n \"\"\".trimIndent()\n )\n assertFails { topologicalSort(graph.nodes, dependencies = { graph.edges[this].orEmpty() }) }\n }\n\n fun testDirectLoopReport() {\n val graph = parseFromString(\n \"\"\"<|endoftext|>"} {"prompt":"\n\nval = {`false`: Boolean -> !`false` }\n\nfun f1(value: Pair): Boolean {\n val (, ) = value\n\n if ( != \"1\") return false","completion":"if ( != \"2\") return false\n\n return true\n}\n\nfun box(): String? {\n var i = 0\n for (: Int in 0..10) {\n i++\n }\n\n if (!(false)) return null<|endoftext|>"} {"prompt":"\/\/ MODULE: platform-jvm()()(common)\n\/\/ FILE: B_J.java\npublic class B_J extends A {\n public String foo() { return \"O\"; }\n}\n\n\/\/ FILE: C2_J.java\npublic class C2_J extends B_J {\n public String foo() { return \"K\"; }\n}\n\n\/\/ FILE: main.kt\nactual class C1 : B_J()","completion":"actual typealias C2 = C2_J\n\nfun box(): String {\n return commonBox()\n}<|endoftext|>"} {"prompt":"kaptClasspath.files.toList(),\n allDataFiles\n )\n .writeToCache()\n\n KaptIncrementalChanges.Unknown\n }\n }\n\n private fun loadPreviousSnapshot(\n cacheDir: File,\n allDataFiles: MutableSet,\n changedFiles: MutableSet\n ): ClasspathSnapshot {","completion":"val loadedPrevious = ClasspathSnapshot.ClasspathSnapshotFactory.loadFrom(cacheDir)\n\n val previousAndCurrentDataFiles = lazy { loadedPrevious.getAllDataFiles() + allDataFiles }\n val allChangesRecognized = changedFiles.all {\n val extension = it.extension\n if (extension.isEmpty() || extension == \"java\" || extension == \"jar\" || extension == \"class\") {<|endoftext|>"} {"prompt":"fun change(newStatus: String) {\n status = newStatus\n }\n}\n\nclass ConeClassLikeErrorLookupTag : ConeClassLikeLookupTag() {\n override val status: String\n get() = \"ERROR\"\n}\n\nfun ConeClassLikeLookupTag.foo(): String {","completion":"(this as? ConeClassLikeLookupTagImpl)?.status?.takeIf { it == \"OK\" }?.let { return it }\n return status.also {\n (this as? ConeClassLikeLookupTagImpl)?.bar(it)\n }\n}\n\nfun ConeClassLikeLookupTagImpl.bar(s: String) {\n change(s)\n}<|endoftext|>"} {"prompt":"text = if (openingStartOffset < closingStartOffset) {\n requireNotNull(opening)\n val openingMatch = Opening(counter++, opening.groups[2]!!.value, opening.range.first)\n openings.addLast(openingMatch)\n stackOfOpenings.addLast(openingMatch)\n text.removeRange(openingStartOffset, opening.range.last + 1)\n } else {","completion":"requireNotNull(closing)\n closingOffsets[stackOfOpenings.removeLast()] = closing.range.first\n text.removeRange(closingStartOffset, closing.range.last + 1)\n }\n }\n if (openings.size != closingOffsets.size) {\n error(\"Opening and closing tags counts are not equals\")\n }\n while (!openings.isEmpty()) {<|endoftext|>"} {"prompt":"assertEquals(1, js(\"j %= 2\"), \"%=\")\n }\n\n assertEquals(undefined, js(\"(void 0)\"), \"void\")\n assertEquals(true, js(\"'key' in {'key': 10}\"), \"in\")\n assertEquals(\"string\", js(\"typeof 'str'\"), \"typeof\")","completion":"assertEquals(true, js(\"new String('str') instanceof String\"), \"instanceof\")\n\n var s: Any = js(\"({key: 10})\")\n assertEquals(undefined, js(\"delete s.key, s.key\"), \"delete\")\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\ninterface IBase {\n override fun toString(): String\n}\n\ninterface IDerived : IBase\n\nobject BaseImpl : IBase {\n override fun toString(): String = \"A\"\n}\n\nobject DerivedImpl : IDerived {\n override fun toString(): String = \"A\"\n}\n\nclass Test1 : IBase by BaseImpl","completion":"class Test2 : IDerived by DerivedImpl<|endoftext|>"} {"prompt":"val nonInteractiveDecision = target.providers.gradleProperty(CONSENT_DECISION_GRADLE_PROPERTY).map { it.toBoolean() }\n if (isInIdea && !nonInteractiveDecision.isPresent) {\n throw CannotRequestConsentWithinIdeException(setupFile.consentDetailsLink)\n }","completion":"val consentReceived = if (nonInteractiveDecision.isPresent) {\n consentManager.applyConsentDecision(nonInteractiveDecision.get(), setupFile.consentDetailsLink)\n } else {\n consentManager.askForConsent(setupFile.consentDetailsLink)\n }\n if (!consentReceived) {<|endoftext|>"} {"prompt":"* fun foo__externalAdapter(x: KotlinType): KotlinType = adaptResult(foo(adaptParameter(x)));\n *\/\n fun transformExternalFunction(function: IrSimpleFunction): List? {\n \/\/ External functions with default parameter values are already processed by\n \/\/ [ComplexExternalDeclarationsToTopLevelFunctionsLowering]","completion":"if (function.valueParameters.any { it.defaultValue != null })\n return null\n\n \/\/ Patch function types for Number parameters as double\n function.returnType = doubleIfNumber(function.returnType)\n\n val valueParametersAdapters = function.valueParameters.map { parameter ->\n val varargElementType = parameter.varargElementType\n if (varargElementType != null) {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.test.framework\n\nimport com.intellij.openapi.Disposable\nimport com.intellij.openapi.util.Disposer\nimport org.jetbrains.kotlin.test.TestConfiguration\nimport org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerTest","completion":"import org.jetbrains.kotlin.test.services.isKtFile\nimport org.junit.jupiter.api.AfterEach\nimport org.junit.jupiter.api.BeforeEach\nimport org.junit.jupiter.api.TestInfo\n\nabstract class AbstractCompilerBasedTest : AbstractKotlinCompilerTest() {\n private var _disposable: Disposable? = null<|endoftext|>"} {"prompt":"\/\/ !CHECK_TYPE\n\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\nimport kotlin.reflect.*\n\ninterface A\ninterface B : A\n\nfun A.foo() {}\n\nfun take(f: (A) -> Unit) {}\nfun take(f: () -> Unit) {}\n\nfun test() {\n B::foo checkType { _>() }","completion":"take(B::foo)\n}<|endoftext|>"} {"prompt":"annotations += c.annotationDeserializer.loadAnnotations(\n ktParameter\n )\n }\n }.toList()\n }\n\n private fun KtTypeReference.toTypeRef(context: StubBasedFirDeserializationContext): FirTypeRef =\n context.typeDeserializer.typeRef(this)\n\n fun loadEnumEntry(\n declaration: KtEnumEntry,","completion":"symbol: FirRegularClassSymbol,\n classId: ClassId\n ): FirEnumEntry {\n val enumEntryName = declaration.name\n ?: errorWithAttachment(\"Enum entry doesn't provide name\") {\n withPsiEntry(\"declaration\", declaration)\n }<|endoftext|>"} {"prompt":"fun create(psiJavaModule: PsiJavaModule) = JavaModuleInfo(\n psiJavaModule.name,\n psiJavaModule.requires.mapNotNull { statement ->\n statement.moduleName?.let { moduleName ->\n Requires(moduleName, statement.hasModifierProperty(PsiModifier.TRANSITIVE))\n }\n },","completion":"psiJavaModule.exports.mapNotNull { statement ->\n statement.packageName?.let { packageName ->\n Exports(FqName(packageName), statement.moduleNames)\n }\n },\n psiJavaModule.annotations.convert {\n JavaAnnotationImpl(\n JavaElementSourceFactory.getInstance(psiJavaModule.project).createPsiSource(it)\n )<|endoftext|>"} {"prompt":"abstract class AbstractFirOutOfContentRootLazyBodiesCalculatorTest : AbstractFirLazyBodiesCalculatorTest() {\n override val configurator = AnalysisApiFirOutOfContentRootTestConfigurator\n}\n\nabstract class AbstractFirScriptLazyBodiesCalculatorTest : AbstractFirLazyBodiesCalculatorTest() {","completion":"override val configurator = AnalysisApiFirScriptTestConfigurator(analyseInDependentSession = false)\n}<|endoftext|>"} {"prompt":"public inline fun BooleanArray.sumOf(selector: (Boolean) -> Long): Long {\n var sum: Long = 0.toLong()\n for (element in this) {\n sum += selector(element)\n }\n return sum\n}\n\n\/**\n * Returns the sum of all values produced by [selector] function applied to each element in the array.\n *\/\n@SinceKotlin(\"1.4\")","completion":"@OptIn(kotlin.experimental.ExperimentalTypeInference::class)\n@OverloadResolutionByLambdaReturnType\n@kotlin.jvm.JvmName(\"sumOfLong\")\n@kotlin.internal.InlineOnly\npublic inline fun CharArray.sumOf(selector: (Char) -> Long): Long {\n var sum: Long = 0.toLong()<|endoftext|>"} {"prompt":"\/\/ Auto-generated by GeneratePrimitiveVsObjectEqualityTestData. Do not edit!\n\nval nx: Long? = 0L\nval nn: Long? = null\nval x: Long = 0L\nval y: Long = 1L\n\nfun box(): String {\n val ax: Long? = 0L\n val an: Long? = null\n val bx: Long = 0L","completion":"val by: Long = 1L\n\n return when {\n nx != 0L -> \"Fail 0\"\n nx == 1L -> \"Fail 1\"\n !(nx == 0L) -> \"Fail 2\"\n !(nx != 1L) -> \"Fail 3\"\n nx != x -> \"Fail 4\"\n nx == y -> \"Fail 5\"<|endoftext|>"} {"prompt":"regex = Regex(\"(p[0-9]*)#?(q[0-9]*)\")\n\n result = regex.find(\"p1#q3p2q42p5p71p63#q888\")\n assertNotNull(result)\n assertEquals(0, result!!.range.start)\n assertEquals(5, result.range.endInclusive + 1)","completion":"assertEquals(3, result.groups.size)\n assertEquals(0, result.groups[0]!!.range.start)\n assertEquals(5, result.groups[0]!!.range.endInclusive + 1)\n assertEquals(0, result.groups[1]!!.range.start)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol\nimport org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol\nimport org.jetbrains.kotlin.ir.types.*\nimport org.jetbrains.kotlin.ir.util.*\nimport org.jetbrains.kotlin.load.kotlin.TypeMappingMode","completion":"import org.jetbrains.kotlin.name.CallableId\nimport org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.resolve.jvm.AsmTypes<|endoftext|>"} {"prompt":"initC2TC(0x0d, TC_WS)\n initC2TC(0x20, TC_WS)\n initC2TC(COMMA, TC_COMMA)\n initC2TC(COLON, TC_COLON)\n initC2TC(BEGIN_OBJ, TC_BEGIN_OBJ)","completion":"initC2TC(END_OBJ, TC_END_OBJ)\n initC2TC(BEGIN_LIST, TC_BEGIN_LIST)\n initC2TC(END_LIST, TC_END_LIST)\n initC2TC(STRING, TC_STRING)\n initC2TC(STRING_ESC, TC_STRING_ESC)\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.model.TestModule\nimport org.jetbrains.kotlin.test.services.EnvironmentConfigurator\nimport org.jetbrains.kotlin.test.services.TestServices\nimport org.jetbrains.kotlin.test.util.KtTestUtil\nimport org.jetbrains.kotlin.utils.PathUtil","completion":"import java.io.File\n\nprivate fun getLibraryJar(classToDetect: String): File? = try {\n PathUtil.getResourcePathForClass(Class.forName(classToDetect))\n} catch (e: ClassNotFoundException) {\n null\n}\n\nclass ParcelizeEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfigurator(testServices) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.incremental.multiproject.ModulesApiHistory\nimport org.jetbrains.kotlin.incremental.util.BufferingMessageCollector\nimport org.jetbrains.kotlin.incremental.util.Either\nimport org.jetbrains.kotlin.load.java.JavaClassesTracker","completion":"import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader\nimport org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCompilationComponents\nimport org.jetbrains.kotlin.modules.TargetId\nimport org.jetbrains.kotlin.name.ClassId<|endoftext|>"} {"prompt":"override fun report(reporter: DiagnosticReporter) {\n reporter.onCallReceiver(receiver, this)\n }\n}\n\n\/\/ candidates result\nclass NoneCandidatesCallDiagnostic : KotlinCallDiagnostic(INAPPLICABLE) {\n override fun report(reporter: DiagnosticReporter) {\n reporter.onCall(this)\n }\n}","completion":"class ManyCandidatesCallDiagnostic(val candidates: Collection) : KotlinCallDiagnostic(INAPPLICABLE) {\n override fun report(reporter: DiagnosticReporter) {\n reporter.onCall(this)\n }\n}<|endoftext|>"} {"prompt":"}\n}\n\nobject Demo {\n val i0 by Delegate { ICInt(1) }\n val l0 by Delegate { ICLong(2L) }\n val o0 by Delegate { ICOverIC(ICLong(3L)) }\n\n val i1: ICInt by Delegate { ICInt(11) }","completion":"val l1: ICLong by Delegate { ICLong(22) }\n val o1: ICOverIC by Delegate { ICOverIC(ICLong(33)) }\n\n var i2 by Delegate { ICInt(0) }\n var l2 by Delegate { ICLong(0) }\n var o2 by Delegate { ICOverIC(ICLong(0)) }\n}<|endoftext|>"} {"prompt":"class ArgumentTypeMismatch(\n val expectedType: ConeKotlinType,\n val actualType: ConeKotlinType,\n val argument: FirExpression,\n val isMismatchDueToNullability: Boolean,\n) : ResolutionDiagnostic(INAPPLICABLE)\n\nclass NullForNotNullType(\n val argument: FirExpression, val expectedType: ConeKotlinType","completion":") : ResolutionDiagnostic(INAPPLICABLE)\n\nclass ManyLambdaExpressionArguments(\n val argument: FirExpression\n) : ResolutionDiagnostic(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR)\n\nclass InfixCallOfNonInfixFunction(val function: FirNamedFunctionSymbol) : ResolutionDiagnostic(CONVENTION_ERROR)<|endoftext|>"} {"prompt":"System.getProperty(\"os.name\")?.also { metricConsumer.report(StringMetrics.OS_TYPE, System.getProperty(\"os.name\")) }\n metricConsumer.report(NumericalMetrics.CPU_NUMBER_OF_CORES, Runtime.getRuntime().availableProcessors().toLong())","completion":"metricConsumer.report(BooleanMetrics.EXECUTED_FROM_IDEA, System.getProperty(\"idea.active\") != null)\n metricConsumer.report(NumericalMetrics.GRADLE_DAEMON_HEAP_SIZE, Runtime.getRuntime().maxMemory())<|endoftext|>"} {"prompt":"k.setSomething(\"\")\n k.something = \"\"\n}\n\nfun useString(i: String) {}\n\n\/\/ FILE: JavaInterface1.java\npublic interface JavaInterface1 {\n String getSomething();\n}\n\n\/\/ FILE: JavaInterface2.java\npublic interface JavaInterface2 {\n void setSomething(String value);\n}\n\n\/\/ FILE: JavaInterface3.java","completion":"public interface JavaInterface3 extends JavaInterface1, JavaInterface2 {}<|endoftext|>"} {"prompt":"class A() {\n fun b() {\n }\n\n @Deprecated(\"a\", level = DeprecationLevel.HIDDEN) fun b() {\n }\n}\n\nopen class B() {","completion":"open fun b() {\n }\n\n @Deprecated(\"a\", level = DeprecationLevel.HIDDEN) fun b() {\n }\n}\n\nopen class C() {\n fun b() {\n }<|endoftext|>"} {"prompt":"$i$a$-f2-LibraryKt$foo$2\\64\\510\\56:int=0:int, $i$f$test\\65\\506:int=0:int, testVal\\65:int=1:int","completion":"\/\/ library.kt:25 box: $i$f$foo\\56\\65:int=0:int, array\\56:java.lang.Integer[]=java.lang.Integer[], myClass\\56:MyClass=MyClass, this_\\62:MyClass=MyClass, $i$f$f2\\62\\506:int=0:int,<|endoftext|>"} {"prompt":"fun Any?.toResultString(): String =\n if (this == null) \"OK\" else \"!! $this\"\n\nfun builder(c: suspend () -> Unit) {\n c.startCoroutine(EmptyContinuation)\n}\n\nfun box(): String {\n var res: String? = null\n builder {\n val base: Base<*> = Derived()","completion":"res = (base.generic() as IC).s.toResultString()\n }\n return res!!\n}<|endoftext|>"} {"prompt":"buffer.append(postfix)\n return buffer\n}\n\n\/**\n * Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.\n * \n * If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]","completion":"* elements will be appended, followed by the [truncated] string (which defaults to \"...\").\n * \n * @sample samples.collections.Collections.Transformations.joinTo\n *\/<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant)\n constructor(arg: Invariant)\n }","completion":"class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB {\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor()\n constructor()\n }<|endoftext|>"} {"prompt":"* Inserts the string representation of the specified double [value] into this string builder at the specified [index] and returns this instance.\n *\n * The overall effect is exactly as if the [value] were converted to a string by the `value.toString()` method,\n * and then that string was inserted into this string builder at the specified [index].\n *","completion":"* @throws IndexOutOfBoundsException if [index] is less than zero or greater than the length of this string builder.\n *\/\n public actual fun insert(index: Int, value: Double): StringBuilder = insert(index, value.toString())\n\n \/**\n * Inserts the specified character [value] into this string builder at the specified [index] and returns this instance.\n *<|endoftext|>"} {"prompt":"val valueParametersCount = constructorDescriptor.valueParameters.size + constructorDescriptor.contextReceiverParameters.size\n return IrConstructorCallImpl(\n startOffset, endOffset,\n type,\n constructorSymbol,\n typeArgumentsCount = totalTypeParametersCount,\n constructorTypeArgumentsCount = totalTypeParametersCount - classTypeParametersCount,\n valueArgumentsCount = valueParametersCount,","completion":"origin = origin\n )\n }\n\n fun fromSymbolOwner(\n startOffset: Int,\n endOffset: Int,\n type: IrType,\n constructorSymbol: IrConstructorSymbol,\n classTypeParametersCount: Int,\n origin: IrStatementOrigin? = null\n ): IrConstructorCallImpl {\n val constructor = constructorSymbol.owner<|endoftext|>"} {"prompt":"package a\n\nfun foo() : Int {\n try {\n doSmth()\n }\n catch (e: Exception) {\n return \"\"\n }\n finally {\n return \"\"\n }\n}\n\nfun bar() : Int =","completion":"try {\n doSmth()\n }\n catch (e: Exception) {\n \"\"\n }\n finally {\n \"\"\n }\n\n\nfun doSmth() {}<|endoftext|>"} {"prompt":"val argAfterSpreadEmptyVararg = create(11, *arrayOf(), o = 123456L)\n if (argAfterSpreadEmptyVararg.size != 2 || js(\"typeof argAfterSpreadEmptyVararg[0] !== 'number'\"))\n return \"fail9: $argAfterSpreadEmptyVararg arguments\"\n\n return \"OK\"\n}\n\n\/\/ FILE: main.js\nfunction create() {\n return arguments","completion":"}<|endoftext|>"} {"prompt":"package delegate\n\nimport kotlin.reflect.KProperty\n\nclass Delegate() {\n inline operator fun getValue(thisRef: Any?, property: KProperty<*>): String {\n return \"I'm your val\"\n }\n\n inline operator fun setValue(thisRef: Any?, property: KProperty<*>, value: String) {","completion":"println(\"$value has been assigned to '${property.name}' in $thisRef.\")\n }\n}<|endoftext|>"} {"prompt":"contextReceivers.addAll(convertContextReceivers(owner.contextReceivers))\n if (!owner.hasModifier(EXTERNAL_KEYWORD) || isExplicitDelegationCall()) {\n delegatedConstructor = buildOrLazyDelegatedConstructorCall(\n isThis = isDelegatedCallToThis(),\n constructedTypeRef = delegatedTypeRef,\n ) {","completion":"getDelegationCall().convert(delegatedTypeRef)\n }\n }\n this@PsiRawFirBuilder.context.firFunctionTargets += target\n extractAnnotationsTo(this)\n typeParameters += constructorTypeParametersFromConstructedClass(ownerTypeParameters)\n extractValueParametersTo(this, symbol, ValueParameterDeclaration.FUNCTION)<|endoftext|>"} {"prompt":"\/\/ TESTCASE NUMBER: 5\nfun case_5(value_1: Int?, value_2: Int?) {\n if (case_5_1(value_1)) {\n value_1.inv()\n if (case_5_2(value_1)) {","completion":"value_1.inv()\n value_1.inv()\n }\n }\n if (!case_5_3(value_2)) {<|endoftext|>"} {"prompt":"project.projectDir.resolve(\"local.properties\").writeText(\n \"\"\"\n a = local\n c = local\n x = \"local\"\n \"\"\".trimIndent()\n )\n\n project.gradle.registerMinimalVariantImplementationFactoriesForTests()\n val properties = PropertiesBuildService.registerIfAbsent(project).get()","completion":"assertEquals(\"extra\", properties.get(\"a\", project))\n assertEquals(\"extra\", properties.get(\"b\", project))\n assertEquals(\"local\", properties.get(\"c\", project))\n assertEquals(null, properties.get(\"d\", project))\n assertEquals(\"\\\"local\\\"\", properties.get(\"x\", project))\n }\n\n}<|endoftext|>"} {"prompt":"IrTypeOperator.INSTANCEOF -> {\n val isInstance = isErased || state.isSubtypeOf(typeOperand)\n callStack.pushState(environment.convertToState(isInstance, irBuiltIns.booleanType))\n }\n IrTypeOperator.NOT_INSTANCEOF -> {\n val isInstance = isErased || state.isSubtypeOf(typeOperand)","completion":"callStack.pushState(environment.convertToState((!isInstance), irBuiltIns.booleanType))\n }\n IrTypeOperator.IMPLICIT_NOTNULL -> {\n when {\n state.isNull() && !typeOperand.isNullable() -> NullPointerException().handleUserException(environment)\n else -> callStack.pushState(state)\n }\n }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.ir.backend.js.transformers.irToJs\n\nimport org.jetbrains.kotlin.ir.backend.js.utils.JsMainFunctionDetector\nimport org.jetbrains.kotlin.utils.addToStdlib.runIf\nimport org.jetbrains.kotlin.utils.putToMultiMap","completion":"typealias CachedTestFunctionsWithTheirPackage = Map>\n\ninterface PerFileGenerator {\n val mainModuleName: String\n\n val Module.isMain: Boolean\n val Module.fileList: Iterable\n\n val Artifact.artifactName: String\n val Artifact.hasEffect: Boolean\n val Artifact.hasExport: Boolean<|endoftext|>"} {"prompt":"val test6\n \/**\n * comment\n *\/\n get() = 42\n\n\n val test7\n @Suppress(\n \"UNUSED_VARIABLE\"\n )\n get() = 42\n\n\n var test8 = 42\n\n\n var test9 = 42; private set\n\n\n var test10 = 42\n private set\n\n\n var test11 = 42","completion":"set(value) {\n field = value\n }\n\n\n var test12 = 42\n \/**\n * comment\n *\/\n set(value) {\n field = value\n }\n\n\n var test13 = 42\n @Suppress(\n \"UNUSED_VARIABLE\"\n )\n set(value) {\n field = value\n }\n\n}<|endoftext|>"} {"prompt":"return \"raw ($lowerRendered..$upperRendered)\"\n }\n if (upperBound.arguments.isEmpty()) return renderer.renderFlexibleType(lowerRendered, upperRendered, builtIns)\n\n val lowerArgs = renderArguments(lowerBound)\n val upperArgs = renderArguments(upperBound)","completion":"val newArgs = lowerArgs.joinToString(\", \") { \"(raw) $it\" }\n val newUpper =\n if (lowerArgs.zip(upperArgs).all { onlyOutDiffers(it.first, it.second) })\n upperRendered.replaceArgs(newArgs)\n else upperRendered\n val newLower = lowerRendered.replaceArgs(newArgs)<|endoftext|>"} {"prompt":"fun testClass3(x : objcnames.protocols.FwdProtocol) = x::class\nfun testClass4() {\n cnames.structs.FwdStruct::class","completion":"objcnames.classes.FwdObjcClass::class\n objcnames.protocols.FwdProtocol::class\n}\ninline fun inlineF(x: T) {}<|endoftext|>"} {"prompt":"$i$a$-foo-LibraryKt$flaf$1\\2\\25\\0$iv:int=0:int, x\\2$iv:int=1:int, fooParam\\5$iv:int=2:int, $i$f$foo\\5\\17:int=0:int, fooVar\\5$iv:int=0:int","completion":"\/\/ library.kt:8 box: $i$f$flaf:int=0:int, flafVar$iv:int=0:int, fooParam\\1$iv:int=0:int, $i$f$foo\\1\\12:int=0:int, fooVar\\1$iv:int=0:int, it\\2$iv:int=42:int,<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {}\nfun > testTypeParameterWithVarianceDifferentUpperBoundsC() {}\n\nfun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {}","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {}\n\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {}<|endoftext|>"} {"prompt":"task.dependencies.set(cocoapodsExtension.pods)\n task.artifactType.set(artifactType)\n }\n\n assembleTask.dependsOn(podspecTask)\n }\n\n private fun injectPodspecExtensionToArtifacts(\n project: Project,\n artifactsExtension: KotlinArtifactsExtension,","completion":"cocoapodsExtension: CocoapodsExtension,\n ) {\n artifactsExtension.artifactConfigs.withType(KotlinNativeArtifactConfig::class.java) { artifactConfig ->\n val podspecExtension = project.objects.newInstance()<|endoftext|>"} {"prompt":"UNDEFINED_OFFSET,\n type,\n origin,\n branches\n )\n\n protected fun irBranch(\n condition: IrExpression,\n result: IrExpression\n ): IrBranch {\n return IrBranchImpl(condition, result)\n }\n\n protected fun irElseBranch(\n expression: IrExpression,","completion":"startOffset: Int = UNDEFINED_OFFSET,\n endOffset: Int = UNDEFINED_OFFSET\n ) = IrElseBranchImpl(startOffset, endOffset, irConst(true), expression)\n\n protected fun irBlock(\n type: IrType = context.irBuiltIns.unitType,\n origin: IrStatementOrigin? = null,\n statements: List<|endoftext|>"} {"prompt":"val List.a: Int get() = size\n val List.b: Int? get() = size\n\n fun List.testCallable1(): () -> Unit = a::foo","completion":"fun List.testCallable1a(): () -> Unit = a::foo<|endoftext|>"} {"prompt":"case501 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 502\nfun case502(){\n val case502 = '\\ufaff'\n case502\n case502 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 503\nfun case503(){","completion":"val case503 = '\\ufb00'\n case503\n case503 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 504\nfun case504(){\n val case504 = '\\ufbff'<|endoftext|>"} {"prompt":"scopeSession: ScopeSession,\n returnTypeCalculator: ReturnTypeCalculator = ReturnTypeCalculatorForFullBodyResolve.Default,\n outerBodyResolveContext: BodyResolveContext? = null,\n) : FirAbstractBodyResolveTransformerDispatcher(\n session,\n phase,\n implicitTypeOnly,\n scopeSession,\n returnTypeCalculator,","completion":"outerBodyResolveContext,\n) {\n final override val expressionsTransformer = FirExpressionsResolveTransformer(this)\n final override val declarationsTransformer = FirDeclarationsResolveTransformer(this)\n}<|endoftext|>"} {"prompt":"override fun javacOptions(action: KaptJavacOption.() -> Unit) {\n javacOptionsActions += action\n }\n\n override fun getJavacOptions(): Map {\n val result = KaptJavacOptionsDelegate()\n javacOptionsActions.forEach { it(result) }\n return result.options\n }","completion":"fun getAdditionalArguments(project: Project, variantData: Any?, androidExtension: Any?): Map {\n val result = KaptAnnotationProcessorOptions(project, variantData, androidExtension)\n apOptionsActions.forEach { it(result) }\n return result.options\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.frontend.classic.handlers.FirTestDataConsistencyHandler\nimport org.jetbrains.kotlin.test.model.DependencyKind\nimport org.jetbrains.kotlin.test.model.FrontendKinds\nimport org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerTest","completion":"import org.jetbrains.kotlin.test.services.configuration.CommonEnvironmentConfigurator\nimport org.jetbrains.kotlin.test.services.configuration.JvmEnvironmentConfigurator\n\nabstract class AbstractParcelizeDiagnosticTest : AbstractKotlinCompilerTest() {\n override fun TestConfigurationBuilder.configuration() {\n globalDefaults {<|endoftext|>"} {"prompt":"0xc00921fb5442cd40UL, 0xc00921fb5444171bUL, 0xbd8bffb390866e47UL, 0xbd8bffb390860c49UL,","completion":"0xbd8bffb39086d045UL, 0xbd9bffb390866e47UL, 0xbd7bffb390866e47UL, 0xbdabffb390866e47UL,<|endoftext|>"} {"prompt":"val localDelegatedValByProvider by Provider(1)\n var localDelegatedVarByProvider by Provider(2)\n\n val x = C()\n if (x.delegatedVal != 1) throw AssertionError()\n if (x.delegatedVar != 2) throw AssertionError()\n x.delegatedVar = 3","completion":"if (x.delegatedVar != 3) throw AssertionError()\n\n if (x.delegatedValByProvider != 1) throw AssertionError()\n if (x.delegatedVarByProvider != 2) throw AssertionError()\n x.delegatedVarByProvider = 3\n if (x.delegatedVarByProvider != 3) throw AssertionError()<|endoftext|>"} {"prompt":"\/\/Generated by the protocol buffer compiler. DO NOT EDIT!\n\/\/ source: proto_tcs.proto\n\npackage org.jetbrains.kotlin.gradle.idea.proto.generated.tcs;\n\n@kotlin.jvm.JvmName(\"-initializeideaKotlinClasspathProto\")","completion":"inline fun ideaKotlinClasspathProto(block: org.jetbrains.kotlin.gradle.idea.proto.generated.tcs.IdeaKotlinClasspathProtoKt.Dsl.() -> kotlin.Unit): org.jetbrains.kotlin.gradle.idea.proto.generated.tcs.IdeaKotlinClasspathProto =<|endoftext|>"} {"prompt":"if (nullability.canBeNull() && !nullability.canBeNonNull()) {\n if (!TypeUtils.isNullableType(expectedReceiverParameterType)) {\n reportUnsafeCall = true\n }\n if (dataFlowValue.immanentNullability.canBeNonNull()) {\n expression?.let { trace.record(BindingContext.SMARTCAST_NULL, it) }\n }","completion":"} else if (!nullableImplicitInvokeReceiver && smartCastNeeded) {\n \/\/ Look if smart cast has some useful nullability info\n\n val smartCastResult = smartCastManager.checkAndRecordPossibleCast(\n dataFlowValue, expectedReceiverParameterType,\n expression, this, candidateCall.call, recordExpressionType = true<|endoftext|>"} {"prompt":"methodFound = true\n\n recordLocalTypesForParameters(access, desc)\n\n object : MethodVisitor(Opcodes.API_VERSION) {\n \/\/ ASM labels cannot be easily compared across to visits of the same method.\n \/\/ Therefore, we keep our own numbering that is consistent across multiple\n \/\/ visits.\n private var currentLabelNumber = 0\n\n \/\/ Record local load and store instructions for each basic block.","completion":"override fun visitVarInsn(opcode: Int, index: Int) {\n currentBlock.addInstruction(index, opcode)\n }\n\n \/\/ Build control-flow graph based on jump instructions.\n override fun visitJumpInsn(opcode: Int, label: Label?) {\n when (opcode) {\n Opcodes.IFEQ,\n Opcodes.IFNE,<|endoftext|>"} {"prompt":"val declarationDescriptor = bindingContext.get(BindingContext.REFERENCE_TARGET, simpleNameExpression)\n return when (declarationDescriptor) {\n is VariableDescriptor -> {\n val resolvedCall = simpleNameExpression.getResolvedCall(bindingContext)\n\n \/\/ todo uncomment assert\n \/\/ KT-4113","completion":"\/\/ for now it fails for resolving 'invoke' convention, return it after 'invoke' algorithm changes\n \/\/ assert resolvedCall != null : \"Cannot create right identifier info if the resolved call is not known yet for\n val usageModuleDescriptor = DescriptorUtils.getContainingModuleOrNull(containingDeclarationOrModule)\n val selectorInfo = IdentifierInfo.Variable(\n declarationDescriptor,<|endoftext|>"} {"prompt":"if (newValue >= 0L) Long.MAX_VALUE else newValue\n }\n assertEquals(Long.MAX_VALUE, l.value)\n r.lazySet(A(\"aaaa\"))\n r.update { cur ->\n A(\"cccc${cur.s}\")\n }\n assertEquals(\"ccccaaaa\", r.value.s)\n }","completion":"fun atomicfuUpdateAndGetTest() {\n val res1 = a.updateAndGet { value ->\n if (value >= 0) Int.MAX_VALUE else value\n }\n assertEquals(Int.MAX_VALUE, res1)\n assertTrue(b.updateAndGet { true })\n val res2 = l.updateAndGet { cur -><|endoftext|>"} {"prompt":"\/\/ See also KT-4285\nopen class A {\n open fun foo(x: Int = 0) {}\n\n open fun gav(y: Int = 1, z: Int = 2) {}\n}\n\nclass B: A() {\n tailrec override fun foo(x: Int) {","completion":"foo()\n }\n\n tailrec override fun gav(y: Int, z: Int) {\n gav(y)\n }<|endoftext|>"} {"prompt":"println(\"destinationDir : $destinationDir\")\n println(\"artifact : $artifact\")\n println(\"klibFiles : ${libraries.klibFiles.dump()}\")\n println(\" : ${libraries.artifacts.map {\n it.artifact.canonicalPath\n }.dump()}\")\n println(\"defFile : $defFile\")\n println(\"target : $target\")","completion":"println(\"packageName : $packageName\")\n println(\"compilerOpts : $compilerOpts\")\n println(\"linkerOpts : $linkerOpts\")\n println(\"headers : ${headers.dump()}\")\n println(\"linkFiles : ${linkFiles.dump()}\")\n println(\"konanVersion : ${KotlinVersion.CURRENT}\")\n println()<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.types\n\nimport org.jetbrains.kotlin.descriptors.annotations.Annotated\nimport org.jetbrains.kotlin.descriptors.annotations.Annotations\nimport org.jetbrains.kotlin.renderer.DescriptorRenderer","completion":"import org.jetbrains.kotlin.renderer.DescriptorRendererOptions\nimport org.jetbrains.kotlin.resolve.scopes.MemberScope\nimport org.jetbrains.kotlin.types.checker.KotlinTypeRefiner\nimport org.jetbrains.kotlin.types.checker.StrictEqualityTypeChecker<|endoftext|>"} {"prompt":"val currentLineCounter = AtomicInteger()\n\n fun nextCodeLine(code: String): ReplCodeLine = ReplCodeLine(currentLineCounter.getAndIncrement(), 0, code)\n\n val replCompiler: JvmReplCompiler by lazy {\n JvmReplCompiler(simpleScriptCompilationConfiguration)\n }\n\n val compiledEvaluator: ReplEvaluator by lazy {","completion":"JvmReplEvaluator(simpleScriptEvaluationConfiguration)\n }\n\n val state by lazy {\n val stateLock = ReentrantReadWriteLock()\n AggregatedReplStageState(replCompiler.createState(stateLock), compiledEvaluator.createState(stateLock), stateLock)\n }\n\n override fun close() {\n state.dispose()<|endoftext|>"} {"prompt":"class Case5 constructor(x: Any = null)\n\n\/\/ TESTCASE NUMBER: 6\nclass Case6 {\n fun foo(x: Nothing = null) {}\n}\n\n\/\/ TESTCASE NUMBER: 7\nclass Case7 {","completion":"val x: Int get() = null\n}\n\n\/\/ TESTCASE NUMBER: 8\nclass Case8 {\n var x: Any = 0\n get() = 0\n set(value) {\n field = null\n }\n}<|endoftext|>"} {"prompt":"}\n\n\/*\n * TESTCASE NUMBER: 3\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-31053\n *\/\nfun case_3(x: Any?) {\n if (x is Nothing?) throw Exception()\n x","completion":"x.equals(10)\n}\n\n\/*\n * TESTCASE NUMBER: 4\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-31053\n *\/\nfun case_4(x: Pair<*, *>?) {\n when (x) {<|endoftext|>"} {"prompt":"val x = object {\n fun test() = 10 as T\n }\n\n val z = x.test()\n\n if (z is T) {\n \/\/ z is {T!! & T!!} (smart cast from T)","completion":"println(z)\n }\n\n val a = object {\n fun test() = 42 as A\n }\n\n val b = a.test()\n\n if (a is T) {<|endoftext|>"} {"prompt":"\"Debugger.scriptParsed\" -> json.decodeFromJsonElement(Debugger.Event.ScriptParsed.serializer(), params)\n \"Runtime.executionContextCreated\" -> json.decodeFromJsonElement(Runtime.Event.ExecutionContextCreated.serializer(), params)","completion":"\"Runtime.executionContextDestroyed\" -> json.decodeFromJsonElement(Runtime.Event.ExecutionContextDestroyed.serializer(), params)\n else -> UnknownCDPEvent(method)\n }\n}\n\n\/**\n * Something capable of invoking a [Chrome DevTools protocol](https:\/\/chromedevtools.github.io\/devtools-protocol\/) method and returning\n * the result of the invocation.\n *\/<|endoftext|>"} {"prompt":"is FakeDirectory -> current = value.contents\n is FakeFile -> if (components.isNotEmpty()) return null\n null -> return null\n }\n }\n return value\n }\n\n fun subdirectoryAt(path: Path): FakeDirectory {\n when (val directory = fileSystemAt(path)) {\n is FakeDirectory -> return directory\n is FakeFile -> error(\"Path $path is a file\")","completion":"null -> error(\"Subdirectory $path doesn't exist\")\n }\n }\n\n fun exists(path: Path): Boolean = fileSystemAt(path) != null\n\n fun walkFileSystemFrom(path: Path): Sequence {\n return sequence {\n walkFileSystem(subdirectoryAt(path))\n }\n }\n\n private suspend fun SequenceScope.walkFileSystem(<|endoftext|>"} {"prompt":"if (!mapper.shouldBeExposed(classDescriptor)) {\n \/\/ There are number of tricky corner cases getting here.\n return ObjCIdType\n }\n\n return if (classDescriptor.isInterface) {\n ObjCProtocolType(referenceProtocol(classDescriptor).objCName)\n } else {\n val typeArgs = if (objcGenerics) {","completion":"kotlinType.arguments.map { typeProjection ->\n if (typeProjection.isStarProjection) {\n ObjCIdType \/\/ TODO: use Kotlin upper bound.\n } else {\n mapReferenceTypeIgnoringNullability(typeProjection.type, objCExportScope)\n }\n }\n } else {\n emptyList()\n }<|endoftext|>"} {"prompt":"\/\/ JSPECIFY_STATE: warn\n\n\/\/ FILE: Foo.java\nimport org.jspecify.nullness.Nullable;\n\npublic class Foo {\n public static void gauge(@Nullable T stateObject) {}\n}\n\n\/\/ FILE: main.kt\nfun test(metric: T) {\n if (metric is String) {","completion":"Foo.gauge(metric)\n }\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.android.synthetic.codegen\n\nimport kotlinx.android.extensions.CacheImplementation\nimport org.jetbrains.kotlin.ir.declarations.IrClass\n\nclass CliAndroidIrExtension(val isExperimental: Boolean, private val globalCacheImpl: CacheImplementation) : AndroidIrExtension() {","completion":"override fun isEnabled(declaration: IrClass) = true\n override fun isExperimental(declaration: IrClass) = isExperimental\n override fun getGlobalCacheImpl(declaration: IrClass) = globalCacheImpl\n}<|endoftext|>"} {"prompt":"disposed = true\n clearCache()\n }\n\n protected open fun nonScriptId(locationId: String): Boolean =\n nonScriptFilenameSuffixes.any {\n locationId.endsWith(it, ignoreCase = true)\n }\n\n override fun findDefinition(script: SourceCode): ScriptDefinition? =","completion":"if (script.locationId == null || nonScriptId(script.locationId!!)) {\n null\n } else {\n cachedDefinitions.firstOrNull { it.isScript(script) }\n }\n\n @Suppress(\"OverridingDeprecatedMember\", \"DEPRECATION\", \"OVERRIDE_DEPRECATION\")\n override fun findScriptDefinition(fileName: String): KotlinScriptDefinition? =<|endoftext|>"} {"prompt":"}\n }\n }\n )\n }\n }\n\n private fun loadKnownThirdPartyCodeList(): List {\n File(\"license\/README.md\").useLines { lineSequence ->\n return lineSequence\n .filter { it.startsWith(\" - Path: \") }","completion":".map { it.removePrefix(\" - Path: \").trim().ensureFileOrEndsWithSlash() }\n .toList()\n\n }\n }\n\n fun testLanguageFeatureOrder() {\n val values = enumValues()\n val enabledFeatures = values.filter { it.sinceVersion != null }<|endoftext|>"} {"prompt":"* | START | ---------------------->| SUSPENDED |\n * +-------+ +-----------+\n * probeCoroutineResumed | ^ probeCoroutineSuspended\n * V |\n * +------------+ completion invoked +-----------+\n * | RUNNING | ------------------->| COMPLETED |\n * +------------+ +-----------+\n * ```\n *","completion":"* While the coroutine is resumed and suspended, it is represented by the pointer to its `frame`\n * which always extends [BaseContinuationImpl] and represents a pointer to the topmost frame of the\n * coroutine. Each [BaseContinuationImpl] object has [completion][BaseContinuationImpl.completion] reference\n * that points either to another frame (extending [BaseContinuationImpl]) or to the completion object<|endoftext|>"} {"prompt":"case316\n case316 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 317\nfun case317(){\n val case317 = '\\u9e00'\n case317","completion":"case317 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 318\nfun case318(){\n val case318 = '\\u9eff'\n case318\n case318 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 319\nfun case319(){<|endoftext|>"} {"prompt":"typeDistance(classifiers, target, typeB, idOfA)\n )\n\n assertEquals(\n CirTypeDistance(-1),\n typeDistance(classifiers, target, typeA, idOfB)\n )\n\n assertEquals(\n CirTypeDistance(2),\n typeDistance(classifiers, target, typeC, idOfA)\n )\n\n assertEquals(","completion":"CirTypeDistance(-2),\n typeDistance(classifiers, target, typeA, idOfC)\n )\n\n assertEquals(\n CirTypeDistance(3),\n typeDistance(classifiers, target, typeD, idOfA)\n )\n\n assertEquals(\n CirTypeDistance(-3),\n typeDistance(classifiers, target, typeA, idOfD)<|endoftext|>"} {"prompt":"private val samConstructorForTypeAliasConstructor =\n storageManager.createMemoizedFunctionWithNullableValues, TypeAliasConstructorDescriptor> { (constructor, typeAliasDescriptor) ->\n TypeAliasConstructorDescriptorImpl.createIfAvailable(storageManager, typeAliasDescriptor, constructor)\n }","completion":"private fun extensionForFunctionNotCached(function: FunctionDescriptor): FunctionDescriptor? {\n if (!function.visibility.isVisibleOutside()) return null\n if (!function.hasJavaOriginInHierarchy()) return null \/\/TODO: should we go into base at all?\n if (!JavaSingleAbstractMethodUtils.isSamAdapterNecessary(function)) return null<|endoftext|>"} {"prompt":"firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,\n) : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.UnsafeInfixCall\n\ninternal class UnsafeOperatorCallImpl(\n override val receiverType: KtType,","completion":"override val receiverExpression: KtExpression,\n override val operator: String,\n override val argumentExpression: KtExpression?,\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"val parentFir = selectorExpression.getOrBuildFir(analysisSession.firResolveSession)\n if (parentFir is FirResolvedQualifier) {\n var classId = parentFir.classId\n while (unresolvedCounter > 0) {\n unresolvedCounter--\n classId = classId?.outerClassId\n }","completion":"return listOfNotNull(classId?.toTargetPsi(session, symbolBuilder))\n }\n parent = parent.parent as? KtDotQualifiedExpression\n unresolvedCounter++\n }\n return emptyList()\n }\n\n private fun getSymbolsByResolvable(\n fir: FirResolvable,\n expression: KtSimpleNameExpression,<|endoftext|>"} {"prompt":"isInNotCall = prevIsInNotCall\n return\n }\n }\n }\n }\n }\n val opSymbol = when (name) {\n \"contains\" -> \"in\"\n \"equals\" -> if (isInNotCall) \"!=\" else \"==\"\n \"plus\" -> \"+\"\n \"not\" -> \"!\"\n \"minus\" -> \"-\"","completion":"\"times\" -> \"*\"\n \"div\" -> \"\/\"\n \"rem\" -> \"%\"\n \"rangeTo\" -> \"..\"\n \"plusAssign\" -> \"+=\"\n \"minusAssign\" -> \"-=\"\n \"unaryMinus\" -> \"-\"\n \"timesAssign\" -> \"*=\"\n \"divAssign\" -> \"\/=\"\n \"remAssign\" -> \"%=\"<|endoftext|>"} {"prompt":"\/** Returns a [Duration] representing the specified [value] number of seconds. *\/\n @SinceKotlin(\"1.5\")\n @ExperimentalTime\n @Deprecated(\"Use 'Long.seconds' extension property from Duration.Companion instead.\", ReplaceWith(\"value.seconds\", \"kotlin.time.Duration.Companion.seconds\"))","completion":"@DeprecatedSinceKotlin(warningSince = \"1.6\", errorSince = \"1.8\", hiddenSince = \"1.9\")\n public fun seconds(value: Long): Duration = value.toDuration(DurationUnit.SECONDS)\n\n \/**\n * Returns a [Duration] representing the specified [value] number of seconds.\n *<|endoftext|>"} {"prompt":"for(i in 0..getExtensionCount(KlibMetadataProtoBuf.constructorAnnotation) - 1) {\n hashCode = 31 * hashCode + getExtension(KlibMetadataProtoBuf.constructorAnnotation, i).hashCode(stringIndexes, fqNameIndexes, typeById)\n }\n\n return hashCode\n}","completion":"fun ProtoBuf.EnumEntry.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int, typeById: (Int) -> ProtoBuf.Type): Int {\n var hashCode = 1\n\n if (hasName()) {\n hashCode = 31 * hashCode + stringIndexes(name)\n }<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\/\/ NI_EXPECTED_FILE\nimport kotlin.reflect.KProperty\n\nvar a: Int by A()","completion":"var a1 by A()<|endoftext|>"} {"prompt":"override fun equals(other: Any?): Boolean {\n error(\"Do not try comparing ByteArrayCharSequence\")\n }\n\n override val length get() = end - start\n\n override fun get(index: Int): Char = bytes[index + start].toInt().toChar()\n\n override fun subSequence(startIndex: Int, endIndex: Int): CharSequence {","completion":"if (startIndex == 0 && endIndex == length) return this\n return ByteArrayCharSequence(bytes, start + startIndex, start + endIndex)\n }\n\n override fun toString(): String {\n val chars = CharArray(length)\n\n for (i in 0 until length) {\n chars[i] = bytes[i + start].toInt().toChar()\n }<|endoftext|>"} {"prompt":"fun case_3(value_1: Boolean): Int = when(value_1) { }\n\n\/\/ TESTCASE NUMBER: 4\nfun case_4(value_1: Boolean): String = when {\n value_1 == true -> \"\"","completion":"value_1 == false -> \"\"\n}\n\n\/*\n * TESTCASE NUMBER: 5\n * DISCUSSION: maybe use const propagation here?\n * ISSUES: KT-25265\n *\/\nfun case_5(value_1: Boolean): String {\n val trueValue = true\n val falseValue = false<|endoftext|>"} {"prompt":"@Deprecated(SHORTCUTS_DEPRECATION_MESSAGE)\n fun tvos(namePrefix: String, configure: Action) = tvos(namePrefix) { configure.execute(this) }\n\n @Deprecated(SHORTCUTS_DEPRECATION_MESSAGE)","completion":"fun tvos(configure: Action) = tvos { configure.execute(this) }\n\n @Deprecated(SHORTCUTS_DEPRECATION_MESSAGE)\n fun watchos(\n namePrefix: String = \"watchos\",\n configure: KotlinNativeTarget.() -> Unit = {},\n ) {<|endoftext|>"} {"prompt":"val annotator = ClosureAnnotator(irElement, container)\n\n localFunctions.forEach { (declaration, context) ->\n context.closure = annotator.getFunctionClosure(declaration)\n }\n\n localClasses.forEach { (declaration, context) ->\n context.closure = annotator.getClassClosure(declaration)\n }\n }","completion":"private fun collectLocalDeclarations() {\n val enclosingPackageFragment = container.getPackageFragment()\n val enclosingClass = run {\n var currentParent = container as? IrClass ?: container.parent\n while (currentParent is IrDeclaration && currentParent !is IrClass) {\n currentParent = currentParent.parent\n }\n\n currentParent as? IrClass\n }<|endoftext|>"} {"prompt":"private const val LANGUAGE_DIRECTIVE = \"LANGUAGE\"\n private val INCOMPATIBLE_LANGUAGE_SETTINGS = setOf(\n \"-ProperIeee754Comparisons\", \/\/ K\/N supports only proper IEEE754 comparisons\n \"-ReleaseCoroutines\", \/\/ only release coroutines\n \"-DataClassInheritance\", \/\/ old behavior is not supported","completion":"\"-ProhibitAssigningSingleElementsToVarargsInNamedForm\", \/\/ Prohibit these assignments\n \"-ProhibitDataClassesOverridingCopy\", \/\/ Prohibit as no longer supported\n \"-ProhibitOperatorMod\", \/\/ Prohibit as no longer supported\n \"-ProhibitIllegalValueParameterUsageInDefaultArguments\", \/\/ Allow only legal values<|endoftext|>"} {"prompt":"if (project.isCompatibilityMetadataVariantEnabled) {\n val mainCompilation = target.compilations.getByName(KotlinCompilation.MAIN_COMPILATION_NAME)\n configureMetadataDependenciesForCompilation(mainCompilation)\n }\n\n sourceSetsWithMetadataCompilations.values.forEach { compilation ->","completion":"exportDependenciesForPublishing(compilation)\n }\n\n target.metadataCompilationsCreated.complete()\n }\n }\n\n private suspend fun isMetadataCompilationSupported(sourceSet: KotlinSourceSet): Boolean {\n val platforms = sourceSet.internal.awaitPlatformCompilations()\n .filter { it.target !is KotlinMetadataTarget }<|endoftext|>"} {"prompt":"printer.printCollection(value.values, separator = \", \", prefix = \"[\", postfix = \"]\") {\n renderConstantValueDebug(it, printer)\n }\n }\n\n is KtEnumEntryAnnotationValue -> {\n printer.append(value.callableId?.asSingleFqName()?.render())\n }\n\n is KtConstantAnnotationValue -> {","completion":"printer.append(value.constantValue.constantValueKind.asString)\n .append(\"(\")\n .append(value.constantValue.value.toString())\n .append(\")\")\n }\n\n KtUnsupportedAnnotationValue -> {\n printer.append(KtUnsupportedAnnotationValue::class.java.simpleName)\n }<|endoftext|>"} {"prompt":"public final fun setRange(startIndex: kotlin.Int, endIndex: kotlin.Int, value: kotlin.String): kotlin.text.StringBuilder\n\n public open override fun subSequence(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence\n\n @kotlin.SinceKotlin(version = \"1.4\")","completion":"public final fun substring(startIndex: kotlin.Int): kotlin.String\n\n @kotlin.SinceKotlin(version = \"1.4\")\n public final fun substring(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.String\n\n @kotlin.SinceKotlin(version = \"1.4\")<|endoftext|>"} {"prompt":"interface MaybeStable\n \"\"\",\n \"\"\"\n @Composable fun MaybeStable.example(x: Int) {\n used(this)\n used(x)\n }\n val example: @Composable MaybeStable.(Int) -> Unit = {\n used(this)\n used(it)\n }\n \"\"\"\n )\n\n @Test","completion":"fun testArrayDefaultArgWithState(): Unit = comparisonPropagation(\n \"\"\"\n \"\"\",\n \"\"\"\n import androidx.compose.runtime.MutableState\n\n @Composable\n fun VarargComposable(state: MutableState, vararg values: String = Array(1) { \"value \" + it }) {\n state.value\n }\n \"\"\"\n )<|endoftext|>"} {"prompt":"fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant()\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant()","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesC(): Invariant = Invariant()\nfun testVarianceDifferentReturnTypesC(): Invariant<*> = Invariant()<|endoftext|>"} {"prompt":"configuration: CompilerConfiguration\n ): KotlinCoreEnvironment\n\n abstract fun createScriptEvaluator(): ScriptEvaluator\n abstract fun createScriptCompiler(environment: KotlinCoreEnvironment): ScriptCompilerProxy\n\n protected abstract fun ScriptEvaluationConfiguration.Builder.platformEvaluationConfiguration()\n\n override fun eval(\n arguments: CommonCompilerArguments,","completion":"configuration: CompilerConfiguration,\n projectEnvironment: KotlinCoreEnvironment.ProjectEnvironment\n ): ExitCode {\n val messageCollector = configuration.getNotNull(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY)\n val scriptDefinitionProvider = ScriptDefinitionProvider.getInstance(projectEnvironment.project)\n if (scriptDefinitionProvider == null) {<|endoftext|>"} {"prompt":"is ProtoBuf.Function, is ProtoBuf.Constructor -> AnnotatedCallableKind.FUNCTION\n else -> throw IllegalStateException(\"Unsupported message: $this\")\n }\n\nfun Name.ref() = StringRef.fromString(this.asString())!!\n\nfun FqName.ref() = StringRef.fromString(this.asString())!!","completion":"fun computeParameterName(name: Name): Name {\n return when {\n name == SpecialNames.IMPLICIT_SET_PARAMETER -> StandardNames.DEFAULT_VALUE_PARAMETER\n SpecialNames.isAnonymousParameterName(name) -> Name.identifier(\"_\")\n else -> name\n }\n}<|endoftext|>"} {"prompt":"val excludedBinaryOperations = listOf(\"rangeUntil\").map { Name.identifier(it) }\n\n for (classDescriptor in allPrimitiveTypes + additionalBuiltIns + arrays) {\n val compileTimeFunctions = classDescriptor.unsubstitutedMemberScope.getContributedDescriptors()\n .filterIsInstance()","completion":".filter { !it.isFakeOverride(classDescriptor) && it.valueParameters.size + 1 == argumentsCount }\n .filter { it.name !in excludedBinaryOperations }\n\n for (function in compileTimeFunctions) {\n val parameterTypes = listOf(classDescriptor.defaultType.constructor.toString()) +\n function.valueParameters.map { it.type.toString() }<|endoftext|>"} {"prompt":"findMissingSuperTypes(symbol)\n }\n\n fun getMissingSuperTypes(declaration: FirClassSymbol<*>): Set {\n return cache.getValue(declaration, null)\n }\n\n private fun findMissingSuperTypes(declaration: FirClassSymbol<*>): Set {","completion":"return declaration.collectSuperTypes(session)\n .filterTo(mutableSetOf()) {\n \/\/ Ignore types which are already errors.\n it !is ConeErrorType && it !is ConeDynamicType && it.toSymbol(session) == null\n }\n }\n\n private fun FirClassSymbol<*>.collectSuperTypes(session: FirSession): Set {<|endoftext|>"} {"prompt":"JsBinaryOperator.ASG_SHRU -> JsAstProtoBuf.BinaryOperation.Type.ASG_SHRU\n JsBinaryOperator.ASG_BIT_AND -> JsAstProtoBuf.BinaryOperation.Type.ASG_BIT_AND","completion":"JsBinaryOperator.ASG_BIT_OR -> JsAstProtoBuf.BinaryOperation.Type.ASG_BIT_OR\n JsBinaryOperator.ASG_BIT_XOR -> JsAstProtoBuf.BinaryOperation.Type.ASG_BIT_XOR\n JsBinaryOperator.COMMA -> JsAstProtoBuf.BinaryOperation.Type.COMMA<|endoftext|>"} {"prompt":"\/\/ Reference to function with context receivers does not currently support memoization.\n @Test\n fun testNonComposableFunctionReferenceWithStableContextReceiverNotMemoized() {\n verifyGoldenComposeIrTransform(\n source = \"\"\"\n import androidx.compose.runtime.Composable\n import androidx.compose.runtime.remember\n\n class StableReceiver\n class Stable {","completion":"context(StableReceiver)\n fun qux() {}\n }\n\n @Composable\n fun Something() {\n val x = remember { Stable() }\n val shouldNotMemoize = x::qux\n }\n \"\"\"\n )\n }\n\n @Test\n fun testUnstableReceiverFunctionReferenceNotMemoized() = verifyGoldenComposeIrTransform(\n \"\"\"<|endoftext|>"} {"prompt":"testServices.ktTestModuleStructure.mainAndBinaryKtModules,\n testServices.environmentManager.getProjectEnvironment()\n )\n }\n\n override fun getProject(module: TestModule): Project {\n return testServices.environmentManager.getProject()\n }\n\n override fun getCompilerConfiguration(module: TestModule): CompilerConfiguration {","completion":"return configurationCache.getOrPut(module) {\n createKotlinCompilerConfiguration(module)\n }\n }\n\n override fun getPackagePartProviderFactory(module: TestModule): (GlobalSearchScope) -> JvmPackagePartProvider {\n val configuration = getCompilerConfiguration(module)\n\n return { scope ->\n JvmPackagePartProvider(configuration.languageVersionSettings, scope).apply {<|endoftext|>"} {"prompt":"originalBody.transformChildrenVoid(object : IrElementTransformerVoid() {\n \/\/ Replace returns to refer to the new function.\n override fun visitReturn(expression: IrReturn): IrExpression {\n expression.transformChildrenVoid(this)\n\n return if (expression.returnTargetSymbol != transformingFunction.symbol)\n expression\n else\n irReturn(expression.value)\n }","completion":"\/\/ Replace function arguments loading with properties reading.\n override fun visitGetValue(expression: IrGetValue): IrExpression {\n expression.transformChildrenVoid(this)\n\n val capturedValue = argumentToPropertiesMap[expression.symbol.owner]\n ?: return expression\n return irGetField(irGet(thisReceiver), capturedValue)\n }<|endoftext|>"} {"prompt":"IrClassReferenceImpl(\n UNDEFINED_OFFSET, UNDEFINED_OFFSET, irBuiltIns.kClassClass.starProjectedType, irBuiltIns.kClassClass, classType\n )\n\n private fun buildIrGet(\n type: IrType,\n receiver: IrExpression?,\n getterSymbol: IrFunctionSymbol\n ): IrCall = IrCallImpl(","completion":"UNDEFINED_OFFSET, UNDEFINED_OFFSET,\n type,\n getterSymbol as IrSimpleFunctionSymbol,\n typeArgumentsCount = getterSymbol.owner.typeParameters.size,\n valueArgumentsCount = 0,\n origin = IrStatementOrigin.GET_PROPERTY\n ).apply {\n dispatchReceiver = receiver\n }<|endoftext|>"} {"prompt":"return CliBindingTrace::class.java.name\n }\n\n fun setKotlinCodeAnalyzer(kotlinCodeAnalyzer: KotlinCodeAnalyzer) {\n this.kotlinCodeAnalyzer = kotlinCodeAnalyzer\n }\n\n @Suppress(\"UNCHECKED_CAST\")","completion":"override fun get(slice: ReadOnlySlice, key: K): V? {\n val value = super.get(slice, key)\n\n if (value == null) {\n if (key is KtDeclaration) {\n \/\/ NB: intentional code duplication, see https:\/\/youtrack.jetbrains.com\/issue\/KT-43296<|endoftext|>"} {"prompt":"public open override operator fun contains(value: kotlin.Char): kotlin.Boolean\n\n public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean\n\n public open override fun hashCode(): kotlin.Int\n\n public open override fun isEmpty(): kotlin.Boolean\n\n public open override fun toString(): kotlin.String","completion":"public companion object of CharRange {\n public final val EMPTY: kotlin.ranges.CharRange { get; }\n }\n}\n\n@kotlin.SinceKotlin(version = \"1.1\")\npublic interface ClosedFloatingPointRange> : kotlin.ranges.ClosedRange {<|endoftext|>"} {"prompt":"return copyWith(transformedType.attributes[key]?.coneType ?: transformedType)\n}\n\ntypealias ConeAttributeKey = KClass>\n\nclass ConeAttributes private constructor(attributes: List>) : AttributeArrayOwner, ConeAttribute<*>>(),\n Iterable> {","completion":"companion object : ConeTypeRegistry, ConeAttribute<*>>() {\n inline fun > attributeAccessor(): ReadOnlyProperty {\n @Suppress(\"UNCHECKED_CAST\")<|endoftext|>"} {"prompt":"return declareEnumEntry(\n declaration\n ) { enumEntrySymbol -> defaultEnumEntryFactory(startOffset, endOffset, origin, declaration, enumEntrySymbol) }\n }\n\n fun declareEnumEntryIfNotExists(declaration: Class, enumEntryFactory: (IrEnumEntrySymbol) -> IrEnumEntry): IrEnumEntry {\n return declareIfNotExist(","completion":"declaration,\n enumEntrySlice,\n SymbolTable::declareEnumEntryIfNotExists,\n { createEnumEntrySymbol(declaration, it) },\n enumEntryFactory,\n ::calculateEnumEntrySignature\n )\n }\n\n override fun referenceEnumEntry(declaration: Class): IrEnumEntrySymbol {\n return reference(\n declaration,<|endoftext|>"} {"prompt":"} catch (e: IllegalArgumentException) {\n null\n}\n\nprivate object PathRelativizer {\n private val emptyPath = Paths.get(\"\")\n private val parentPath = Paths.get(\"..\")\n\n \/\/ Workarounds some bugs in Path.relativize that were fixed only in JDK9\n fun tryRelativeTo(path: Path, base: Path): Path {","completion":"val bn = base.normalize()\n val pn = path.normalize()\n val rn = bn.relativize(pn)\n \/\/ work around https:\/\/bugs.openjdk.java.net\/browse\/JDK-8066943\n for (i in 0 until minOf(bn.nameCount, pn.nameCount)) {<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsA() {}\nfun testTypeParameterWithIdenticalUpperBoundsA() {}","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {}\nfun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.javac.wrappers.trees\n\nimport com.sun.source.tree.CompilationUnitTree\nimport com.sun.tools.javac.tree.JCTree\nimport org.jetbrains.kotlin.descriptors.Visibilities\nimport org.jetbrains.kotlin.descriptors.Visibility","completion":"import org.jetbrains.kotlin.javac.JavacWrapper\nimport org.jetbrains.kotlin.load.java.structure.*\nimport org.jetbrains.kotlin.name.Name\n\nclass TreeBasedMethod(\n tree: JCTree.JCMethodDecl,\n compilationUnit: CompilationUnitTree,\n containingClass: JavaClass,<|endoftext|>"} {"prompt":"if (isEqualAnyNullableLeft(A(Inner(\"\")), A(Inner(\"a\")))) return \"Fail 25\"\n if (!isEqualAnyNullableRight>(null, null)) return \"Fail 26\"\n if (!isEqualAnyNullableRight(A(Inner(\"a\")), A(Inner(\"a\")))) return \"Fail 27\"","completion":"if (isEqualAnyNullableRight(Inner(\"\"), A(Inner(\"\")))) return \"Fail 28\"\n if (isEqualAnyNullableRight>(Inner(\"\"), null)) return \"Fail 29\"\n if (isEqualAnyNullableRight(null, A(Inner(\"\")))) return \"Fail 30\"<|endoftext|>"} {"prompt":"listOf(\n \"-4611686018427388000000000.000000000000ns\",\n \"-4611686018427387904000000.000000000000ns\"\n ),\n (-(MAX_MILLIS - 1).milliseconds).toString(DurationUnit.NANOSECONDS, 15)\n )\n\n d = Duration.INFINITE","completion":"test(DurationUnit.DAYS, \"Infinity\", \"Infinity\")\n d = -Duration.INFINITE\n test(DurationUnit.NANOSECONDS, \"-Infinity\", \"-Infinity\")\n }\n\n\n @Test\n fun parseAndFormatDefault() {\n fun testParsing(string: String, expectedDuration: Duration) {<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1279\n\/\/ Snippet from stdlib test test.exceptions.ExceptionTest\n\nprivate val cause = Exception(\"cause\")\n\nfun assertSame(x: Any?, y: Any?) {\n if (x !== y) {\n error(\"Assertion failed\")\n }\n}\n\nprivate fun testCreateException(","completion":"noarg: () -> T,\n fromMessage: (String?) -> T,\n fromCause: ((Throwable?) -> T)? = null,\n fromMessageCause: ((String?, Throwable?) -> T)? = null\n) {\n noarg().let { e ->\n assertEquals(null, e.message)\n assertEquals(null, e.cause)\n }<|endoftext|>"} {"prompt":"class Outer {\n val outerProp: String\n inner class Inner(inner: Inner, outer: Outer) {\n val innerProp: String\n init {\n outerProp \/\/ use of outerProp is ok because we're suppose that Outer instance should be initialized\n this@Outer.outerProp","completion":"this@Outer.outerProp = \"1\"\n outerProp = \"2\" \/\/ do not repeat the same diagnostic with this receiver of outer class\n outer.outerProp = \"3\"\n\n innerProp = \"4\" + inner.innerProp<|endoftext|>"} {"prompt":"132389, 132427, 132666, 133124, 133342, 133676, 133987, 136420, 136872, 136938, 137672, 138008, 138507, 138724,","completion":"138726, 139651, 139679, 140081, 141012, 141380, 141386, 142092, 142321, 143370, 144056, 144223, 144275, 144284,<|endoftext|>"} {"prompt":"firDeclarationProvider = { declaration ->\n if (declaration is KtClassLikeDeclaration) {\n declaration.findFir(provider)\n } else {\n val containingClassOrObject = declaration.containingClassOrObject\n val declarations = if (containingClassOrObject != null) {\n val containerClassFir = containingClassOrObject.findFir(provider) as? FirRegularClass","completion":"containerClassFir?.declarations\n } else {\n if (declaration.containingKtFile.isScript()) {\n \/\/ .kts will have a single [FirScript] as a declaration. We need to unwrap statements in it.\n val firScript = firFile.declarations.singleOrNull() as? FirScript\n if (declaration is KtScript) {<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: -ForbidInferringTypeVariablesIntoEmptyIntersection\n\/\/ RENDER_DIAGNOSTICS_FULL_TEXT\nopen class Foo\ninline fun g(): T? = null\n\ninline fun f(block: ()->R?): R? {\n return block()\n}\n\nfun main() {","completion":"f { g() }\n}<|endoftext|>"} {"prompt":"it.runResolverForNoReceiver(invokeReceiverVariableWithNoReceiverInfo, skipSynthetics = true)\n }\n }\n\n \/**\n * Let we have a call if a form of \"x.f()\" or \"f()\"\n *\n * This method enqueues a task (based on runResolutionForInvokeReceiverVariable) that for each successful property enqueues another task","completion":"* that tries to resolve \"f()\" call itself\n *\n * @param info describes whole \"x.f()\" or \"f()\"\n * @param invokeReceiverInfo describes \"x.f\" or \"f\" variable (in case of no-receiver call or in case of resolving invokeExtension with \"x\")<|endoftext|>"} {"prompt":"fun simpleType(proto: ProtoBuf.Type): ConeSimpleKotlinType {\n return simpleType(proto, attributesFromAnnotations(proto))\n ?: ConeErrorType(ConeSimpleDiagnostic(\"?!id:0\", DiagnosticKind.DeserializationError))\n }","completion":"private fun type(proto: ProtoBuf.Type, attributes: ConeAttributes): ConeKotlinType {\n if (proto.hasFlexibleTypeCapabilitiesId()) {\n val lowerBound = simpleType(proto, attributes)\n val upperBound = simpleType(proto.flexibleUpperBound(typeTable)!!, attributes)<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.library\n\nimport org.jetbrains.kotlin.konan.properties.Properties\n\ninterface BaseWriter {\n val versions: KotlinLibraryVersioning\n fun addLinkDependencies(libraries: List)\n fun addManifestAddend(properties: Properties)\n fun commit()\n}\n\ninterface MetadataWriter {","completion":"fun addMetadata(metadata: SerializedMetadata)\n}\n\ninterface IrWriter {\n fun addIr(ir: SerializedIrModule)\n fun addDataFlowGraph(dataFlowGraph: ByteArray)\n}\n\ninterface KotlinLibraryWriter : MetadataWriter, BaseWriter, IrWriter\n\n\/\/ TODO: Move SerializedIr here too to eliminate dependency on backend.common.serialization\nclass SerializedMetadata(<|endoftext|>"} {"prompt":"override suspend fun callMe(a: IntArray) {}\n\n override suspend fun callMe(a: Int): Unit {\n c()\n }\n\n override suspend fun callMe(s: String) {}\n override suspend fun callMe(a: Array) {}\n }\n}\n\nfun builder(c: suspend () -> Unit) {\n c.startCoroutine(EmptyContinuation)","completion":"}\n\nfun box(): String {\n var res: Any? = null\n\n builder {\n res = inlineMe {\n tx { Dummy }\n }.callMe(1)\n }\n\n (c as? Continuation)?.resume(Dummy)\n\n return if (res != Unit) \"$res\" else \"OK\"\n}<|endoftext|>"} {"prompt":"override fun accept(visitor: ControlFlowGraphVisitor, data: D): R {\n return visitor.visitWhenSyntheticElseBranchNode(this, data)\n }\n}\n\n\/\/ ----------------------------------- Loop -----------------------------------","completion":"class LoopEnterNode(owner: ControlFlowGraph, override val fir: FirLoop, level: Int) : CFGNode(owner, level),\n EnterNodeMarker {\n override fun accept(visitor: ControlFlowGraphVisitor, data: D): R {\n return visitor.visitLoopEnterNode(this, data)\n }\n}<|endoftext|>"} {"prompt":"\/\/ attribute, which is set if the property was mentioned in SerializationPluginMetadataExtensions.\n \/\/ Also, deserialized properties do not store default value (initializer expression) for property,\n \/\/ so we either should find corresponding constructor parameter and check its default, or rely on less strict check for default getter.\n \/\/ Comments are copied from PropertyDescriptor.declaresDefaultValue() as it has similar logic.","completion":"val hasBackingField = fir.symbol.registeredInSerializationPluginMetadataExtension\n val matchingPrimaryConstructorParam = containingClass?.declarations?.filterIsInstance()\n ?.singleOrNull()?.valueParameters?.find { it.name == this.name }\n if (matchingPrimaryConstructorParam != null) {<|endoftext|>"} {"prompt":"public actual operator fun Array.plus(elements: Collection): Array {\n return arrayPlusCollection(this, elements)\n}\n\n\/**\n * Returns an array containing all elements of the original array and then all elements of the given [elements] collection.\n *\/\npublic actual operator fun ByteArray.plus(elements: Collection): ByteArray {\n var index = size","completion":"val result = this.copyOf(size + elements.size)\n for (element in elements) result[index++] = element\n return result\n}\n\n\/**\n * Returns an array containing all elements of the original array and then all elements of the given [elements] collection.\n *\/\npublic actual operator fun ShortArray.plus(elements: Collection): ShortArray {\n var index = size<|endoftext|>"} {"prompt":"object WasmImportAnnotationChecker : DeclarationChecker {\n private val wasmImportFqName = FqName(\"kotlin.wasm.WasmImport\")\n\n override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {\n val wasmImport = descriptor.annotations.findAnnotation(wasmImportFqName) ?: return","completion":"val trace = context.trace\n\n val wasmImportPsi = wasmImport.source.getPsi() ?: declaration\n\n if (!DescriptorUtils.isTopLevelDeclaration(descriptor)) {\n trace.report(ErrorsWasm.NESTED_WASM_IMPORT.on(wasmImportPsi))\n }<|endoftext|>"} {"prompt":"fun `test - data class`() {\n val file = inlineSourceCodeAnalysis.createKtFile(\n \"\"\"\n data class Foo(val a: Int)\n \"\"\".trimIndent()\n )\n analyze(file) {\n val foo = file.getClassOrFail(\"Foo\")\n assertEquals(","completion":"listOf(\"component1\", \"copy\", \"equals\", \"hashCode\", \"toString\", \"a\"),\n foo.getCallableSymbolsForObjCMemberTranslation()\n .sortedWith(StableCallableOrder)\n .map { it as KtNamedSymbol }\n .map { it.name.asString() }\n )\n }\n }\n\n @Test<|endoftext|>"} {"prompt":"val value = 0x1_234C67890L\nval value = 0XF_______3456789L\nval value = 0x3_4_5_6_7_8L\nval value = 0X4_______5_______d_______7L\nval value = 0X5__________________________________________________________________________________________________6L\nval value = 0x0_______BL\nval value = 0X0_0L","completion":"val value = 0xB_______________________________________________________________________________________________________________________________________________________0L\nval value = 0x1_00000000000000000_1L\n\nval value = 0x_a2b45f789eL\nval value = 0X_______2f45c7d9L\nval value = 0X_a_3_4_5_6_7_e_eL\nval value = 0x_L<|endoftext|>"} {"prompt":"na !== z","completion":"val test_bna = b === na || na === b || b !== na ||<|endoftext|>"} {"prompt":"PropertyChecker(\"method.$name\"),\n MethodChecker {\n\n override fun check(method1: MethodNode, method2: MethodNode, report: MethodReport) {\n val value1 = getProperty(method1)\n val value2 = getProperty(method2)\n if (!areEqual(value1, value2)) {\n report.addPropertyDiff(","completion":"defectType,\n NamedDiffEntry(\n name,\n valueToHtml(value1, value2),\n valueToHtml(value2, value1)\n )\n )\n }\n }\n}<|endoftext|>"} {"prompt":"appendLine(\"Annotation processing mode: ${mode.stringValue}\")\n appendLine(\"Memory leak detection mode: ${detectMemoryLeaks.stringValue}\")\n KaptFlag.values().forEach { appendLine(it.description + \": \" + this@logString[it]) }\n\n appendLine(\"Project base dir: $projectBaseDir\")","completion":"appendLine(\"Compile classpath: \" + compileClasspath.joinToString())\n appendLine(\"Java source roots: \" + javaSourceRoots.joinToString())\n\n appendLine(\"Sources output directory: $sourcesOutputDir\")\n appendLine(\"Class files output directory: $classesOutputDir\")\n appendLine(\"Stubs output directory: $stubsOutputDir\")<|endoftext|>"} {"prompt":"import androidx.compose.compiler.plugins.kotlin.ComposeFqNames\nimport androidx.compose.compiler.plugins.kotlin.FunctionMetrics\nimport androidx.compose.compiler.plugins.kotlin.KtxNameConventions\nimport androidx.compose.compiler.plugins.kotlin.ModuleMetrics","completion":"import androidx.compose.compiler.plugins.kotlin.analysis.ComposeWritableSlices\nimport androidx.compose.compiler.plugins.kotlin.analysis.KnownStableConstructs\nimport androidx.compose.compiler.plugins.kotlin.analysis.Stability\nimport androidx.compose.compiler.plugins.kotlin.analysis.StabilityInferencer<|endoftext|>"} {"prompt":"if (this.z != null) z.equals(null)\n if (this.z != null) z.propT","completion":"if (this.z != null) z.propAny\n if (this.z != null) z.propNullableT<|endoftext|>"} {"prompt":"typeMapper.mapType(declaration.returnType, TypeMappingMode.RETURN_TYPE_BOXED, sw, materialized)\n }\n else -> mapReturnType(declaration, declaration.returnType, sw, materialized)\n }\n }","completion":"private fun mapReturnType(declaration: IrDeclaration, returnType: IrType, sw: JvmSignatureWriter?, materialized: Boolean = true): Type {\n val isAnnotationMethod = declaration.parent.let { it is IrClass && it.isAnnotationClass }\n if (sw == null || sw.skipGenericSignature()) {<|endoftext|>"} {"prompt":"val NON_INLINE_MEMBER_VAL_INITIALIZATION by error {\n parameter(\"property\")\n }\n val SETTER_PROJECTED_OUT by error(PositioningStrategy.SELECTOR_BY_QUALIFIED) {\n parameter(\"property\")\n }","completion":"val WRONG_INVOCATION_KIND by warning {\n parameter(\"declaration\")\n parameter(\"requiredRange\")\n parameter(\"actualRange\")\n }\n val LEAKED_IN_PLACE_LAMBDA by warning {<|endoftext|>"} {"prompt":"\/\/ Ambiguity between fun and callable property\n\nopen class BaseWithCallableProp {\n val fn = { \"fn.invoke()\" }\n\n val bar = { \"bar.invoke()\"}\n open fun bar(): String = \"bar()\"\n}\n\ninterface InterfaceWithFun {\n fun fn(): String = \"fn()\"\n}\n\nclass DerivedUsingFun : BaseWithCallableProp(), InterfaceWithFun {","completion":"fun foo(): String =\n super.fn()\n\n override fun bar(): String =\n super.bar()\n}<|endoftext|>"} {"prompt":"\"kotlin.CharArray\" -> if (typeB == \"kotlin.Int\" && typeC == \"kotlin.Char\") return (a as CharArray).set(b as Int, c as Char)","completion":"\"kotlin.ByteArray\" -> if (typeB == \"kotlin.Int\" && typeC == \"kotlin.Byte\") return (a as ByteArray).set(b as Int, c as Byte)<|endoftext|>"} {"prompt":"internal fun putIfNeeded(descriptor: ClassDescriptor, properties: SerializableProperties) {\n if (!descriptor.needSaveProgramOrder) return\n descriptorMetadataMap[descriptor] = properties\n }\n\n override fun afterClass(\n descriptor: ClassDescriptor,\n proto: ProtoBuf.Class.Builder,","completion":"versionRequirementTable: MutableVersionRequirementTable,\n childSerializer: DescriptorSerializer,\n extension: SerializerExtension\n ) {\n fun Name.toIndex() = extension.stringTable.getStringIndex(asString())\n\n if (descriptor.isCompanionObject\n && descriptor.name != SpecialNames.DEFAULT_NAME_FOR_COMPANION_OBJECT<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE","completion":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE_DEPRECATION<|endoftext|>"} {"prompt":"public inline operator fun rem(other: Short): Int =\n this % other.toInt()\n\n \/**\n * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).\n *\n * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor.\n *\/","completion":"@SinceKotlin(\"1.1\")\n @kotlin.internal.IntrinsicConstEvaluation\n @TypedIntrinsic(IntrinsicType.SIGNED_REM)\n public external operator fun rem(other: Int): Int\n\n \/**\n * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).\n *<|endoftext|>"} {"prompt":"id(unresolved)\n }\n\n if (true)\n id(unresolved)\n else\n id(unresolved)\n\n when {","completion":"true -> id(unresolved)\n }\n id(unresolved) ?: id(unresolved)\n}<|endoftext|>"} {"prompt":"if (areCompatibleMainFunctions(declaration, containingFile, conflictingSymbol, actualConflictingFile, session)) return\n @OptIn(SymbolInternals::class)\n val conflicting = conflictingSymbol.fir\n if (\n conflicting is FirMemberDeclaration &&","completion":"!session.visibilityChecker.isVisible(conflicting, session, containingFile, emptyList(), dispatchReceiver = null)\n ) return\n if (areNonConflictingCallables(declaration, conflictingSymbol)) return\n\n declarationConflictingSymbols.getOrPut(declaration) { SmartSet.create() }.add(conflictingSymbol)\n}<|endoftext|>"} {"prompt":"caches.lookupCache.lookupSymbols.map { if (it.scope.isBlank()) it.name else it.scope }.distinct()\n )\n\n when (classpathChanges) {\n is ChangesEither.Unknown -> {\n reporter.info { \"Could not get classpath's changes: ${classpathChanges.reason}\" }","completion":"return CompilationMode.Rebuild(classpathChanges.reason)\n }\n is ChangesEither.Known -> {\n dirtyFiles.addByDirtySymbols(classpathChanges.lookupSymbols)\n dirtyFiles.addByDirtyClasses(classpathChanges.fqNames)\n }\n }\n\n val removedClassesChanges = getRemovedClassesChanges(caches, changedFiles)<|endoftext|>"} {"prompt":"return builder.irBlock(\n resultType = expression.type\n ) {\n val tempDispatchReceiver = dispatchReceiver?.let {\n val tmp = irTemporary(it)\n captures.add(tmp)\n tmp\n }\n val tempExtensionReceiver = extensionReceiver?.let {\n val tmp = irTemporary(it)\n captures.add(tmp)\n tmp","completion":"}\n\n \/\/ Patch reference receiver in place\n reference.dispatchReceiver = tempDispatchReceiver?.let { irGet(it) }\n reference.extensionReceiver = tempExtensionReceiver?.let { irGet(it) }\n\n +rememberExpression(\n functionContext,\n expression,\n captures\n )\n }<|endoftext|>"} {"prompt":"if (b != null) {\n val c = ?>?>?>?> & Out?>?>?>?>?\")!>b.get()","completion":"if (c != null) {\n val d = ?>?>?> & Out?>?>?>?\")!>c.get()\n if (d != null) {<|endoftext|>"} {"prompt":"IC2(Generic(\"aba\", 5.0)) != (IC2(Generic(3, 8)) as Any) -> \"Fail 2.3\"\n (IC2(Generic(\"aba\", 5.0)) as Any) != (IC2(Generic(3, 8)) as Any) -> \"Fail 2.4\"\n\n IC3(\"x\") != IC3(\"y\") -> \"Fail 3.1\"","completion":"(IC3(\"x\") as Any) != IC3(\"y\") -> \"Fail 3.2\"\n IC3(\"x\") != (IC3(\"y\") as Any) -> \"Fail 3.3\"\n (IC3(\"x\") as Any) != (IC3(\"y\") as Any) -> \"Fail 3.4\"\n\n IC4(\"aba\") != IC4(\"caba\") -> \"Fail 4.1\"<|endoftext|>"} {"prompt":"is KlibClassAddress -> getClassOrObjectSymbol()?.let { symbol -> sequenceOf(symbol) } ?: emptySequence()\n is KlibTypeAliasAddress -> getTypeAliasSymbol()?.let { symbol -> sequenceOf(symbol) } ?: emptySequence()\n is KlibFunctionAddress -> getFunctionSymbols()\n is KlibPropertyAddress -> getPropertySymbols()\n }","completion":"}\n\n\/**\n * @see [getSymbols]\n *\/\ncontext(KtAnalysisSession)\npublic fun KlibClassAddress.getClassOrObjectSymbol(): KtClassOrObjectSymbol? {\n return getClassOrObjectSymbolByClassId(classId)\n ?.takeIf { symbol -> symbol in this }\n}\n\ncontext(KtAnalysisSession)<|endoftext|>"} {"prompt":"a.bar()!!.length\n\n a.field?.length\n a.field.length\n\n a.foo2(\"\", null)?.length\n a.foo2(\"\", null).length","completion":"a.foo2(null, \"\").length\n\n a.bar2().length\n a.bar2()!!.length\n\n a.field2?.length\n a.field2.length\n}<|endoftext|>"} {"prompt":"fun functionWithUnsubstitutedTypeParametersInReturnType2(): T = TODO()\nfun functionWithUnsubstitutedTypeParametersInReturnType3(): T = TODO()\nfun functionWithUnsubstitutedTypeParametersInReturnType4(): T = TODO()\nfun functionWithUnsubstitutedTypeParametersInReturnType5(): T = TODO()","completion":"fun functionWithUnsubstitutedTypeParametersInReturnType6(): T = TODO()\nfun functionWithUnsubstitutedTypeParametersInReturnType7(): T = TODO()\nfun functionWithUnsubstitutedTypeParametersInReturnType8(): Box = TODO()<|endoftext|>"} {"prompt":"SYMBOL_WITH_CONTAINING_DECLARATION\n )\n\n map.put(\n VAR_TYPE_MISMATCH_ON_INHERITANCE,\n \"{0} clashes with {1}: property types do not match.\",\n SYMBOL_WITH_CONTAINING_DECLARATION,\n SYMBOL_WITH_CONTAINING_DECLARATION\n )","completion":"map.put(\n RETURN_TYPE_MISMATCH_BY_DELEGATION,\n \"{0} clashes with {1} from delegation: return types are incompatible.\",\n SYMBOL_WITH_CONTAINING_DECLARATION,\n SYMBOL_WITH_CONTAINING_DECLARATION\n )\n\n map.put(<|endoftext|>"} {"prompt":"package a\n\nfun test1() {\n bar(\n 11,\n todo(),\/\/comment1\n \"\"\/\/comment2\n )\n}\n\nfun test2() {","completion":"bar(11, todo()\/*comment1*\/, \"\"\/*comment2*\/)\n}\nfun test3() {<|endoftext|>"} {"prompt":"\/\/ Overload resolution is not working in K2 with Supress INVISIBLE_REFERENCE.\n\/\/ But resolving constants and annotations work\n\/\/ So we are creating local copies of this intrinsic for test\n\n@TypedIntrinsic(IntrinsicType.GET_AND_ADD_FIELD)\ninternal external fun KMutableProperty0.getAndAddFieldLocal(delta: Short): Short","completion":"@TypedIntrinsic(IntrinsicType.GET_AND_ADD_FIELD)\ninternal external fun KMutableProperty0.getAndAddFieldLocal(newValue: Int): Int\n@TypedIntrinsic(IntrinsicType.GET_AND_ADD_FIELD)\ninternal external fun KMutableProperty0.getAndAddFieldLocal(newValue: Long): Long<|endoftext|>"} {"prompt":"is GccConfigurables -> GccBasedLinker(configurables)\n is AppleConfigurables -> MacOSBasedLinker(configurables)\n is AndroidConfigurables-> AndroidLinker(configurables)\n is MingwConfigurables -> MingwLinker(configurables)\n is WasmConfigurables -> WasmLinker(configurables)","completion":"is ZephyrConfigurables -> ZephyrLinker(configurables)\n else -> error(\"Unexpected target: ${configurables.target}\")\n }<|endoftext|>"} {"prompt":"if (compareTo2.id() != 0) return \"Fail 1.2\"\n if (compareTo3.id() != 1) return \"Fail 1.3\"\n if (compareTo4.id() != 0) return \"Fail 1.4\"\n if (compareTo5.id() != 0) return \"Fail 1.5\"","completion":"if (compareTo6.id() != 0) return \"Fail 1.6\"\n if (compareTo7.id() != 0) return \"Fail 1.7\"\n if (compareTo8.id() != 0) return \"Fail 1.8\"\n\n if (plus1.id() != 3) return \"Fail 2.1\"<|endoftext|>"} {"prompt":"val previousCompare = this@then.compare(a, b)\n if (previousCompare != 0) previousCompare else comparator.compare(a, b)\n }\n\n\/**\n * Combines this comparator and the given [comparator] such that the latter is applied only\n * when the former considered values equal.\n *\n * @sample samples.comparisons.Comparisons.thenDescending\n *\/","completion":"public infix fun Comparator.thenDescending(comparator: Comparator): Comparator =\n Comparator { a, b ->\n val previousCompare = this@thenDescending.compare(a, b)\n if (previousCompare != 0) previousCompare else comparator.compare(b, a)\n }<|endoftext|>"} {"prompt":"ktDeclarationContainer.startOffsetSkippingComments, ktDeclarationContainer.endOffset,\n IrDeclarationOrigin.DEFINED,\n propertyDescriptor,\n isDelegated = false\n ).also { irProperty ->\n irProperty.backingField = generatePropertyBackingField(ktDeclarationContainer, propertyDescriptor, generateInitializer)\n\n val getter = propertyDescriptor.getter","completion":"?: if (generateSyntheticAccessors) {\n PropertyGetterDescriptorImpl(\n propertyDescriptor,\n Annotations.EMPTY, Modality.FINAL, DescriptorVisibilities.PUBLIC, false, false, false,\n CallableMemberDescriptor.Kind.SYNTHESIZED, null, propertyDescriptor.source\n ).apply {<|endoftext|>"} {"prompt":"reifiedSafeAsReturnsNull>(null, \"reifiedSafeAs>(null)\")\n reifiedSafeAsReturnsNull>(null, \"reifiedSafeAs>(null)\")","completion":"reifiedSafeAsReturnsNull>(null, \"reifiedSafeAs>(null)\")\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"argument.toConeTypeProjection(session, javaTypeParameterStack, variance, newMode, source)\n }\n }\n\n else -> lowerBound?.typeArguments\n }\n\n lookupTag.constructClassType(mappedTypeArguments ?: ConeTypeProjection.EMPTY_ARRAY, isNullable = lowerBound != null, attributes)\n }\n\n is JavaTypeParameter -> {","completion":"val symbol = javaTypeParameterStack[classifier]\n if (symbol != null) {\n ConeTypeParameterTypeImpl(symbol.toLookupTag(), isNullable = lowerBound != null, attributes)\n } else {\n ConeErrorType(ConeUnresolvedNameError(classifier.name))\n }\n }\n\n null -> {<|endoftext|>"} {"prompt":"}\nfun f(): Int {\n if (1 < 2) { return 1 } else returnNothing()\n}\n\nfun f1(): Int = if (1 < 2) 1 else returnNothing()\n\npublic fun f2() = 1\nclass B() {\n protected fun f() = \"ss\"\n}","completion":"fun testFunctionLiterals() {\n val endsWithVarDeclaration : () -> Boolean = {\n val x = 2\n }\n\n val endsWithAssignment: () -> Int = {\n var x = 1<|endoftext|>"} {"prompt":"}\n\n val fileWithSpacesInPath = projectPath.resolve(\"src\/commonMain\/kotlin\/$complicatedDirectoryName\").toFile()\n .apply { mkdirs() }\n .canonicalFile\n .resolve(\"B.kt\")\n fileWithSpacesInPath.writeText(\"fun foo() = 42\")\n\n build(","completion":"\"compileKotlin${nativeHostTargetName.capitalize()}\",\n ) {\n extractNativeTasksCommandLineArgumentsFromOutput(\":compileKotlin${nativeHostTargetName.capitalize()}\") {\n val escapedQuotedPath =\n \"\\\"${fileWithSpacesInPath.absolutePath.replace(\"\\\\\", \"\\\\\\\\\").replace(\"\\\"\", \"\\\\\\\"\")}\\\"\"<|endoftext|>"} {"prompt":"Any, Any, Any, Any, Any, Any, Any, Any, Any, Any,\n >(body)\n\ninline fun <\n reified U01, reified U02, reified U03, reified U04, reified U05, reified U06, reified U07, reified U08, reified U09, reified U10,","completion":"reified U11, reified U12, reified U13, reified U14, reified U15, reified U16, reified U17, reified U18, reified U19, reified U20,\n> g(crossinline body: suspend () -> Unit): suspend () -> Unit {\n return run {\n run {\n run {\n run {\n run {\n run {\n run {<|endoftext|>"} {"prompt":"@kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Short): kotlin.Double { \/* compiled code *\/ }\n\n @kotlin.internal.IntrinsicConstEvaluation public open operator fun equals(other: kotlin.Any?): kotlin.Boolean { \/* compiled code *\/ }","completion":"public final operator fun inc(): kotlin.Double { \/* compiled code *\/ }\n\n @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Byte): kotlin.Double { \/* compiled code *\/ }<|endoftext|>"} {"prompt":"$this$mapTo\\77:java.lang.Object[]=java.lang.Integer[], destination\\77:java.util.Collection=java.util.ArrayList, $i$f$mapTo\\77\\531:int=0:int, item\\77:java.lang.Object=java.lang.Integer, it\\78:int=1:int,","completion":"$i$a$-map-LibraryKt$foo$5\\78\\533\\56:int=0:int<|endoftext|>"} {"prompt":"}\n else {\n translateVarargArgument(actualArgument,\n argsToJsExpr,\n actualArgument.arguments.size > 1,\n varargElementType)?.let { result.add(it) }\n }\n }\n else {\n if (isNativeFunctionCall) {","completion":"result.addAll(translateResolvedArgument(actualArgument, argsToJsExpr))\n }\n else {\n translateVarargArgument(actualArgument, argsToJsExpr, true, varargElementType)?.let { result.add(it) }\n }\n }\n }\n else {<|endoftext|>"} {"prompt":"init {\n ManagementFactoryHelper.getThreadMXBean().isThreadCpuTimeEnabled = true\n }\n}\n\nfun vmStateSnapshot(): VMCounters {\n Init\n val threadMXBean = ManagementFactoryHelper.getThreadMXBean()\n val hotspotRuntimeMBean = ManagementFactoryHelper.getHotspotRuntimeMBean()\n\n return VMCounters(","completion":"threadMXBean.threadUserTime(), threadMXBean.threadCpuTime(),\n ManagementFactoryHelper.getGarbageCollectorMXBeans().associate { it.name to GCInfo(it.name, it.collectionTime, it.collectionCount) },\n hotspotRuntimeMBean.totalSafepointTime,\n hotspotRuntimeMBean.safepointSyncTime,<|endoftext|>"} {"prompt":"notProperTypesCache.clear()\n\n return result\n }\n\n private enum class State {\n BUILDING,\n TRANSACTION,\n FREEZED,\n COMPLETION\n }\n\n \/*\n * If remove spread operator then call `checkState` will resolve to itself\n * instead of fun checkState(vararg allowedState: State)\n *\/","completion":"private fun checkState(a: State) {\n if (!AbstractTypeChecker.RUN_SLOW_ASSERTIONS) return\n checkState(*arrayOf(a))\n }\n\n private fun checkState(a: State, b: State) {\n if (!AbstractTypeChecker.RUN_SLOW_ASSERTIONS) return\n checkState(*arrayOf(a, b))\n }<|endoftext|>"} {"prompt":"preactions = getDefaultIrActions() + getDefaultLlvmModuleActions(),\n postactions = getDefaultIrActions() + getDefaultLlvmModuleActions(),\n op = { generationState, input ->\n val context = generationState.context\n generationState.objCExport = ObjCExport(\n generationState,","completion":"input.irModule.descriptor,\n context.objCExportedInterface,\n context.objCExportCodeSpec\n )\n\n input.irModule.acceptVoid(CodeGeneratorVisitor(generationState, input.irModule.irBuiltins, input.lifetimes))\n\n if (generationState.hasDebugInfo())\n DIFinalize(generationState.debugInfo.builder)\n }\n)<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ NI_EXPECTED_FILE\n\/*\n * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)\n *\n * SPEC VERSION: 0.1-152\n * PRIMARY LINKS: expressions, when-expression -> paragraph 2 -> sentence 1\n * expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1\n * declarations, function-declaration -> paragraph 7 -> sentence 1","completion":"* declarations, function-declaration -> paragraph 7 -> sentence 2\n * declarations, function-declaration -> paragraph 8 -> sentence 1\n * overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 1 -> sentence 3\n *\/\n\nval test1 = when {\n true -> { { true } }\n else -> TODO()\n}\n\nval test1a: () -> Boolean = when {<|endoftext|>"} {"prompt":"\/\/ 1. Create captured type for type argument T (it's built upon star-projection from `KClass<*>` that's argument is <: Any)\n \/\/ 2. Approximate resulting descriptor, now it 'KClass1<*>.primaryConstructor: KFunction1<*>'","completion":"\/\/ Note that star-projection in 'KFunction1<*>' is obtained from KClass and its `projectionType` is Any (not-nullable).\n \/\/ Of course that situation is already strange\n \/\/ 3. When checking subtyping after call completion we get that 'KFunction1<*>' is not a subtype of 'KFunction1' in new type checker.<|endoftext|>"} {"prompt":"if (x == null) {\n x as Int\n stringArg(x)","completion":"x\n }\n}\n\n\/*\n * TESTCASE NUMBER: 4\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-27464\n *\/\nfun case_4(x: Int?) {\n if (x == null) {<|endoftext|>"} {"prompt":"otherLowercaseGenerators.add(OtherLowercaseRangesGenerator(generatedDir.resolve(\"_OtherLowercaseChars.kt\"), target))\n otherUppercaseGenerators.add(OtherUppercaseRangesGenerator(generatedDir.resolve(\"_OtherUppercaseChars.kt\"), target))\n }\n\n val oneToOneMappingsGenerators = mutableListOf()","completion":"fun addOneToOneMappingsGenerators(generatedDir: File, target: KotlinTarget) {\n val uppercase = MappingsGenerator.forUppercase(generatedDir.resolve(\"_UppercaseMappings.kt\"), target)\n val lowercase = MappingsGenerator.forLowercase(generatedDir.resolve(\"_LowercaseMappings.kt\"), target)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.types.renderForDebugging\n\ninternal class KtFirDefinitelyNotNullType(\n override val coneType: ConeDefinitelyNotNullType,\n private val builder: KtSymbolByFirBuilder,\n) : KtDefinitelyNotNullType(), KtFirType {","completion":"override val token: KtLifetimeToken get() = builder.token\n override val original: KtType = withValidityAssertion { builder.typeBuilder.buildKtType(this.coneType.original) }\n override val annotationsList: KtAnnotationsList by cached {\n KtFirAnnotationListForType.create(coneType, builder)\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.js.resolve.diagnostics.findPsi\nimport org.jetbrains.kotlin.js.translate.context.Namer\nimport org.jetbrains.kotlin.js.translate.context.TranslationContext\nimport org.jetbrains.kotlin.js.translate.general.Translation","completion":"import org.jetbrains.kotlin.js.translate.utils.JsAstUtils\nimport org.jetbrains.kotlin.js.translate.utils.TranslationUtils\nimport org.jetbrains.kotlin.psi.KtExpression\nimport org.jetbrains.kotlin.psi.KtPureClassOrObject<|endoftext|>"} {"prompt":"1 + T\n\n B::class.equals(T)","completion":"T = \"\"\n}\n\nfun baz(a: Any) {}<|endoftext|>"} {"prompt":"val buildGradle: Path get() = projectPath.resolve(\"build.gradle\")\n val buildGradleKts: Path get() = projectPath.resolve(\"build.gradle.kts\")\n val settingsGradle: Path get() = projectPath.resolve(\"settings.gradle\")\n val settingsGradleKts: Path get() = projectPath.resolve(\"settings.gradle.kts\")","completion":"val gradleProperties: Path get() = projectPath.resolve(\"gradle.properties\")\n val buildFileNames: Set get() = setOf(\"build.gradle\", \"build.gradle.kts\", \"settings.gradle\", \"settings.gradle.kts\")\n\n fun classesDir(\n sourceSet: String = \"main\",\n targetName: String? = null,<|endoftext|>"} {"prompt":"if (!('0' !in '1'..<'3') != range0.contains('0')) throw AssertionError()\n \/\/ no local optimizations\n if (element0 in '1'..<'3' != range0.contains(element0)) throw AssertionError()","completion":"if (element0 !in '1'..<'3' != !range0.contains(element0)) throw AssertionError()\n if (!(element0 in '1'..<'3') != !range0.contains(element0)) throw AssertionError()\n if (!(element0 !in '1'..<'3') != range0.contains(element0)) throw AssertionError()<|endoftext|>"} {"prompt":"this.toInt() \/ other.toInt()\n\n \/** Divides this value by the other value, truncating the result to an integer that is closer to zero. *\/\n @kotlin.internal.IntrinsicConstEvaluation\n public inline operator fun div(other: Short): Int =\n this.toInt() \/ other.toInt()","completion":"\/** Divides this value by the other value, truncating the result to an integer that is closer to zero. *\/\n @kotlin.internal.IntrinsicConstEvaluation\n public inline operator fun div(other: Int): Int =\n this.toInt() \/ other\n\n \/** Divides this value by the other value, truncating the result to an integer that is closer to zero. *\/<|endoftext|>"} {"prompt":"private const val licenseReadmePath = \"license\/README.md\"\n }\n\n @Test\n fun testLinksDefinitions() {\n val linkDefinitionRegExp = Regex(pattern = \"\\\\[(\\\\w+)]:.+\")\n val linkRegExp = Regex(pattern = \"]\\\\s?\\\\[(\\\\w+)]\")\n\n val linksUsages = mutableSetOf()","completion":"val linksDefinitions = mutableSetOf()\n\n val readmeFile = File(licenseReadmePath)\n readmeFile.useLines { lineSequence ->\n lineSequence.forEach { line ->\n val definitionMatch = linkDefinitionRegExp.matchEntire(line)\n if (definitionMatch != null) {<|endoftext|>"} {"prompt":"\/\/ Mutable member property of a class or object.\n \/\/ Smartcast is always unsafe regardless of usage.\n MUTABLE_PROPERTY(SmartcastStability.MUTABLE_PROPERTY),\n\n \/\/ Delegated property of a class or object.\n \/\/ Smartcast is always unsafe regardless of usage.\n DELEGATED_PROPERTY(SmartcastStability.DELEGATED_PROPERTY);","completion":"fun combineWithReceiverStability(receiverStability: PropertyStability?): PropertyStability {\n if (receiverStability == null) return this\n if (this == LOCAL_VAR) {\n require(receiverStability == STABLE_VALUE || receiverStability == LOCAL_VAR) {\n \"LOCAL_VAR can have only stable or local receiver, but got $receiverStability\"<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.generators.tree.printer.printFunctionDeclaration\nimport org.jetbrains.kotlin.ir.generator.IrTree\nimport org.jetbrains.kotlin.ir.generator.elementTransformerType\nimport org.jetbrains.kotlin.ir.generator.irTypeType","completion":"import org.jetbrains.kotlin.ir.generator.model.Element\nimport org.jetbrains.kotlin.ir.generator.model.Field\nimport org.jetbrains.kotlin.ir.generator.model.ListField\nimport org.jetbrains.kotlin.ir.generator.model.SingleField\nimport org.jetbrains.kotlin.utils.SmartPrinter<|endoftext|>"} {"prompt":"private String name;\n\n private boolean human;\n\n private Integer toOverride;\n\n public int getAge() {\n return age;\n }\n\n public void setAge(String age) {\n\n }\n\n public boolean isHuman(String arg) {\n return human;\n }\n\n private int score;\n\n public void setScore(int score, int times) {\n\n }","completion":"static void test() {\n val obj = new ClashTest();\n\n obj.getAge();\n\/\/ obj.setAge(41);\n\n obj.getName();\n obj.setName(\"Al\");\n\n obj.isHuman();\n obj.setHuman(true);\n obj.isHuman(\"sdf\");\n }\n\n}\n\n\/\/ FILE: ChildClass.java<|endoftext|>"} {"prompt":"val message = arguments.getOrNull(1)\n\n if (message != null) {\n appendLine(\"\/\/ $message\")\n }\n append(\"println(\\\"$actual is \\${$actual}\\\") \/\/ false\")\n }\n },\n \"assertPrints\" to object : FunctionCallRewriter {\n \/\/ rewrites `assertPrints(expression, expectedOutput)`","completion":"override fun rewrite(arguments: List, typeArguments: List): String {\n val expression = arguments[0]\n val expectedOutput = arguments[1].removeSurrounding(\"\\\"\")\n return \"println($expression) \/\/ $expectedOutput\"\n }\n },\n \"assertFails\" to object : FunctionCallRewriter {<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\nfun foo(vararg ii: Int) {}\nfun foo(vararg ss: String) {}\nfun foo(i: Int) {}\n\nval fn1: (Int) -> Unit = ::foo\nval fn2: (IntArray) -> Unit = ::foo\nval fn3: (Int, Int) -> Unit = ::foo","completion":"val fn4: (Array) -> Unit = ::foo<|endoftext|>"} {"prompt":"run { myBuildList { add(\"\") } },\n myBuildList { add(1) },\n )\n}","completion":"fun buildPartList(left: MutableList.() -> Unit, right: MutableList.() -> Unit): List {\n val list = mutableListOf()\n list.left()\n list.right()\n return list\n}\n\nfun test4() {\n buildPartList(<|endoftext|>"} {"prompt":"defaultNull(\"getter\", \"setter\", \"initializer\", \"delegate\", \"receiverParameter\", withGetter = true)\n }\n\n impl(valueParameter, \"FirDefaultSetterValueParameter\") {\n default(\"name\", \"Name.identifier(\\\"value\\\")\")\n }\n\n impl(simpleFunction)\n\n impl(safeCallExpression) {","completion":"additionalImports(checkedSafeCallSubject)\n }\n\n impl(checkedSafeCallSubject) {\n additionalImports(expression)\n }\n\n impl(resolvedQualifier) {\n \/\/ Initialize the value to true if only the companion object is present. This makes a standalone class reference expression\n \/\/ correctly resolve to the companion object. For example\n \/\/ ```\n \/\/ class A {<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -IMPLICIT_CAST_TO_ANY -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION\n\/\/ SKIP_TXT\n\n\/*","completion":"* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)\n *\n * SPEC VERSION: 0.1-296\n * MAIN LINK: control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 1 -> sentence 1\n * NUMBER: 2\n * DESCRIPTION: check if-expressions must have both branches.\n *\/\n\n\/\/ TESTCASE NUMBER: 1<|endoftext|>"} {"prompt":"package test\n\nimport android.app.Activity\nimport kotlinx.android.synthetic.main.layout.*\n\nfun Activity.a() {\n val x = login\n val y = this.login\n}\n\n\/\/ 2 GETSTATIC test\/R\\$id\\.login\n\/\/ 2 INVOKEVIRTUAL android\/app\/Activity\\.findViewById\n\/\/ 2 CHECKCAST android\/widget\/Button","completion":"\/\/ 0 _\\$_findCachedViewById<|endoftext|>"} {"prompt":"val classId = owner.getClassId() ?: return null\n return CallableId(classId, callableName)\n }\n is KtFile -> {\n return CallableId(owner.packageFqName, callableName)\n }\n else -> return null\n }\n }\n\nprivate fun parseCallableId(rawString: String): CallableId {","completion":"val chunks = rawString.split('#')\n assert(chunks.size == 2) { \"Invalid CallableId string format: $rawString\" }\n\n val rawQualifier = chunks[0]\n val rawCallableName = chunks[1]\n\n val callableName = Name.identifier(rawCallableName)\n\n return when {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol\nimport org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.name.FqName\n\n\/**\n * Compared to [resolveToPackageOrClass], does not perform the actual resolve.\n *","completion":"* Instead of it, it just looks for the longest existing package name prefix in the [fqName],\n * and assumes that the rest of the name (if present) is a relative class name.\n *\n * Given that [FqName.ROOT] package is always present in any [FirSymbolProvider],\n * this function **can never fail**.\n *\/<|endoftext|>"} {"prompt":"val version = if (row[\"scenario\"].toString().endsWith(stableKotlinVersions)) {\n stableKotlinVersions\n } else {\n currentKotlinVersion\n }\n row[\"tasks start median time\"] into \"Configuration: $version\"\n row[\"execution median time\"] into \"Execution: $version\"\n }\n }","completion":".rename { col(0) }.into(\"Scenario\")\n .sortBy(\"Scenario\")\n .reorderColumnsBy {\n \/\/ \"Scenario\" column should always be in the first place\n if (it.name() == \"Scenario\") \"0000Scenario\" else it.name()\n }\n .insert(\"Configuration diff from stable release\") {<|endoftext|>"} {"prompt":"val lowerBound = expectedType.asFlexibleType().lowerBound\n val upperBound = expectedType.asFlexibleType().upperBound\n\n \/\/ Use site variance projection is always the same for flexible types\n if (lowerBound.constructor == upperBound.constructor) return\n \/\/ Anything is acceptable for raw types\n if (expectedType.unwrap() is RawTypeImpl) return","completion":"val correspondingSubType = TypeCheckingProcedure.findCorrespondingSupertype(expressionTypeWithSmartCast, lowerBound) ?: return\n\n assert(lowerBound.arguments.size == upperBound.arguments.size) {\n \"Different arguments count in flexible bounds: \" +\n \"($lowerBound(${lowerBound.arguments.size})..$upperBound(${upperBound.arguments.size})\"<|endoftext|>"} {"prompt":"package lib.case2.b\n\n\/\/fun C() : String = \"\"\n\nobject C {\n operator fun invoke() : Int = 1\n}\n\n\/\/ FILE: TestCase3.kt\n\/\/ TESTCASE NUMBER: 3\n\npackage tests.case3\n\nimport lib.case3.b.C as B\nimport lib.case3.a.C as A\n\ninterface I\nclass A : I","completion":"class B : I\n\nfun case3(){\n A()\n A()\n\n A.invoke()<|endoftext|>"} {"prompt":"task.javaOutputDir.set(javaCompileTask.flatMap { it.destinationDirectory })\n task.kotlinCompileDestinationDirectory.set(kotlinCompileTask.flatMap { it.destinationDirectory })\n }\n }\n }\n }\n\n internal fun configureLibraries(\n project: Project,","completion":"kotlinCompileTask: TaskProvider,\n vararg paths: Any\n ) {\n project.whenKaptEnabled {\n val kaptGenerateStubsTaskName = getKaptTaskName(kotlinCompileTask.name, KAPT_GENERATE_STUBS_PREFIX)<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNCHECKED_CAST -UNUSED_EXPRESSION -UNREACHABLE_CODE\n\nfun materialize(): K = null as K\nfun materializeWithGenericArg(x: T): K = null as K","completion":"fun id(x: K): K = null as K\nfun K.idFromReceiver(): K = null as K\nfun K.idFromReceiverWithArg(x: String): K = null as K\n\nfun select(x: S, y: S): S = x\n\nclass Foo {\n fun idFromClassTypeArg(): T = null as T<|endoftext|>"} {"prompt":"}\n\n private fun isDirectlyExternal(declaration: KtDeclaration, descriptor: DeclarationDescriptor): Boolean {\n if (declaration is KtProperty && descriptor is PropertyAccessorDescriptor) return false\n\n return declaration.hasModifier(KtTokens.EXTERNAL_KEYWORD) ||\n AnnotationsUtils.hasAnnotation(descriptor, PredefinedAnnotation.NATIVE)","completion":"}\n\n private fun isPrivateMemberOfExternalClass(descriptor: DeclarationDescriptor): Boolean {\n if (descriptor is PropertyAccessorDescriptor && descriptor.visibility == descriptor.correspondingProperty.visibility) return false\n if (descriptor !is MemberDescriptor || descriptor.visibility != DescriptorVisibilities.PRIVATE) return false<|endoftext|>"} {"prompt":"\/\/ test.kt:22 mightThrow\n\/\/ test.kt:23 mightThrow\n\/\/ test.kt:8 foo\n\/\/ test.kt:9 foo\n\/\/ test.kt:11 foo\n\/\/ test.kt:12 foo\n\/\/ test.kt:26 mightThrow2\n\/\/ test.kt:27 mightThrow2\n\/\/ test.kt:14 foo\n\/\/ test.kt:15 foo\n\/\/ test.kt:11 foo","completion":"\/\/ test.kt:16 foo\n\/\/ test.kt:31 box\n\/\/ test.kt:32 box\n\/\/ test.kt:5 foo\n\/\/ test.kt:6 foo\n\/\/ test.kt:22 mightThrow\n\/\/ test.kt:23 mightThrow\n\/\/ test.kt:8 foo\n\/\/ test.kt:9 foo\n\/\/ test.kt:11 foo\n\/\/ test.kt:12 foo\n\/\/ test.kt:26 mightThrow2<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.util.substitute\nimport org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature\nimport org.jetbrains.org.objectweb.asm.Type\nimport org.jetbrains.org.objectweb.asm.commons.InstructionAdapter\n\nabstract class IntrinsicFunction(","completion":"val expression: IrFunctionAccessExpression,\n val signature: JvmMethodSignature,\n val classCodegen: ClassCodegen,\n val argsTypes: List,\n) {\n abstract fun genInvokeInstruction(v: InstructionAdapter)\n\n open fun invoke(\n v: InstructionAdapter,\n codegen: ExpressionCodegen,\n data: BlockInfo,<|endoftext|>"} {"prompt":"inline class IC(val x: Any)\n\nfun box(): String {\n val k = IC(\"K\")\n return roundtrip(Sam { s -> s + k.x })\n .get(\"O\")\n}\n\nfun roundtrip(x: T): T {\n val out1 = ByteArrayOutputStream()\n ObjectOutputStream(out1).writeObject(x)","completion":"return ObjectInputStream(ByteArrayInputStream(out1.toByteArray())).readObject() as T\n}\n\n\/\/ FILE: Sam.java\nimport java.io.*;\n\npublic interface Sam extends Serializable {\n String get(String s);\n}<|endoftext|>"} {"prompt":"\/\/ Otherwise, we are interested in situation like: `a: Any? = 1 as Int?`\n return TypeUtils.isDontCarePlaceholder(expectedType)\n }\n\n private fun isExactTypeCast(candidateType: KotlinType, targetType: KotlinType): Boolean {\n return candidateType == targetType && candidateType.isExtensionFunctionType == targetType.isExtensionFunctionType\n }","completion":"private fun isUpcast(candidateType: KotlinType, targetType: KotlinType): Boolean {\n if (!KotlinTypeChecker.DEFAULT.isSubtypeOf(candidateType, targetType)) return false\n\n if (candidateType.isFunctionType && targetType.isFunctionType) {\n return candidateType.isExtensionFunctionType == targetType.isExtensionFunctionType\n }<|endoftext|>"} {"prompt":"val x = FirstModuleClass()\n x.externalNotNullMethod()?.foo()\n x.explicitNotNullMethod()?.foo()\n}\n\nfun String.foo() {\n\n}\n\/\/ MODULE: javaModule2","completion":"\/\/ FILE: three\/SecondModuleClass.java\npackage three;\n\nimport org.jetbrains.annotations.NotNull;\n\npublic class SecondModuleClass {\n public static String staticExternalNotNullMethod() {\n return \"\";\n }\n\n @NotNull\n public static String staticExplicitNotNullMethod() {\n return \"\";\n }\n}\n\/\/ FILE: three\/annotations.xml<|endoftext|>"} {"prompt":"assertIsPositiveZero(items.maxOf { it.compareTo(middle) * 0.0 })\n assertIsPositiveZero(items.maxOfOrNull { it.compareTo(middle) * 0.0 }!!)\n }\n \n @Test\n fun minMaxOfFloat() {\n val middle = 2.0","completion":"val items = doubleArrayOf(1.0, 2.0, Double.POSITIVE_INFINITY).apply { shuffle() }\n assertTrue(items.minOf { it.compareTo(middle).toFloat().pow(0.5F) }.isNaN())<|endoftext|>"} {"prompt":"membersBuilder.createPropertyField(parameter, usedNames, forceStatic = false)?.let(result::add)\n }\n\n if (!isInterface) {\n val isCompanion = this.classOrObject.safeAs()?.isCompanion() == true\n for (property in this.classOrObject.declarations.filterIsInstance()) {","completion":"\/\/ All fields for companion object of classes are generated to the containing class\n \/\/ For interfaces, only @JvmField-annotated properties are generated to the containing class\n \/\/ Probably, the same should work for const vals but it doesn't at the moment (see KT-28294)\n if (isCompanion && (containingClass?.isInterface == false || property.isJvmField())) continue<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.services.defaultsProvider\nimport org.jetbrains.kotlin.test.services.moduleStructure\n\nclass CodegenWithFir2IrFakeOverrideGeneratorSuppressor(testServices: TestServices) : AfterAnalysisChecker(testServices) {\n override fun suppressIfNeeded(failedAssertions: List): List {","completion":"return when {\n !mainDirectiveEnabled -> failedAssertions\n suppressDirectiveEnabled ->\n if (failedAssertions.isEmpty())\n listOf(\n AssertionError(\"Looks like this test can be unmuted. Remove $IGNORE_CODEGEN_WITH_FIR2IR_FAKE_OVERRIDE_GENERATION directive.\").wrap()\n )\n else emptyList()<|endoftext|>"} {"prompt":"fun getKotlinClassifier(classId: ClassId) = classifiers[classId] ?: createClassifier(classId)\n\n fun createMockKotlinClassifier(classifier: KtClassOrObject?,\n ktFile: KtFile?,\n classId: ClassId) = MockKotlinClassifier(classId,\n classifier,\n ktFile,","completion":"this,\n javac)\n .apply { classifiers[classId] = this }\n\n fun hasPackage(packageFqName: FqName) = kotlinPackages.contains(packageFqName)\n\n private fun createClassifier(classId: ClassId): JavaClass? {\n kotlinFacadeClasses[classId]?.let {<|endoftext|>"} {"prompt":"* and calculates the next accumulator value.\n * \n * @sample samples.collections.Collections.Aggregates.reduceOrNull\n *\/\n@SinceKotlin(\"1.4\")\n@ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly","completion":"public inline fun UShortArray.reduceOrNull(operation: (acc: UShort, UShort) -> UShort): UShort? {\n if (isEmpty())\n return null\n var accumulator = this[0]\n for (index in 1..lastIndex) {\n accumulator = operation(accumulator, this[index])\n }\n return accumulator\n}\n\n\/**<|endoftext|>"} {"prompt":"* Converts this [Byte] value to [Double].\n *\n * The resulting `Double` value represents the same numerical value as this `Byte`.\n *\/\n @kotlin.internal.IntrinsicConstEvaluation\n @TypedIntrinsic(IntrinsicType.SIGNED_TO_FLOAT)\n public external override fun toDouble(): Double","completion":"@kotlin.internal.IntrinsicConstEvaluation\n @GCUnsafeCall(\"Kotlin_Byte_toString\")\n public external override fun toString(): String\n\n @kotlin.internal.IntrinsicConstEvaluation\n public override fun equals(other: Any?): Boolean =\n other is Byte && kotlin.native.internal.areEqualByValue(this, other)<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_EXPRESSION\n\/\/ SKIP_TXT\n\n\/*\n * KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (NEGATIVE)\n *\n * SECTIONS: dfa\n * NUMBER: 17\n * DESCRIPTION: Raw data flow analysis test\n * HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses\n *\/","completion":"\/*\n * TESTCASE NUMBER: 1\n * ISSUES: KT-28362\n *\/\nfun case_1(x: Any) {\n if (x is Interface1) {\n if (x is Interface2) {\n x<|endoftext|>"} {"prompt":"\/\/A != B is exactly the same as !((A as? Any)?.equals(B) ?: (B === null)) where equals is the method of kotlin.Any.\n\nfun box():String{\n val x = A(true)\n val y = A(true)\n\n if ((x != y) == checkNotEquals(x, y)) {","completion":"if (x.isEqualsCalled && !y.isEqualsCalled)\n return \"OK\"\n }\n return \"NOK\"\n}\n\nfun checkNotEquals(A: Any?, B: Any?): Boolean {\n return !((A as? Any)?.equals(B) ?: (B === null))\n}\n\n\ndata class A(val a: Boolean) {<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER\n\/\/ JSR305_GLOBAL_REPORT: strict\n\n\/\/ FILE: MyNullable.java\nimport javax.annotation.*;\nimport java.lang.annotation.Documented;\nimport java.lang.annotation.Retention;","completion":"import java.lang.annotation.RetentionPolicy;\n\nimport javax.annotation.meta.TypeQualifierNickname;\nimport javax.annotation.meta.When;\n\n@Documented\n@TypeQualifierNickname\n@Nonnull(when = When.NEVER)\n@Retention(RetentionPolicy.RUNTIME)\npublic @interface MyNullable {\n\n}\n\n\/\/ FILE: A.java<|endoftext|>"} {"prompt":"8 -> \"Double\"\n else -> error(\"Real constant with unexpected size of $size.\")\n }\n}.let { Classifier.topLevel(cinteropInternalPackage, \"ConstantValue\").nested(it) }\n\n\/**\n * Returns the original name of the given type.\n *\/\nval StubType.underlyingTypeFqName: String\n get() = when (this) {","completion":"is ClassifierStubType -> classifier.fqName\n is AbbreviatedType -> underlyingType.underlyingTypeFqName\n is FunctionalType -> classifier.fqName\n is TypeParameterType -> name\n }<|endoftext|>"} {"prompt":"val unwind = when (exceptionHandler) {\n ExceptionHandler.Caller -> cleanupLandingpad\n is ExceptionHandler.Local -> exceptionHandler.unwind\n\n ExceptionHandler.None -> {\n \/\/ When calling a function that is not marked as nounwind (can throw an exception),\n \/\/ it is required to specify an unwind label to handle exceptions properly.","completion":"\/\/ Runtime C++ function can be marked as non-throwing using `RUNTIME_NOTHROW`.\n val functionName = llvmCallable.name\n val message =\n \"no exception handler specified when calling function $functionName without nounwind attr\"\n throw IllegalArgumentException(message)\n }\n }\n\n val position = position()\n val endLocation = position?.end<|endoftext|>"} {"prompt":"\"Last parameter type of suspend function must be Continuation, but it is $fqName\"\n }\n suspendParameterType = parameterType\n continue\n }\n }\n val annotations = c.components.annotationLoader.loadTypeAnnotations(parameterType, c.nameResolver)\n\n fun getFunctionTypeParameterName(annotations: List): String? {","completion":"for (annotationWithArgs in annotations) {\n if (annotationWithArgs.classId.asSingleFqName() == StandardNames.FqNames.parameterName) {\n return (annotationWithArgs.args.values.firstOrNull() as? StringValue)?.value\n }\n }\n return null\n }\n\n val parameter = KotlinParameterStubImpl(\n parameterList,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.incremental.storage.saveToFile\nimport org.jetbrains.kotlin.name.ClassId\n\nobject ClasspathSnapshotShrinker {\n\n \/**\n * Shrinks the given classes by retaining only classes that are referenced by the lookup symbols stored in the given [LookupStorage].\n *\/\n fun shrinkClasspath(","completion":"allClasses: List,\n lookupStorage: LookupStorage,\n metrics: MetricsReporter = MetricsReporter()\n ): List {\n val lookupSymbols = metrics.getLookupSymbols {\n lookupStorage.lookupSymbols\n }\n return shrinkClasses(allClasses, lookupSymbols, metrics)<|endoftext|>"} {"prompt":"private fun KotlinTypeMapper.mapTypeSafe(type: KotlinType, forceBoxed: Boolean) = when {\n type.isError -> Type.getObjectType(\"java\/lang\/Object\")\n else -> mapType(type, null, if (forceBoxed) TypeMappingMode.GENERIC_ARGUMENT else TypeMappingMode.DEFAULT)\n }\n\n fun get(","completion":"type: KotlinType,\n asmType: Type,\n context: ParcelSerializerContext,\n forceBoxed: Boolean = false,\n strict: Boolean = false\n ): ParcelSerializer {\n val typeMapper = context.typeMapper\n\n val className = asmType.className<|endoftext|>"} {"prompt":"class X(val ok: String) {\n fun y(): String = ok\n}\n\nfun box(): String {\n val x = X(\"OK\")\n val y = x::y\n return y()\n}\n\n\/\/fun y(): String = \"OK\"\n\/\/\n\/\/fun box(): String {\n\/\/ val y = ::y\n\/\/ return y.invoke()\n\/\/}\n\n\/\/val x = \"OK\"\n\/\/","completion":"\/\/fun box(): String {\n\/\/ val x = ::x\n\/\/ return x.get()\n\/\/}<|endoftext|>"} {"prompt":"\/\/ val _a = atomic(77)\n \/\/ var a: Int by _a\n \/\/ This is the delegate getValue operator of property `a`, which should be transformed to getting the value of the original atomic `_a`\n \/\/ operator fun getValue(thisRef: Any?, property: kotlin.reflect.KProperty<*>) {\n \/\/ return thisRef._a\n \/\/ }","completion":"val dispatchReceiver = expression.getValueArgument(0)?.let {\n if (it.isConstNull()) null else it\n }\n val fieldAccessors = listOf(\n context.buildFieldAccessor(originalField, dispatchReceiver, false),\n context.buildFieldAccessor(originalField, dispatchReceiver, true)\n )\n return buildCall(<|endoftext|>"} {"prompt":"if (a1.toString() != \"@test.A()\") return \"Fail: toString does not correspond to the documentation of java.lang.annotation.Annotation#toString: $a1\"\n\n val a2 = createA.call()\n if (a1 === a2) return \"Fail: instances created by the constructor should be different\"","completion":"if (a1 != a2) return \"Fail: any instance of A should be equal to any other instance of A\"\n if (a1.hashCode() != a2.hashCode()) return \"Fail: hash codes of equal instances should be equal\"<|endoftext|>"} {"prompt":"public actual fun String.toLowerCase(): String = lowercaseImpl()\n\n\/**\n * Returns a copy of this string converted to lower case using Unicode mapping rules of the invariant locale.\n *\n * This function supports one-to-many and many-to-one character mapping,\n * thus the length of the returned string can be different from the length of the original string.\n *\n * @sample samples.text.Strings.lowercase\n *\/","completion":"@SinceKotlin(\"1.5\")\n@WasExperimental(ExperimentalStdlibApi::class)\npublic actual fun String.lowercase(): String = lowercaseImpl()\n\n\/**\n * Returns a [CharArray] containing characters of this string.\n *\/\npublic actual fun String.toCharArray(): CharArray = toCharArray(this, CharArray(length), 0, 0, length)<|endoftext|>"} {"prompt":"implementedAsIntrinsic\n\n@PublishedApi\n@WasmOp(WasmOp.I64_SHR_U)\ninternal fun wasm_i64_shr_u(a: Long, b: Long): Long =\n implementedAsIntrinsic\n\n@WasmOp(WasmOp.I64_ROTL)","completion":"internal fun wasm_i64_rotl(a: Long, b: Long): Long =\n implementedAsIntrinsic\n\n@WasmOp(WasmOp.I64_ROTR)\ninternal fun wasm_i64_rotr(a: Long, b: Long): Long =\n implementedAsIntrinsic\n\n@WasmOp(WasmOp.F32_ADD)<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\nannotation class Ann1\nannotation class Ann2(val x: Int)\n\nclass A {\n @Ann1\n constructor()\n @Ann2\n constructor(x1: Int)\n @Ann2(2)","completion":"constructor(x1: Int, x2: Int)\n}<|endoftext|>"} {"prompt":"is CirTypeAliasType -> computeExpandedType(this).unabbreviate()\n}\n\ninternal tailrec fun computeExpandedType(underlyingType: CirClassOrTypeAliasType): CirClassType {\n return when (underlyingType) {\n is CirClassType -> underlyingType\n is CirTypeAliasType -> computeExpandedType(underlyingType.underlyingType)\n }\n}","completion":"@Suppress(\"unused\", \"NOTHING_TO_INLINE\")\ninternal inline fun CirDeclaration.unsupported(): Nothing = error(\"This method should never be called on ${this::class.java}, $this\")\n\ninternal fun CirClassOrTypeAliasType.withParentArguments(\n parentArguments: List\n): CirClassOrTypeAliasType {<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass)\n}\nfun TestIdenticalValueParameters(arg: UserKlass) {}\n\nclass TestIdenticalValueParametersReverse {","completion":"constructor(arg: UserKlass)\n}\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun TestIdenticalValueParametersReverse(arg: UserKlass) {}\n\nclass TestDifferentlyNamedValueParameters {<|endoftext|>"} {"prompt":"require(x is String)\n x += \"\"\n runWithoutContract {\n x.length\n }\n }\n}\n\nfun test4() {\n var x: Any? = materialize()\n for (i in 1..10) {\n require(x is Int)\n x++\n atLeastOnce {\n x.inc()\n }\n }\n}","completion":"fun test5() {\n var x: Any? = materialize()\n for (i in 1..10) {\n require(x is Int)\n x++\n exactlyOnce {\n x.inc()\n }\n }\n}\n\nfun test6() {\n var x: Any? = materialize()\n for (i in 1..10) {\n require(x is Int)<|endoftext|>"} {"prompt":"val closureCallExports = mutableMapOf()\n val kotlinClosureToJsConverters = mutableMapOf()\n val jsClosureCallers = mutableMapOf()\n val jsToKotlinClosures = mutableMapOf()\n\n val jsModuleAndQualifierReferences =","completion":"mutableSetOf()\n\n override val coroutineSymbols =\n JsCommonCoroutineSymbols(symbolTable, module,this)\n\n override val jsPromiseSymbol: IrClassSymbol?\n get() = if (isWasmJsTarget) wasmSymbols.jsRelatedSymbols.jsPromise else null<|endoftext|>"} {"prompt":"public

void foo(P p) {}\n }\n\n public static class DerivedRaw extends Base {\n public void foo(I1 p) {}\n }\n}\n\n\/\/ FILE: main.kt\ninterface KI1\ninterface KI2\ninterface KI12 : KI1, KI2\n\nopen class KBase {\n open fun

foo()","completion":"where P : KI1, P : KI2 {}\n}\n\nclass KDerived : KBase() {\n override fun

foo()\n where P : KI2, P : KI1 {}\n}\n\n\nfun callJava(derived: Test.Derived, derivedRaw: Test.DerivedRaw, v: Test.I123) {\n derived.foo(v)<|endoftext|>"} {"prompt":"abstract class AbstractParcelBytecodeListingTest : AbstractAsmLikeInstructionListingTest() {\n override fun setupEnvironment(environment: KotlinCoreEnvironment) {\n AndroidComponentRegistrar.registerParcelExtensions(environment.project)\n addAndroidExtensionsRuntimeLibrary(environment)\n environment.updateClasspath(listOf(JvmClasspathRoot(AbstractParcelBoxTest.layoutlibJar)))\n }","completion":"}<|endoftext|>"} {"prompt":"branches.add(IrBranchImpl(leftOperand, constTrue(leftOperand.startOffset, leftOperand.endOffset)))\n branches.add(elseBranch(rightOperand))\n }\n }\n }\n }\n }\n}\n\nval KtSourceElement.isChildOfForLoop: Boolean\n get() =","completion":"if (this is KtPsiSourceElement) psi.parent is KtForExpression\n else treeStructure.getParent(lighterASTNode)?.tokenType == KtNodeTypes.FOR\n\nval KtSourceElement.operationToken: IElementType?\n get() {\n assert(elementType == KtNodeTypes.BINARY_EXPRESSION)<|endoftext|>"} {"prompt":"when (stackValue) {\n is StackValue.Constant -> {\n val value = stackValue.value\n if (value is String && (value.contains(\"\\u0001\") || value.contains(\"\\u0002\"))) {\n items.add(Item.constant(value)) \/\/strings with special symbols generated via bootstrap","completion":"} else if (value is Char && (value == 1.toChar() || value == 2.toChar())) {\n items.add(Item.constant(value.toString())) \/\/strings with special symbols generated via bootstrap\n } else {\n items.add(Item.inlinedConstant(value.toString()))\n }\n return\n }\n TRUE -> {<|endoftext|>"} {"prompt":"if (!eqLF(null, null)) throw Exception()\n}\n\nfun testNull0() {\n if (eqDI(null, 0)) throw Exception()\n if (eqDL(null, 0L)) throw Exception()\n if (eqID(null, 0.0)) throw Exception()\n if (eqLD(null, 0.0)) throw Exception()\n if (eqFI(null, 0)) throw Exception()","completion":"if (eqFL(null, 0L)) throw Exception()\n if (eqIF(null, 0.0F)) throw Exception()\n if (eqLF(null, 0.0F)) throw Exception()\n}\n\nfun test0Null() {\n if (eqDI(0.0, null)) throw Exception()\n if (eqDL(0.0, null)) throw Exception()<|endoftext|>"} {"prompt":"override fun factoryForInvoke(variable: ResolutionCandidate, useExplicitReceiver: Boolean):\n Pair>? {\n if (isRecursiveVariableResolution(variable)) return null\n\n assert(variable.isSuccessful) {\n \"Variable call should be successful: $variable \" +","completion":"\"Descriptor: ${variable.resolvedCall.candidateDescriptor}\"\n }\n val variableCallArgument = createReceiverCallArgument(variable)\n\n val explicitReceiver = kotlinCall.explicitReceiver\n val callForInvoke = if (useExplicitReceiver && explicitReceiver != null) {<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\/\/ IGNORE_BACKEND: JVM\n\/\/ WORKS_WHEN_VALUE_CLASS\n\/\/ LANGUAGE: +ValueClasses\n\nabstract class C {\n fun foo(v: T?, x: (T) -> Any?) = v?.let { x(it) }\n}\n\nOPTIONAL_JVM_INLINE_ANNOTATION","completion":"value class V(val value: Any?)\n\nclass D : C()\n\nfun box() = D().foo(V(\"OK\")) { it.value } as String<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.symbols.impl.IrAnonymousInitializerSymbolImpl\nimport org.jetbrains.kotlin.ir.util.isFileClass\nimport org.jetbrains.kotlin.ir.util.parentAsClass\nimport org.jetbrains.kotlin.ir.util.remapReceiver","completion":"import org.jetbrains.kotlin.ir.util.transformDeclarationsFlat\nimport org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid\n\n@PhaseDescription(\n name = \"SingletonOrConstantDelegation\",\n description = \"Optimize `val x by ConstOrSingleton`: there is no need to store the value in a field\"\n)<|endoftext|>"} {"prompt":"fun foo(s: String, f: (String)->Int) = f(s)\nfun foo(a: Any, f: (Any)->Int) = f(a)\n\/\/appropriate function\nfun foo(i: Int, f: (Int)->Int) = f(i)\n\nfun test() {\n foo(1) { x1: Int ->\n foo(2) { x2: Int ->","completion":"foo(3) { x3: Int ->\n foo(4) { x4: Int ->\n foo(5) { x5: Int ->\n x1 + x2 + x3 + x4 + x5 + A.iii\n }\n }\n }\n }\n }\n}<|endoftext|>"} {"prompt":"fun inline() = inlineFunction(callSite, callee, callee.originalFunction, true)\n\n private fun E.copy(): E {\n @Suppress(\"UNCHECKED_CAST\")\n return copyIrElement.copy(this) as E\n }\n\n private fun inlineFunction(\n callSite: IrFunctionAccessExpression,\n callee: IrFunction,","completion":"originalInlinedElement: IrElement,\n performRecursiveInline: Boolean\n ): IrReturnableBlock {\n val copiedCallee = callee.copy().apply {\n parent = callee.parent\n if (performRecursiveInline) {\n body?.transformChildrenVoid()\n valueParameters.forEachIndexed { index, param -><|endoftext|>"} {"prompt":"\/\/ MODULE: m1-common\n\/\/ FILE: common.kt\nexpect interface Foo {\n fun foo(p: Int = 1)\n}\n\n\/\/ MODULE: m2-jvm()()(m1-common)","completion":"\/\/ FILE: jvm.kt\ninterface Base1 {\n fun foo(p: Int)\n}\n\ninterface Base2 {\n fun foo(p: Int)\n}\n\n@Suppress(\"ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_SUPERTYPES_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING\")<|endoftext|>"} {"prompt":"baz1LambdaVar\\4$iv:int=1:int, baz1Param\\5$iv:int=2:int, $i$f$baz1\\5\\60:int=0:int, baz1Var\\5$iv:int=3:int","completion":"\/\/ library.kt:35 box: mainVar:int=1:int, fooParam$iv:int=1:int, $i$f$foo:int=0:int, fooVar$iv:int=1:int, bazParam\\1$iv:int=1:int, $i$f$baz\\1\\7:int=0:int, bazVar\\1$iv:int=3:int,<|endoftext|>"} {"prompt":"@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly\npublic inline operator fun kotlin.UByteArray.component4(): kotlin.UByte\n\n@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes","completion":"@kotlin.internal.InlineOnly\npublic inline operator fun kotlin.UIntArray.component4(): kotlin.UInt\n\n@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly\npublic inline operator fun kotlin.ULongArray.component4(): kotlin.ULong<|endoftext|>"} {"prompt":"assertTrue(moduleFiles.size == 1, \"Multiple .module files in $publicationDirectory: $moduleFiles\")\n\n val moduleFile = moduleFiles.single()\n val moduleFileText = moduleFile.readText()\n assertTrue(\"AgpVersionAttr\" !in moduleFileText, \".module file $moduleFile leaks AgpVersionAttr\")\n }\n }\n }\n }","completion":"\/\/ TODO: improve it via KT-63409\n @DisplayName(\"produced artifacts are consumable by projects with various AGP versions\")\n @GradleAndroidTest\n fun testAndroidMultiplatformPublicationAGPCompatibility(\n gradleVersion: GradleVersion,\n agpVersion: String,\n jdkVersion: JdkVersions.ProvidedJdk,\n @TempDir tempDir: Path\n ) {<|endoftext|>"} {"prompt":"open class B1 {\n constructor(x: Int = 1)\n constructor()\n}\n\nclass A1 : B1 {\n constructor()\n constructor(x: Int) : super()\n}\n\n\/\/ --------------------------\n\nopen class B2 {\n constructor(x: Int)\n constructor(x: String)\n}\n\nclass A2 : B2 {","completion":"constructor()\n constructor(x: Int) : super()\n}\n\n\/\/ --------------------------\n\nopen class B3 {\n private constructor()\n}\n\nclass A3 : B3 {<|endoftext|>"} {"prompt":"get() = modality == Modality.FINAL && kind != ClassKind.ENUM_CLASS\n\nval IrTypeParametersContainer.classIfConstructor get() = if (this is IrConstructor) parentAsClass else this\n\nfun IrValueParameter.copyTo(\n irFunction: IrFunction,\n origin: IrDeclarationOrigin = this.origin,\n index: Int = this.index,","completion":"startOffset: Int = this.startOffset,\n endOffset: Int = this.endOffset,\n name: Name = this.name,\n remapTypeMap: Map = mapOf(),\n type: IrType = this.type.remapTypeParameters(\n (parent as IrTypeParametersContainer).classIfConstructor,\n irFunction.classIfConstructor,<|endoftext|>"} {"prompt":"configurations.forEach { configuration ->\n configuration.incoming.beforeResolve {\n println(\"Resolving ${'$'}configuration\")\n if (!ready) {\n throw ${if (kts) \"\" else \"new\"} GradleException(\"${'$'}configuration is being resolved at configuration time\")\n }\n }\n }\n }\n \/\/ KT-45834 end","completion":"\"\"\".trimIndent()\n )\n\n build(\n \"assemble\",\n \"-m\"\n )\n }\n}<|endoftext|>"} {"prompt":"val functionExpr = expression.findSamFunctionExpr()\n if (functionExpr != null && expression.typeOperand.isComposableFunInterface()) {\n val argument = functionExpr.transform(this, null) as IrFunctionExpression\n val superType = expression.typeOperand\n val superClass = superType.classOrNull ?: error(\"Expected non-null class\")\n return FunctionReferenceBuilder(","completion":"argument,\n superClass,\n superType,\n currentDeclarationParent!!,\n context,\n currentScope!!.scope.scopeOwnerSymbol,\n IrTypeSystemContextImpl(context.irBuiltIns)\n ).build()\n }\n return super.visitTypeOperator(expression)\n }\n}\n\nprivate fun IrType.isComposableFunInterface(): Boolean =\n classOrNull<|endoftext|>"} {"prompt":"ExpectedData(0xa927ed8b2bf09bb6UL, 0x6e65ec14a8fb565UL, 0x34bff6f2ee5a7f79UL, 0x2e329a5be2c011bUL, 0x73161c93331b14f9UL),","completion":"ExpectedData(0x8d25746414aedf28UL, 0x379f76458a3c8957UL, 0x79dd080f9843af77UL, 0xc46f0a7847f60c1dUL, 0xaf1579c5797703ccUL),<|endoftext|>"} {"prompt":"if (dispatchReceiver.hasUnsignedType() || extensionReceiver.hasUnsignedType()) return true\n if ((0 until this.valueArgumentsCount).any { getValueArgument(it)?.type?.isUnsigned() == true }) return true\n return false\n }\n }","completion":"class OnlyIntrinsicConst(private val isFloatingPointOptimizationDisabled: Boolean = false) : EvaluationMode() {\n override fun canEvaluateFunction(function: IrFunction): Boolean {\n if (isFloatingPointOptimizationDisabled && function.isFloatingPointOperation()) return false<|endoftext|>"} {"prompt":"}\n\n\/\/ FILE: 2.kt\n\nimport test.*\n\n\nfun box(): String {\n\n val z = 1;\n\n val p = z[2, { 3 }]\n if (p != 106) return \"fail 1: $p\"\n\n val captured = 3;\n z[2, { captured } ] = p\n if (res != 112) return \"fail 2: $res\"","completion":"return \"OK\"\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.cli.jvm.compiler\n\nimport com.intellij.openapi.vfs.VirtualFile\nimport com.intellij.psi.search.GlobalSearchScope\nimport com.intellij.util.SmartList\nimport org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation","completion":"import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.ERROR\nimport org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.LOGGING\nimport org.jetbrains.kotlin.cli.common.messages.MessageCollector\nimport org.jetbrains.kotlin.cli.jvm.index.JavaRoot<|endoftext|>"} {"prompt":"@kotlin.internal.IntrinsicConstEvaluation\n public open override fun toChar(): kotlin.Char\n\n @kotlin.internal.IntrinsicConstEvaluation\n public open override fun toDouble(): kotlin.Double\n\n @kotlin.internal.IntrinsicConstEvaluation\n public open override fun toFloat(): kotlin.Float","completion":"@kotlin.internal.IntrinsicConstEvaluation\n public open override fun toInt(): kotlin.Int\n\n @kotlin.internal.IntrinsicConstEvaluation\n public open override fun toLong(): kotlin.Long\n\n @kotlin.internal.IntrinsicConstEvaluation\n public open override fun toShort(): kotlin.Short<|endoftext|>"} {"prompt":"private fun IrElement.toSourceElement(containingIrFile: IrFile) =\n (PsiSourceManager.findPsiElement(this, containingIrFile)?.let(::KtRealPsiSourceElement)\n ?: sourceElement())\n\n override fun at(irElement: IrElement, containingIrDeclaration: IrDeclaration): DiagnosticContextImpl =\n at(irElement, containingIrDeclaration.file)","completion":"override fun at(irDeclaration: IrDeclaration): DiagnosticContextImpl =\n at(irDeclaration, irDeclaration.file)\n\n override fun at(irElement: IrElement, containingIrFile: IrFile): DiagnosticContextImpl =\n at(irElement.toSourceElement(containingIrFile), irElement, containingIrFile)\n\n override fun at(<|endoftext|>"} {"prompt":"check(js(\"Number\"), 23)\n check(js(\"Number\"), 23.0F)\n check(js(\"Number\"), 23.0)\n\n assertEquals(\"Long\", Long::class.simpleName)\n assertEquals(\"Long\", 23L::class.simpleName)\n if (testUtils.isLegacyBackend()) {\n assertEquals(\"BoxedChar\", Char::class.simpleName)","completion":"assertEquals(\"BoxedChar\", '@'::class.simpleName)\n } else {\n assertEquals(\"Char\", Char::class.simpleName)\n assertEquals(\"Char\", '@'::class.simpleName)\n }\n assertEquals(\"RuntimeException\", RuntimeException::class.simpleName)\n assertEquals(\"RuntimeException\", RuntimeException()::class.simpleName)<|endoftext|>"} {"prompt":"suspend fun test() = bar().s.x\n}\n\nfun Int.toBoxResult() =\n if (this == 42) \"OK\" else toString()\n\nfun box(): String {\n builder {\n Test1().test().toBoxResult()\n }\n c?.resumeWithException(IllegalStateException(\"OK\"))\n\n if (result != \"OK\") return \"FAIL 1 $result\"","completion":"result = \"FAIL2\"\n\n builder {\n Test2().test().toBoxResult()\n }\n c?.resumeWithException(IllegalStateException(\"OK\"))\n\n if (result != \"OK\") return \"FAIL 2 $result\"\n\n result = \"FAIL 3\"\n\n builder {\n Test3().test().toBoxResult()\n }<|endoftext|>"} {"prompt":"\/\/ !OPT_IN: kotlin.contracts.ExperimentalContracts\n\n\/*\n * KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)\n *\n * SECTIONS: contracts, analysis, smartcasts\n * NUMBER: 9\n * DESCRIPTION: Smartcast using complex condition with some contract functions (Returns effect).\n * HELPERS: typesProvider, contractFunctions\n *\/\n\n\/\/ FILE: contracts.kt","completion":"package contracts\n\nimport kotlin.contracts.*\n\n\/\/ TESTCASE NUMBER: 4\nfun T?.case_4(): Boolean {\n contract { returns(true) implies (this@case_4 != null) }\n return this@case_4 != null\n}\nfun T?.case_4_1(): Boolean {<|endoftext|>"} {"prompt":"Checks(listOf(INC, DEC), MemberOrExtension) {\n val receiver = dispatchReceiverParameter ?: extensionReceiverParameter\n ensure(receiver != null && ((returnType?.isSubtypeOf(receiver.type) ?: false) || incDecCheckForExpectClass(receiver))) {\n \"receiver must be a supertype of the return type\"\n }\n },","completion":"Checks(ASSIGNMENT_OPERATIONS, MemberOrExtension, ReturnsUnit, SingleValueParameter, NoDefaultAndVarargsCheck),\n Checks(COMPONENT_REGEX, MemberOrExtension, NoValueParameters)\n )\n\n \/**\n * See KT-49714\n * Workaround for mismatching types of an implicit dispatch receiver inside an `expect` class<|endoftext|>"} {"prompt":"public interface Function11 : Function {\n \/** Invokes the function with the specified arguments. *\/","completion":"public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11): R\n}\n\/** A function that takes 12 arguments. *\/<|endoftext|>"} {"prompt":"}\n\n extractAnnotations().takeIf { it.isNotEmpty() }?.let { state.rememberAnnotations(it) }\n\n for (index in 0 until argumentsCount()) {\n val type = getArgument(index)\n \/\/skip in\/out variance for now it's not clear should type annotations on wildcard bound be supported or not","completion":"if (type.getVariance() == TypeVariance.INV) {\n when {\n this@gatherTypeAnnotations.isArrayOrNullableArray() -> type.getType().process(\"[\")\n else -> type.getType().process(\"$index;\")\n }\n }\n }\n }\n }\n\n fun KotlinTypeMarker.process(step: String) {<|endoftext|>"} {"prompt":"@JvmField\n val COMPOSABLE_SUSPEND_FUN =\n DiagnosticFactory0.create(\n Severity.ERROR\n )\n\n @JvmField\n val ABSTRACT_COMPOSABLE_DEFAULT_PARAMETER_VALUE =\n DiagnosticFactory0.create(\n Severity.ERROR\n )","completion":"@JvmField\n val COMPOSABLE_FUN_MAIN =\n DiagnosticFactory0.create(\n Severity.ERROR\n )\n\n @JvmField\n val CAPTURED_COMPOSABLE_INVOCATION =\n DiagnosticFactory2.create(\n Severity.ERROR\n )<|endoftext|>"} {"prompt":"when (val kind = element.kind) {\n is PropertyStub.Kind.Constant -> {\n out(\"${modality}const val $header = ${renderValueUsage(kind.constant)}\")\n }\n is PropertyStub.Kind.Val -> {\n val shouldWriteInline = kind.getter.let {","completion":"(it is PropertyAccessor.Getter.SimpleGetter && it.constant != null)\n \/\/ We should render access to constructor parameter inline.\n \/\/ Otherwise, it may be access to the property itself. (val f: Any get() = f)\n || it is PropertyAccessor.Getter.GetConstructorParameter\n }\n if (shouldWriteInline) {<|endoftext|>"} {"prompt":"isStandaloneTest -> Unit\n file.packageFqName.startsWith(StandardNames.BUILT_INS_PACKAGE_NAME) -> {\n \/\/ We can't fully patch packages for tests containing source code in any of kotlin.* packages.\n \/\/ So, such tests should be run in standalone mode to avoid possible signature clashes with other tests.\n isStandaloneTest = true\n }","completion":"else -> super.visitKtFile(file)\n }\n })\n }\n\n isStandaloneTest\n }\n\n \/**\n * For every Kotlin file (*.kt) stored in this text:\n *\n * - If there is a \"package\" declaration, patch it to prepend unique package prefix.<|endoftext|>"} {"prompt":"*\/\npublic actual interface KProperty : KCallable\n\npublic actual interface KProperty0 : kotlin.reflect.KProperty, () -> V {\n\n public actual fun get(): V\n\n public override abstract operator fun invoke(): V\n}","completion":"public actual interface KProperty1 : kotlin.reflect.KProperty, (T) -> V {\n public actual fun get(receiver: T): V\n\n public override operator fun invoke(p1: T): V\n}\n\npublic actual interface KProperty2 : kotlin.reflect.KProperty, (D, E) -> V {<|endoftext|>"} {"prompt":"initializer = initializer?.transform(transformer, data)\n return this\n }\n\n override fun transformDelegate(transformer: FirTransformer, data: D): FirEnumEntryImpl {\n return this\n }\n\n override fun transformGetter(transformer: FirTransformer, data: D): FirEnumEntryImpl {\n return this","completion":"}\n\n override fun transformSetter(transformer: FirTransformer, data: D): FirEnumEntryImpl {\n return this\n }\n\n override fun transformBackingField(transformer: FirTransformer, data: D): FirEnumEntryImpl {\n backingField = backingField?.transform(transformer, data)\n return this\n }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.backend.jvm.lower\n\nimport org.jetbrains.kotlin.backend.common.phaser.PhaseDescription\nimport org.jetbrains.kotlin.backend.jvm.JvmBackendContext\nimport org.jetbrains.kotlin.ir.declarations.IrFile","completion":"import org.jetbrains.kotlin.ir.inline.FunctionInlining\n\n@PhaseDescription(\n name = \"FunctionInliningPhase\",\n description = \"Perform function inlining\",\n prerequisite = [JvmExpectDeclarationRemover::class]\n)\nclass JvmIrInliner(context: JvmBackendContext) : FunctionInlining(\n context,<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.konan.target\n\ninterface TargetManager {\n val target: KonanTarget\n val targetName: String\n fun list()\n}\n\ninternal class TargetManagerImpl(val userRequest: String?, val hostManager: HostManager) : TargetManager {\n override val target = determineCurrent()\n override val targetName\n get() = target.visibleName","completion":"override fun list() {\n hostManager.enabled.forEach {\n val isDefault = if (it == target) \" (default)\" else \"\"\n val isDeprecated = if (it in KonanTarget.deprecatedTargets) \" (deprecated)\" else \"\"\n println(\"${it.visibleName}$isDefault$isDeprecated\")\n }\n }\n\n private fun determineCurrent(): KonanTarget {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.types.ConeKotlinType\nimport org.jetbrains.kotlin.fir.visitors.FirTransformer\nimport org.jetbrains.kotlin.fir.visitors.FirVisitor\nimport org.jetbrains.kotlin.name.Name\n\n\/**","completion":"* Generated from: [org.jetbrains.kotlin.fir.tree.generator.FirTreeBuilder.incrementDecrementExpression]\n *\/\nabstract class FirIncrementDecrementExpression : FirExpression() {\n abstract override val source: KtSourceElement?\n @UnresolvedExpressionTypeAccess\n abstract override val coneTypeOrNull: ConeKotlinType?<|endoftext|>"} {"prompt":"package kotlin.collections\n\nimport kotlin.native.concurrent.isFrozen\nimport kotlin.native.FreezingIsDeprecated\n\n@OptIn(FreezingIsDeprecated::class)\npublic actual class HashMap private constructor(\n \/\/ keys in insert order\n private var keysArray: Array,","completion":"\/\/ values in insert order, allocated only when actually used, always null in pure HashSet\n private var valuesArray: Array?,\n \/\/ hash of a key by its index, -1 if a key at that index was removed\n private var presenceArray: IntArray,\n \/\/ (index + 1) of a key by its hash, 0 if there is no key with that hash, -1 if collision chain continues to the hash-1<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.renderer.types.renderers.KtFunctionalTypeRenderer\nimport org.jetbrains.kotlin.analysis.api.renderer.types.renderers.KtUsualClassTypeRenderer\nimport org.jetbrains.kotlin.analysis.api.symbols.*","completion":"import org.jetbrains.kotlin.analysis.api.symbols.markers.KtSymbolWithTypeParameters\nimport org.jetbrains.kotlin.analysis.api.symbols.pointers.KtPsiBasedSymbolPointer\nimport org.jetbrains.kotlin.analysis.api.symbols.pointers.KtSymbolPointer<|endoftext|>"} {"prompt":"is KtNamedDeclaration -> element.nameIdentifier\n is KtFile -> element.packageDirective!!.nameIdentifier\n else -> null\n }\n\n if (nameIdentifier == null && element is KtObjectDeclaration) return DEFAULT.mark(element)\n\n return markElement(nameIdentifier ?: element)\n }\n }\n\n @JvmField","completion":"val FOR_UNRESOLVED_REFERENCE: PositioningStrategy = object : PositioningStrategy() {\n override fun mark(element: KtReferenceExpression): List {\n if (element is KtArrayAccessExpression) {\n val ranges = element.bracketRanges\n if (!ranges.isEmpty()) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver\nimport org.jetbrains.kotlin.types.*\nimport org.jetbrains.kotlin.types.TypeUtils.DONT_CARE\nimport org.jetbrains.kotlin.types.expressions.ControlStructureTypingUtils.ResolveConstruct","completion":"import org.jetbrains.kotlin.types.expressions.ExpressionTypingUtils\nimport org.jetbrains.kotlin.types.typeUtil.makeNullable\n\nval SPECIAL_FUNCTION_NAMES = ResolveConstruct.entries.map { it.specialFunctionName }.toSet()\n\nclass GenericCandidateResolver(\n private val argumentTypeResolver: ArgumentTypeResolver,<|endoftext|>"} {"prompt":"ExpectedData(0x4182832b52d63735UL, 0x7ebc034235bc122fUL, 0xd9a7783d4edd8049UL, 0x5f8b04a15ae42361UL, 0xfc193363336453ddUL),","completion":"ExpectedData(0xd6cdae892584a2cbUL, 0x9e4ea5a4941e097dUL, 0x547e048d5a9daabaUL, 0xeb6ecbb0b831d185UL, 0xe0168df5fad0c670UL),<|endoftext|>"} {"prompt":"cBodyLines += \"return ${bridgedToC(cBridgeCall)};\"\n }\n}\n\nprivate class TrivialValuePassing(val kotlinType: IrType, override val cType: CType) : SimpleValuePassing() {\n override val kotlinBridgeType: IrType\n get() = kotlinType\n override val cBridgeType: CType","completion":"get() = cType\n\n override fun IrBuilderWithScope.kotlinToBridged(expression: IrExpression): IrExpression = expression\n override fun IrBuilderWithScope.bridgedToKotlin(expression: IrExpression, symbols: KonanSymbols): IrExpression = expression\n override fun bridgedToC(expression: String): String = expression<|endoftext|>"} {"prompt":"var isAnyMarkedNullable = currentSubtype.isMarkedNullable\n\n var currentPathNode = lastPathNode.previous\n\n while (currentPathNode != null) {\n val currentType = currentPathNode.type\n substituted = if (currentType.arguments.any { it.projectionKind != Variance.INVARIANT }) {","completion":"TypeConstructorSubstitution.create(currentType)\n .wrapWithCapturingSubstitution().buildSubstitutor()\n .safeSubstitute(substituted, Variance.INVARIANT)\n .approximate()\n }\n else {\n TypeConstructorSubstitution.create(currentType)\n .buildSubstitutor()<|endoftext|>"} {"prompt":"\/\/ Note that the case of an \"actual class\" works as expected though, because the actual class by definition has the same FQ name\n \/\/ as the corresponding expected class, so their type constructors are equal as per AbstractClassTypeConstructor#equals\n private fun isExpectedClassAndActualTypeAlias(\n expectedTypeConstructor: TypeConstructor,\n actualTypeConstructor: TypeConstructor,","completion":"platformModule: ModuleDescriptor\n ): Boolean {\n val expected = expectedTypeConstructor.declarationDescriptor\n val actual = actualTypeConstructor.declarationDescriptor\n return expected is ClassifierDescriptorWithTypeParameters &&\n expected.isExpect &&\n actual is ClassifierDescriptorWithTypeParameters &&<|endoftext|>"} {"prompt":"value class B1(val x: B1, val y: B1)\n\n\n@JvmInline\nvalue class A2(val x: B2)","completion":"@JvmInline\nvalue class B2(val x: A2, val y: A2)\n\n\n@JvmInline<|endoftext|>"} {"prompt":"entityB = entitiesB.singleOrNull(),\n entityKind = entityKind,\n entityKey = entityKey,\n entitiesComparator = entitiesComparator\n )\n }\n )\n }\n\n private fun compareRepetitiveEntityLists(\n entityListA: List,\n entityListB: List,","completion":"groupingKeySelector: (index: Int, E) -> String,\n groupedEntityListsComparator: (entityKey: String, List, List) -> Unit\n ) {\n val filteredEntityListA: List = entityListA.filter(config::shouldCheckDeclaration)\n val filteredEntityListB: List = entityListB.filter(config::shouldCheckDeclaration)<|endoftext|>"} {"prompt":"\/\/ test.kt:7 id: obj:java.lang.Object=java.lang.Integer","completion":"\/\/ test.kt:11 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1, $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$baz:int=0:int, $i$f$bar:int=0:int,<|endoftext|>"} {"prompt":"val lam9: () -> DPoint = { throw DataClassException(9) }\n val lam10: () -> Unit = { throw DataClassException(10 to dPoint) }\n val lam11: () -> DPoint = { throw DataClassException(11) }\n val lam12: () -> Unit = { throw DataClassException(12 to dPoint) }","completion":"val lam13: () -> DPoint = { throw DataClassException(13) }\n val lam14: () -> Unit = { throw DataClassException(14 to dPoint) }\n val lam15: () -> DPoint = { throw DataClassException(15) }\n val lam16: () -> Unit = { throw DataClassException(16 to dPoint) }<|endoftext|>"} {"prompt":"if (z != null) z.propT\n\n if (z != null) z.propAny","completion":"if (z != null) z.propNullableT\n\n if (z != null) z.propNullableAny<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.descriptors.symbols.calculateHashCode\nimport org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.base.toKtType\nimport org.jetbrains.kotlin.analysis.api.descriptors.symbols.isEqualTo","completion":"import org.jetbrains.kotlin.analysis.api.descriptors.symbols.pointers.KtFe10NeverRestoringSymbolPointer\nimport org.jetbrains.kotlin.analysis.api.descriptors.symbols.psiBased.base.KtFe10PsiSymbol<|endoftext|>"} {"prompt":"NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP.mapTo(mutableSetOf()) { (signatureAndName, jdkName) ->\n signatureAndName.copy(name = jdkName).signature\n }","completion":"val ORIGINAL_SHORT_NAMES: Set = NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP.keys.mapTo(HashSet()) { it.name }\n\n val JVM_SHORT_NAME_TO_BUILTIN_SHORT_NAMES_MAP: Map =<|endoftext|>"} {"prompt":"internal class ExposedReceiverTypeImpl(\n override val elementVisibility: EffectiveVisibility,\n override val restrictingDeclaration: KtSymbol,\n override val restrictingVisibility: EffectiveVisibility,\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.ExposedReceiverType\n\ninternal class ExposedPropertyTypeImpl(\n override val elementVisibility: EffectiveVisibility,\n override val restrictingDeclaration: KtSymbol,\n override val restrictingVisibility: EffectiveVisibility,<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.signatureSubstitution\n\nimport kotlinx.collections.immutable.PersistentList\nimport kotlinx.collections.immutable.persistentListOf\nimport org.jetbrains.kotlin.analysis.api.KtAnalysisSession","completion":"import org.jetbrains.kotlin.analysis.api.components.buildClassType\nimport org.jetbrains.kotlin.analysis.api.components.buildSubstitutor\nimport org.jetbrains.kotlin.analysis.api.signatures.KtFunctionLikeSignature\nimport org.jetbrains.kotlin.analysis.api.signatures.KtVariableLikeSignature<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1287\npackage foo\n\nfun box(): String {\n var c = 2\n\n while (fizz(c) % 2 == 0 || buzz(c) % 3 == 0) {\n if (c > 4) throw Exception(\"Timeout!\")\n c++\n }","completion":"assertEquals(\"fizz(2);fizz(3);buzz(3);fizz(4);fizz(5);buzz(5);\", pullLog())\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"internal fun KtElementImplStub<*>.getAllModifierLists(): Array =\n getStubOrPsiChildren(KtStubElementTypes.MODIFIER_LIST, KtStubElementTypes.MODIFIER_LIST.arrayFactory)\n\n \/\/ TODO: remove this method and its usages in 1.4","completion":"private fun checkNonParenthesizedAnnotationsOnFunctionalType(\n typeElement: KtFunctionType,\n annotationEntries: List,\n trace: BindingTrace\n ) {\n val lastAnnotationEntry = annotationEntries.lastOrNull()\n val isAnnotationsGroupedUsingBrackets =<|endoftext|>"} {"prompt":"val otherFiles = absoluteFiles(\"test\/other\/file.xml\", \"some\/other\/baddir\")\n\n addDependency(\n JpsJavaDependencyScope.COMPILE,\n listOf(findModule(\"module\")),\n false,\n \"LibraryWithBadRoots\",\n *(filesToBeReported + otherFiles),\n )\n\n val result = buildAllModules()","completion":"result.assertSuccessful()\n\n val actualWarnings = result.getMessages(BuildMessage.Kind.WARNING).map { it.messageText }\n val expectedWarnings = filesToBeReported.map { \"Classpath entry points to a non-existent location: $it\" }\n\n val expectedText = expectedWarnings.sorted().joinToString(\"\\n\")<|endoftext|>"} {"prompt":"x ?: 1\n x!!\n \"\"\n }\n val ret3 = build3 {\n emit(1)","completion":"get()?.equals(\"\")\n val x = get()\n x?.equals(\"\")<|endoftext|>"} {"prompt":"}\n\n object EnumEntry : DescriptorKindExclude() {\n override fun excludes(descriptor: DeclarationDescriptor)\n = descriptor is ClassDescriptor && descriptor.kind == ClassKind.ENUM_ENTRY\n\n override val fullyExcludedDescriptorKinds: Int get() = 0\n }\n\n object TopLevelPackages : DescriptorKindExclude() {","completion":"override fun excludes(descriptor: DeclarationDescriptor): Boolean {\n val fqName = when (descriptor) {\n is PackageFragmentDescriptor -> descriptor.fqName\n is PackageViewDescriptor -> descriptor.fqName\n else -> return false\n }\n return fqName.parent().isRoot\n }<|endoftext|>"} {"prompt":"override val incompatibilityType: ExpectActualAnnotationsIncompatibilityType,\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,\n) : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.ActualAnnotationsNotMatchExpect","completion":"internal class OptionalDeclarationOutsideOfAnnotationEntryImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,\n) : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.OptionalDeclarationOutsideOfAnnotationEntry\n\ninternal class OptionalDeclarationUsageInNonCommonSourceImpl(<|endoftext|>"} {"prompt":"p_h = u + v\n p_h = doubleSetWord(d = p_h, lo = 0)\n p_l = v - (p_h - u)\n z_h = cp_h * p_h \/* cp_h+cp_l = 2\/(3*log2) *\/","completion":"z_l = cp_l * p_h + p_l * cp + dp_l[k]\n \/* log2(ax) = (ss+..)*2\/(3*log2) = n + dp_h + z_h + z_l *\/\n t = n.toDouble()\n t1 = (((z_h + z_l) + dp_h[k]) + t)<|endoftext|>"} {"prompt":"model(\"incremental\/invalidation\/\", pattern = \"^([^_](.+))$\", targetBackend = TargetBackend.JS_IR, recursive = false)\n }\n\n testClass {","completion":"model(\"incremental\/invalidation\/\", pattern = \"^([^_](.+))$\", targetBackend = TargetBackend.JS_IR_ES6, recursive = false)\n }\n\n testClass {<|endoftext|>"} {"prompt":"\/\/ NOTE: the unstable mask is indexed by valueParameter index, which is different\n \/\/ than the slotIndex but that is OKAY because we only care about defaults, which\n \/\/ also use the value parameter index.\n val realParams = declaration.valueParameters.take(\n declaration.contextReceiverParametersCount + scope.realValueParamCount\n )\n val unstableMask = realParams.map {","completion":"stabilityInferencer.stabilityOf((it.varargElementType ?: it.type)).knownUnstable()\n }.toBooleanArray()\n\n val hasAnyUnstableParams = unstableMask.any { it }\n\n \/\/ If we aren't in strong skipping mode and\n \/\/ if there are unstable params, then we fence the whole expression with a check to<|endoftext|>"} {"prompt":"if (this.w != null) w.funNullableAny()\n if (this.w != null) w","completion":"if (w != null || this.w != null) w.equals(null)<|endoftext|>"} {"prompt":"* Computes the logarithm of the value [x] to the given [base].\n *\n * Special cases:\n * - `log(x, b)` is `NaN` if either `x` or `b` are `NaN`\n * - `log(x, b)` is `NaN` when `x < 0` or `b <= 0` or `b == 1.0`","completion":"* - `log(+Inf, +Inf)` is `NaN`\n * - `log(+Inf, b)` is `+Inf` for `b > 1` and `-Inf` for `b < 1`\n * - `log(0.0, b)` is `-Inf` for `b > 1` and `+Inf` for `b > 1`\n *<|endoftext|>"} {"prompt":"* SPEC VERSION: 0.1-218\n * MAIN LINK: expressions, try-expression -> paragraph 1 -> sentence 3\n * PRIMARY LINKS: expressions, try-expression -> paragraph 1 -> sentence 2\n * NUMBER: 1\n * DESCRIPTION: try-expression has to start with a try body and continue with zero ore more catch blocks\n *\/\nfun throwException(): Nothing = throw Exception()\n\n\/\/ TESTCASE NUMBER: 1","completion":"fun case1() {\n try {\n val a = \"\"\n } catch (e: Exception) {\n }\n}\n\n\/\/ TESTCASE NUMBER: 2\n\nfun case2() {\n try {\n val a = \"\"\n throwException()\n } catch (e: IllegalArgumentException) {\n } catch (e: ExcA) {\n } catch (e: ExcB) {<|endoftext|>"} {"prompt":"val simpleFunction = expression.symbol.owner\n val property = simpleFunction.correspondingPropertySymbol?.owner ?: return super.visitCall(expression)\n expression.transformChildrenVoid()\n\n if (shouldSubstituteAccessorWithField(property, simpleFunction) ||\n isDefaultAccessorForCompanionPropertyBackingFieldOnCurrentClass(property, simpleFunction)\n ) {","completion":"backendContext.createIrBuilder(currentScope!!.scope.scopeOwnerSymbol, expression.startOffset, expression.endOffset).apply {\n return when (simpleFunction) {\n property.getter -> substituteGetter(property, expression)\n property.setter -> substituteSetter(property, expression)\n else -> error(\"Orphaned property getter\/setter: ${simpleFunction.render()}\")\n }<|endoftext|>"} {"prompt":"* @sample samples.collections.Collections.Transformations.flatMapIndexed\n *\/\n@SinceKotlin(\"1.4\")\n@OptIn(kotlin.experimental.ExperimentalTypeInference::class)\n@OverloadResolutionByLambdaReturnType\n@kotlin.jvm.JvmName(\"flatMapIndexedIterable\")\n@kotlin.internal.InlineOnly","completion":"public inline fun CharArray.flatMapIndexed(transform: (index: Int, Char) -> Iterable): List {\n return flatMapIndexedTo(ArrayList(), transform)\n}\n\n\/**\n * Returns a single list of all elements yielded from results of [transform] function being invoked on each element\n * and its index in the original array.\n *<|endoftext|>"} {"prompt":"* \"else\" branch, for example, because that code path will encounter no lambdas. Instead, any assignments done in elided\n * blocks are immediately propagated to the parents, which is why the \"entry\" node contains `y`.\n *\n * - the \"lambda\" and \"empty\" nodes are not merge points, but they are what the CFG is for: if the lambda is not called-in-place,","completion":"* then all variables it assigns to cannot be smartcasted in \"empty\" or its successors and vice versa, as the body of the lambda\n * can be executed at arbitrary points on that path.\n *\n * - changes to `z` is captured and back-propagated to all earlier nodes as desired.\n *<|endoftext|>"} {"prompt":"abstract override val inputTypes: Collection\n abstract override val outputType: ConeKotlinType?\n override var analyzed: Boolean = false\n abstract override val expectedType: ConeKotlinType?\n}\n\n\/\/ ------------- Lambdas -------------\n\nclass ResolvedLambdaAtom(\n override val atom: FirAnonymousFunction,","completion":"expectedType: ConeKotlinType?,\n val expectedFunctionTypeKind: FunctionTypeKind?,\n val receiver: ConeKotlinType?,\n val contextReceivers: List,\n val parameters: List,\n var returnType: ConeKotlinType,<|endoftext|>"} {"prompt":"moduleData = session.nullableModuleData ?: function.moduleData\n this.name = name\n symbol = it\n status = function.status.copy(modality = Modality.FINAL)\n delegateGetter = function\n deprecationsProvider = UnresolvedDeprecationProvider\n }\n }\n }\n\n processor(symbol)\n }\n }","completion":"override fun processDirectOverriddenFunctionsWithBaseScope(\n functionSymbol: FirNamedFunctionSymbol,\n processor: (FirNamedFunctionSymbol, FirTypeScope) -> ProcessorAction\n ): ProcessorAction {\n return ProcessorAction.NONE\n }\n\n override fun processDirectOverriddenPropertiesWithBaseScope(\n propertySymbol: FirPropertySymbol,<|endoftext|>"} {"prompt":"internal val friendPathsSet: Set\n get() {\n val buildDirFile = projectLayout.buildDirectory.asFile.get()\n return friendPaths\n .filter { it.exists() }\n .map { it.normalize().relativeTo(buildDirFile).invariantSeparatorsPath }.toSet()\n }\n\n @get:Internal","completion":"val startParameters = BuildReportsService.getStartParameters(project)\n\n @get:Input\n @get:Optional\n abstract val explicitApiMode: Property\n\n @get:Internal\n internal abstract val suppressKotlinOptionsFreeArgsModificationWarning: Property<|endoftext|>"} {"prompt":"else -> exprs.reduce { a, b ->\n irOr(a, b)\n }\n }\n }\n\n is Stability.Certain ->\n if (stable)\n irConst(StabilityBits.STABLE.bitsForSlot(0))\n else\n null\n\n is Stability.Parameter -> resolve(parameter)\n is Stability.Runtime -> {","completion":"val stableField = declaration.makeStabilityField()\n IrGetFieldImpl(\n UNDEFINED_OFFSET,\n UNDEFINED_OFFSET,\n stableField.symbol,\n stableField.type\n )\n }\n\n is Stability.Unknown -> null\n }\n\n \/\/ set the bit at a certain index<|endoftext|>"} {"prompt":"\/**\n * Converts this [Int] value to [Byte].\n *\n * If this value is in [Byte.MIN_VALUE]..[Byte.MAX_VALUE], the resulting `Byte` value represents\n * the same numerical value as this `Int`.\n *\n * The resulting `Byte` value is represented by the least significant 8 bits of this `Int` value.\n *\/","completion":"@kotlin.internal.IntrinsicConstEvaluation\n public override fun toByte(): Byte\n\n \/**\n * Converts this [Int] value to [Char].\n *\n * If this value is in the range of `Char` codes `Char.MIN_VALUE..Char.MAX_VALUE`,\n * the resulting `Char` code is equal to this value.\n *<|endoftext|>"} {"prompt":") : KotlinBackendIrHolder {\n override val kotlinIr: IrElement\n get() = irModule\n}\n\ninternal val CodegenPhase = createSimpleNamedCompilerPhase(\n name = \"Codegen\",\n description = \"Code generation\",","completion":"preactions = getDefaultIrActions() + getDefaultLlvmModuleActions(),\n postactions = getDefaultIrActions() + getDefaultLlvmModuleActions(),\n op = { generationState, input ->\n val context = generationState.context\n generationState.objCExport = ObjCExport(\n generationState,<|endoftext|>"} {"prompt":"\")!>select(id(A3()), id(\")!>A3::foo1), { a: Number ->","completion":"a<|endoftext|>"} {"prompt":"}\n\n@JsModule(\".\/dataClass.mjs\")\nexternal fun jsBox(): JsResult\n\nfun box(): String {\n val res = jsBox()\n if (res.copy00 != \"[3::7]\") {\n return \"Fail1: ${res.copy00}\"\n }\n if (res.copy01 != \"[3::11]\") {","completion":"return \"Fail2: ${res.copy01}\"\n }\n if (res.copy10 != \"[15::7]\") {\n return \"Fail3: ${res.copy10}\"\n }\n if (res.copy11 != \"[13::11]\") {\n return \"Fail4: ${res.copy11}\"\n }\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"fun test5f(x: Float, y: Any) = y is Float && x == y\nfun test6f(x: Any, y: Any) = x is Float && y is Float && x == y\n\n\/\/ The following possibly should not compile (but so far it does)\n\/\/ because of EQUALITY_NOT_APPLICABLE.","completion":"fun testFD(x: Any, y: Any) = x is Float && y is Double && x == y\nfun testDF(x: Any, y: Any) = x is Double && y is Float && x == y<|endoftext|>"} {"prompt":"private val definitions = mutableMapOf()\n private val usages = mutableMapOf()\n private val definedValues = mutableMapOf()\n private val temporary = mutableSetOf()\n private val capturedInClosure = mutableSetOf()\n private var hasChanges = false","completion":"private val localVariables = function.collectLocalVariables()\n\n \/\/ During `perform` phase we collect all variables we should substitute and all statements we should remove later,\n \/\/ when cleaning-up\n private val namesToSubstitute = mutableSetOf()\n private val statementsToRemove = mutableSetOf()<|endoftext|>"} {"prompt":"* Returns a string representation of the contents of the specified array as if it is [List].\n * \n * @sample samples.collections.Arrays.ContentOperations.contentToString\n *\/\n@SinceKotlin(\"1.4\")\npublic actual fun LongArray?.contentToString(): String {\n return this?.joinToString(\", \", \"[\", \"]\") ?: \"null\"\n}\n\n\/**","completion":"* Returns a string representation of the contents of the specified array as if it is [List].\n * \n * @sample samples.collections.Arrays.ContentOperations.contentToString\n *\/\n@SinceKotlin(\"1.4\")\npublic actual fun FloatArray?.contentToString(): String {\n return this?.joinToString(\", \", \"[\", \"]\") ?: \"null\"\n}\n\n\/**<|endoftext|>"} {"prompt":"override fun onMatchedClasses(expectClassSymbol: IrClassSymbol, actualClassSymbol: IrClassSymbol) {\n shouldNotBeCalled()\n }\n\n override fun onMatchedCallables(expectSymbol: IrSymbol, actualSymbol: IrSymbol) {\n require(expectSymbol == baseExpectSymbol)\n matchingActuals += actualSymbol","completion":"}\n }\n AbstractExpectActualMatcher.matchSingleExpectTopLevelDeclarationAgainstPotentialActuals(\n expectSymbol,\n actualSymbols,\n context,\n )\n return matchingActuals\n}\n\ninternal fun recordActualForExpectDeclaration(\n expectSymbol: IrSymbol,\n actualSymbol: IrSymbol,<|endoftext|>"} {"prompt":"\/\/ instances. A naive implementation would cache both S1 in `cachedPackageNames` and S2 in `topLevelClassifierPackageNames`.\n \/\/ `hasSpecificClassifierPackageNamesComputation` gives the provider enough information to avoid computing and caching S2 entirely,\n \/\/ so that S1 will also be cached in `topLevelClassifierPackageNames`.\n if (hasSpecificClassifierPackageNamesComputation) {","completion":"computePackageNamesWithTopLevelClassifiers()?.let { return@lazy it }\n }\n cachedPackageNames\n }\n\n private val topLevelClassifierNamesByPackage =\n session.firCachesFactory.createCache(::computeTopLevelClassifierNames)\n\n private val topLevelCallablePackageNames by lazy(LazyThreadSafetyMode.PUBLICATION) {<|endoftext|>"} {"prompt":"x.propNullableAny\n x.funT()","completion":"x.funAny()\n x.funNullableT()<|endoftext|>"} {"prompt":"\/\/ test.kt:8 \n\/\/ test.kt:5 box\n\/\/ test.kt:11 test\n\/\/ test.kt:18 foo\n\/\/ test.kt:19 foo\n\/\/ test.kt:12 test\n\/\/ test.kt:23 getProp\n\/\/ test.kt:12 test\n\/\/ test.kt:13 test\n\/\/ test.kt:26 setProp\n\/\/ test.kt:27 setProp","completion":"\/\/ test.kt:14 test\n\/\/ test.kt:6 box\n\n\/\/ EXPECTATIONS JS_IR\n\/\/ test.kt:5 box\n\/\/ test.kt:8 \n\/\/ test.kt:21 \n\/\/ test.kt:16 \n\/\/ test.kt:8 \n\/\/ test.kt:5 box\n\/\/ test.kt:11 test\n\/\/ test.kt:11 test<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ ALLOW_KOTLIN_PACKAGE\n\/\/ !LANGUAGE: +UnrestrictedBuilderInference\n\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\/\/ FILE: annotation.kt\n\npackage kotlin\n\nannotation class BuilderInference\n\n\/\/ FILE: test.kt\n\nclass Builder {\n fun add(t: T) {}\n}","completion":"fun build(g: Builder.() -> Unit): List = TODO()\nfun wrongBuild(g: Builder.() -> Unit): List = TODO()\n\nfun Builder.extensionAdd(s: S) {}\n\nfun Builder.safeExtensionAdd(s: S) {}\n\nval member = build {<|endoftext|>"} {"prompt":"K2JsArgumentConstants::RUNTIME_DIAGNOSTIC_EXCEPTION.name to K2JsArgumentConstants.RUNTIME_DIAGNOSTIC_EXCEPTION,\n K2JsArgumentConstants::RUNTIME_DIAGNOSTIC_LOG.name to K2JsArgumentConstants.RUNTIME_DIAGNOSTIC_LOG,\n )","completion":"for ((key, value) in modes) {\n println(\"$key(\\\"$value\\\"),\")\n }\n println(\";\")\n\n println()\n println(\"companion object {\")\n withIndent {\n println(\"@JvmStatic\")\n println(\"fun fromMode(mode: String): JsDiagnosticMode =\")<|endoftext|>"} {"prompt":"inner class Bar {\n fun good() {\n contract {\n returns() implies (this@Bar != null)\n }\n }\n\n fun badOuter() {\n contract {\n returns() implies (this@Foo != null)\n }\n }\n\n fun badInner() {\n contract {","completion":"returns() implies (this != null)\n }\n }\n\n fun A?.goodWithReceiver() {\n contract {\n returns() implies (this@goodWithReceiver != null)\n }\n }\n\n fun A?.badWithReceiver() {\n contract {<|endoftext|>"} {"prompt":"val test11: List = listOf2(d1, d2)\n \/\/ NB Inferred type is List because List is covariant.\n\n val test12 = listOf2(d1, d2)","completion":"val test13 = arrayOf2(d1, d2)\n\n val test14: Array = arrayOf2(d1, d2)\n \/\/ NB Inferred type is Array because Array is invariant.\n\n val test15 = arrayOf2(d1, d2)<|endoftext|>"} {"prompt":"override fun visitMemberAccess(expression: IrMemberAccessExpression<*>, data: D): IrElement {\n (0 until expression.typeArgumentsCount).forEach {\n expression.getTypeArgument(it)?.let { type ->\n expression.putTypeArgument(it, transformType(expression, type, data))\n }\n }\n return super.visitMemberAccess(expression, data)\n }","completion":"override fun visitClassReference(expression: IrClassReference, data: D): IrExpression {\n expression.classType = transformType(expression, expression.classType, data)\n return super.visitClassReference(expression, data)\n }\n\n override fun visitConstantObject(expression: IrConstantObject, data: D): IrConstantValue {<|endoftext|>"} {"prompt":"* A. top-level\/member properties of non-local class (\"public\" properties)\n * B. local delegated properties\/delegated properties of local classes (\"private\" properties)\n *\n * Here are some facts for this differences:\n * 1. Property of kind `B` may be written inside scope of some other delegate\/PCLA inference (e.g., inside another delegate or","completion":"* `buildList` lambda), and property of kind `A` are always analyzed in top-level delegate inference session\n * 2. Once written, the resolved return type ref of property of kind `A` can be observed by different threads.\n * [ReturnTypeCalculatorWithJump] relies on the contract, that if some callable declaration has FirResolvedTypeRef as a return<|endoftext|>"} {"prompt":"override fun visitAnnotationCall(annotationCall: FirAnnotationCall, data: Nothing?) {\n visitWithCallOrAssignment(annotationCall)\n }\n\n override fun visitVariableAssignment(variableAssignment: FirVariableAssignment, data: Nothing?) {\n visitWithCallOrAssignment(variableAssignment)\n }","completion":"override fun visitDelegatedConstructorCall(delegatedConstructorCall: FirDelegatedConstructorCall, data: Nothing?) {\n visitWithCallOrAssignment(delegatedConstructorCall)\n }\n\n override fun visitGetClassCall(getClassCall: FirGetClassCall, data: Nothing?) {\n visitWithGetClassCall(getClassCall)\n }<|endoftext|>"} {"prompt":"ranges[index - 1] = newPrevious\n } else {\n ranges.removeAt(index - 1)\n index--\n }\n } else {\n index--\n }\n }\n\n\/\/ if (this is LetterRangesBuilder) {\n\/\/ println(ranges.joinToString(separator = \"\\n\"))\n\/\/ }","completion":"\/\/ if (this is CharCategoryRangesBuilder) {\n\/\/ println(ranges.subList(fromIndex = 0, toIndex = 10).joinToString(separator = \"\\n\"))\n\/\/ }\n\n return Triple(ranges.map { it.rangeStart() }, ranges.map { it.rangeEnd() }, ranges.map { it.category() })\n }\n\n \/**<|endoftext|>"} {"prompt":"if (funWithReturnsNull(value_1 is Float? && value_1 != null && value_2 != null) == null) {\n println(value_1.dec())\n println(value_2?.toByte())\n }\n}\n\n\/\/ TESTCASE NUMBER: 10\nclass case_10_class {","completion":"val prop_1: Int? = 10\n\n fun case_10(value_1: Any?, value_2: Number?) {\n val o = case_10_class()\n if (funWithReturnsTrue(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null && this.prop_1 != null)) {\n println(value_1.dec())<|endoftext|>"} {"prompt":"protected abstract val dataFlowInfoProviderImpl: KtDataFlowInfoProvider\n\n internal val klibSourceFileProvider: KtKlibSourceFileNameProvider get() = klibSourceFileProviderImpl\n protected abstract val klibSourceFileProviderImpl: KtKlibSourceFileNameProvider\n}\n\npublic fun KtAnalysisSession.getModule(element: PsiElement): KtModule {","completion":"return ProjectStructureProvider.getModule(useSiteModule.project, element, useSiteModule)\n}<|endoftext|>"} {"prompt":"val areThereConstraintsWithUninferredTypeParameter = constraints.any { c -> c.type.contains { it.isUninferredParameter() } }\n return constraints.any { isProperArgumentConstraint(it) } && !areThereConstraintsWithUninferredTypeParameter\n }\n\n private fun Context.isProperArgumentConstraint(c: Constraint) =","completion":"isProperType(c.type)\n && c.position.initialConstraint.position !is DeclaredUpperBoundConstraintPosition<*>\n && !c.isNullabilityConstraint\n\n private fun Context.isProperType(type: KotlinTypeMarker): Boolean =<|endoftext|>"} {"prompt":"const val ui0 = UInt(-1)\nconst val ui1 = UInt(0)\nconst val ui2 = UInt(40 + 2)\n\n@AnnoUB(UByte(1), ub0)\nfun f0() {}\n\n@AnnoUS(UShort(2 + 5), us0)","completion":"fun f1() {}\n\n@AnnoUI(ui0, ui1, ui2, UInt(100))\nfun f2() {}\n\n@AnnoUL(ul0, ULong(5))\nfun f3() {}\n\nconst val explicit: UInt = UInt(2)<|endoftext|>"} {"prompt":")\n\n build(\"compileKotlin\") {\n assertTasksExecuted(\":compileKotlin\")\n\n assertCompilerArgument(\":compileKotlin\", \"-Xexplicit-api=warning\")\n }\n\n build(\":compileTestKotlin\") {\n assertTasksExecuted(\":compileTestKotlin\")","completion":"assertNoCompilerArgument(\":compileTestKotlin\", \"-Xexplicit-api=warning\")\n }\n }\n }\n\n @JvmGradlePluginTests\n @DisplayName(\"Explicit api strict mode produces errors on violation\")\n @GradleTest\n fun explicitApiStrict(gradleVersion: GradleVersion) {\n project(\n \"simpleProject\",<|endoftext|>"} {"prompt":"descriptor: PropertyAccessorDescriptor,\n context: DeclarationCheckerContext\n ) {\n val propertyDescriptor = descriptor.correspondingProperty\n val propertyPsi = declaration.parent as? KtProperty ?: return\n val name = propertyPsi.nameIdentifier\n val initializer = propertyPsi.initializer\n val hasComposableAnnotation = descriptor.hasComposableAnnotation()","completion":"if (descriptor.overriddenDescriptors.isNotEmpty()) {\n val override = descriptor.overriddenDescriptors.first()\n val overrideComposable = override.hasComposableAnnotation()\n if (overrideComposable != hasComposableAnnotation) {\n context.trace.report(\n ComposeErrors.CONFLICTING_OVERLOADS.on(\n declaration,<|endoftext|>"} {"prompt":"a.funAny()","completion":"a.funNullableT()<|endoftext|>"} {"prompt":"\/\/ IGNORE_BACKEND: JS\n\/\/ RUN_PLAIN_BOX_FUNCTION\n\/\/ INFER_MAIN_MODULE\n\n\/\/ MODULE: export_interface\n\/\/ FILE: lib.kt\n\ninterface ParentI {\n val str: String\n}\n\n@JsExport\ninterface I : ParentI {\n val value: Int\n var variable: Int\n fun foo(): String\n}\n\ninterface ExtendedI: I {","completion":"fun bar(): Int\n}\n\nopen class NotExportedClass(override var value: Int) : ExtendedI {\n override var variable: Int = value\n override open fun foo(): String = \"Not Exported\"\n override val str: String = \"test 1\"\n override open fun bar(): Int = 42\n}\n\n@JsExport<|endoftext|>"} {"prompt":"val allCachedBitcodeDependencies: List) {\n\n companion object {\n private const val NATIVE_DEPENDENCIES_TO_LINK = \"NATIVE_DEPENDENCIES_TO_LINK\"\n private const val ALL_NATIVE_DEPENDENCIES = \"ALL_NATIVE_DEPENDENCIES\"","completion":"private const val ALL_CACHED_BITCODE_DEPENDENCIES = \"ALL_CACHED_BITCODE_DEPENDENCIES\"\n\n fun serialize(res: DependenciesTrackingResult): List {<|endoftext|>"} {"prompt":"WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET.on(annotationEntry, \"undefined target\", target.renderName)\n else\n WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET_ON_TYPE.on(annotationEntry, target.renderName)\n\n reportDiagnosticOnce(diagnostic)\n }\n }","completion":"}\n\n private fun BindingTrace.checkDeclaration(\n annotated: KtAnnotated,\n languageVersionSettings: LanguageVersionSettings,\n descriptor: DeclarationDescriptor\n ) {\n for (annotation in annotated.annotationEntries) {\n val useSiteTarget = annotation.useSiteTarget\n val target = useSiteTarget?.getAnnotationUseSiteTarget() ?: continue<|endoftext|>"} {"prompt":"packedFields.add(IndexedField(offset, field))\n }\n packedFields.sortBy { it.offset }\n return packedFields.map { it.field }\n }\n\n private fun createClassDeclarations(declaration: IrClass): ClassLlvmDeclarations {\n val internalName = qualifyInternalName(declaration)\n\n val fields =","completion":"if (context.config.packFields)\n packFields(declaration)\n else\n context.getLayoutBuilder(declaration).getFields(llvm)\n val (bodyType, alignment, fieldIndices) = createClassBody(\"kclassbody:$internalName\", fields)\n\n require(alignment == runtime.objectAlignment) {<|endoftext|>"} {"prompt":"@JvmField val platformDependent: FqName = FqName(\"kotlin.internal.PlatformDependent\")\n @JvmField val platformDependentClassId: ClassId = ClassId.topLevel(platformDependent)\n\n @JvmField val iterator: FqName = collectionsFqName(\"Iterator\")\n @JvmField val iterable: FqName = collectionsFqName(\"Iterable\")","completion":"@JvmField val collection: FqName = collectionsFqName(\"Collection\")\n @JvmField val list: FqName = collectionsFqName(\"List\")\n @JvmField val listIterator: FqName = collectionsFqName(\"ListIterator\")\n @JvmField val set: FqName = collectionsFqName(\"Set\")<|endoftext|>"} {"prompt":"if (classDescriptor.kind == ClassKind.ANNOTATION_CLASS && DescriptorUtils.isLocal(classDescriptor)) {\n trace.report(LOCAL_ANNOTATION_CLASS.on(languageVersionSettings, classOrObject))\n }\n }\n\n private fun checkTypesInClassHeader(classOrObject: KtClassOrObject) {","completion":"fun KtTypeReference.type(): KotlinType? = trace.bindingContext.get(TYPE, this)\n\n for (delegationSpecifier in classOrObject.superTypeListEntries) {\n val typeReference = delegationSpecifier.typeReference ?: continue\n typeReference.type()?.let { upperBoundChecker.checkBoundsInSupertype(typeReference, it, trace, languageVersionSettings) }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.backend.jvm.lower\n\nimport org.jetbrains.kotlin.backend.common.FileLoweringPass\nimport org.jetbrains.kotlin.backend.common.ir.getAdditionalStatementsFromInlinedBlock\nimport org.jetbrains.kotlin.backend.common.ir.putStatementBeforeActualInline","completion":"import org.jetbrains.kotlin.backend.common.phaser.PhaseDescription\nimport org.jetbrains.kotlin.backend.jvm.JvmBackendContext\nimport org.jetbrains.kotlin.backend.jvm.ir.createJvmIrBuilder\nimport org.jetbrains.kotlin.backend.jvm.ir.isInlineParameter<|endoftext|>"} {"prompt":"* Performs a logical `or` operation between this Boolean and the [other] one. Unlike the `||` operator,\n * this function does not perform short-circuit evaluation. Both `this` and [other] will always be evaluated.\n *\/\n @kotlin.internal.IntrinsicConstEvaluation\n public infix fun or(other: Boolean): Boolean","completion":"\/** Performs a logical `xor` operation between this Boolean and the [other] one. *\/\n @kotlin.internal.IntrinsicConstEvaluation\n public infix fun xor(other: Boolean): Boolean\n\n @kotlin.internal.IntrinsicConstEvaluation\n public override fun compareTo(other: Boolean): Int<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.api.components\n\nimport com.intellij.psi.PsiElement\nimport org.jetbrains.kotlin.analysis.api.lifetime.withValidityAssertion\nimport org.jetbrains.kotlin.analysis.api.types.KtType\nimport org.jetbrains.kotlin.psi.KtDeclaration","completion":"import org.jetbrains.kotlin.psi.KtExpression\nimport org.jetbrains.kotlin.psi.KtFunction\n\npublic abstract class KtExpressionTypeProvider : KtAnalysisSessionComponent() {\n public abstract fun getKtExpressionType(expression: KtExpression): KtType?<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.backend.konan\n\nimport org.jetbrains.kotlin.config.CompilerConfigurationKey\nimport org.jetbrains.kotlin.konan.target.CompilerOutputKind\nimport org.jetbrains.kotlin.konan.target.KonanTarget\n\nclass KonanConfigKeys {\n companion object {","completion":"\/\/ Keep the list lexically sorted.\n val BUNDLE_ID: CompilerConfigurationKey\n = CompilerConfigurationKey.create(\"bundle ID to be set in Info.plist of a produced framework\")\n val CHECK_DEPENDENCIES: CompilerConfigurationKey\n = CompilerConfigurationKey.create(\"check dependencies and download the missing ones\")<|endoftext|>"} {"prompt":"set(_) = Unit\nvar propertyGetterMarkedWithAnotherFoo: String @Another.Foo get() = \"\"\n set(_) = Unit\nvar propertyGetterMarkedWithBar: String @Bar get() = \"\"\n set(_) = Unit\nvar propertyGetterMarkedWithAnotherBar: String @Another.Bar get() = \"\"\n set(_) = Unit","completion":"var propertySetterMarkedWithFoo: String get() = \"\"\n @Foo set(_) = Unit\nvar propertySetterMarkedWithAnotherFoo: String get() = \"\"\n @Another.Foo set(_) = Unit\nvar propertySetterMarkedWithBar: String get() = \"\"\n @Bar set(_) = Unit\nvar propertySetterMarkedWithAnotherBar: String get() = \"\"<|endoftext|>"} {"prompt":"\/\/ KT-65503 For all changed types, if oldType is a lambda or an anonymous object,\n \/\/ and the newType is a name for an inline call,\n \/\/ it should be added to the remapper to ensure correct inline conversion of nested anonymous objects or lambdas.\n if (newType.contains(INLINE_CALL_TRANSFORMATION_SUFFIX) &&","completion":"!oldType.contains(INLINE_CALL_TRANSFORMATION_SUFFIX) &&\n isAnonymousClass(oldType) &&\n !remapper.hasNoAdditionalMapping(oldType)\n ) {\n remapper.addMapping(oldType, newType)\n }\n }\n result.merge(transformResult)\n result.addChangedType(oldClassName, newClassName)<|endoftext|>"} {"prompt":"\/\/ Potentially, this would have better to forbid calling manyParams, too.\n \/\/ But it might be complicated because we need to match that it is an override\n \/\/ Seems to be fine because `A::manyParams` is anyway an override in JVM and can be called with (a as K)\n a.manyParams {","completion":"x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32 -><|endoftext|>"} {"prompt":"require(n >= 0) { \"Requested element count $n is less than zero.\" }\n return take((size - n).coerceAtLeast(0))\n}\n\n\/**\n * Returns a list containing all elements except last [n] elements.\n * \n * @throws IllegalArgumentException if [n] is negative.\n * \n * @sample samples.collections.Collections.Transformations.drop\n *\/","completion":"public fun IntArray.dropLast(n: Int): List {\n require(n >= 0) { \"Requested element count $n is less than zero.\" }\n return take((size - n).coerceAtLeast(0))\n}\n\n\/**\n * Returns a list containing all elements except last [n] elements.\n * \n * @throws IllegalArgumentException if [n] is negative.\n *<|endoftext|>"} {"prompt":"\"Case_Ignorable\" -> caseIgnorableRanges.add(line)\n }\n }\n\n fun generate() {\n generateIsCasedTest()\n generateIsCaseIgnorableTest()\n }\n\n private fun generateIsCasedTest() {\n val file = outputDir.resolve(\"_IsCasedTest.kt\")","completion":"generateRangesTest(casedRanges, file, \"casedRanges\", \"isCased\")\n }\n\n private fun generateIsCaseIgnorableTest() {\n val file = outputDir.resolve(\"_IsCaseIgnorableTest.kt\")\n generateRangesTest(caseIgnorableRanges, file, \"caseIgnorableRanges\", \"isCaseIgnorable\")\n }<|endoftext|>"} {"prompt":"proto.addExtension(KlibMetadataProtoBuf.packageFragmentFiles, fileIdx)\n }\n\n override fun visitFqName(fqName: String) {\n proto.setExtension(KlibMetadataProtoBuf.fqName, fqName)\n }\n\n override fun visitClassName(className: ClassName) {","completion":"val classNameIdx = (c.strings as StringTableImpl).getQualifiedClassNameIndex(ClassId.fromString(className))\n proto.addExtension(KlibMetadataProtoBuf.className, classNameIdx)\n }\n })\n }\n\n override fun writeFunctionExtensions(\n kmFunction: KmFunction,<|endoftext|>"} {"prompt":"var lastIntrinsicCall: IrCall? = null\n while (saveToTmp is IrCall && (saveToTmp.symbol == boxIntrinsic || saveToTmp.symbol == unboxIntrinsic)) {\n if (lastIntrinsicCall == null) {","completion":"lastIntrinsicCall = JsIrBuilder.buildCall(saveToTmp.symbol, saveToTmp.type, saveToTmp.typeArguments.filterNotNull())\n rootIntrinsicCall = lastIntrinsicCall\n } else {<|endoftext|>"} {"prompt":"contract { returns(true) implies (x is String) }\n return x is String\n }\n\n fun returnsFalse(x: Any?): Boolean {\n contract { returns(false) implies (x is String) }\n return x !is String\n }\n\n fun returnsNotNull(x: Any?): Any? {\n contract { returnsNotNull() implies (x is String) }","completion":"return when (x) {\n is String -> \"\"\n else -> null\n }\n }\n\n fun returnsNull(x: Any?): Any? {\n contract { returns(null) implies (x is String) }\n return when (x) {\n is String -> null\n else -> \"\"\n }\n }\n}<|endoftext|>"} {"prompt":"assertPrints(1230.minutes.toString(DurationUnit.DAYS, 2), \"0.85d\")\n assertPrints(1230.minutes.toString(DurationUnit.HOURS, 2), \"20.50h\")\n assertPrints(1230.minutes.toString(DurationUnit.MINUTES), \"1230m\")","completion":"assertPrints(1230.minutes.toString(DurationUnit.SECONDS), \"73800s\")\n }\n\n @Sample\n fun parse() {\n val isoFormatString = \"PT1H30M\"\n val defaultFormatString = \"1h 30m\"\n val singleUnitFormatString = \"1.5h\"\n val invalidFormatString = \"1 hour 30 minutes\"<|endoftext|>"} {"prompt":"receiverArgumentType = TypeUtils.makeNullable(receiverArgumentType)\n }\n }\n }\n\n val dataFlowValue = dataFlowValueFactory.createDataFlowValue(receiverArgument, this)\n val nullability = dataFlowInfo.getStableNullability(dataFlowValue)\n val expression = (receiverArgument as? ExpressionReceiver)?.expression","completion":"if (nullability.canBeNull() && !nullability.canBeNonNull()) {\n if (!TypeUtils.isNullableType(expectedReceiverParameterType)) {\n reportUnsafeCall = true\n }\n if (dataFlowValue.immanentNullability.canBeNonNull()) {\n expression?.let { trace.record(BindingContext.SMARTCAST_NULL, it) }\n }<|endoftext|>"} {"prompt":"+--- org.sample:liba (org.sample:liba-native): 2.0\n | \\--- org.jetbrains.kotlin:kotlin-stdlib: $KOTLIN_VERSION\n +--- org.sample:libb (org.sample:libb-native): 1.0\n | ^^^ This module requires symbol sample.liba\/C|null[0].","completion":"| +--- org.sample:liba (org.sample:liba-native): 1.0 -> 2.0 (*)\n | \\--- org.jetbrains.kotlin:kotlin-stdlib: $KOTLIN_VERSION\n \\--- org.jetbrains.kotlin:kotlin-stdlib: $KOTLIN_VERSION\n \n (*) - dependencies omitted (listed previously)<|endoftext|>"} {"prompt":"if (y !== z || y != implicitNullableNothingProperty) {","completion":"val z1 = `.``?\")!> case_25.``.``?)? & () -> case_25.``.``?\"),<|endoftext|>"} {"prompt":"class Universe(val width: Int, val height: Int) {\n var gen = Generation.random(width, height)\n\n fun evolve() {\n gen = gen.evolve()\n }\n}\n\nfun run(space: Int, time: Int) {\n val width = space\n val height = space\n val universe = Universe(width, height)\n for (i in 0 until time) {","completion":"universe.evolve()\n }\n Blackhole.consume(universe)\n}\n\nopen class LifeBenchmark {\n val spaceScale = BENCHMARK_SIZE \/ 40\n val timeScale = 5\n\n fun bench() {\n run(spaceScale, timeScale)\n }\n}\n\nclass LifeWithMarkHelpersBenchmark : LifeBenchmark() {<|endoftext|>"} {"prompt":"@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class})\n@kotlin.internal.InlineOnly\npublic inline fun kotlin.Short.toUShort(): kotlin.UShort\n\n@kotlin.SinceKotlin(version = \"2.0\")","completion":"@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})\n@kotlin.internal.InlineOnly\npublic inline fun T.use(block: (T) -> R): R\n\npublic interface Annotation {\n}\n\npublic open class Any {\n public constructor Any()<|endoftext|>"} {"prompt":"fun test5() {}\n\n@JavaAnn(value = arrayOf(\"value\"))\nfun jTest1() {}\n\n@JavaAnn(value = [\"value\"])\nfun jTest2() {}\n\n@JavaAnn(value = [\"value\"], path = [\"path\"])\nfun jTest3() {}\n\n\nannotation class IntAnn(vararg val i: Int)\n\n@IntAnn(i = [1, 2])","completion":"fun foo1() {}\n\n@IntAnn(i = intArrayOf(0))\nfun foo2() {}<|endoftext|>"} {"prompt":"?: return ReplEvalResult.Error.CompileTime(\"Unable to access compiled script: ${compiledScriptList.get()}\")\n\n\n val lastSnippetClass = history.peek()?.item?.first\n val historyBeforeSnippet = history.previousItems(compileResult.lineId).map { it.second }.toList()","completion":"val currentConfiguration = ScriptEvaluationConfiguration(baseScriptEvaluationConfiguration) {\n previousSnippets.put(historyBeforeSnippet)\n if (lastSnippetClass != null) {\n jvm {\n baseClassLoader(lastSnippetClass.java.classLoader)\n }\n }\n if (scriptArgs != null) {\n constructorArgs(*scriptArgs.scriptArgs)<|endoftext|>"} {"prompt":"constructor(vararg providers: AdditionalAnnotationsProvider) : this(providers.toList())\n\n override fun addAllAnnotations(\n currentRawAnnotations: MutableList,\n foundQualifiers: MutableSet,\n owner: PsiElement,\n ) {\n providers.forEach { provider ->","completion":"provider.addAllAnnotations(currentRawAnnotations, foundQualifiers, owner)\n }\n }\n\n override fun findSpecialAnnotation(\n annotationsBox: GranularAnnotationsBox,\n qualifiedName: String,\n owner: PsiElement,<|endoftext|>"} {"prompt":"append(quotes)\n append(const.value.toString())\n append(quotes)\n}\n\nprivate fun renderClassWithRenderer(declaration: IrClass, renderer: RenderIrElementVisitor?, options: DumpIrTreeOptions) =\n declaration.runTrimEnd {\n \"CLASS ${renderOriginIfNonTrivial()}\" +\n \"$kind name:$name \" +","completion":"renderSignatureIfEnabled(options.printSignatures) +\n \"modality:$modality visibility:$visibility \" +\n renderClassFlags() +\n \"superTypes:[${superTypes.joinToString(separator = \"; \") { it.renderTypeWithRenderer(renderer, options) }}]\"\n }<|endoftext|>"} {"prompt":"internal fun getMethodImplForSVGStringList(obj: SVGStringList, index: Int): String? { js(\"return obj[index];\") }\n\npublic operator fun SVGStringList.get(index: Int): String? = getMethodImplForSVGStringList(this, index)\n\n@Suppress(\"UNUSED_PARAMETER\")","completion":"internal fun setMethodImplForSVGStringList(obj: SVGStringList, index: Int, newItem: String) { js(\"obj[index] = newItem;\") }\n\npublic operator fun SVGStringList.set(index: Int, newItem: String) = setMethodImplForSVGStringList(this, index, newItem)\n\n\/**<|endoftext|>"} {"prompt":"override fun getTypeConstructor() = _typeConstructor\n\n override fun getOriginal() = this\n\n override fun getSource() = SourceElement.NO_SOURCE\n\n override fun getIndex() = owner.index\n\n override fun isCapturedFromOuterDeclaration() = false\n\n private val _defaultType: SimpleType by lazy {","completion":"KotlinTypeFactory.simpleTypeWithNonTrivialMemberScope(\n TypeAttributes.Empty, typeConstructor, emptyList(), false,\n LazyScopeAdapter {\n TypeIntersectionScope.create(\n \"Scope for type parameter \" + name.asString(),\n upperBounds\n )\n }\n )\n }\n\n override fun getDefaultType() = _defaultType<|endoftext|>"} {"prompt":"objectSymbol = namedClassOrObjectSymbol,\n containingClass = this,\n name = JvmAbi.INSTANCE_FIELD,\n lightMemberOrigin = null,\n isCompanion = false,\n )\n )\n }\n\n context(KtAnalysisSession)","completion":"private fun addFieldsForEnumEntries(result: MutableList, classOrObjectSymbol: KtNamedClassOrObjectSymbol) {\n if (!isEnum) return\n\n classOrObjectSymbol.getStaticDeclaredMemberScope().getCallableSymbols()\n .filterIsInstance()\n .mapNotNullTo(result) {<|endoftext|>"} {"prompt":"\/\/inline var newInlineProperty2: String\n \/\/ get() = \"OpenClass.newInlineProperty2\"\n \/\/ set(value) { lastRecordedState = \"OpenClass.newInlineProperty2=$value\" }\n\n \/\/var newNonInlineProperty: String\n \/\/ get() = \"OpenClass.newNonInlineProperty\"","completion":"\/\/ set(value) { lastRecordedState = \"OpenClass.newNonInlineProperty=$value\" }\n\n fun newInlineProperty1Reader(): String = TODO(\"Not implemented: OpenClass.newInlineProperty1Reader()\")\n fun newInlineProperty2Reader(): String = TODO(\"Not implemented: OpenClass.newInlineProperty2Reader()\")<|endoftext|>"} {"prompt":") = diagnostics.firstOrNull { diagnostic ->\n if (diagnostic.severity != Severity.ERROR) return@firstOrNull false\n if (diagnostic.factory in syntaxErrors) return@firstOrNull true\n val isResolutionError = diagnostic.factory in resolutionFailureErrors\n val isCallArgError = diagnostic.factory in callArgErrors\n val reportedPsi = diagnostic.psiElement","completion":"val reportedPsiParent = reportedPsi.parent\n when {\n \/\/ Errors reported on the querying element or the `selectorExpression`\/`calleeExpression` of the querying element\n isResolutionError &&\n (reportedPsi == psi ||\n psi is KtQualifiedExpression && reportedPsi == psi.selectorExpression ||<|endoftext|>"} {"prompt":"public inline fun kotlin.ULongArray.reduceRightOrNull(operation: (kotlin.ULong, acc: kotlin.ULong) -> kotlin.ULong): kotlin.ULong?\n\n@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly","completion":"public inline fun kotlin.UShortArray.reduceRightOrNull(operation: (kotlin.UShort, acc: kotlin.UShort) -> kotlin.UShort): kotlin.UShort?\n\n@kotlin.SinceKotlin(version = \"1.4\")<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.kapt3.test.runners.AbstractIrKotlinKaptContextTest\nimport org.jetbrains.kotlin.kapt4.AbstractKotlinKapt4ContextTest\nimport org.jetbrains.kotlin.lombok.*\nimport org.jetbrains.kotlin.noarg.*","completion":"import org.jetbrains.kotlin.parcelize.test.runners.*\nimport org.jetbrains.kotlin.powerassert.AbstractFirLightTreeBlackBoxCodegenTestForPowerAssert\nimport org.jetbrains.kotlin.powerassert.AbstractIrBlackBoxCodegenTestForPowerAssert\nimport org.jetbrains.kotlin.samWithReceiver.*<|endoftext|>"} {"prompt":"@Test\n fun testContextReceiverAndDefaultParamsUsage(): Unit = contextReceivers(\n \"\"\"\n class Foo {\n val someString = \"Some String\"\n }\n \"\"\",\n \"\"\"\n @Composable\n fun Parent() {\n with(Foo()) {\n Test()\n Test(a = \"a\")\n Test(b = 101)","completion":"Test(a = \"Yes\", b = 10)\n }\n }\n\n context(Foo)\n @Composable\n fun Test(a: String = \"A\", b: Int = 2) {\n val combineParams = a + b\n if (someString == combineParams) {\n println(\"Same same\")\n }\n }\n \"\"\"\n )\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.codegen.range\n\nimport org.jetbrains.kotlin.codegen.ExpressionCodegen\nimport org.jetbrains.kotlin.codegen.generateCallReceiver\nimport org.jetbrains.kotlin.codegen.generateCallSingleArgument","completion":"import org.jetbrains.kotlin.codegen.range.comparison.getComparisonGeneratorForKotlinType\nimport org.jetbrains.kotlin.codegen.range.forLoop.ForInSimpleProgressionLoopGenerator\nimport org.jetbrains.kotlin.codegen.range.forLoop.ForLoopGenerator<|endoftext|>"} {"prompt":"val p8: Boolean?)\n\nannotation class InAnn4(val p1: Array,\n val p2: Array?)","completion":"annotation class InAnn6(val p: Class<*>?)\nannotation class InAnn7(val p: RetentionPolicy?)<|endoftext|>"} {"prompt":"fun box() = parcelTest { parcel ->\n val test = Test(SealedClass1.SealedClass1Impl1)\n test.writeToParcel(parcel, 0)\n\n val bytes = parcel.marshall()\n parcel.unmarshall(bytes, 0, bytes.size)\n parcel.setDataPosition(0)","completion":"val test2 = parcelableCreator().createFromParcel(parcel)\n assert(test == test2)\n}<|endoftext|>"} {"prompt":"override fun foo(): X? = X(null)\n}\n\nfun box(): String {\n val t1: IFoo = Test()\n val x1 = t1.foo()\n if (x1 != X(null)) throw AssertionError(\"x1: $x1\")\n\n val t2 = Test()\n val x2 = t2.foo()","completion":"if (x2 != X(null)) throw AssertionError(\"x2: $x2\")\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"@GradleWithJdkTest\n fun testIncrementalBinaryAggregatingChanges(gradleVersion: GradleVersion, jdk: JdkVersions.ProvidedJdk) {\n doIncrementalAggregatingChanges(\n gradleVersion,\n jdk,\n true\n )\n }\n\n private fun TestProject.checkAggregatingResource(check: (List) -> Unit) {","completion":"val aggregatingResource = \"build\/tmp\/kapt3\/classes\/main\/generated.txt\"\n assertFileInProjectExists(aggregatingResource)\n val lines = projectPath.resolve(aggregatingResource).readLines()\n check(lines)\n }\n\n private fun doIncrementalAggregatingChanges(\n gradleVersion: GradleVersion,<|endoftext|>"} {"prompt":"private val BODILESS_BUILTIN_CLASSES = listOf(\n \"kotlin.String\",\n \"kotlin.Nothing\",\n \"kotlin.Array\",\n \"kotlin.Any\",\n \"kotlin.ByteArray\",\n \"kotlin.CharArray\",\n \"kotlin.ShortArray\",\n \"kotlin.IntArray\",","completion":"\"kotlin.LongArray\",\n \"kotlin.FloatArray\",\n \"kotlin.DoubleArray\",\n \"kotlin.BooleanArray\",\n \"kotlin.Boolean\",\n \"kotlin.Byte\",\n \"kotlin.Short\",\n \"kotlin.Int\",\n \"kotlin.Float\",\n \"kotlin.Double\",<|endoftext|>"} {"prompt":"token: KtLifetimeToken,\n) : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.RecursiveTypealiasExpansion\n\ninternal class TypealiasShouldExpandToClassImpl(\n override val expandedType: KtType,\n firDiagnostic: KtPsiDiagnostic,","completion":"token: KtLifetimeToken,\n) : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.TypealiasShouldExpandToClass\n\ninternal class ConstructorOrSupertypeOnTypealiasWithTypeProjectionErrorImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"open val f = \"A\"\n}\n\nclass B(s: String) : A(s) {\n override val f = \"B\"\n}\n\nfun test(b1: Boolean, b2: Boolean): String {\n global = \"\"\n try {\n bar(\n foo(\"G\") + foo(\n (if (b1) {\n bar(\"then1\")\n (try {","completion":"if (b2) {\n bar(\"then2\")\n A(\"X\")\n } else {\n bar(\"else2\")\n B(\"Y\")\n }\n } finally {\n\n }).me()\n } else {\n try {\n bar(\"try3\")\n bar(\"else1\")\n } finally {\n\n }\n (if (b2) {<|endoftext|>"} {"prompt":"assertFailsWith { base64.encodeIntoByteArray(bytes, destination, destinationOffset = 1) }\n\n assertTrue(destination.all { it == 0.toByte() })\n\n var length = base64.encodeIntoByteArray(bytes, destination, endIndex = 3)","completion":"assertContentEquals(symbols.encodeToByteArray(0, 4), destination.copyOf(length))\n length += base64.encodeIntoByteArray(bytes, destination, destinationOffset = length, startIndex = 3)\n assertContentEquals(symbols.encodeToByteArray(), destination)\n }\n\n \/\/ decode(CharSequence)<|endoftext|>"} {"prompt":"t.test2()\n t\n }\n }\n }\n }\n }\n}","completion":"\/*\n * TESTCASE NUMBER: 75\n * NOTE: lazy smartcasts\n * DISCUSSION\n * ISSUES: KT-28362\n *\/\nfun case_75(t: Any?, z: Nothing?) {\n if (t !is ClassLevel2? || t !is ClassLevel1?) else {<|endoftext|>"} {"prompt":"assertEquals(false, notNullToNotNullB(AIA()), \"AIA is IB\")\n assertEquals(true, notNullToNotNullB(AIB()), \"AIB is IB\")\n assertEquals(false, notNullToNotNullB(AIE()), \"AIE is IB\")\n assertEquals(true, notNullToNotNullB(AIF()), \"AIF is IB\")","completion":"assertEquals(true, notNullToNotNullB(AIJ()), \"AIJ is IB\")\n assertEquals(true, notNullToNotNullB(BAIA()), \"BAIA is IB\")\n assertEquals(true, notNullToNotNullB(BAIAIF()), \"BAIAIF is IB\")<|endoftext|>"} {"prompt":"val test_dnd = d === nd || nd === d || d !== nd ||","completion":"nd !== d<|endoftext|>"} {"prompt":"override fun loadAnnotation(proto: ProtoBuf.Annotation, nameResolver: NameResolver): AnnotationDescriptor =\n annotationDeserializer.deserializeAnnotation(proto, nameResolver)\n\n override fun loadConstant(desc: String, initializer: Any): ConstantValue<*>? {\n val normalizedValue: Any = if (desc in \"ZBCS\") {","completion":"val intValue = initializer as Int\n when (desc) {\n \"Z\" -> intValue != 0\n \"B\" -> intValue.toByte()\n \"C\" -> intValue.toChar()\n \"S\" -> intValue.toShort()\n else -> throw AssertionError(desc)\n }\n } else {\n initializer\n }<|endoftext|>"} {"prompt":"\/\/ !API_VERSION: 1.0\n\n@SinceKotlin(\"1.1\")\nopen class Foo\n\nclass Bar @SinceKotlin(\"1.1\") constructor()\n\n@SinceKotlin(\"1.0\")\nclass Baz @SinceKotlin(\"1.1\") constructor()\n\n@SinceKotlin(\"1.1\")\nclass Quux @SinceKotlin(\"1.0\") constructor()","completion":"fun t1(): Foo = Foo()\n\n\/\/ TODO: do not report API_NOT_AVAILABLE twice\nfun t2() = object : Foo() {}<|endoftext|>"} {"prompt":"import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter\nimport org.jetbrains.org.objectweb.asm.tree.MethodNode\n\nclass IrSourceCompilerForInline(\n override val state: GenerationState,\n override val callElement: IrFunctionAccessExpression,\n private val callee: IrFunction,\n internal val codegen: ExpressionCodegen,","completion":"private val data: BlockInfo\n) : SourceCompilerForInline {\n override val callElementText: String\n get() = ir2string(callElement)\n\n override val inlineCallSiteInfo: InlineCallSiteInfo\n get() {\n val rootFunction = codegen.enclosingFunctionForLocalObjects\n return InlineCallSiteInfo(<|endoftext|>"} {"prompt":"override fun testNonAbiChangeInLib_changeMethodBody_tracked(gradleVersion: GradleVersion) {\n super.testNonAbiChangeInLib_changeMethodBody_tracked(gradleVersion)\n }\n\n @Disabled(\"KT-57147\")\n @GradleTest\n override fun testAbiChangeInLib_changeMethodSignature(gradleVersion: GradleVersion) {","completion":"super.testAbiChangeInLib_changeMethodSignature(gradleVersion)\n }\n\n @Disabled(\"KT-57147\")\n @GradleTest\n override fun testNonAbiChangeInLib_changeMethodBody(gradleVersion: GradleVersion) {\n super.testNonAbiChangeInLib_changeMethodBody(gradleVersion)\n }\n}<|endoftext|>"} {"prompt":"calleeReference.accept(visitor, data)\n }\n\n override fun transformChildren(transformer: FirTransformer, data: D): FirErrorAnnotationCallImpl {\n transformAnnotationTypeRef(transformer, data)\n transformTypeArguments(transformer, data)\n argumentList = argumentList.transform(transformer, data)","completion":"transformCalleeReference(transformer, data)\n return this\n }\n\n override fun transformAnnotations(transformer: FirTransformer, data: D): FirErrorAnnotationCallImpl {\n return this\n }\n\n override fun transformAnnotationTypeRef(transformer: FirTransformer, data: D): FirErrorAnnotationCallImpl {<|endoftext|>"} {"prompt":"val diagnosticsService = testServices.diagnosticsService\n\n fun processModule(module: TestModule) {\n if (!processedModules.add(module)) return\n for (testFile in module.files) {\n val ktDiagnostics = ktDiagnosticReporter.diagnosticsByFilePath[\"\/${testFile.name}\"] ?: continue\n ktDiagnostics.forEach {","completion":"if (diagnosticsService.shouldRenderDiagnostic(module, it.factoryName, it.severity)) {\n val metaInfos = it.toMetaInfos(module, testFile, globalMetadataInfoHandler, lightTreeEnabled, lightTreeComparingModeEnabled)\n globalMetadataInfoHandler.addMetadataInfosForFile(testFile, metaInfos)\n }\n }\n }<|endoftext|>"} {"prompt":"fun transformToNullable(a: AsInt): AsInt? = a as AsInt\n fun transformToNullableTarget(a: AsInt): AsInt? = a as AsInt?\n fun transformNullableToNullableTarget(a: AsInt?): AsInt? = a as AsInt?\n}\n\nfun box(): String {\n val a = AsAny(42)","completion":"val b1 = Reference.transform(a)\n val b2 = Reference.transformNullable(a)\n val b3 = Reference.transformToNullable(a)\n val b4 = Reference.transformToNullableTarget(a)\n val b5 = Reference.transformNullableToNullableTarget(a)<|endoftext|>"} {"prompt":"is WasmStructDeclaration ->\n gcTypes += type\n is WasmArrayDeclaration -> {}\n }\n }\n }\n\n \/\/ Import section\n 2 -> {\n forEachVectorElement {\n val importPair = WasmImportDescriptor(readString(), readString())\n when (val kind = b.readByte().toInt()) {\n 0 -> {","completion":"val type = functionTypes[b.readVarUInt32AsInt()]\n importedFunctions += WasmFunction.Imported(\n name = \"\",\n type = WasmSymbol(type),\n importPair = importPair,\n ).also { importsInOrder.add(it) }\n }\n \/\/ Table\n 1 -> {<|endoftext|>"} {"prompt":"val statements = result.declarations.statements\n val fileStatements = fileExports.file.accept(IrFileToJsTransformer(useBareParameterNames = true), staticContext).statements\n val exportFragment = fileExports.generateProgramFragmentForExport(mode, globalNameScope)\n\n if (fileStatements.isNotEmpty()) {\n var startComment = \"\"","completion":"if (generateRegionComments) {\n startComment = \"region \"\n }\n\n if (generateRegionComments || generateFilePaths) {\n val originalPath = fileExports.file.path\n val path = pathPrefixMap.entries\n .find { (k, _) -> originalPath.startsWith(k) }<|endoftext|>"} {"prompt":"override fun getFunctionNames(): Set =\n getContributedDescriptors(\n DescriptorKindFilter.FUNCTIONS, alwaysTrue()\n ).filterIsInstanceMapTo>(mutableSetOf()) { it.name }\n\n override fun getVariableNames(): Set =\n getContributedDescriptors(","completion":"DescriptorKindFilter.VARIABLES, alwaysTrue()\n ).filterIsInstanceMapTo>(mutableSetOf()) { it.name }\n\n override fun getClassifierNames(): Set? = null\n\n \/\/ This method should not be implemented here by default: every scope class has its unique structure pattern<|endoftext|>"} {"prompt":"val result_2 = select(A(B()), A(x), A(if (true) B() else null))\n val result_3 = select(A(x), A(if (true) B() else null))\n\n \")!>result_1","completion":"\")!>result_2\n \")!>result_3\n}\n\nfun case_2() {\n val x = Test.bar() \/\/ Any!\n val y: Any? = null<|endoftext|>"} {"prompt":"components: InferenceComponents,\n transformerComponents: BodyResolveComponents\n ): ConeCompositeConflictResolver {\n val specificityComparator = TypeSpecificityComparator.NONE\n \/\/ NB: Adding new resolvers is strongly discouraged because the results are order-dependent.\n return ConeCompositeConflictResolver(","completion":"ConeEquivalentCallConflictResolver(specificityComparator, components, transformerComponents),\n ConeIntegerOperatorConflictResolver,\n ConeOverloadConflictResolver(specificityComparator, components, transformerComponents),\n )\n }\n}<|endoftext|>"} {"prompt":"public external fun ByteArray.setCharAt(index: Int, value: Char)\n\n\/**\n * Sets [Short] out of the [ByteArray] byte buffer at specified index [index]\n * @throws IndexOutOfBoundsException if [index] is outside of array boundaries.\n *\/\n@ExperimentalNativeApi\n@GCUnsafeCall(\"Kotlin_ByteArray_setShortAt\")","completion":"public external fun ByteArray.setShortAt(index: Int, value: Short)\n\n\/**\n * Sets [UShort] out of the [ByteArray] byte buffer at specified index [index]\n * @throws IndexOutOfBoundsException if [index] is outside of array boundaries.\n *\/\n@ExperimentalNativeApi\n@GCUnsafeCall(\"Kotlin_ByteArray_setShortAt\")\n@ExperimentalUnsignedTypes<|endoftext|>"} {"prompt":"import kotlin.test.assertEquals\nimport kotlin.test.assertTrue\n\nclass HierarchicalModuleCommonizationTest : AbstractInlineSourcesCommonizationTest() {\n\n fun `test common modules hierarchically`() {\n val result = commonize {\n outputTarget(\"(a, b)\", \"(a, b, c)\")\n\n target(\"a\") {\n module {\n name = \"foo\"","completion":"source(\"val foo: Int = 1\")\n }\n\n module {\n name = \"bar\"\n source(\"val bar: Int = 1\")\n }\n }\n\n target(\"b\") {\n module {\n name = \"foo\"\n source(\"val foo: Int = 1\")\n }\n\n module {\n name = \"bar\"\n source(\"val bar: Int = 1\")<|endoftext|>"} {"prompt":"const val SURROGATE_CARDINALITY = 2048\n\n \/**\n * Character classes.\n * See http:\/\/www.unicode.org\/reports\/tr18\/, http:\/\/www.unicode.org\/Public\/4.1.0\/ucd\/Blocks.txt\n *\/\n enum class CharClasses(val regexName : String, val factory: () -> CachedCharClass) {","completion":"LOWER(\"Lower\", ::CachedLower),\n UPPER(\"Upper\", ::CachedUpper),\n ASCII(\"ASCII\", ::CachedASCII),\n ALPHA(\"Alpha\", ::CachedAlpha),\n DIGIT(\"Digit\", ::CachedDigit),\n ALNUM(\"Alnum\", :: CachedAlnum),\n PUNCT(\"Punct\", ::CachedPunct),<|endoftext|>"} {"prompt":"internal actual fun ulongDivide(v1: ULong, v2: ULong): ULong {\n val dividend = v1.toLong()\n val divisor = v2.toLong()\n if (divisor < 0) { \/\/ i.e., divisor >= 2^63:\n return if (v1 < v2) ULong(0) else ULong(1)\n }","completion":"\/\/ Optimization - use signed division if both dividend and divisor < 2^63\n if (dividend >= 0) {\n return ULong(dividend \/ divisor)\n }\n\n \/\/ Otherwise, approximate the quotient, check, and correct if necessary.\n val quotient = ((dividend ushr 1) \/ divisor) shl 1<|endoftext|>"} {"prompt":"is ObjCClass -> StubOrigin.ObjCClass(container, isMeta = true)\n }\n return listOf(buildClassStub(origin))\n }\n }\n)\n\ninternal class ObjCProtocolStubBuilder(\n context: StubsBuildingContext,\n private val protocol: ObjCProtocol\n) : ObjCClassOrProtocolStubBuilder(context, protocol), StubElementBuilder {","completion":"override fun build(): List {\n val classStub = buildClassStub(StubOrigin.ObjCProtocol(protocol, isMeta = false))\n return listOf(*metaContainerStub!!.build().toTypedArray(), classStub)\n }\n}\n\ninternal class ObjCClassStubBuilder(\n context: StubsBuildingContext,<|endoftext|>"} {"prompt":"UBInfo(0x0D80, 0x0DFF, \"Sinhala\"), \/\/ Character.UnicodeBlock.SINHALA\n \/* 0E00; 0E7F; Thai *\/\n UBInfo(0x0E00, 0x0E7F, \"Thai\"), \/\/ Character.UnicodeBlock.THAI\n \/* 0E80; 0EFF; Lao *\/","completion":"UBInfo(0x0E80, 0x0EFF, \"Lao\"), \/\/ Character.UnicodeBlock.LAO\n \/* 0F00; 0FFF; Tibetan *\/\n UBInfo(0x0F00, 0x0FFF, \"Tibetan\"), \/\/ Character.UnicodeBlock.TIBETAN\n \/* 1000; 109F; Myanmar *\/<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.backend.wasm.lower\n\nimport org.jetbrains.kotlin.backend.wasm.ir2wasm.WasmSignature\nimport org.jetbrains.kotlin.backend.wasm.ir2wasm.wasmSignature\nimport org.jetbrains.kotlin.ir.backend.js.JsCommonBackendContext","completion":"import org.jetbrains.kotlin.ir.backend.js.lower.BridgesConstruction\nimport org.jetbrains.kotlin.ir.declarations.IrDeclaration\nimport org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin\nimport org.jetbrains.kotlin.ir.declarations.IrSimpleFunction<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.tooling.core\n\nimport org.junit.Test\nimport kotlin.test.assertEquals\nimport kotlin.test.assertSame\n\nclass ClosureTest {\n\n private class Node(val value: String, var parent: Node? = null, val children: MutableList = mutableListOf()) {","completion":"override fun toString(): String = value\n }\n\n \/* 'Children' is explicitly not implementing Collection *\/\n private class IterableNode(val value: String, val children: Children = Children(mutableListOf())) {\n\n \/* Does not implement Collection *\/\n class Children(private val list: MutableList) : Iterable {<|endoftext|>"} {"prompt":"block: TestInterface.() -> Unit\n): R = TODO()\n\nclass Inv\n\ninterface TestInterface {\n fun emit(r: R)\n fun get(): R\n fun getInv(): Inv\n}\n\nfun id(x: U) = x\n\nfun test() {\n val ret = build {\n emit(\"1\")","completion":"get()\n \")!>getInv()\n \"\"\n }\n}<|endoftext|>"} {"prompt":"* Sealed class representing a type of path through a [Control Flow Graph (CFG) Node][org.jetbrains.kotlin.fir.resolve.dfa.cfg.CFGNode] used\n * for data flow analysis. Most CFG nodes only have a single data flow path through them, but there are times when a node may require","completion":"* multiple paths to be calculated. The most common use case is for `finally` code blocks, where multiple code paths may enter, but these\n * paths diverge after exiting the code block. Consider the following (very) contrived example:\n *\n * ```kotlin\n * fun test() {\n * var x: Any? = null\n * while (true) {\n * try {\n * x = \"\" \/\/ (1)<|endoftext|>"} {"prompt":"A.Companion::ext2\n A::ext2\n\n A::foo","completion":"A::bar\n}<|endoftext|>"} {"prompt":"configureKotlinPomAttributes(project)\n if (sbom && project.name !in internalPlugins) {\n if (name == \"pluginMaven\") {\n val sbomTask = configureSbom(target = \"PluginMaven\")\n artifact(sbomTask) {\n extension = \"spdx.json\"\n builtBy(sbomTask)\n }","completion":"} else if (name == \"Main\") {\n val sbomTask = configureSbom()\n artifact(sbomTask) {\n extension = \"spdx.json\"\n builtBy(sbomTask)\n }\n }\n }\n }\n }\n }\n configureDefaultPublishing(signingRequired)\n}\n\n\/**<|endoftext|>"} {"prompt":"return possiblePairBound == b.constructor.declarationDescriptor?.fqNameSafe\n }\n\n \/\/ We consider base bounds as readonly collection interfaces (e.g. kotlin.collections.Iterable).\n fun getBaseBoundFqNameByMutability(type: KotlinType): FqName? =","completion":"type.constructor.declarationDescriptor?.fqNameSafe?.let(::getBaseBoundFqNameByMutability)\n\n fun getBaseBoundFqNameByMutability(fqName: FqName): FqName? {\n return CommonFlexibleTypeBoundsChecker.getBaseBoundFqNameByMutability(fqName)\n }\n}<|endoftext|>"} {"prompt":"if (convert2.id() != '\u0001') return \"Fail 8.2\"\n if (convert3.id() != 1.toShort()) return \"Fail 8.3\"\n if (convert4.id() != 1) return \"Fail 8.4\"\n if (convert5.id() != 1L) return \"Fail 8.5\"","completion":"if (convert6.id() != 1.0f) return \"Fail 8.6\"\n if (convert7.id() != 1.0) return \"Fail 8.7\"\n\n if (equals1.id() != false) return \"Fail 9.1\"\n if (equals2.id() != true) return \"Fail 9.2\"<|endoftext|>"} {"prompt":"\/\/ 1 INVOKESTATIC KInterface2.access\\$setBar\\$jd\n\/\/ 1 INVOKESTATIC KInterface.access\\$getBar\\$jd\n\/\/ 1 INVOKESTATIC KInterface.access\\$setBar\\$jd\n\n\/\/ 1 INVOKESPECIAL KInterface2.getBar\n\/\/ 1 INVOKESPECIAL KInterface2.setBar","completion":"\/\/ 1 INVOKESPECIAL KInterface.getBar\n\/\/ 1 INVOKESPECIAL KInterface.setBar<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.descriptors.impl.PackageFragmentDescriptorImpl\nimport org.jetbrains.kotlin.incremental.ANDROID_LAYOUT_CONTENT_LOOKUP_NAME\nimport org.jetbrains.kotlin.incremental.components.LookupLocation\nimport org.jetbrains.kotlin.incremental.components.LookupTracker","completion":"import org.jetbrains.kotlin.incremental.recordPackageLookup\nimport org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.resolve.descriptorUtil.module\nimport org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter<|endoftext|>"} {"prompt":"if (sameAbiDir.exists()) {\n val sameAbi = Compilation(testDir, \"sameAbi\").also { make(it) }\n assertEqualDirectories(sameAbi.abiDir, base.abiDir, forgiveExtraFiles = false)\n }\n\n if (differentAbiDir.exists()) {","completion":"val differentAbi = Compilation(testDir, \"differentAbi\").also { make(it) }\n assertFails(\"$base and $differentAbi abi are equal\") {\n assertEqualDirectories(differentAbi.abiDir, base.abiDir, forgiveExtraFiles = false)\n }\n }\n }\n}<|endoftext|>"} {"prompt":"} catch (e: Throwable) {\n val psiFile = (file.fileEntry as? PsiIrFileEntry)?.psiFile\n CodegenUtil.reportBackendException(e, \"psi2ir\", psiFile?.virtualFile?.path ?: psiFile?.name ?: file.fileEntry.name)\n }\n }","completion":"private val descriptorGenerator = SyntheticDeclarationsGenerator(context)\n private val symbolTable = context.symbolTable\n\n override fun visitElement(element: IrElement) {\n element.acceptChildrenVoid(this)\n }\n\n override fun visitCall(expression: IrCall) {\n expression.acceptChildrenVoid(this)\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_INCREMENTAL_USE_CLASSPATH_SNAPSHOT\nimport org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_INTERNAL_DIAGNOSTICS_SHOW_STACKTRACE","completion":"import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_INTERNAL_DIAGNOSTICS_USE_PARSABLE_FORMATTING\nimport org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_JS_KARMA_BROWSERS<|endoftext|>"} {"prompt":"override fun condJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {\n if (jumpIfFalse) {\n genJumpIfFalse(v, jumpLabel)\n } else {\n genJumpIfTrue(v, jumpLabel)\n }\n }\n\n private fun genJumpIfTrue(v: InstructionAdapter, jumpLabel: Label) {","completion":"\/\/ if (arg is in range) goto jumpLabel\n\n frameMap.useTmpVar(operandType) { arg1Var ->\n val exitLabel1 = Label()\n val exitLabel2 = Label()\n\n boundedValue.putHighLow(v, operandType)\n\n arg1.put(operandType, v)\n v.store(arg1Var, operandType)<|endoftext|>"} {"prompt":"expression.transformChildrenVoid(this)\n\n val currentList = mutableListOf()\n val segments = mutableListOf()\n\n val arrayInfo = InlineClassArrayInfo(context, expression.varargElementType, expression.type)\n\n for (e in expression.elements) {\n when (e) {\n is IrSpreadElement -> {","completion":"if (currentList.isNotEmpty()) {\n segments.add(arrayInfo.toPrimitiveArrayLiteral(currentList))\n currentList.clear()\n }\n segments.add(arrayInfo.unboxElementIfNeeded(e.expression))\n }\n\n is IrExpression -> {\n currentList.add(arrayInfo.unboxElementIfNeeded(e))\n }<|endoftext|>"} {"prompt":"): KotlinCoreEnvironment? {\n if (messageCollector.hasErrors()) return null\n\n val environment = KotlinCoreEnvironment.createForProduction(rootDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES)\n\n val sourceFiles = environment.getSourceFiles()\n configuration[CLIConfigurationKeys.PERF_MANAGER]?.notifyCompilerInitialized(","completion":"sourceFiles.size, environment.countLinesOfCode(sourceFiles), targetDescription\n )\n\n return if (messageCollector.hasErrors()) null else environment\n }\n\n override fun setupPlatformSpecificArgumentsAndServices(\n configuration: CompilerConfiguration, arguments: K2JVMCompilerArguments, services: Services\n ) {\n with(configuration) {<|endoftext|>"} {"prompt":"object None : SourceSetTreeClassifier() {\n override fun toString(): String = \"None\"\n }\n\n @ExternalKotlinTargetApi\n data class Value(val tree: SourceSetTree) : SourceSetTreeClassifier()\n\n\n @ExternalKotlinTargetApi\n data class Name(val name: String) : SourceSetTreeClassifier()","completion":"@ExternalKotlinTargetApi\n class Property(val property: org.gradle.api.provider.Property) : SourceSetTreeClassifier() {\n override fun toString(): String {\n return property.toString()\n }\n }\n\n internal suspend fun classify(compilation: KotlinCompilation<*>): SourceSetTree? {\n return when (this) {<|endoftext|>"} {"prompt":"* Returns a list containing only the non-null results of applying the given [transform] function\n * to each element in the original collection.\n * \n * @sample samples.collections.Collections.Transformations.mapNotNull\n *\/\npublic inline fun Iterable.mapNotNull(transform: (T) -> R?): List {","completion":"return mapNotNullTo(ArrayList(), transform)\n}\n\n\/**\n * Applies the given [transform] function to each element in the original collection\n * and appends only the non-null results to the given [destination].\n *\/<|endoftext|>"} {"prompt":"@kotlin.SinceKotlin(version = \"1.1\")\n@kotlin.internal.InlineOnly\npublic inline fun minOf(a: kotlin.Long, b: kotlin.Long, c: kotlin.Long): kotlin.Long\n\n@kotlin.SinceKotlin(version = \"1.4\")","completion":"public fun minOf(a: kotlin.Long, vararg other: kotlin.Long): kotlin.Long\n\n@kotlin.SinceKotlin(version = \"1.1\")\n@kotlin.internal.InlineOnly\npublic inline fun minOf(a: kotlin.Short, b: kotlin.Short): kotlin.Short<|endoftext|>"} {"prompt":"}\n assertEquals(expected, namesBottomUp, \"Bottom-up walk results differ\")\n }\n\n @Test fun withDirectoryFilter() {\n val basedir = createTestFiles()\n try {\n \/\/ Every directory ended with 3 and its content is filtered out\n fun filter(file: File): Boolean = !file.name.endsWith(\"3\")","completion":"val referenceNames = listOf(\"\", \"1\", \"1\/2\", \"6\", \"7.txt\", \"8\", \"8\/9.txt\").map { File(it).path }.toSet()\n compareWalkResults(referenceNames, basedir, ::filter)\n } finally {\n basedir.deleteRecursively()\n }\n }\n\n @Test fun withTotalDirectoryFilter() {<|endoftext|>"} {"prompt":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.RedundantExplicitType\n\ninternal class RedundantSingleExpressionStringTemplateImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.RedundantSingleExpressionStringTemplate\n\ninternal class CanBeValImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"@kotlin.internal.InlineOnly\npublic inline fun > CharArray.maxOf(selector: (Char) -> R): R {\n if (isEmpty()) throw NoSuchElementException()\n var maxValue = selector(this[0])\n for (i in 1..lastIndex) {\n val v = selector(this[i])\n if (maxValue < v) {","completion":"maxValue = v\n }\n }\n return maxValue\n}\n\n\/**\n * Returns the largest value among all values produced by [selector] function\n * applied to each element in the array or `null` if there are no elements.\n * \n * If any of values produced by [selector] function is `NaN`, the returned result is `NaN`.\n *\/\n@SinceKotlin(\"1.4\")<|endoftext|>"} {"prompt":"val jsQualifierFqn = FqName(\"kotlin.js.JsQualifier\")\n val jsExportFqn = FqName(\"kotlin.js.JsExport\")\n val jsImplicitExportFqn = FqName(\"kotlin.js.JsImplicitExport\")\n val jsExportIgnoreFqn = FqName(\"kotlin.js.JsExport.Ignore\")","completion":"val jsNativeGetter = FqName(\"kotlin.js.nativeGetter\")\n val jsNativeSetter = FqName(\"kotlin.js.nativeSetter\")\n val jsNativeInvoke = FqName(\"kotlin.js.nativeInvoke\")\n val jsFunFqn = FqName(\"kotlin.js.JsFun\")<|endoftext|>"} {"prompt":"name = \"kotlin-library\"\n podfile = project.file(\"ios-app\/Podfile\")\n \"\"\".trimIndent()\n )\n\n buildAndFailWithCocoapodsWrapper(podInstallTaskName) {\n assertOutputContains(missingPodExecutableInPath)\n }\n\n projectPath.resolve(\"local.properties\")","completion":".also { if (!it.exists()) it.createFile() }\n .apply {\n append(\"\\n\")\n appendText(\n \"\"\"\n kotlin.apple.cocoapods.bin=${podPath}\n \"\"\".trimIndent()\n )\n }\n\n buildWithCocoapodsWrapper(podInstallTaskName) {<|endoftext|>"} {"prompt":"val mit = MIt()\n val arrayList = ArrayList()\n\n asFailsWithCCE(\"it as MutableIterable\") { it as MutableIterable<*> }\n asSucceeds(\"mit as MutableIterable\") { mit as MutableIterable<*> }","completion":"asSucceeds(\"arrayList as MutableIterable\") { arrayList as MutableIterable<*> }\n\n val coll = C() as Any\n val mcoll = MC()\n\n asFailsWithCCE(\"coll as MutableIterable\") { coll as MutableIterable<*> }\n asFailsWithCCE(\"coll as MutableCollection\") { coll as MutableCollection<*> }<|endoftext|>"} {"prompt":"return CallComputation(ESBooleanType, or.functor.invokeWithArguments(left, right))\n }\n\n override fun visitVariable(esVariable: ESVariable): Computation = substitutions[esVariable] ?: esVariable\n\n override fun visitConstant(esConstant: ESConstant): Computation = esConstant","completion":"override fun visitReceiver(esReceiver: ESReceiver): ESReceiver = esReceiver\n\n override fun visitLambda(lambda: ESValue): Computation = lambda\n}<|endoftext|>"} {"prompt":"builder.register(IncrementalResultsConsumer::class.java, RemoteIncrementalResultsConsumer(facade, eventManager, rpcProfiler))\n }\n if (facade.hasIncrementalDataProvider()) {\n builder.register(IncrementalDataProvider::class.java, RemoteIncrementalDataProvider(facade, rpcProfiler))\n }\n\n return builder.build()\n }","completion":"override fun leaseReplSession(\n aliveFlagPath: String?,\n compilerArguments: Array,\n compilationOptions: CompilationOptions,\n servicesFacade: CompilerServicesFacadeBase,\n templateClasspath: List,\n templateClassName: String,\n ): CompileService.CallResult = ifAlive(minAliveness = Aliveness.Alive) {<|endoftext|>"} {"prompt":"val test = Test(P1(\"\"), P1(\"My\"), Sealed1(1), Sealed1(5))\n test.writeToParcel(parcel, 0)\n\n val bytes = parcel.marshall()\n parcel.unmarshall(bytes, 0, bytes.size)\n parcel.setDataPosition(0)","completion":"val test2 = parcelableCreator().createFromParcel(parcel)\n assert(test == test2)\n}<|endoftext|>"} {"prompt":"private var _functionFactory: IrAbstractDescriptorBasedFunctionFactory? = null\n var functionFactory: IrAbstractDescriptorBasedFunctionFactory\n get() =\n synchronized(this) {\n if (_functionFactory == null) {\n _functionFactory = IrDescriptorBasedFunctionFactory(this, symbolTable, typeTranslator)\n }\n _functionFactory!!\n }\n set(value) {","completion":"synchronized(this) {\n if (_functionFactory != null) {\n error(\"functionFactory already set\")\n } else {\n _functionFactory = value\n }\n }\n }\n\n override val irFactory: IrFactory = symbolTable.irFactory\n\n private val builtInsModule = builtIns.builtInsModule<|endoftext|>"} {"prompt":"val midVal = get(mid)\n val cmp = comparison(midVal)\n\n if (cmp < 0)\n low = mid + 1\n else if (cmp > 0)\n high = mid - 1\n else\n return mid \/\/ key found\n }\n return -(low + 1) \/\/ key not found\n}\n\n\/**\n * Checks that `from` and `to` are in","completion":"* the range of [0..size] and throws an appropriate exception, if they aren't.\n *\/\nprivate fun rangeCheck(size: Int, fromIndex: Int, toIndex: Int) {\n when {\n fromIndex > toIndex -> throw IllegalArgumentException(\"fromIndex ($fromIndex) is greater than toIndex ($toIndex).\")<|endoftext|>"} {"prompt":"override fun hashCode() =\n identityHashCode\n\n override fun toString() =\n ref.get()?.toString() ?: \"\"\n}\n\ninternal fun Class<*>.getOrCreateModule(): RuntimeModuleData {\n val classLoader = this.safeClassLoader\n\n val key = WeakClassLoaderBox(classLoader)\n\n val cached = moduleByClassLoader[key]","completion":"if (cached != null) {\n cached.get()?.let { return it }\n moduleByClassLoader.remove(key, cached)\n }\n\n val module = RuntimeModuleData.create(classLoader)\n try {\n while (true) {\n val ref = moduleByClassLoader.putIfAbsent(key, WeakReference(module)) ?: return module<|endoftext|>"} {"prompt":"* subtype = List<...>\n * result = List<*>, some arguments were not inferred, replaced with '*'\n *\/\n @JvmStatic\n fun findStaticallyKnownSubtype(supertype: KotlinType, subtypeConstructor: TypeConstructor): TypeReconstructionResult {\n assert(!supertype.isMarkedNullable) { \"This method only makes sense for non-nullable types\" }","completion":"\/\/ Assume we are casting an expression of type Collection to List\n \/\/ First, let's make List, where T is a type variable\n val descriptor = subtypeConstructor.declarationDescriptor ?: error(\"Can't create default type for \" + subtypeConstructor)\n val subtypeWithVariables = descriptor.defaultType<|endoftext|>"} {"prompt":"fun outer() {\n fun test1(): Int = { return 1 }","completion":"fun test2(): Int = { 1 }<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\nimport kotlin.test.assertEquals\n\nclass C(val expected: Int) {\n fun memberVararg(i: Int, vararg s: String) {\n assertEquals(expected, i)\n assertEquals(0, s.size)\n }\n\n fun memberDefault(i: Int, s: String = \"\") {\n assertEquals(expected, i)","completion":"assertEquals(\"\", s)\n }\n\n fun memberBoth(i: Int, s: String = \"\", vararg t: String) {\n assertEquals(expected, i)\n assertEquals(\"\", s)\n assertEquals(0, t.size)\n }\n}\n\nfun C.extensionVararg(i: Int, vararg s: String) {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.fir.analysis.checkers.expression\n\nimport org.jetbrains.kotlin.KtSourceElement\nimport org.jetbrains.kotlin.builtins.StandardNames\nimport org.jetbrains.kotlin.config.AnalysisFlags\nimport org.jetbrains.kotlin.diagnostics.DiagnosticReporter","completion":"import org.jetbrains.kotlin.fir.analysis.checkers.MppCheckerKind\nimport org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext\nimport org.jetbrains.kotlin.fir.analysis.checkers.fullyExpandedClassId\nimport org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression<|endoftext|>"} {"prompt":"} else {\n CommandFallback.Error(sharedHandleError(podInstallCommand, result))\n }\n },\n processConfiguration = {\n directory(workingDir.get())\n \/\/ CocoaPods requires to be run with Unicode external encoding\n environment().putIfAbsent(\"LC_ALL\", \"en_US.UTF-8\")\n })\n }","completion":"private fun sharedHandleError(podInstallCommand: List, result: RunProcessResult): String? {\n val command = podInstallCommand.joinToString(\" \")\n val output = result.stdErr.ifBlank { result.stdOut }\n\n var message = \"\"\"\n |'$command' command failed with an exception:\n | stdErr: ${result.stdErr}<|endoftext|>"} {"prompt":"OBJECT_PARAMETER_GENERIC(\"Ljava\/lang\/Object;\", true)\n }\n\n companion object {\n fun getSpecialSignatureInfo(builtinSignature: String): SpecialSignatureInfo {\n if (builtinSignature in ERASED_COLLECTION_PARAMETER_SIGNATURES) return SpecialSignatureInfo.ONE_COLLECTION_PARAMETER","completion":"val defaultValue = SIGNATURE_TO_DEFAULT_VALUES_MAP.getValue(builtinSignature)\n\n return if (defaultValue == TypeSafeBarrierDescription.NULL) {\n \/\/ return type is some generic type as 'Map.get'\n SpecialSignatureInfo.OBJECT_PARAMETER_GENERIC\n } else<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments\nimport org.jetbrains.kotlin.cli.common.extensions.ScriptEvaluationExtension\nimport org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation\nimport org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity","completion":"import org.jetbrains.kotlin.cli.common.messages.MessageCollector\nimport org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment\nimport org.jetbrains.kotlin.config.CompilerConfiguration\nimport org.jetbrains.kotlin.scripting.configuration.ScriptingConfigurationKeys<|endoftext|>"} {"prompt":"fun shareTypeInfo(from: T, to: T) {}\n val buildee = build {\n shareTypeInfo(0x13, materialize())\n }\n checkExactType>(buildee)\n }\n fun test3() {\n fun shareTypeInfo(from: T, to: T) {}\n val buildee = build {","completion":"shareTypeInfo(0b1000, materialize())\n }\n checkExactType>(buildee)\n }\n\n test1()\n test2()\n test3()\n }\n\n testBasicCase()\n testLiterals()\n}\n\nfun box(): String {\n testYield()\n testMaterialize()\n return \"OK\"\n}<|endoftext|>"} {"prompt":"if (test3(p = *arrayOf(\"1\")) != \"1\") return \"fail 29\"\n if (test3(p = *arrayOf(\"1\", \"2\")) != \"12\") return \"fail 30\"\n\n return \"OK\"\n}\n\nfun test1(vararg p: Int): String {\n var result = \"\"\n for (i in p) {\n result += i","completion":"}\n return result\n}\n\nfun test2(vararg p: String): String {\n var result = \"\"\n for (i in p) {\n result += i\n }\n return result\n}\n\nfun test3(vararg p: T): String {\n var result = \"\"\n for (i in p) {\n result += i\n }\n return result\n}<|endoftext|>"} {"prompt":"},\n valueParameter.returnTypeRef,\n extractedAnnotations = valueParameter.annotations\n )\n if (multiDeclaration != null) {\n addDestructuringStatements(\n statements,\n baseModuleData,\n multiDeclaration,\n firLoopParameter,\n tmpVariable = true,\n forceLocal = true,\n )\n } else {","completion":"statements.add(firLoopParameter)\n }\n statements += convertLoopBody(blockNode)\n }\n }\n }\n }\n\n \/**\n * @see org.jetbrains.kotlin.parsing.KotlinExpressionParsing.parseLoopBody<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.resolve.sam.SAM_LOOKUP_NAME\n\n\/\/TODO(valtman) Should be in gradle daemon.\nclass AbiSnapshotDiffService() {\n\n companion object {\n \/\/Store list of changed lookups","completion":"private val diffCache: MutableMap, DirtyData> = mutableMapOf()\n\n \/\/TODO(valtman) move out from Kotlin daemon\n fun compareJarsInternal(\n oldSnapshot: AbiSnapshot, newSnapshot: AbiSnapshot,\n caches: IncrementalCacheCommon<|endoftext|>"} {"prompt":"this@case_5 is ClassLevel1 && this@case_5_1_1 is Float)","completion":"}<|endoftext|>"} {"prompt":"throw UnsupportedOperationException()\n }\n\n override fun remove(o: Int) = true\n\n override fun removeAt(index: Int): Int = 123\n\n override fun addAll(c: Collection): Boolean {\n throw UnsupportedOperationException()\n }\n\n override fun addAll(index: Int, c: Collection): Boolean {\n throw UnsupportedOperationException()","completion":"}\n\n override fun removeAll(c: Collection): Boolean {\n throw UnsupportedOperationException()\n }\n\n override fun retainAll(c: Collection): Boolean {\n throw UnsupportedOperationException()\n }\n\n override fun clear() {\n throw UnsupportedOperationException()\n }\n\n override fun set(index: Int, element: Int): Int {<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION\n\ninterface Bound1\ninterface Bound2 \nobject First : Bound1, Bound2\nobject Second : Bound1, Bound2\n\nfun intersect(vararg elements: S): S = TODO()\n\nfun topLevelFunction() = intersect(First, Second)","completion":"val Any.extensionProperty\n get() = intersect(First, Second)\n\nfun Any.extensionFunction() = intersect(First, Second)\n\nclass Cls {\n val publicProperty = intersect(First, Second)\n private val privateProperty = intersect(First, Second)\n\n fun publicMemberFunction() = intersect(First, Second)\n private fun privateMemberFunction() = intersect(First, Second)<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.cfg.pseudocode\n\nimport com.google.common.collect.HashMultimap\nimport com.google.common.collect.Multimap\nimport com.intellij.util.containers.BidirectionalMap\nimport org.jetbrains.kotlin.cfg.Label","completion":"import org.jetbrains.kotlin.cfg.pseudocode.instructions.*\nimport org.jetbrains.kotlin.cfg.pseudocode.instructions.eval.MagicInstruction\nimport org.jetbrains.kotlin.cfg.pseudocode.instructions.eval.MagicKind<|endoftext|>"} {"prompt":"fun f2(x: I1) = x.k\n\n\/\/ MODULE: platform()()(common)\n\/\/ FILE: platform.kt\n\nactual open class C1 {\n actual fun o() = \"O\"\n\n actual val k = \"K\"\n}\n\nactual interface I1 {\n actual fun o(): String\n\n actual val k: String\n}","completion":"fun box() = f1(C()) + f2(C())<|endoftext|>"} {"prompt":"* NUMBER: 1\n * DESCRIPTION: Check Elvis evaluation\n *\/\n\n\nfun box(): String {\n val x: Boolean? = null ?: getNull(null) ?: A().b ?: getTrue() ?: false\n val s = null == getNull(null) ?: !getNullableTrue()!! || getFalse() ?: false","completion":"val k = ((getNull(null)?: getNull(null) ) ?: getNull(true)) ?: getFalse()\n try {\n val y = null ?: throw ExcA()\n } catch (e: ExcA) {\n\n if ((x == true && !s && k!!)) return \"OK\"\n }\n\n return \"NOK\"\n}\nfun getTrue() = true<|endoftext|>"} {"prompt":"val library = buildNativeLibraryFrom(defFile, files.directory)\n val index = buildNativeIndex(library, false).index\n\n index.objCClasses.find { it.name == \"Foo\" }.let { cls ->\n assertNotNull(cls, \"Class 'Foo' not found in native library $library\")","completion":"assertNotNull(cls.methods.find { it.selector == \"direct\" && it.isClass && it.isDirect })\n assertNotNull(cls.methods.find { it.selector == \"direct\" && !it.isClass && it.isDirect })\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives\nimport org.jetbrains.kotlin.test.directives.configureFirParser\nimport org.jetbrains.kotlin.test.model.BinaryKind\nimport org.jetbrains.kotlin.test.model.DependencyKind","completion":"import org.jetbrains.kotlin.test.model.FrontendKind\nimport org.jetbrains.kotlin.test.model.FrontendKinds\nimport org.jetbrains.kotlin.test.preprocessors.IrInterpreterImplicitKotlinImports\nimport org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest<|endoftext|>"} {"prompt":"(*a) -> {}\n }\n}\n\nfun testWithSubject_bad_4(b: B) {\n var x = b\n \/\/ bad\n when (b) {","completion":"x = b -> {}\n b += b -> {}\n b -= b -> {}<|endoftext|>"} {"prompt":"@kotlin.internal.InlineOnly\npublic inline fun UShortArray.indexOfLast(predicate: (UShort) -> Boolean): Int {\n return storage.indexOfLast { predicate(it.toUShort()) }\n}\n\n\/**\n * Returns the last element.\n * \n * @throws NoSuchElementException if the array is empty.\n *","completion":"* @sample samples.collections.Collections.Elements.last\n *\/\n@SinceKotlin(\"1.3\")\n@ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly\npublic inline fun UIntArray.last(): UInt {\n return storage.last().toUInt()\n}\n\n\/**\n * Returns the last element.\n *<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\nimport kotlin.reflect.KCallable\n\nclass Foo {\n fun installRoute(handler: T) where T : (String) -> Any?, T : KCallable<*> {\n }","completion":"fun installRoute(handler: T) where T : () -> Any?, T : KCallable<*> {\n }\n\n fun foo() {\n installRoute(::route)\n }\n\n}\n\nfun route(s: String): Any? = null<|endoftext|>"} {"prompt":"fun set4(a: Double, v: String): Any = 1\n\n @nativeSetter\n fun set5(a: Double, v: String): CharSequence = \"OK\"\n\n companion object {","completion":"@nativeSetter\n fun set(a: String, v: Any?): Any? = null\n\n @nativeSetter<|endoftext|>"} {"prompt":"a()\n b()\n bar2 {\n a()\n b()\n }\n }\n\n bar2 {\n a()\n b()\n }\n }\n\n foo2 {\n a()\n\n bar1 {\n a()","completion":"b()\n bar2 {\n a()\n b()\n }\n }\n\n bar2 {\n a()\n b()\n }\n }\n\n bar1 {\n b()\n bar2 {\n b()\n }\n }<|endoftext|>"} {"prompt":"@Deprecated(\"Use CharArray.concatToString(startIndex, endIndex) instead\", ReplaceWith(\"chars.concatToString(offset, offset + length)\"))\n@DeprecatedSinceKotlin(warningSince = \"1.4\", errorSince = \"1.5\")\npublic actual fun String(chars: CharArray, offset: Int, length: Int): String {","completion":"if (offset < 0 || length < 0 || offset + length > chars.size)\n throw IndexOutOfBoundsException()\n\n val copy = WasmCharArray(length)\n copyWasmArray(chars.storage, copy, offset, 0, length)\n return copy.createString()\n}\n\n\/**\n * Concatenates characters in this [CharArray] into a String.\n *\/<|endoftext|>"} {"prompt":"if (this is FirPropertyAccessor && visibility == propertySymbol.visibility) return false\n if (this !is FirMemberDeclaration || visibility != Visibilities.Private) return false\n\n val containingDeclaration = getContainingClassSymbol(session) ?: return false\n return isNativeOrEffectivelyExternal(containingDeclaration, session)\n }","completion":"private fun FirDeclaration.isNonAbstractMemberIfInterface(session: FirSession): Boolean {\n return this is FirCallableDeclaration\n && modality != Modality.ABSTRACT\n && (getContainingClassSymbol(session) as? FirClassSymbol<*>)?.classKind == ClassKind.INTERFACE\n && this !is FirPropertyAccessor\n }<|endoftext|>"} {"prompt":"if (Modifier.STATIC in this) {\n JavaVisibilities.ProtectedStaticVisibility\n } else {\n JavaVisibilities.ProtectedAndPackage\n }\n }\n else -> JavaVisibilities.PackageVisibility\n }\n\n\ninternal fun TypeElement.computeClassId(): ClassId? {\n val enclosingElement = enclosingElement","completion":"if (enclosingElement.kind != ElementKind.PACKAGE) {\n val parentClassId = (enclosingElement as TypeElement).computeClassId() ?: return null\n return parentClassId.createNestedClassId(Name.identifier(simpleName.toString()))\n }\n\n return ClassId.topLevel(FqName(qualifiedName.toString()))\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.internal.testing\n\nimport jetbrains.buildServer.messages.serviceMessages.ServiceMessage\nimport jetbrains.buildServer.messages.serviceMessages.ServiceMessageParserCallback\nimport jetbrains.buildServer.messages.serviceMessages.TestFailed\nimport org.gradle.api.GradleException","completion":"import org.jetbrains.kotlin.gradle.internal.testing.TCServiceMessageOutputStreamHandler.Companion.MESSAGE_LIMIT_BYTES\nimport org.slf4j.Logger\nimport java.io.ByteArrayOutputStream\nimport java.io.IOException\nimport java.io.OutputStream\n\n\/**\n * Provides output stream that handles lines and parsing it for TeamCity server messages.<|endoftext|>"} {"prompt":"\/\/ This file was generated automatically. See compiler\/ir\/ir.tree\/tree-generator\/ReadMe.md.\n\/\/ DO NOT MODIFY IT MANUALLY.\n\npackage org.jetbrains.kotlin.ir.visitors\n\nimport org.jetbrains.kotlin.ir.IrElement\nimport org.jetbrains.kotlin.ir.IrStatement","completion":"import org.jetbrains.kotlin.ir.declarations.*\nimport org.jetbrains.kotlin.ir.expressions.*\nimport org.jetbrains.kotlin.ir.types.IrType\n\n\/**\n * Auto-generated by [org.jetbrains.kotlin.ir.generator.print.TypeTransformerPrinter]\n *\/<|endoftext|>"} {"prompt":"fooLamdbdaVar\\21:int=2:int, barParam\\22:int=2:int, $i$f$bar\\22\\56:int=0:int, barVar\\22:int=2:int, barLambdaParam\\23:int=1:int, $i$a$-bar-TestKt$box$1$1\\23\\236\\21:int=0:int,","completion":"barLamdbdaVar\\23:int=3:int<|endoftext|>"} {"prompt":"public int getSize() {\n return 0;\n }\n\n @Override\n public void add(int i, Integer integer) {}\n\n @Override\n public Integer removeAt(int i) {\n return null;\n }\n\n @Override\n public Integer get(int index) {\n return null;\n }\n\n @Override\n public Integer set(int i, Integer integer) {","completion":"return null;\n }\n}\n\n\/\/ FILE: 1.kt\nclass A : Java1()<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.symbols.KtSymbol\nimport org.jetbrains.kotlin.psi.KtDestructuringDeclarationEntry\n\nclass KtFirDestructuringDeclarationReference(\n element: KtDestructuringDeclarationEntry\n) : KtDestructuringDeclarationReference(element), KtFirReference {","completion":"override fun canRename(): Boolean = false \/\/todo\n\n override fun KtAnalysisSession.resolveToSymbols(): Collection {\n check(this is KtFirAnalysisSession)\n val fir = expression.getOrBuildFirSafe(firResolveSession) ?: return emptyList()\n return listOfNotNull(<|endoftext|>"} {"prompt":"import b.constant.fff \/\/function from val\nimport b.constant.dValue \/\/property from val","completion":"import b.constant\nimport b.E.Companion.f \/\/val from companion object\nimport smth.illegal<|endoftext|>"} {"prompt":"LONG -> KmAnnotationArgument.ULongValue(intValue.toULong())\n else -> error(\"Cannot read value of unsigned type: $type\")\n }\n }\n\n return when (type) {\n BYTE -> KmAnnotationArgument.ByteValue(intValue.toByte())\n CHAR -> KmAnnotationArgument.CharValue(intValue.toInt().toChar())","completion":"SHORT -> KmAnnotationArgument.ShortValue(intValue.toShort())\n INT -> KmAnnotationArgument.IntValue(intValue.toInt())\n LONG -> KmAnnotationArgument.LongValue(intValue)\n FLOAT -> KmAnnotationArgument.FloatValue(floatValue)\n DOUBLE -> KmAnnotationArgument.DoubleValue(doubleValue)<|endoftext|>"} {"prompt":"public fun assertSame(message: String?, expected: Any?, actual: Any?): Unit {\n assertTrue({ messagePrefix(message) + \"Expected <$expected>, actual <$actual> is not same.\" }, actual === expected)\n }\n\n \/**\n * Asserts that the specified values are not the same instance.\n *\n * @param message the message to report if the assertion fails.\n *\/","completion":"public fun assertNotSame(message: String?, illegal: Any?, actual: Any?): Unit {\n assertTrue({ messagePrefix(message) + \"Expected not same as <$actual>.\" }, actual !== illegal)\n }\n\n \/**\n * Asserts that the specified value is `null`.\n *\n * @param message the message to report if the assertion fails.\n *\/<|endoftext|>"} {"prompt":"NullPointer(llvm.int32Type), NullPointer(llvm.int8Type), NullPointer(llvm.int8PtrType),\n debugOperationsSize, debugOperations)\n } else {\n class FieldRecord(val offset: Int, val type: Int, val name: String)\n\n val fields = context.getLayoutBuilder(irClass).getFields(llvm).map {","completion":"val index = llvmDeclarations.fieldIndices[it.irFieldSymbol]!!\n FieldRecord(\n LLVMOffsetOfElement(llvmTargetData, bodyType, index).toInt(),\n mapRuntimeType(LLVMStructGetTypeAtIndex(bodyType, index)!!),\n it.name)\n }<|endoftext|>"} {"prompt":"): CDPMethodInvocationResult\n}\n\nprivate suspend inline fun CDPRequestEvaluator.evaluateRequest(\n noinline body: (Int) -> Pair\n) = genericEvaluateRequest(body) as T\n\n\/**","completion":"* The [`Runtime` domain](https:\/\/chromedevtools.github.io\/devtools-protocol\/tot\/Runtime\/) of Chrome DevTools protocol.\n *\/\nclass Runtime(private val requestEvaluator: CDPRequestEvaluator) {\n\n \/**\n * Enables reporting of execution contexts creation by means of [Runtime.Event.ExecutionContextCreated] event.<|endoftext|>"} {"prompt":"get() = rootPackageJsonFile.getFile()\n\n @get:PathSensitive(PathSensitivity.RELATIVE)\n @get:IgnoreEmptyDirectories\n @get:NormalizeLineEndings\n @get:InputFiles\n val packageJsonFiles: List by lazy {\n rootResolver.projectResolvers.values\n .flatMap { it.compilationResolvers }","completion":".map { it.compilationNpmResolution }\n .map { resolution ->\n val name = resolution.npmProjectName\n packagesDir.map { it.dir(name).file(NpmProject.PACKAGE_JSON) }.get()\n }\n }\n\n @TaskAction\n fun resolve() {<|endoftext|>"} {"prompt":"val interopObjCProtocol = interopClass(InteropFqNames.objCProtocolName)\n\n val interopObjCRelease = interopFunction(\"objc_release\")\n\n val interopObjCRetain = interopFunction(\"objc_retain\")\n\n val interopObjcRetainAutoreleaseReturnValue = interopFunction(\"objc_retainAutoreleaseReturnValue\")","completion":"val interopCreateObjCObjectHolder = interopFunction(\"createObjCObjectHolder\")\n\n val interopCreateKotlinObjectHolder = interopFunction(\"createKotlinObjectHolder\")\n val interopUnwrapKotlinObjectHolderImpl = interopFunction(\"unwrapKotlinObjectHolderImpl\")\n\n val interopCreateObjCSuperStruct = interopFunction(\"createObjCSuperStruct\")<|endoftext|>"} {"prompt":"IrConstKind.String -> buildLiteralExpression(\n source = null,\n ConstantValueKind.String,\n argument.value as String,\n setType = true\n )\n }\n }\n }\n }\n }\n\n private object GeneratedForMetadata : GeneratedDeclarationKey()\n\n private inner class Provider : FirAdditionalMetadataProvider() {","completion":"override fun findGeneratedAnnotationsFor(declaration: FirDeclaration): List {\n val irAnnotations = extractGeneratedIrDeclarations(declaration).takeUnless { it.isEmpty() } ?: return emptyList()\n return irAnnotations.map { it.toFirAnnotation() }\n }<|endoftext|>"} {"prompt":"import kotlin.properties.ReadOnlyProperty\nimport kotlin.reflect.KProperty\n\ninternal sealed class SlotType {\n \/\/ An object is statically allocated on stack.\n object STACK : SlotType()\n\n \/\/ Frame local arena slot can be used.\n object ARENA : SlotType()\n\n \/\/ Return slot can be used.\n object RETURN : SlotType()","completion":"\/\/ Return slot, if it is an arena, can be used.\n object RETURN_IF_ARENA : SlotType()\n\n \/\/ Param slot, if it is an arena, can be used.\n class PARAM_IF_ARENA(val parameter: Int) : SlotType()\n\n \/\/ Params slot, if it is an arena, can be used.<|endoftext|>"} {"prompt":"* UNEXPECTED BEHAVIOUR\n * ISSUES: KT-30376\n *\/\nfun case_2(x: Class?) {\n if ((x as Class).prop_8?.prop_8?.prop_8?.prop_8 !== null) {\n x","completion":"x.prop_8\n x.prop_8.prop_8<|endoftext|>"} {"prompt":"fieldAnnotations, static, overriddenNode, defaultMethodsImplementationSourceNode, oldGetter, modality, oldField\n ).also {\n updateAnnotationsAndPropertyFromOldProperty(oldProperty, context, it)\n }\n}\n\nfun createIntermediateNodeForStandaloneMfvcField(\n parent: IrClass,\n context: JvmBackendContext,\n oldField: IrField,","completion":"): IntermediateMfvcNode {\n val type = oldField.type\n require(type is IrSimpleType && type.needsMfvcFlattening()) { \"Expected MFVC but got ${type.render()}\" }\n return createIntermediateMfvcNode(\n parent, context, type, makeTypeArgumentsFromType(type), MethodFullNameMode.Getter, listOf(oldField.name),<|endoftext|>"} {"prompt":"private fun generateGenericArrayCheck(argument: IrExpression) =\n JsIrBuilder.buildCall(isArraySymbol).apply { putValueArgument(0, argument) }\n\n private fun generateNumberCheck(argument: IrExpression) =\n JsIrBuilder.buildCall(context.intrinsics.isNumberSymbol).apply { putValueArgument(0, argument) }","completion":"private fun generateComparableCheck(argument: IrExpression) =\n JsIrBuilder.buildCall(context.intrinsics.isComparableSymbol).apply { putValueArgument(0, argument) }\n\n private fun generateCharSequenceCheck(argument: IrExpression) =<|endoftext|>"} {"prompt":"reporter.reportOn(\n defaultValue.source,\n ComposeErrors.ABSTRACT_COMPOSABLE_DEFAULT_PARAMETER_VALUE,\n context\n )\n }\n }\n\n \/\/ Composable main functions are not allowed.\n if (declaration.symbol.isMain(context.session)) {","completion":"reporter.reportOn(declaration.source, ComposeErrors.COMPOSABLE_FUN_MAIN, context)\n }\n\n \/\/ Disallow composable setValue operators\n if (declaration.isOperator &&\n declaration.nameOrSpecialName == OperatorNameConventions.SET_VALUE\n ) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.psi.*\nimport org.jetbrains.kotlin.psi.psiUtil.unwrapParenthesesLabelsAndAnnotations\nimport org.jetbrains.kotlin.utils.exceptions.errorWithAttachment\nimport org.jetbrains.kotlin.utils.exceptions.withPsiEntry\n\ninternal class KtFirExpressionInfoProvider(","completion":"override val analysisSession: KtFirAnalysisSession,\n override val token: KtLifetimeToken,\n) : KtExpressionInfoProvider(), KtFirAnalysisSessionComponent {\n override fun getReturnExpressionTargetSymbol(returnExpression: KtReturnExpression): KtCallableSymbol? {<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION\n\n\/\/ FILE: foo.kt\n\npackage test\n\ntypealias ClassAlias = ClassSample\ntypealias ObjectAlias = ObjectSample\ntypealias EnumAlias = EnumSample\n\nclass ClassSample {\n class Nested {\n fun func() {}\n }\n\n fun func() {}\n}\n\nobject ObjectSample {","completion":"class Nested {\n fun func() {}\n }\n\n fun func() {}\n}\n\nenum class EnumSample {\n Entry;\n\n class Nested {\n fun func() {}\n }\n\n fun func() {}\n}\n\n\/\/ FILE: test.kt\n\nfun foo(\n a0: test.ClassSample.Nested,<|endoftext|>"} {"prompt":"assertFails { sb.setRange(sb.length + 1, sb.length + 2, \"\") }\n }\n }\n\n @Test\n fun toCharArray() {\n StringBuilder(\"my toCharArray test\").let { sb ->\n val chars = CharArray(10) { '_' }\n\n sb.toCharArray(chars, 8, 0, 2)","completion":"assertEquals(\"________my\", chars.concatToString())\n sb.toCharArray(chars, 3, 6, 11)\n assertEquals(\"___harArmy\", chars.concatToString())\n sb.toCharArray(chars, 0, 16, 19)\n assertEquals(\"estharArmy\", chars.concatToString())\n\n sb.setLength(5)<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.test.preprocessors\n\nimport org.jetbrains.kotlin.test.model.TestFile\nimport org.jetbrains.kotlin.test.services.ReversibleSourceFilePreprocessor\nimport org.jetbrains.kotlin.test.services.TestServices\nimport org.jetbrains.kotlin.test.services.isExternalAnnotation\n\n\/**","completion":"* This preprocessor is required to drop '\/\/' comments from the file to avoid exceptions from XML parser\n *\/\nclass ExternalAnnotationsSourcePreprocessor(testServices: TestServices) : ReversibleSourceFilePreprocessor(testServices) {\n override fun process(file: TestFile, content: String): String = if (file.isExternalAnnotation) {<|endoftext|>"} {"prompt":"signature: (Function) -> Signature\n): Set> {\n \/\/ If it's an abstract function, no bridges are needed: when an implementation will appear in some concrete subclass, all necessary\n \/\/ bridges will be generated there\n if (function.isAbstract) return setOf()\n\n val fake = !function.isDeclaration","completion":"\/\/ If it's a concrete fake override and all of its super-functions are concrete, then every possible bridge is already generated\n \/\/ into some of the super-classes and will be inherited in this class\n if (fake && function.getOverridden().none { it.isAbstract }) return setOf()\n\n val implementation = findConcreteSuperDeclaration(function) ?: return setOf()<|endoftext|>"} {"prompt":"| KObjHeader* result = ${cname}_instance(result_holder.slot());\n | return $objectClassC { .pinned = CreateStablePointer(result)};\n |}\n \"\"\".trimMargin()\n } else \"\"\n return \"$typeGetter$instanceGetter\"\n }\n\n fun makeEnumEntryDeclaration(): String {","completion":"assert(isEnumEntry)\n val enumClass = declaration.containingDeclaration as ClassDescriptor\n val enumClassC = typeTranslator.translateType(enumClass.defaultType)\n\n return \"\"\"\n |extern \"C\" KObjHeader* $cname(KObjHeader**);\n |static $enumClassC ${cname}_impl(void) {<|endoftext|>"} {"prompt":"package kotlin.script.experimental.jvm\n\nimport java.lang.reflect.InvocationTargetException\nimport kotlin.reflect.KClass\nimport kotlin.script.experimental.api.*\nimport kotlin.script.experimental.impl._languageVersion\n\nopen class BasicJvmScriptEvaluator : ScriptEvaluator {\n\n override suspend operator fun invoke(","completion":"compiledScript: CompiledScript,\n scriptEvaluationConfiguration: ScriptEvaluationConfiguration\n ): ResultWithDiagnostics = try {\n compiledScript.getClass(scriptEvaluationConfiguration).onSuccess { scriptClass ->\n\n \/\/ configuration shared between all module scripts\n val sharedConfiguration = scriptEvaluationConfiguration.getOrPrepareShared(scriptClass.java.classLoader)<|endoftext|>"} {"prompt":"xs.forEach(this::contains) \/\/ resolved to (2) in 1.7.0-RC, should be error \"Type checking has run into a recursive problem\"\n}\n\nfun Any.contains(vararg xs: Int) {} \/\/ 2\n\nfun box(): String {","completion":"object : Foo() {}.contains(1)\n return \"OK\"\n}<|endoftext|>"} {"prompt":"contract { returns(false) implies (this@case_25_1 == null || this@case_25_1 !is String || value_1 == null) }\n return !(this@case_25_1 == null || this@case_25_1 !is String || value_1 == null)\n}\nfun T?.case_25_2(value_1: Int?): Boolean? {","completion":"contract { returnsNotNull() implies (this@case_25_2 == null || this@case_25_2 !is String || value_1 == null) }\n return if (this@case_25_2 == null || this@case_25_2 !is String || value_1 == null) true else null\n}\nfun T?.case_25_3(value_1: Int?): Boolean? {<|endoftext|>"} {"prompt":"LLFirSessionConfigurator.configure(this)\n }\n }\n\n abstract fun createDanglingFileSession(module: KtDanglingFileModule, contextSession: LLFirSession): LLFirSession\n\n protected fun doCreateDanglingFileSession(\n module: KtDanglingFileModule,\n contextSession: LLFirSession,","completion":"additionalSessionConfiguration: context(DanglingFileSessionCreationContext) LLFirDanglingFileSession.() -> Unit,\n ): LLFirSession {\n val danglingFile = module.file\n val platform = module.platform\n\n val builtinsSession = LLFirBuiltinsSessionFactory.getInstance(project).getBuiltinsSession(platform)<|endoftext|>"} {"prompt":"\/\/ this class is transformed and original not used so we should remove original one after inlining\n result.addClassToRemove(oldClassName)\n }\n\n if (transformResult.reifiedTypeParametersUsages.wereUsedReifiedParameters()) {\n ReifiedTypeInliner.putNeedClassReificationMarker(mv)","completion":"result.reifiedTypeParametersUsages.mergeAll(transformResult.reifiedTypeParametersUsages)\n }\n\n for (classBuilder in childInliningContext.continuationBuilders.values) {\n classBuilder.done(inliningContext.state.config.generateSmapCopyToAnnotation)\n }\n } else {\n result.addNotChangedClass(oldClassName)\n }\n }<|endoftext|>"} {"prompt":"println(value_1.length)\n println(value_2?.toByte())\n }","completion":"if (funWithReturnsNull(value_1 is Float? && value_1 != null && value_2 != null) != null) {\n println(value_1.dec())<|endoftext|>"} {"prompt":"getSymbolsFromImportingScope(importScopeContext, fqName, KtScopeKind.DefaultStarImportingScope::class).ifNotEmpty { return this }\n return emptyList()\n }\n\n private fun KtAnalysisSession.getSymbolsFromDeclaration(name: Name, owner: KtDeclaration): List = buildList {","completion":"if (owner is KtNamedDeclaration) {\n if (owner.nameAsName == name) {\n add(owner.getSymbol())\n }\n }\n if (owner is KtTypeParameterListOwner) {\n for (typeParameter in owner.typeParameters) {\n if (typeParameter.nameAsName == name) {\n add(typeParameter.getTypeParameterSymbol())\n }<|endoftext|>"} {"prompt":"primaryArtifactContent.resolve(\"sourceSetA-cinterop\/interopA0\"), interopA0MetadataFile,\n \"Expected correct content for extracted 'interopA0'\"\n )\n }\n\n \/* Assertions on interopA1 *\/\n run {","completion":"val interopA1MetadataFile = sourceSetAInteropMetadataFiles.firstOrNull { it.name == \"interopA1.klib\" }\n ?: fail(\"Failed to find 'interopA1.klib\")\n assertZipContentEquals(\n temporaryFolder,<|endoftext|>"} {"prompt":"val boundB = Scheme(Token(\"one\"), listOf(Scheme(Token(\"two\"))))\n assertEquals(boundA, boundB)\n }\n\n @Test\n fun testSerialization() {\n val uiToken = Token(\"androidx.compose.ui.UI\")\n val ui = Scheme(uiToken)\n val a = Open(-1)","completion":"val aScheme = Scheme(a)\n val z = Open(0)\n val one = Open(1)\n val oneScheme = Scheme(one)\n val schemes = listOf(\n ui,\n Scheme(z, listOf(Scheme(z))),\n Scheme(Token(\"This is a really long token with special chars [],_,123\")),<|endoftext|>"} {"prompt":"\/\/ test.kt:17 box\n\/\/ test.kt:7 box\n\/\/ test.kt:8 box\n\/\/ test.kt:17 box\n\/\/ test.kt:18 box\n\/\/ test.kt:10 box\n\/\/ test.kt:16 box\n\/\/ test.kt:17 box\n\/\/ test.kt:11 box\n\/\/ test.kt:12 box\n\/\/ test.kt:17 box\n\/\/ test.kt:18 box","completion":"\/\/ test.kt:13 box\n\n\/\/ EXPECTATIONS JS_IR\n\/\/ test.kt:16 box\n\/\/ test.kt:7 box\n\/\/ test.kt:16 box\n\/\/ test.kt:11 box\n\/\/ test.kt:13 box\n\n\/\/ EXPECTATIONS WASM\n\/\/ test.kt:6 $box\n\/\/ test.kt:16 $box (12, 4, 12, 4)<|endoftext|>"} {"prompt":"typeParameterName.lowercase()\n }\n }\n\n return ValueParameterDescriptorImpl(\n containingDeclaration, null, index,\n Annotations.EMPTY,\n Name.identifier(name),\n typeParameter.defaultType,\n declaresDefaultValue = false,\n isCrossinline = false,\n isNoinline = false,\n varargElementType = null,","completion":"SourceElement.NO_SOURCE\n )\n }\n }\n}<|endoftext|>"} {"prompt":"fun isSubtypeForTypeMismatch(context: ConeInferenceContext, subtype: ConeKotlinType, supertype: ConeKotlinType): Boolean {\n val subtypeFullyExpanded = subtype.fullyExpandedType(context.session)\n val supertypeFullyExpanded = supertype.fullyExpandedType(context.session)","completion":"return AbstractTypeChecker.isSubtypeOf(context, subtypeFullyExpanded, supertypeFullyExpanded)\n}\n\nfun FirCallableDeclaration.isVisibleInClass(parentClass: FirClass): Boolean {\n return symbol.isVisibleInClass(parentClass.symbol, symbol.resolvedStatus)\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.config\n\nenum class JVMAssertionsMode(val description: String) {\n ALWAYS_ENABLE(\"always-enable\"),\n ALWAYS_DISABLE(\"always-disable\"),\n JVM(\"jvm\"),\n LEGACY(\"legacy\");\n\n companion object {\n @JvmField\n val DEFAULT = LEGACY","completion":"@JvmStatic\n fun fromStringOrNull(string: String?) = entries.find { it.description == string }\n\n @JvmStatic\n fun fromString(string: String?) = fromStringOrNull(string) ?: DEFAULT\n }\n}<|endoftext|>"} {"prompt":"operator fun getValue(thisRef: Any?, property: KProperty<*>): String = \"delegation\"\n\n operator fun setValue(thisRef: Any?, property: KProperty<*>, value: String) {\n \/\/ setValue\n }\n\n operator fun provideDelegate(thisRef: Any?, property: KProperty<*>): Delegate {\n \/\/ side effect\n return Delegate()\n }","completion":"}<|endoftext|>"} {"prompt":"select(id(::foo5), id { x: A -> }, id { x: B -> }, id { it })","completion":"val x2: (Int) -> Unit = selectNumber(id(::foo6), id { x -> & Number}\")!>x }, id { & Number}\")!>it })\n}<|endoftext|>"} {"prompt":"fun testFusStatisticsWithConfigurationCache(gradleVersion: GradleVersion, isProjectIsolationEnabled: Boolean) {\n project(\n \"simpleProject\",\n gradleVersion,\n buildOptions = defaultBuildOptions.copy(\n configurationCache = true,\n projectIsolation = isProjectIsolationEnabled,\n buildReport = listOf(BuildReportType.FILE)\n ),\n ) {\n build(","completion":"\"compileKotlin\",\n \"-Pkotlin.session.logger.root.path=$projectPath\",\n ) {\n assertConfigurationCacheStored()\n assertFileContains(\n fusStatisticsPath,\n *expectedMetrics,\n \"CONFIGURATION_IMPLEMENTATION_COUNT=1\",\n \"NUMBER_OF_SUBPROJECTS=1\",<|endoftext|>"} {"prompt":"\"Test class ${irClass.fqNameWhenAvailable ?: irClass.name} must declare a public or internal constructor with no explicit parameters\"\n else -> null\n }\n\n if (exceptionMessage != null) {\n val irBuilder = context.createIrBuilder(fn.symbol)\n body.statements += irBuilder.irCall(context.irBuiltIns.illegalArgumentExceptionSymbol).apply {","completion":"putValueArgument(0, irBuilder.irString(exceptionMessage))\n }\n\n return\n }\n\n val classVal = JsIrBuilder.buildVar(irClass.defaultType, fn, initializer = irClass.instance())\n\n body.statements += classVal\n\n body.statements += beforeFuns.map {\n JsIrBuilder.buildCall(it.symbol).apply {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.multiplatform.ExpectActualCompatibility\nimport org.jetbrains.kotlin.resolve.multiplatform.ExpectActualCompatibility.MismatchOrIncompatible\nimport org.jetbrains.kotlin.serialization.deserialization.IncompatibleVersionErrorData\nimport org.jetbrains.kotlin.types.Variance\n\n\/*","completion":"* This file was generated automatically\n * DO NOT MODIFY IT MANUALLY\n *\/\n\ninternal class UnsupportedImpl(\n override val unsupported: String,\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,\n) : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.Unsupported<|endoftext|>"} {"prompt":"if (y != null || this.y != null) y.funAny()","completion":"if (y != null || this.y != null) y.funNullableT()<|endoftext|>"} {"prompt":"override fun visitReturn(expression: IrReturn): IrExpression {\n expression.transformChildrenVoid(this)\n\n return if (expression.returnTargetSymbol != simplifiedFunction.symbol)\n expression\n else\n JsIrBuilder.buildReturn(stateMachineFunction.symbol, expression.value, expression.type)\n }\n })","completion":"val liveLocals = computeLivenessAtSuspensionPoints(functionBody).values.flatten().toSet()\n\n val localToPropertyMap = hashMapOf()\n var localCounter = 0\n \/\/ TODO: optimize by using the same property for different locals.\n liveLocals.forEach {<|endoftext|>"} {"prompt":"xBaz1\\2$iv:int=100:int, xBaz2\\2$iv:int=101:int, xBaz3\\2$iv:int=102:int, $i$f$baz\\2\\31:int=0:int, $i$f$x1\\3\\35:int=0:int, x1\\3$iv:int=1:int","completion":"\/\/ library.kt:19 box: xFoo$iv:int=1:int, $i$f$foo:int=0:int, xBar1\\1$iv:int=0:int, xBar2\\1$iv:int=1:int, xBar3\\1$iv:int=2:int, $i$f$bar\\1\\6:int=0:int,<|endoftext|>"} {"prompt":"* The set of optimizations relies on current compiler configuration.\n * In case of debug we do almost nothing (that's why we need [createLTOPipelineConfigForRuntime]),\n * but for release binaries we rely on \"closed\" world and enable a lot of optimizations.\n *\/\ninternal fun createLTOFinalPipelineConfig(\n context: PhaseContext,\n targetTriple: String,\n closedWorld: Boolean,","completion":"timePasses: Boolean = false,\n): LlvmPipelineConfig {\n val config = context.config\n val target = config.target\n val configurables: Configurables = config.platform.configurables\n val cpuModel = getCpuModel(context)\n val cpuFeatures = getCpuFeatures(context)\n val optimizationLevel: LlvmOptimizationLevel = when {<|endoftext|>"} {"prompt":"@SinceKotlin(\"1.3\")\n const val MAX_VALUE: Char = '\\uFFFF'\n const val MIN_HIGH_SURROGATE: Char = '\\uD800'\n const val MAX_HIGH_SURROGATE: Char = '\\uDBFF'\n const val MIN_LOW_SURROGATE: Char = '\\uDC00'","completion":"const val MAX_LOW_SURROGATE: Char = '\\uDFFF'\n const val MIN_SURROGATE: Char = MIN_HIGH_SURROGATE\n const val MAX_SURROGATE: Char = MAX_LOW_SURROGATE\n @SinceKotlin(\"1.3\")\n const val SIZE_BYTES: Int = 2<|endoftext|>"} {"prompt":"private fun generateUtils(outputFile: File) {\n FileWriter(outputFile).use { writer ->\n writer.writeHeader(outputFile)\n writer.appendLine()\n writer.write(\"\"\"\n \n\/\/workaround about method with receiver\ninternal fun powWrapper(x: Double, y: Double): Double = x.pow(y)","completion":"private fun getMantissa(d: Double): Double = Double.fromBits(((d.toBits().toULong() and 0x800fffffffffffffUL) or 0x3ff0000000000000UL).toLong())\nprivate fun getExp(d: Double): Int = (((d.toBits() shr 52) and 0x7FF) - 1023).toInt()<|endoftext|>"} {"prompt":"public fun kotlin.LongArray.toMutableSet(): kotlin.collections.MutableSet\n\npublic fun kotlin.ShortArray.toMutableSet(): kotlin.collections.MutableSet","completion":"public fun kotlin.collections.Iterable.toMutableSet(): kotlin.collections.MutableSet\n\n@kotlin.internal.InlineOnly\npublic inline fun kotlin.collections.Map.Entry.toPair(): kotlin.Pair<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.symbols.IrSymbol\nimport org.jetbrains.kotlin.ir.visitors.IrElementVisitor\n\nenum class ProgressionDirection {\n DECREASING {\n override fun asReversed() = INCREASING\n },\n INCREASING {\n override fun asReversed() = DECREASING","completion":"},\n UNKNOWN {\n override fun asReversed() = UNKNOWN\n };\n\n abstract fun asReversed(): ProgressionDirection\n}\n\n\/** Information about a loop that is required by [HeaderProcessor] to build a [ForLoopHeader]. *\/\nsealed class HeaderInfo {\n \/**\n * Returns a copy of this [HeaderInfo] with the values reversed.<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.platform.TargetPlatform\nimport org.jetbrains.kotlin.storage.StorageManager\nimport org.jetbrains.kotlin.utils.sure\n\nclass ModuleDescriptorImpl @JvmOverloads constructor(\n moduleName: Name,\n private val storageManager: StorageManager,","completion":"override val builtIns: KotlinBuiltIns,\n \/\/ May be null in compiler context, should be not-null in IDE context\n override val platform: TargetPlatform? = null,\n capabilities: Map, Any?> = emptyMap(),\n override val stableName: Name? = null,\n) : DeclarationDescriptorImpl(Annotations.EMPTY, moduleName), ModuleDescriptor {<|endoftext|>"} {"prompt":"arguments.addIfNotNull(receiverType?.asTypeProjection())\n\n parameterTypes.mapIndexedTo(arguments) { index, type ->\n val name = parameterNames?.get(index)?.takeUnless { it.isSpecial }\n val typeToUse = if (name != null) {\n val parameterNameAnnotation = BuiltInAnnotationDescriptor(\n builtIns,","completion":"StandardNames.FqNames.parameterName,\n mapOf(StandardNames.NAME to StringValue(name.asString()))\n )\n type.replaceAnnotations(Annotations.create(type.annotations + parameterNameAnnotation))\n }\n else {\n type\n }\n typeToUse.asTypeProjection()\n }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.model.builder\n\nimport org.jetbrains.kotlin.gradle.model.KotlinProject\nimport org.junit.Test\nimport kotlin.test.assertFalse\nimport kotlin.test.assertTrue\n\nclass KotlinModelBuilderTest {\n @Test\n fun testCanBuild() {","completion":"val modelBuilder = KotlinModelBuilder(\"version\", null)\n assertTrue(modelBuilder.canBuild(KotlinProject::class.java.name))\n assertFalse(modelBuilder.canBuild(\"wrongModel\"))\n }\n}<|endoftext|>"} {"prompt":"Assert.assertEquals(\n \"Diagnostics should be same\",\n expectedDiag.map { it.toString() },\n actualDiag.map { it.toString() }\n )\n }\n }\n else -> {\n Assert.fail(\"#$index: Expected $expectedRes, got $res\")\n }\n }\n }","completion":"if (expectedIter.hasNext()) {\n Assert.fail(\"Expected ${expectedIter.next()} got end of results stream\")\n }\n }\n\n fun checkEvaluateInRepl(\n snippets: Sequence,\n expected: Sequence,\n compilationConfiguration: ScriptCompilationConfiguration = simpleScriptCompilationConfiguration,<|endoftext|>"} {"prompt":"val DOCUMENT_NODE: Short\n val DOCUMENT_TYPE_NODE: Short\n val DOCUMENT_FRAGMENT_NODE: Short\n val NOTATION_NODE: Short\n val DOCUMENT_POSITION_DISCONNECTED: Short\n val DOCUMENT_POSITION_PRECEDING: Short\n val DOCUMENT_POSITION_FOLLOWING: Short","completion":"val DOCUMENT_POSITION_CONTAINS: Short\n val DOCUMENT_POSITION_CONTAINED_BY: Short\n val DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: Short\n }\n}\n\n\/**\n * Exposes the JavaScript [SVGAElement](https:\/\/developer.mozilla.org\/en\/docs\/Web\/API\/SVGAElement) to Kotlin\n *\/<|endoftext|>"} {"prompt":"fun builder(c: suspend () -> Unit) {\n c.startCoroutine(Continuation(EmptyCoroutineContext) {\n it.getOrThrow()\n })\n}\n\nfun box(): String {\n builder {\n test(\"a\", \"b\")\n }","completion":"val continuationName = \"Continuation at TwoRefsKt\\$box\\$1.invokeSuspend(twoRefs.kt:46)\"<|endoftext|>"} {"prompt":"int: TInt,\n long: TLong,\n float: TFloat,\n double: TDouble,\n uByte: TUByte,\n uShort: TUShort,\n uInt: TUInt,\n uLong: TULong,\n string: TString,\n function: TFunction,\n externalInterface: TExternalInterface,\n externalOpenClass: TExternalOpenClass,","completion":"externalObject: TExternalObject,\n correctTypeParameter: TCorrectTypeParameter\n)\n\nexternal class CorrectJsInteropTypesAsClassTypeParameterUpperBounds<\n \/\/ primitive types\n TBoolean: Boolean,\n TChar: Char,\n TByte: Byte,\n TShort: Short,\n TInt: Int,\n TLong: Long,\n TFloat: Float,<|endoftext|>"} {"prompt":"if (z3.message != \"java.lang.Throwable: test\") return \"fail 5: ${z3.message}\"\n if (z3.cause !== t) return \"fail 6: ${z2.cause}\"\n\n var thr4: KFunction0 = ::Throwable\n val z4 = thr4()","completion":"if (z4.message !== null) return \"fail 7: ${z4.message}\"\n if (z4.cause !== null) return \"fail 8: ${z4.cause}\"\n\n return z.message!!\n}<|endoftext|>"} {"prompt":"fun id(arg: I): I = arg\nfun select(vararg args: S): S = TODO()\n\nfun test(bool: Boolean) {\n val test1 = if (bool) {\n { \"1\" }\n } else null\n test1\n\n val test2 = if (bool) {\n id { \"2\" }\n } else null\n test2","completion":"val test3 = if (bool) {\n Inv { \"3\" }\n } else null\n test3\n\n val test4 = if (bool) {\n 4 to { \"4\" }\n } else null\n test4\n\n val test5 = if (bool) {\n {{ \"5\" }}\n } else null\n test5\n\n val test6 = if (bool) {<|endoftext|>"} {"prompt":"fun addExtras(text: String): String =\n addImports(text, extras)\n\n fun stripExtras(actualText: StringBuilder) {\n val extras = extras\n val start = actualText.indexOf(extras)\n if (start >= 0) {\n actualText.delete(start, start + extras.length)\n }\n }","completion":"private fun addImports(text: String, imports: String): String {\n var result = text\n val pattern = Pattern.compile(\"^package [.\\\\w\\\\d]*\\n\", Pattern.MULTILINE)\n val matcher = pattern.matcher(result)\n result = if (matcher.find()) {\n \/\/ add imports after the package directive<|endoftext|>"} {"prompt":"\/** Returns startIndex+shift, the next position to match *\/\n override fun matches(startIndex: Int, testString: CharSequence, matchResult: MatchResultImpl): Int {\n matchResult.saveState()\n return tryToMatch(startIndex, testString, matchResult).also { if (it < 0) matchResult.rollbackState() }\n }","completion":"override fun hasConsumed(matchResult: MatchResultImpl): Boolean = true\n}<|endoftext|>"} {"prompt":"private object A432 { val a = Random.nextInt(100) }\nprivate object A433 { val a = Random.nextInt(100) }\nprivate object A434 { val a = Random.nextInt(100) }\nprivate object A435 { val a = Random.nextInt(100) }\nprivate object A436 { val a = Random.nextInt(100) }","completion":"private object A437 { val a = Random.nextInt(100) }\nprivate object A438 { val a = Random.nextInt(100) }\nprivate object A439 { val a = Random.nextInt(100) }\nprivate object A440 { val a = Random.nextInt(100) }\nprivate object A441 { val a = Random.nextInt(100) }<|endoftext|>"} {"prompt":"* @sample samples.collections.Collections.Elements.elementAt\n *\/\npublic actual fun ShortArray.elementAt(index: Int): Short {\n return elementAtOrElse(index) { throw IndexOutOfBoundsException(\"index: $index, size: $size}\") }\n}\n\n\/**","completion":"* Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array.\n * \n * @sample samples.collections.Collections.Elements.elementAt\n *\/\npublic actual fun IntArray.elementAt(index: Int): Int {<|endoftext|>"} {"prompt":"x\n x?.get(0)\n }\n}\n\n\/*\n * TESTCASE NUMBER: 10","completion":"* UNEXPECTED BEHAVIOUR\n * ISSUES: KT-28329\n *\/\nfun case_10(x: Any?) {\n if (!!(x !is Interface3) === true && true) else {\n x<|endoftext|>"} {"prompt":"var nullableTest: S?\n get() = S(\"${global.x}$x\")\n set(value) {\n global = S(\"${value!!.x}$x\")\n }\n}\n\ninline class Z(val x: Int) {\n var nonNullTest: S\n get() = S(\"${global.x}$x\")\n set(value) {","completion":"global = S(\"${value.x}$x\")\n }\n\n var nullableTest: S?\n get() = S(\"${global.x}$x\")\n set(value) {\n global = S(\"${value!!.x}$x\")\n }\n}\n\ninline class A(val x: Any) {\n var nonNullTest: S<|endoftext|>"} {"prompt":"this.unspecifiedBehavior = this.unspecifiedBehavior or addTestCase.unspecifiedBehavior\n this.issues?.addAll(addTestCase.issues!!)\n this.ranges.addAll(addTestCase.ranges)\n}\n\nprivate fun SpecTestCase.save(\n testCasesByNumbers: TestCasesByNumbers,\n testCasesOfFile: TestCasesByNumbers,","completion":"testCasesByRangesOfFile: NavigableMap,\n caseInfoElements: SpecTestInfoElements\n) {\n val testCaseNumbers =\n caseInfoElements[SpecTestCaseInfoElementType.TESTCASE_NUMBER]!!.content.splitByComma().map {\n it.trim().toIntOrNull()<|endoftext|>"} {"prompt":"* Call this function when it's known than a != b\n *\/\n fun disequate(a: DataFlowValue, b: DataFlowValue, languageVersionSettings: LanguageVersionSettings): DataFlowInfo\n\n fun establishSubtyping(value: DataFlowValue, type: KotlinType, languageVersionSettings: LanguageVersionSettings): DataFlowInfo\n\n \/**","completion":"* Call this function to add data flow information from other to this and return sum as the result\n *\/\n fun and(other: DataFlowInfo): DataFlowInfo\n\n \/**\n * Call this function to choose data flow information common for this and other and return it as the result\n *\/\n fun or(other: DataFlowInfo): DataFlowInfo\n\n companion object {<|endoftext|>"} {"prompt":"x\n x?.inv()\n }\n}\n\n\/\/ TESTCASE NUMBER: 9\nfun case_9(x: Any?) {","completion":"if (!!(x !is TypealiasNullableStringIndirect?)) else {\n x<|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-63654\n\nclass Klass(private val action: (A) -> Unit) {\n fun execute(value: B, klassB: Klass) {\n klassB.action(value)\n }\n}\n\nfun box(): String {","completion":"Klass { a: Int -> a.inc() }.execute(\"\", Klass { b: String -> b.length })\n return \"OK\"\n}<|endoftext|>"} {"prompt":"private data class NotInlinedCall(val fromCall: MethodInfo, val inlineMethod: MethodInfo)\n\n private data class NotInlinedParameter(val parameterClassName: String, val fromCall: MethodInfo)\n\n private data class MethodInfo(val owner: String, val name: String, val desc: String)\n\n private open class ClassVisitorWithName : ClassVisitor(Opcodes.API_VERSION) {","completion":"lateinit var className: String\n\n override fun visit(version: Int, access: Int, name: String, signature: String?, superName: String?, interfaces: Array?) {\n className = name\n super.visit(version, access, name, signature, superName, interfaces)\n }\n }\n\n private abstract class MethodNodeWithAnonymousObjectCheck(<|endoftext|>"} {"prompt":"superClassGenerics = superClass.superClassGenerics\n )\n}\n\n\/**\n * Resolves all [KtCallableSymbol] symbols that are to be translated to ObjC for [this] [KtClassOrObjectSymbol].\n * Note: This will return only 'declared' members (aka members written on this class\/interface\/object) and 'synthetic'\/'generated' members.\n *","completion":"* ## Example regular class\n * ```kotlin\n * open class Base {\n * fun base() = Unit\n * }\n *\n * class Foo : Base() {\n * fun foo() = Unit\n * ```\n *\n * In this example `Foo` will return the function `foo` (as declared in `Foo`), but not the function `base` (as declared in `Base` and<|endoftext|>"} {"prompt":"@property:Ann\n protected var p3: String = \"\"\n\n @property:Ann\n protected val p4: String by CustomDelegate()\n\n @property:Ann\n var propertyWithCustomSetter: Int\n get() = 5\n set(v) {}","completion":"@property:Ann\n fun anotherFun() {<|endoftext|>"} {"prompt":"private class LazyFutureImpl(private val future: Lazy>) : Future, Serializable {\n override suspend fun await(): T {\n return future.value.await()\n }\n\n override fun getOrThrow(): T {\n return future.value.getOrThrow()\n }\n\n private fun writeReplace(): Any {","completion":"return Surrogate(getOrThrow())\n }\n\n private class Surrogate(private val value: T) : Serializable {\n private fun readResolve(): Any {\n return FutureImpl(Completable(value))\n }\n }\n}\n\n\/**\n * Simple, with primitive synchronization, replacement for kotlinx.coroutines.CompletableDeferred.\n *\/<|endoftext|>"} {"prompt":"increment(result, arraySize)\n }\n }\n }\n\n private fun IrBuilderWithScope.irArraySize(arrayHandle: ArrayHandle, expression: IrExpression): IrExpression {\n val arraySize = irCall(arrayHandle.sizeGetterSymbol.owner).apply {\n dispatchReceiver = expression\n }\n return arraySize\n }","completion":"private fun hasSpreadElement(expression: IrVararg?) = expression?.elements?.any { it is IrSpreadElement }?:false\n\n private fun log(msg:() -> String) {\n context.log { \"VARARG-INJECTOR: ${msg()}\" }\n }\n\n abstract inner class ArrayHandle(val arraySymbol: IrClassSymbol) {<|endoftext|>"} {"prompt":"description = \"Include the given native bitcode library.\", delimiter = Argument.Delimiters.none\n )\n var nativeLibraries: Array? = null\n\n @Argument(value = \"-no-default-libs\", deprecatedName = \"-nodefaultlibs\", description = \"Don't link the libraries from dist\/klib automatically.\")\n var nodefaultlibs: Boolean = false","completion":"@Argument(\n value = \"-no-endorsed-libs\",\n description = \"Don't link endorsed libraries from the dist automatically. \" +\n \"This option has been deprecated, as the dist no longer has any endorsed libraries.\"\n )\n var noendorsedlibs: Boolean = false<|endoftext|>"} {"prompt":"return visitor.builder.build()\n }\n\n protected fun serialize(module: JsImportedModule): JsAstProtoBuf.JsImportedModule {\n val moduleBuilder = JsAstProtoBuf.JsImportedModule.newBuilder()\n moduleBuilder.externalName = serialize(module.externalName)\n moduleBuilder.internalName = serialize(module.internalName)","completion":"module.plainReference?.let {\n moduleBuilder.plainReference = serialize(it)\n }\n return moduleBuilder.build()\n }\n\n protected fun serializeParameter(parameter: JsParameter): JsAstProtoBuf.Parameter {\n val parameterBuilder = JsAstProtoBuf.Parameter.newBuilder()\n parameterBuilder.nameId = serialize(parameter.name)<|endoftext|>"} {"prompt":"return inlineX.foo2({ z: Int, p: Int -> z + p}, 25, { x: Double, y: Int, z: Int -> z + x + y}, 11.5, 2)\n}\n\nfun box(): String {\n if (test1() != 36.5) return \"test1: ${test1()}\"","completion":"if (test1WithCaptured() != 37.5) return \"test1WithCaptured: ${test1WithCaptured()}\"\n if (test2() != 65.5) return \"test2: ${test2()}\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"get() = null!!\n val platformPropertyInBothLeafTargets: PlatformInt \n get() = null!!\n \"\"\".trimIndent()\n\n WATCHOS_ARM64.name withSource \"\"\"\n val platformPropertyInOneLeafTarget: Int \n get() = 42\n val platformPropertyInBothLeafTargets: PlatformInt \n get() = null!!","completion":"\"\"\".trimIndent()\n }\n\n result.assertCommonized(\n \"(${LINUX_X64.name}, ${WATCHOS_ARM64.name})\", \"\"\"\n expect val platformPropertyInOneLeafTarget: PlatformInt\n expect val platformPropertyInBothLeafTargets: PlatformInt\n \"\"\".trimIndent()\n )\n }<|endoftext|>"} {"prompt":"assertEquals(\"abc\", pair.second, \"pair.second\")\n }\n\n @Test fun partitionCharSequence() = withOneCharSequenceArg(\"a1b2c3\") { data ->\n val pair = data.partition { it.isAsciiDigit() }\n assertContentEquals(\"123\", pair.first, \"pair.first\")","completion":"assertContentEquals(\"abc\", pair.second, \"pair.second\")\n }\n\n @Test fun zipWithNext() = withOneCharSequenceArg { arg1 ->\n assertEquals(listOf(\"ab\", \"bc\"), arg1(\"abc\").zipWithNext { a: Char, b: Char -> a.toString() + b })<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\n\/\/ WITH_REFLECT\n\/\/ FILE: J.java\n\npublic class J {\n public void bar(int x) {}\n}\n\n\/\/ FILE: K.kt\n\nimport kotlin.reflect.full.findParameterByName\nimport kotlin.test.assertEquals\nimport kotlin.test.assertNull\n\nfun foo(x: Int) = x","completion":"fun box(): String {\n assertEquals(::foo.parameters.single(), ::foo.findParameterByName(\"x\"))\n assertNull(::foo.findParameterByName(\"y\"))\n\n assertNull(J::bar.findParameterByName(\"x\"))\n assertNull(J::bar.findParameterByName(\"y\"))\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"val nominalPackageName: PackageName,\n val assertionsMode: AssertionsMode,\n)\n\nprivate typealias SharedModuleGenerator = (sharedModulesDir: File) -> TestModule.Shared?\nprivate typealias SharedModuleCache = (moduleName: String, generator: SharedModuleGenerator) -> TestModule.Shared?","completion":"private class ExtTestDataFileStructureFactory(parentDisposable: Disposable) : TestDisposable(parentDisposable) {\n private val psiFactory = createPsiFactory(parentDisposable = this)\n\n inner class ExtTestDataFileStructure(originalTestDataFile: File, sourceTransformers: ExternalSourceTransformers) {\n init {\n assertNotDisposed()\n }<|endoftext|>"} {"prompt":"TypealiasNullableString \/* = kotlin.String? *\/\")!>x.propNullableT","completion":"if (x !== null && x != null) "} {"prompt":"variance = when (kind) {\n ProjectionKind.IN -> Variance.IN_VARIANCE\n ProjectionKind.OUT -> Variance.OUT_VARIANCE\n ProjectionKind.INVARIANT -> Variance.INVARIANT\n ProjectionKind.STAR -> throw IllegalStateException()\n }\n }\n }\n }","completion":"fun resolveAnnotationCall(annotation: FirAnnotationCall): FirAnnotationCall? {\n val reference = annotation.calleeReference as? FirSimpleNamedReference ?: return null\n val annotationClassSymbol = annotation.getCorrespondingClassSymbolOrNull(session)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.plugin.launchInStage\nimport org.jetbrains.kotlin.gradle.util.assertContainsDiagnostic\nimport org.jetbrains.kotlin.gradle.util.assertNoDiagnostics\nimport org.jetbrains.kotlin.gradle.util.buildProjectWithMPP\nimport org.junit.Test","completion":"import kotlin.test.assertFails\n\nclass WasmSourceSetsNotFoundErrorTest {\n\n @Test\n fun `wasmMain SourceSet`() {\n diagnosticsForTestProjectRequestingMissingSourceSet(\"wasmMain\")\n .assertContainsDiagnostic(KotlinToolingDiagnostics.WasmSourceSetsNotFoundError(\"wasmMain\"))\n }\n\n @Test<|endoftext|>"} {"prompt":"\/\/ If we don't know the direction, we can't be sure which limit to use.\n return@lazy true\n }\n\n \/\/ Induction variable can NOT overflow if \"last\" is const and is <= (MAX\/MIN_VALUE - step) (depending on direction).\n \/\/\n \/\/ Examples that can NOT overflow:\n \/\/ - `0..10` cannot overflow (10 <= MAX_VALUE - 1)","completion":"\/\/ - `0..MAX_VALUE - 1` cannot overflow (MAX_VALUE - 1 <= MAX_VALUE - 1)\n \/\/ - `0..MAX_VALUE - 3 step 3` cannot overflow (MAX_VALUE - 3 <= MAX_VALUE - 3)\n \/\/ - `0 downTo -10` cannot overflow (-10 >= MIN_VALUE - (-1))<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.psi\n\nimport com.intellij.lang.ASTNode\nimport com.intellij.psi.PsiElement\nimport com.intellij.psi.tree.IElementType\nimport org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.name.SpecialNames","completion":"import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType\nimport org.jetbrains.kotlin.psi.stubs.KotlinEnumEntrySuperclassReferenceExpressionStub\nimport org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes<|endoftext|>"} {"prompt":"\/\/ Writes the service file only; CustomComponentRegistrar is already in classpath.\n private fun writePlugin(): String {\n val jarFile = tmpdir.resolve(\"plugin.jar\")\n ZipOutputStream(jarFile.outputStream()).use {\n val entry = ZipEntry(\"META-INF\/services\/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar\")","completion":"it.putNextEntry(entry)\n it.write(CustomComponentRegistrar::class.java.name.toByteArray())\n }\n return jarFile.absolutePath\n }\n\n private val jsirStdlib: String?\n get() = System.getProperty(\"kotlin.js.full.stdlib.path\")\n\n private val wasmStdlib: String?<|endoftext|>"} {"prompt":"for (irTypeParameter in irTypeParametersOwner.typeParameters) {\n irTypeParameter.superTypes = irTypeParameter.descriptor.upperBounds.map {\n it.toIrType()\n }\n }\n }\n\n fun generateInitializerBody(scopeOwnerSymbol: IrSymbol, ktBody: KtExpression): IrExpressionBody =","completion":"createBodyGenerator(scopeOwnerSymbol).generateExpressionBody(ktBody)\n\n fun generateFakeOverrideDeclaration(memberDescriptor: CallableMemberDescriptor, ktElement: KtPureElement): IrDeclaration? {\n assert(memberDescriptor.kind == CallableMemberDescriptor.Kind.FAKE_OVERRIDE) {\n \"Fake override expected: $memberDescriptor\"<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.diagnostics.ConeDiagnostic\nimport org.jetbrains.kotlin.fir.expressions.FirAnnotation\nimport org.jetbrains.kotlin.fir.expressions.FirResolvedQualifier\nimport org.jetbrains.kotlin.fir.expressions.impl.FirResolvedQualifierImpl","completion":"import org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol\nimport org.jetbrains.kotlin.fir.types.ConeKotlinType\nimport org.jetbrains.kotlin.fir.types.FirTypeProjection\nimport org.jetbrains.kotlin.name.ClassId<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.compilerRunner.KotlinToolRunner\nimport org.jetbrains.kotlin.konan.target.AbstractToolConfig\n\ninternal interface KonanToolRunner {\n fun run(args: List)\n}\n\ninternal fun KonanToolRunner.run(vararg args: String) = run(args.toList())","completion":"private const val runFromDaemonPropertyName = \"kotlin.native.tool.runFromDaemon\"\n\n@Suppress(\"DEPRECATION\") \/\/ calling KotlinToolRunner(project) constructor is deprecated\ninternal abstract class KonanCliRunner(\n protected val toolName: String,\n project: Project,\n isolatedClassLoadersService: KonanCliRunnerIsolatedClassLoadersService,<|endoftext|>"} {"prompt":"suspend fun testIntersection(x: T): String where T : () -> String, T : (Int) -> String {\n val a = useSuspendFun(x)\n val b = useSuspendFunInt(x)\n return a + b\n}\n\nclass Test : () -> String, (Int) -> String {\n override fun invoke(): String = \"OKEmpty\"","completion":"override fun invoke(p: Int) = \"OK$p\"\n}\n\nfun box(): String {\n var test = \"Failed\"\n builder {\n test = testIntersection(Test())\n }\n\n if (test != \"OKEmptyOK42\") return \"failed: $test\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"case.let { 1[\"1\"] }\n case.let { 1[\"1\"] }","completion":"case.also { 1[\"1\"] }\n case.also { 1[\"1\"] }<|endoftext|>"} {"prompt":"if (localFunctionSymbol == function.symbol || localThrowsAnnotation == null && overriddenFunctions.isNotEmpty()) {\n for (overriddenFunction in overriddenFunctions) {\n val annotation = runUnless(overriddenFunction.isSubstitutionOrIntersectionOverride) {\n overriddenFunction.getAnnotationByClassId(throwsClassId, context.session)\n }","completion":"getInheritedThrows(annotation, overriddenFunction)\n }\n } else {\n result[localFunctionSymbol] = decodeThrowsFilter(localThrowsAnnotation, context.session)\n }\n }\n }\n\n getInheritedThrows(throwsAnnotation, function.symbol)\n\n return result\n }<|endoftext|>"} {"prompt":"operator fun plus(o: Int): Any? { TODO() }\n operator fun plus(o: Case3): Any? { TODO() }\n}\n\nfun case3() {\n val a = Case3(1) + 1\n val b = Case3(1) + Case3( 1)\n val c = Case3(1) - 1\n val d = Case3(1) - Case3( 1)","completion":"a checkType { check() }\n b checkType { check() }\n c checkType { check() }\n d checkType { check() }\n}<|endoftext|>"} {"prompt":"val typeProjection = stack.pop()\n if (typeProjection.isStarProjection) continue\n\n result.add(typeProjection)\n\n typeProjection.type.arguments.forEach { stack.add(it) }\n }\n return result\n}\n\ninternal fun KotlinType.getNestedTypeParameters(): List {","completion":"return getNestedArguments().mapNotNull { typeProjection ->\n typeProjection.type.constructor.declarationDescriptor as? TypeParameterDescriptor\n }\n}<|endoftext|>"} {"prompt":"override val ValueParameterSymbolMarker.parameterName: Name\n get() = asSymbol().name\n\n override fun TypeAliasSymbolMarker.expandToRegularClass(): RegularClassSymbolMarker? {\n return asSymbol()\n .resolvedExpandedTypeRef\n .coneType\n .fullyExpandedType(actualSession)","completion":".toSymbol(actualSession) as? FirRegularClassSymbol\n }\n\n override val RegularClassSymbolMarker.classKind: ClassKind\n get() = asSymbol().classKind\n override val RegularClassSymbolMarker.isCompanion: Boolean\n get() = asSymbol().resolvedStatus.isCompanion\n override val RegularClassSymbolMarker.isInner: Boolean<|endoftext|>"} {"prompt":"fun testSimpleUIntLoop() {\n var s = 0\n for (i in p1) {\n s = s*10 + i.toInt()\n }\n if (s != 654321) throw AssertionError(\"$s\")\n}\n\nval p2 = 1u downTo 6u\nfun testEmptyUIntLoop() {\n var s = 0\n for (i in p2) {","completion":"s = s*10 + i.toInt()\n }\n if (s != 0) throw AssertionError(\"$s\")\n}\n\nval p3 = 6UL downTo 1UL\nfun testSimpleULongLoop() {\n var s = 0\n for (i in p3) {\n s = s*10 + i.toInt()\n }<|endoftext|>"} {"prompt":"val allDescriptors = descriptor.secondaryConstructors + descriptor.defaultType.memberScope.getContributedDescriptors()\n val (enumEntries, members) = allDescriptors.partition(::isEnumEntry)\n\n for ((index, enumEntry) in enumEntries.withIndex()) {\n newlineExceptFirst()\n builder.append(subindent)","completion":"appendDescriptor(enumEntry, subindent, index == enumEntries.lastIndex)\n }\n\n val companionObject = descriptor.companionObjectDescriptor\n if (companionObject != null) {\n newlineExceptFirst()\n builder.append(subindent)\n appendDescriptor(companionObject, subindent)\n }\n\n for (member in members) {<|endoftext|>"} {"prompt":"operator fun Ref.provideDelegate(a: Any?, p: KProperty<*>): GenericDelegate = GenericDelegate(this.t)\n\noperator fun GenericDelegate.getValue(a: Any?, p: KProperty<*>): W = this.value","completion":"fun List>.getElement(i: Int): Ref = this[i] as Ref\n\n@Suppress(\"UNNECESSARY_NOT_NULL_ASSERTION\")\nfun test(list: List>) {\n val data: String by list.getElement(0)!!\n require(data == list[0].t)<|endoftext|>"} {"prompt":"return if (elementRange.endOffset <= range.endOffset) element else null\n}\n\nval PsiElement.textRangeWithoutComments: TextRange\n get() = if (!startsWithComment()) textRange else TextRange(startOffsetSkippingComments, endOffset)\n\nfun PsiElement.startsWithComment(): Boolean = firstChild is PsiComment\n\n\n\/\/ ---------------------------------- Debug\/logging ----------------------------------------------------------------------------------------","completion":"fun PsiElement.getElementTextWithContext(): String = org.jetbrains.kotlin.utils.getElementTextWithContext(this)\n\nfun PsiElement.getTextWithLocation(): String = \"'${this.text}' at ${PsiDiagnosticUtils.atLocation(this)}\"<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.backend.konan.llvm.objc\n\nimport llvm.*\nimport org.jetbrains.kotlin.backend.konan.llvm.*\n\n\/**\n * This class provides methods to generate Objective-C RTTI and other data.","completion":"* It is mostly based on `clang\/lib\/CodeGen\/CGObjCMac.cpp`, and supports only subset of operations\n * required for our purposes (thus simplified).\n *\n * [finishModule] must be called exactly once after all required data was generated.\n *\/\ninternal class ObjCDataGenerator(val codegen: CodeGenerator) {\n\n val context = codegen.context<|endoftext|>"} {"prompt":"add(FirErrors.ACTUAL_TYPE_ALIAS_NOT_TO_CLASS) { firDiagnostic ->\n ActualTypeAliasNotToClassImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }","completion":"add(FirErrors.ACTUAL_TYPE_ALIAS_TO_CLASS_WITH_DECLARATION_SITE_VARIANCE) { firDiagnostic ->\n ActualTypeAliasToClassWithDeclarationSiteVarianceImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }<|endoftext|>"} {"prompt":"return LanguageFeature.State.DISABLED\n }\n\n override fun isPreRelease(): Boolean = stub()\n\n override fun getFlag(flag: AnalysisFlag): T = stub()\n\n override val apiVersion: ApiVersion\n get() = stub()\n override val languageVersion: LanguageVersion\n get() = stub()\n }\n ))","completion":"register(FirExtensionService::class, FirExtensionService(this))\n }\n }\n\n \/**\n * Registers default components for [FirSession]\n * They could be overridden by calling a function that registers specific platform components\n *\/\n @OptIn(SessionConfiguration::class)\n fun FirSession.registerDefaultComponents() {<|endoftext|>"} {"prompt":"@kotlin.SinceKotlin(version = \"1.5\")\n@kotlin.OverloadResolutionByLambdaReturnType\n@kotlin.jvm.JvmName(name = \"sumOfUInt\")\n@kotlin.ExperimentalUnsignedTypes\n@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class})","completion":"@kotlin.internal.InlineOnly\npublic inline fun kotlin.UShortArray.sumOf(selector: (kotlin.UShort) -> kotlin.UInt): kotlin.UInt\n\n@kotlin.SinceKotlin(version = \"1.5\")\n@kotlin.OverloadResolutionByLambdaReturnType<|endoftext|>"} {"prompt":"private val defFile: File?,\n private val cppAdapterFile: File,\n private val target: KonanTarget,\n) {\n private val typeTranslator = elements.typeTranslator\n private val builtIns = elements.typeTranslator.builtIns\n\n private val prefix = elements.typeTranslator.prefix\n private lateinit var outputStreamWriter: PrintWriter\n\n \/\/ Primitive built-ins and unsigned types","completion":"private val predefinedTypes = listOf(\n builtIns.byteType, builtIns.shortType,\n builtIns.intType, builtIns.longType,\n builtIns.floatType, builtIns.doubleType,\n builtIns.charType, builtIns.booleanType,\n builtIns.unitType\n ) + UnsignedType.values().map {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.kapt.cli.KaptCliOption.*\nimport org.jetbrains.kotlin.kapt.cli.KaptCliOption.Companion.ANNOTATION_PROCESSING_COMPILER_PLUGIN_ID\nimport org.jetbrains.kotlin.kapt3.base.*","completion":"import org.jetbrains.kotlin.kapt3.base.util.KaptLogger\nimport org.jetbrains.kotlin.kapt3.base.util.doOpenInternalPackagesIfRequired\nimport org.jetbrains.kotlin.kapt3.util.MessageCollectorBackedKaptLogger\nimport org.jetbrains.kotlin.platform.TargetPlatform<|endoftext|>"} {"prompt":"* @sample samples.collections.Collections.Aggregates.none\n *\/\npublic fun IntArray.none(): Boolean {\n return isEmpty()\n}\n\n\/**\n * Returns `true` if the array has no elements.\n * \n * @sample samples.collections.Collections.Aggregates.none\n *\/\npublic fun LongArray.none(): Boolean {\n return isEmpty()\n}\n\n\/**","completion":"* Returns `true` if the array has no elements.\n * \n * @sample samples.collections.Collections.Aggregates.none\n *\/\npublic fun FloatArray.none(): Boolean {\n return isEmpty()\n}\n\n\/**\n * Returns `true` if the array has no elements.\n * \n * @sample samples.collections.Collections.Aggregates.none\n *\/<|endoftext|>"} {"prompt":"@Throws(RemoteException::class)\n fun scheduleShutdown(graceful: Boolean): CallResult\n\n @Throws(RemoteException::class)\n fun compile(\n sessionId: Int,\n compilerArguments: Array,\n compilationOptions: CompilationOptions,\n servicesFacade: CompilerServicesFacadeBase,\n compilationResults: CompilationResults?","completion":"): CallResult\n\n @Throws(RemoteException::class)\n fun classesFqNamesByFiles(\n sessionId: Int,\n sourceFiles: Set\n ): CallResult>\n\n @Throws(RemoteException::class)\n fun clearJarCache()\n\n @Throws(RemoteException::class)<|endoftext|>"} {"prompt":"\/\/ MODULE: main\n\n\/\/ FILE: generics.kt\n@JsExport\nfun simple(x: T): T = x\n\n@JsExport\nfun second(a: A, b: B): B = b\n\n@JsExport\nfun simpleWithConstraint(x: T): T = x","completion":"external interface Foo : JsAny {\n val foo: T\n}\n\nexternal interface Bar : JsAny {\n val bar: JsString\n}\n\nexternal object Baz : JsAny {\n val baz: JsBoolean\n}\n\nfun getBaz(x: Foo): JsAny = js(\"({ baz: x.foo > 0n })\")<|endoftext|>"} {"prompt":"else if (value_2 < 10) \"2\"\n else \"4\"\n}\n\n\/*\n * TESTCASE NUMBER: 9\n * ISSUES: KT-37249\n *\/\nfun case_9(value_1: Int, value_2: String, value_3: String) = when {","completion":"value_1 == 1 -> try { 4 } catch (e: Exception) { 5 }\n value_1 == 2 -> try { throw Exception() } catch (e: Exception) { value_2 }<|endoftext|>"} {"prompt":"override val diagnosticClass get() = TypeParametersInAnonymousObject::class\n }\n\n interface IllegalProjectionUsage : KtFirDiagnostic {\n override val diagnosticClass get() = IllegalProjectionUsage::class\n }\n\n interface TypeParametersInEnum : KtFirDiagnostic {","completion":"override val diagnosticClass get() = TypeParametersInEnum::class\n }\n\n interface ConflictingProjection : KtFirDiagnostic {\n override val diagnosticClass get() = ConflictingProjection::class\n val type: KtType\n }<|endoftext|>"} {"prompt":"override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) {\n useSiteMemberScope.processFunctionsByName(name) process@{ original ->\n val function = substitutionOverrideCache.overridesForFunctions.getValue(original, this)\n processor(function)\n }\n\n return super.processFunctionsByName(name, processor)","completion":"}\n\n override fun processDirectOverriddenFunctionsWithBaseScope(\n functionSymbol: FirNamedFunctionSymbol,\n processor: (FirNamedFunctionSymbol, FirTypeScope) -> ProcessorAction\n ): ProcessorAction =\n processDirectOverriddenWithBaseScope(\n functionSymbol,\n processor,\n FirTypeScope::processDirectOverriddenFunctionsWithBaseScope,<|endoftext|>"} {"prompt":"value checkType { _() }\n }\n\n override var z\n get() = \"\"\n set(value) {\n value checkType { _() }\n }\n}\n\nfun foo(c: C) {\n c.x checkType { _() }\n c.y checkType { _() }","completion":"c.z checkType { _() }\n\n c.y = \"\"\n c.y = 1\n\n c.z = \"\"\n c.z = 1\n}<|endoftext|>"} {"prompt":"\/\/ SKIP_KT_DUMP\n\/\/ FIR_IDENTICAL\n\/\/ TARGET_BACKEND: JVM\n\n\/\/ FILE: Java1.java\npublic class Java1 {\n public static void foo(T t) {}\n public static T bar() {\n return null;\n }\n public static void foo(Number t) {}\n public static void foo(Number t, Integer t2) {}","completion":"}\n\n\/\/ FILE: Java2.java\npublic class Java2 extends Java1 { }\n\n\/\/ FILE: Java3.java\npublic class Java3 extends A { }\n\n\/\/ FILE: 1.kt\n\nopen class A : Java1() {\n open fun test1() = foo(1)\n open fun test2(): Int = bar()\n open fun test3() = foo(\"\")<|endoftext|>"} {"prompt":"class Out\nclass OutPair\nclass In\nclass Inv\n\nopen class Open\nclass Final\n\nfun skipAllOutInvWildcards(): Inv>>> = null!!\n\/\/ method: FinalReturnTypeKt::skipAllOutInvWildcards","completion":"\/\/ generic signature: ()LInv;>;>;>;\n\nfun skipAllInvWildcards(): Inv>> = null!!\n\/\/ method: FinalReturnTypeKt::skipAllInvWildcards\n\/\/ generic signature: ()LInv;>;>;<|endoftext|>"} {"prompt":"fun devNull(obj: Any?) {}\n\nopen class A {\n companion object {\n val internal_val = 1\n public val public_val: Int = 2\n private val private_val = 3\n protected val protected_val: Int = 5\n }\n\n fun fromClass() {\n devNull(internal_val)\n devNull(public_val)\n devNull(private_val)","completion":"devNull(protected_val)\n }\n}\n\nfun fromOutside() {\n devNull(A.internal_val)\n devNull(A.public_val)\n devNull(A.private_val)\n devNull(A.protected_val)\n}\n\nclass B: A() {<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION\n\/\/ SKIP_TXT\n\n\/*\n * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)\n *","completion":"* SPEC VERSION: 0.1-280\n * MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, call-with-named-parameters -> paragraph 1 -> sentence 2\n * PRIMARY LINKS: overload-resolution, building-the-overload-candidate-set-ocs, call-with-named-parameters -> paragraph 2 -> sentence 1\n * NUMBER: 3<|endoftext|>"} {"prompt":"}\n}\n\nprivate fun Printer.printMangledNames(computedMangledNames: List, prefix: String) {\n val distinctNames = computedMangledNames.distinctBy { it.value }\n\n \/\/ If mangled names computed from all three representations (descriptors, IR, FIR) and modes match,\n \/\/ print just one mangled name.","completion":"distinctNames.singleOrNull()?.let {\n println(\"\/\/ $prefix: ${it.value}\")\n return\n }\n\n if (distinctNames.same { it.compatibleMode }) {\n \/\/ If the mangled names differ only by the mangler used (but not the compatibility mode), print\n \/\/ only mangled names from each mangler.\n computedMangledNames<|endoftext|>"} {"prompt":"* or interface in the `-Xjvm-default=all` mode, where only JVM default methods are generated, without `DefaultImpls`.\n *\n * Annotating an existing class with this annotation is a binary incompatible change. Therefore this annotation makes\n * the most sense for _new_ classes in libraries which opted into the compatibility mode.\n *\n * Used only with `-Xjvm-default=all-compatibility`.\n *\/","completion":"@SinceKotlin(\"1.4\")\n@Retention(AnnotationRetention.SOURCE)\n@Target(AnnotationTarget.CLASS)\npublic annotation class JvmDefaultWithoutCompatibility\n\n\/**\n * Forces the compiler to generate compatibility accessors for the annotated interface in the `DefaultImpls` class.<|endoftext|>"} {"prompt":"* The default strategy.\n *\/\n public fun useInProcessStrategy(): CompilerExecutionStrategyConfiguration\n\n \/**\n * Marks the compilation to be run in Kotlin daemon launched as a separate process and shared across similar compilation requests.","completion":"* See Kotlin daemon documentation here: https:\/\/kotlinlang.org\/docs\/gradle-compilation-and-caches.html#the-kotlin-daemon-and-how-to-use-it-with-gradle\n * @param jvmArguments a list of JVM startup arguments for the daemon\n *\/\n public fun useDaemonStrategy(\n jvmArguments: List,<|endoftext|>"} {"prompt":"public inline fun kotlin.DoubleArray.dropWhile(predicate: (kotlin.Double) -> kotlin.Boolean): kotlin.collections.List\n\npublic inline fun kotlin.FloatArray.dropWhile(predicate: (kotlin.Float) -> kotlin.Boolean): kotlin.collections.List","completion":"public inline fun kotlin.IntArray.dropWhile(predicate: (kotlin.Int) -> kotlin.Boolean): kotlin.collections.List\n\npublic inline fun kotlin.LongArray.dropWhile(predicate: (kotlin.Long) -> kotlin.Boolean): kotlin.collections.List<|endoftext|>"} {"prompt":"addStableJavaScriptName(targetSymbol, overriddenSymbol, context)\n if (targetSymbol is FirPropertySymbol && overriddenSymbol is FirPropertySymbol) {\n addStableJavaScriptName(targetSymbol.getterSymbol, overriddenSymbol.getterSymbol, context)","completion":"addStableJavaScriptName(targetSymbol.setterSymbol, overriddenSymbol.setterSymbol, context)\n }\n }\n\n fun addAllSymbolsFrom(symbols: Collection>, sessionHolder: SessionHolder) {\n for (symbol in symbols) {\n when (symbol) {<|endoftext|>"} {"prompt":"reporter.reportOn(source, FirErrors.DEPRECATION, referencedSymbol, message, context)\n }\n }\n\n internal val DeprecatedOverrideOfHiddenReplacements: Map = mapOf(\n \"getFirst\" to \"first()\",\n \"getLast\" to \"last()\",\n \"toArray\" to null,\n )","completion":"internal fun getDeprecatedOverrideOfHiddenMessage(callableName: String?): String {\n val getFirstOrLastReplacement = DeprecatedOverrideOfHiddenReplacements[callableName]\n return if (getFirstOrLastReplacement != null) {\n \"This declaration will be renamed in a future version of Kotlin. Please consider using the '$getFirstOrLastReplacement' stdlib extension if the collection supports fast random access.\"<|endoftext|>"} {"prompt":"graph(b to a, c to b)\n doTest(a, setOf())\n doTest(b, setOf())\n doTest(c, setOf())\n }\n\n \/\/ Declaration \"c\" overrides two declarations \"a\" and \"b\"\n\n fun testAbstractDeclarationOverridesTwoAbstractDeclarations() {\n val a = v(\"-D1\")","completion":"val b = v(\"-D2\")\n val c = v(\"-D3\")\n graph(c to a, c to b)\n doTest(c, setOf())\n }\n\n fun testAbstractDeclarationOverridesAbstractAndConcreteDeclarations() {\n val a = v(\"-D1\")\n val b = v(\"+D2\")\n val c = v(\"-D3\")<|endoftext|>"} {"prompt":"}\n\nprivate fun throwIllegalArgumentType(index: Int, name: String, expectedJvmType: Class<*>): Nothing {\n val kotlinClass = when {\n expectedJvmType == Class::class.java -> KClass::class\n expectedJvmType.isArray && expectedJvmType.componentType == Class::class.java ->","completion":"@Suppress(\"CLASS_LITERAL_LHS_NOT_A_CLASS\") Array>::class \/\/ Workaround KT-13924\n else -> expectedJvmType.kotlin\n }\n \/\/ For arrays, also render the type argument in the message, e.g. \"... not of the required type kotlin.Array\"\n val typeString =<|endoftext|>"} {"prompt":"\"\"\n else \", but captures at:\\n ${captures.joinToString(\"\\n \") {\n val location = it.getCompilerMessageLocation(irFile)!!\n val relativePath = File(location.path).descendantRelativeTo(cwd).path\n val capturedValueName = if (it is IrGetValue) \": ${it.symbol.owner.name.asString()}\" else \"\"","completion":"\"$relativePath:${location.line}:${location.column}$capturedValueName\"\n }}\"\n\n reportError(expression,\n \"${callee.fqNameForIrSerialization} must take an unbound, non-capturing function or lambda$formattedCaptures\")\n }\n\n override fun visitCall(expression: IrCall) {\n expression.acceptChildrenVoid(this)<|endoftext|>"} {"prompt":"gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl)\n\n build(\"publish\") {\n assertSuccessful()\n }\n }\n\n companion object {\n fun List.containsSequentially(vararg elements: String): Boolean {\n check(elements.isNotEmpty())\n return Collections.indexOfSubList(this, elements.toList()) != -1","completion":"}\n }\n}<|endoftext|>"} {"prompt":"return \"${addressToString(startAddress)}: $indent i32 : ${value.owner} ;; $name\\n\"\n }\n\n override val sizeInBytes: Int = INT_SIZE_BYTES\n}\n\nclass ConstantDataIntegerArray(val name: String, val value: List, private val integerSize: Int) : ConstantDataElement() {\n override fun toBytes(): ByteArray {","completion":"val array = ByteArray(value.size * integerSize)\n repeat(value.size) { i ->\n value[i].toLittleEndianBytesTo(array, i * integerSize, integerSize)\n }\n return array\n }\n\n override fun dump(indent: String, startAddress: Int): String {\n if (value.isEmpty()) return \"\"<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.descriptors.ClassKind\nimport org.jetbrains.kotlin.descriptors.Modality\nimport org.jetbrains.kotlin.descriptors.Visibility\nimport org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget","completion":"import org.jetbrains.kotlin.fir.tree.generator.context.generatedType\nimport org.jetbrains.kotlin.fir.tree.generator.context.type\nimport org.jetbrains.kotlin.fir.types.ConeClassLikeType\nimport org.jetbrains.kotlin.fir.types.ConeErrorType<|endoftext|>"} {"prompt":"abstract override fun createPointer(): KtSymbolPointer\n}\n\npublic abstract class KtSamConstructorSymbol : KtFunctionLikeSymbol(), KtNamedSymbol {\n final override val symbolKind: KtSymbolKind get() = withValidityAssertion { KtSymbolKind.SAM_CONSTRUCTOR }","completion":"abstract override fun createPointer(): KtSymbolPointer\n}\n\npublic abstract class KtFunctionSymbol : KtFunctionLikeSymbol(),\n KtNamedSymbol,\n KtPossibleMemberSymbol,\n KtPossibleMultiplatformSymbol,\n KtSymbolWithModality,\n KtSymbolWithVisibility {<|endoftext|>"} {"prompt":"override fun visitAnnotation(desc: String, visible: Boolean): AnnotationVisitor? =\n visitAnnotationImpl { args ->\n methodAnnotations += \"@\" + renderAnnotation(desc, args) + \" \"\n }\n\n override fun visitParameterAnnotation(parameter: Int, desc: String, visible: Boolean): AnnotationVisitor? =\n visitAnnotationImpl { args ->","completion":"parameterAnnotations.getOrPut(\n parameter + methodParamCount - (if (visible) visibleAnnotableParameterCount else invisibleAnnotableParameterCount)\n ) { arrayListOf() }.add(\"@\" + renderAnnotation(desc, args) + \" \")\n }\n\n override fun visitEnd() {\n val parameterWithAnnotations = parameterTypes.mapIndexed { index, parameter -><|endoftext|>"} {"prompt":"declaration.collectRealOverrides()\n .onEach {\n if (isFakeOverride && it.modality == Modality.ABSTRACT) {\n missedOverrides.add(it)\n }\n }\n .find { it.modality != Modality.ABSTRACT }\n ?.let {\n val implClassDeclaration = it.parent as IrClass","completion":"if (implClassDeclaration.shouldCopyFrom()) {\n val reference = context.getNameForStaticDeclaration(it).makeRef()\n classModel.postDeclarationBlock.statements += jsAssignment(\n jsElementAccess(memberName, classPrototypeRef),\n reference\n ).makeStmt()\n if (isFakeOverride) {\n classModel.postDeclarationBlock.statements += missedOverrides<|endoftext|>"} {"prompt":"public inline fun > IntArray.filterIndexedTo(destination: C, predicate: (index: Int, Int) -> Boolean): C {\n forEachIndexed { index, element ->\n if (predicate(index, element)) destination.add(element)\n }\n return destination\n}\n\n\/**","completion":"* Appends all elements matching the given [predicate] to the given [destination].\n * @param [predicate] function that takes the index of an element and the element itself\n * and returns the result of predicate evaluation on the element.\n * \n * @sample samples.collections.Collections.Filtering.filterIndexedTo\n *\/<|endoftext|>"} {"prompt":"if (a.s != null) a.s.propNullableAny\n if (a.s != null) a.s.funT()","completion":"if (a.s != null) a.s.funAny()\n if (a.s != null) a.s.funNullableT()<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.konan.test.blackbox.support.compilation\n\nimport java.io.File\n\nsealed interface TestCompilationArtifact {\n val logFile: File\n\n data class KLIB(val klibFile: File) : TestCompilationArtifact {\n val path: String get() = klibFile.path","completion":"val headerKlib: File get() = klibFile.resolveSibling(klibFile.name.replaceAfterLast(\".\", \"header.klib\"))\n override val logFile: File get() = klibFile.resolveSibling(\"${klibFile.name}.log\")\n }\n\n interface KLIBStaticCache : TestCompilationArtifact {\n val cacheDir: File\n val klib: KLIB<|endoftext|>"} {"prompt":"Errors.UNSUPPORTED.on(\n resolvedCall.call.callElement,\n error.message\n )\n )\n\n is NestedClassViaInstanceReference -> tracing.nestedClassAccessViaInstanceReference(\n resolvedCall.trace,\n error.classDescriptor,\n resolvedCall.explicitReceiverKind\n )\n\n is ErrorDescriptorDiagnostic -> {","completion":"\/\/ todo\n \/\/ return@map null\n }\n\n is ResolvedUsingDeprecatedVisibility -> {\n reportResolvedUsingDeprecatedVisibility(\n resolvedCall.call, resolvedCall.candidateDescriptor,\n resolvedCall.resultingDescriptor, error, resolvedCall.trace\n )\n }\n }\n }\n }<|endoftext|>"} {"prompt":"if (max < e) max = e\n }\n return max\n}\n\n\/**\n * Returns the largest element or `null` if there are no elements.\n *\/\n@SinceKotlin(\"1.4\")\n@ExperimentalUnsignedTypes\npublic fun UByteArray.maxOrNull(): UByte? {\n if (isEmpty()) return null\n var max = this[0]","completion":"for (i in 1..lastIndex) {\n val e = this[i]\n if (max < e) max = e\n }\n return max\n}\n\n\/**\n * Returns the largest element or `null` if there are no elements.\n *\/\n@SinceKotlin(\"1.4\")\n@ExperimentalUnsignedTypes\npublic fun UShortArray.maxOrNull(): UShort? {<|endoftext|>"} {"prompt":" & kotlin.collections.Map?\")!>x.funAny()","completion":" & kotlin.collections.Map?\")!>x.funNullableT()<|endoftext|>"} {"prompt":"const val notEqual8 = 1u !== uint","completion":"const val notEqual9 = uint !== int<|endoftext|>"} {"prompt":"is Intermediary.KeepCounting -> if (currentStep.togo == 0) {\n BaseTerminal.Success(count)\n } else {\n count++\n Intermediary.KeepCounting(currentStep.togo - 1)\n }\n }\n }\n}\n\nfun box(): String {\n val interpreter = CountingInterpreter()","completion":"var step: Interpreter.Step = CountingInterpreter.Intermediary.KeepCounting(1)\n while (step is CountingInterpreter.Intermediary) {\n step = interpreter.next(step).invoke()\n }\n return if ((step as BaseTerminal.Success).result == 1) \"OK\" else \"NOK\"<|endoftext|>"} {"prompt":"assertTrue(commandWithPrefix.startsWith(expectedPrefix)) {\n \"The command should start with $expectedPrefix. Got: $commandWithPrefix\"\n }\n\n val command = commandWithPrefix.removePrefix(expectedPrefix).trimStart()\n val body = lines.drop(1).filterNot(String::isBlank)\n\n return Step(command, body)\n }","completion":"}\n}\n\ninternal class LLDBSessionSpec private constructor(private val expectedSteps: List) {\n fun generateCLIArguments(prettyPrinters: File): List = buildList {\n this += \"-b\"\n this += \"-o\"\n this += \"command script import ${prettyPrinters.absolutePath}\"\n expectedSteps.forEach { step ->\n this += \"-o\"<|endoftext|>"} {"prompt":"process(C9(), \"C9\", setOf(\"I57\", \"I56\", \"I60\", \"I55\", \"I50\", \"I1\", \"I2\", \"I3\", \"I4\", \"I5\", \"I6\", \"I7\", \"I8\", \"I9\", \"I10\", \"I54\", \"I40\", \"I53\", \"I30\", \"I29\", \"I28\",","completion":"\"I27\", \"I26\", \"I25\", \"I24\", \"I23\", \"I22\", \"I21\", \"I52\", \"I20\", \"I51\", \"I10\", \"I61\", \"I62\", \"I63\", \"I64\", \"I65\", \"I66\", \"I67\", \"I68\", \"I69\", \"I70\"))<|endoftext|>"} {"prompt":"): CirClassType {\n return createInterned(\n classId = classifierId,\n outerType = outerType,\n arguments = arguments,\n isMarkedNullable = isMarkedNullable,\n attachments = attachments,\n )\n }\n\n private val interner = Interner()\n }\n}\n\n\/**","completion":"* All attributes are read from the abbreviation type: [KmType.abbreviatedType].\n *\n * This is necessary to properly compare types for type aliases, where abbreviation type represents the type alias itself while\n * expanded type represents right-hand side declaration that should be processed separately.\n *\/\nabstract class CirTypeAliasType : CirClassOrTypeAliasType() {\n abstract val underlyingType: CirClassOrTypeAliasType<|endoftext|>"} {"prompt":"resolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES\n returnTypeRef = typeArgument\n this.name = parameterName\n symbol = FirValueParameterSymbol(parameterName)\n defaultValue = null\n isCrossinline = false\n isNoinline = false\n isVararg = false\n }\n }","completion":"dispatchReceiverType = classId.defaultType(this@klass.typeParameters.map { it.symbol })\n kind.annotationOnInvokeClassId?.let { annotationClassId ->\n annotations += buildAnnotation {\n annotationTypeRef = annotationClassId\n .constructClassLikeType(emptyArray(), isNullable = false)\n .toFirResolvedTypeRef()<|endoftext|>"} {"prompt":"\/\/ no local optimizations\n if (element0 in 1u..<3u != range0.contains(element0)) throw AssertionError()\n if (element0 !in 1u..<3u != !range0.contains(element0)) throw AssertionError()\n if (!(element0 in 1u..<3u) != !range0.contains(element0)) throw AssertionError()","completion":"if (!(element0 !in 1u..<3u) != range0.contains(element0)) throw AssertionError()\n}\n\nfun testR0xE1() {\n \/\/ with possible local optimizations\n if (1u in 1u..<3u != range0.contains(1u)) throw AssertionError()<|endoftext|>"} {"prompt":"fun three(p1: O, p2: F, p3: I) = Unit\n fun three(p1: I, p2: O, p3: F) = Unit\n fun three(p1: I, p2: F, p3: O) = Unit","completion":"fun three(p1: F, p2: O, p3: I) = Unit\n fun three(p1: F, p2: I, p3: O) = Unit\n\n inner class Inner2(p1: O, p2: I, p3: I2) {<|endoftext|>"} {"prompt":"x\n x.hashCode()\n }\n}\n\n\/\/ TESTCASE NUMBER: 40\nfun case_40() {","completion":"val x: Unit? = null\n var z = null\n\n if (x == implicitNullableNothingProperty || z === x) {\n x<|endoftext|>"} {"prompt":"val newInitializer = revive(designation)\n initializer.replaceBody(newInitializer.body)\n}\n\nprivate fun needCalculatingLazyBodyForConstructor(firConstructor: FirConstructor): Boolean {","completion":"if (needCalculatingLazyBodyForFunction(firConstructor) || firConstructor.delegatedConstructor is FirLazyDelegatedConstructorCall) {\n return true\n }\n val delegatedConstructor = firConstructor.delegatedConstructor\n if (delegatedConstructor is FirMultiDelegatedConstructorCall) {<|endoftext|>"} {"prompt":"if (y != null || this.y != null) this.y.equals(null)","completion":"if (y != null || this.y != null) this.y.propT<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.incremental.storage\n\nimport junit.framework.TestCase.assertEquals\nimport junit.framework.TestCase.assertNull\nimport org.jetbrains.kotlin.incremental.IncrementalCompilationContext\nimport org.junit.After\nimport org.junit.Before\nimport org.junit.Rule\nimport org.junit.Test","completion":"import org.junit.rules.TemporaryFolder\nimport java.io.File\nimport kotlin.test.assertFailsWith\n\nclass SourceToOutputFilesMapTest {\n\n @get:Rule\n val tmpDir = TemporaryFolder()\n\n private lateinit var srcDir: File\n private lateinit var classesDir: File\n\n private lateinit var stofMap: SourceToOutputFilesMap<|endoftext|>"} {"prompt":"return implClass.constructors.singleOrNull { cons ->\n cons.valueParameters.map { it.name }.toSet() == existingValueArguments\n } ?: implClass.addConstructor {\n startOffset = SYNTHETIC_OFFSET\n endOffset = SYNTHETIC_OFFSET\n visibility = DescriptorVisibilities.PUBLIC\n }.apply {","completion":"expression.symbol.owner.valueParameters\n .filter { it.name in existingValueArguments }\n .forEach { parameter -> addValueParameter(parameter.name.asString(), parameter.type) }\n createConstructorBody(this, expression.symbol.owner)\n }\n }<|endoftext|>"} {"prompt":"add(FirErrors.FINITE_BOUNDS_VIOLATION_IN_JAVA) { firDiagnostic ->\n FiniteBoundsViolationInJavaImpl(\n firDiagnostic.a.map { firBasedSymbol ->\n firSymbolBuilder.buildSymbol(firBasedSymbol)\n },\n firDiagnostic as KtPsiDiagnostic,","completion":"token,\n )\n }\n add(FirErrors.EXPANSIVE_INHERITANCE) { firDiagnostic ->\n ExpansiveInheritanceImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n add(FirErrors.EXPANSIVE_INHERITANCE_IN_JAVA) { firDiagnostic -><|endoftext|>"} {"prompt":"open class A0 : MutableList {\n override fun add(element: E): Boolean {\n throw UnsupportedOperationException()\n }\n\n override fun add(index: Int, element: E) {\n throw UnsupportedOperationException()\n }\n\n override fun addAll(index: Int, elements: Collection): Boolean {\n throw UnsupportedOperationException()\n }","completion":"override fun addAll(elements: Collection): Boolean {\n throw UnsupportedOperationException()\n }\n\n override fun clear() {\n throw UnsupportedOperationException()\n }\n\n override fun listIterator(): MutableListIterator {\n throw UnsupportedOperationException()\n }\n\n override fun listIterator(index: Int): MutableListIterator {<|endoftext|>"} {"prompt":"OTHER(\"other\", \"complex expression\");\n\n override fun toString() = str\n }\n\n \/**\n * Stable means here we do not expect some sudden change of their values,\n * like accessing mutable properties in another thread, so smart casts can be used safely.\n *\/\n val isStable = kind == Kind.STABLE_VALUE ||\n kind == Kind.STABLE_VARIABLE ||","completion":"kind == Kind.STABLE_COMPLEX_EXPRESSION ||\n kind == Kind.LEGACY_STABLE_LOCAL_DELEGATED_PROPERTY ||\n kind == Kind.LEGACY_ALIEN_BASE_PROPERTY ||\n kind == Kind.LEGACY_ALIEN_BASE_PROPERTY_INHERITED_IN_INVISIBLE_CLASS<|endoftext|>"} {"prompt":"open inner class ExtFieldGeneratorImpl(field: Descriptors.FieldDescriptor, p: Printer) : FieldGenerator(field, p) {\n val outerClassName = field.file.options.javaOuterClassname.removePrefix(\"Debug\")\n val fieldName = field.name.javaName\n val fullFieldName = \"$outerClassName.$fieldName\"","completion":"override fun printRepeatedField() {\n p.printlnMultiline(\n \"\"\"\n if (old.getExtensionCount($fullFieldName) != new.getExtensionCount($fullFieldName)) {\n $statement\n }\n else {\n for(i in 0..old.getExtensionCount($fullFieldName) - 1) {<|endoftext|>"} {"prompt":"a.length\n (a as? String)!!\n a.length\n}\n\nfun test_3(a: Any?) {\n a as String\n a as String\n}","completion":"fun test_4(a: Any?) {\n a as String\n a as? String\n}\n\nfun test_5(a: Any?) {\n (a as? String)!!\n a.length\n (a as String)\n}<|endoftext|>"} {"prompt":"withDeclaration: (T, () -> Unit) -> Unit,\n declarationsProvider: (T) -> List,\n crossinline isUsedInControlFlowBuilder: (FirDeclaration) -> Boolean,\n ) {\n val declarations = declarationsProvider(declarationWithMembers)\n if (declarations.none(isUsedInControlFlowBuilder)) return\n\n withDeclaration(declarationWithMembers) {","completion":"for (declaration in declarations) {\n if (isUsedInControlFlowBuilder(declaration)) {\n declaration.lazyResolveToPhase(resolverPhase.previous)\n performResolve(declaration)\n }\n }\n }\n }\n\n private fun calculateControlFlowGraph(target: FirFile) {\n checkWithAttachment(\n target.controlFlowGraphReference == null,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.declarations.IrProperty\nimport org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl\nimport org.jetbrains.kotlin.ir.symbols.IrClassSymbol\nimport org.jetbrains.kotlin.ir.types.defaultType","completion":"import org.jetbrains.kotlin.ir.util.constructors\nimport org.jetbrains.kotlin.ir.util.isLocal\nimport org.jetbrains.kotlin.ir.visitors.transformChildrenVoid\nimport org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.platform.konan.isNative\n\n\/**<|endoftext|>"} {"prompt":"assertFalse(eqCharLongQ(0.toChar(), undefined))\n assertFalse(eqCharLongQ(1.toChar(), 0.toLong()))\n assertFalse(eqCharLongQ(1.toChar(), 1.toLong()))\n assertFalse(eqCharLongQ(1.toChar(), null))\n assertFalse(eqCharLongQ(1.toChar(), undefined))","completion":"assertFalse(eqCharQLong(0.toChar(), 0.toLong()))\n assertFalse(eqCharQLong(0.toChar(), 1.toLong()))\n assertFalse(eqCharQLong(1.toChar(), 0.toLong()))\n assertFalse(eqCharQLong(1.toChar(), 1.toLong()))<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.psi2ir.generators\n\nimport org.jetbrains.kotlin.descriptors.ModuleDescriptor\nimport org.jetbrains.kotlin.descriptors.NotFoundClasses\nimport org.jetbrains.kotlin.ir.IrBuiltIns\nimport org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI","completion":"import org.jetbrains.kotlin.ir.declarations.IrDeclaration\nimport org.jetbrains.kotlin.ir.declarations.lazy.LazyScopedTypeParametersResolver\nimport org.jetbrains.kotlin.ir.linkage.IrDeserializer\nimport org.jetbrains.kotlin.ir.linkage.IrProvider<|endoftext|>"} {"prompt":"}.joinToString(File.pathSeparator))\n }\n}\n\nprivate fun ArrayList.addScriptArguments(arguments: List) {\n if (arguments.isNotEmpty() && arguments.first() != \"--\") {\n add(\"--\")\n }\n addAll(arguments)\n}\n\nclass ReplRunner : RunnerWithCompiler() {","completion":"override fun run(classpath: List, compilerArguments: List, arguments: List, compilerClasspath: List) {\n val compilerArgs = ArrayList().apply {\n addClasspathArgIfNeeded(classpath)\n addAll(compilerArguments)\n addScriptArguments(arguments)\n }<|endoftext|>"} {"prompt":"public fun insert(index: Int, value: Any?): StringBuilder\n\n \/**\n * Inserts the string [value] into this string builder at the specified [index] and returns this instance.\n *\n * If [value] is `null`, then the four characters `\"null\"` are inserted.\n *","completion":"* @throws IndexOutOfBoundsException if [index] is less than zero or greater than the length of this string builder.\n *\/\n @SinceKotlin(\"1.4\")\n public fun insert(index: Int, value: String?): StringBuilder\n\n \/**\n * Sets the length of this string builder to the specified [newLength].\n *<|endoftext|>"} {"prompt":"t = 4\n }\n VV14 -> {\n t = 4\n }\n VV15 -> {\n t = 435\n }\n VV16 -> {\n t = 31\n }\n VV17 -> {\n t = 1\n }\n VV18 -> {\n t = 1\n }\n VV19 -> {\n t = 1\n }","completion":"VV20 -> {\n t = 1\n }\n else -> {\n t = 5\n }\n }\n return t\n }\n\n private fun stringSwitch(s: String) : Int {\n when(s) {\n \"ABCDEFG1\" -> return 1\n \"ABCDEFG2\" -> return 2\n \"ABCDEFG2\" -> return 3<|endoftext|>"} {"prompt":"override fun getSubPackagesOf(fqName: FqName, nameFilter: (Name) -> Boolean): Collection {\n val result = HashSet()\n for (provider in providers) {\n result.addAll(provider.getSubPackagesOf(fqName, nameFilter))\n }\n return result\n }","completion":"override fun toString(): String = debugName\n}<|endoftext|>"} {"prompt":"inline fun tryOrElse(f1: () -> T, f2: () -> T): T {\n try {\n return f1()\n }\n catch (e: Exception) {\n return f2()\n }\n}\n\nfun testIt() = \"abc\" + tryOrElse({ \"def\" }, { \"oops\" }) + \"ghi\"\n\nfun box(): String {","completion":"val test = testIt()\n if (test != \"abcdefghi\") return \"Failed, test==$test\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"context.scope.ownerDescriptor,\n Annotations.EMPTY,\n CallableMemberDescriptor.Kind.DECLARATION,\n expression.toSourceElement(),\n \/* isCoroutine = *\/ ReflectionTypes.isNumberedKSuspendFunction(type) || referencedFunction.isSuspend\n )\n\n functionDescriptor.initialize(\n null, null, emptyList(), emptyList(),","completion":"createValueParametersForInvokeInFunctionType(functionDescriptor, type.arguments.dropLast(1)),\n type.arguments.last().type,\n Modality.FINAL,\n DescriptorVisibilities.PUBLIC\n )\n\n context.trace.record(BindingContext.FUNCTION, expression, functionDescriptor)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.incremental.parsing.classesFqNames\nimport org.jetbrains.kotlin.incremental.storage.BasicFileToPathConverter\nimport org.jetbrains.kotlin.incremental.storage.FileLocations\nimport org.jetbrains.kotlin.incremental.util.BufferingMessageCollector","completion":"import org.jetbrains.kotlin.incremental.util.ExceptionLocation\nimport org.jetbrains.kotlin.incremental.util.reportException\nimport org.jetbrains.kotlin.metadata.jvm.deserialization.JvmMetadataVersion\nimport org.jetbrains.kotlin.name.FqName<|endoftext|>"} {"prompt":"if (a) {\n val a = someComposableValue()\n used(a)\n val m = Modifier()\n val dismissModifier = if (visible) {\n m.pointerInput(Unit) { detectTapGestures { onDismiss() } }\n } else {\n m\n }\n used(dismissModifier)\n }\n }\n \"\"\"\n )","completion":"@Test\n fun testRememberAfterStaticDefaultParameters() = comparisonPropagation(\n unchecked = \"\"\"\n import androidx.compose.runtime.*\n\n enum class Foo {\n A,\n B,\n C,\n }\n\n @Stable\n fun swizzle(a: Int, b: Int) = a + b\n\n @Composable<|endoftext|>"} {"prompt":"fun __(___: Int, y: _?): Int {","completion":"val (_, z) = Pair(___ - 1, 42)\n val (x, __________) = Pair(___ - 1, 42)<|endoftext|>"} {"prompt":"A(1, 2f, kotlin.Unit, \"\", ',', null), B(1, 2f, kotlin.Unit, \"\", ',', null), C(1, 2f, kotlin.Unit, \"\", ',', null);\n\n val x: Char? = '.'\n private val y: Unit? = kotlin.Unit\n protected val z: Int? = 12","completion":"public val u: String? = \"...\"\n val s: Any?\n val v: Int?\n val w: Number?\n val t: String? = if (u != null) this.u else null\n\n init {<|endoftext|>"} {"prompt":"* which are required earlier than the [TYPES] phase or other annotations which are required for some compiler plugins.\n * For some annotations (like [Deprecated] or [Target]) not only the type, but also the arguments are resolved.\n *\n * Also calculates [DeprecationsProvider].\n *\n * This is a [*jumping phase*][FirResolvePhase].\n *\/","completion":"COMPILER_REQUIRED_ANNOTATIONS,\n\n \/**\n * The compiler generates companion objects which were provided by compiler plugins.\n *\/\n COMPANION_GENERATION,\n\n \/**\n * The compiler resolves all supertypes of classes and performs type alias expansion.\n * Breaks loops in the type hierarchy if needed.\n *<|endoftext|>"} {"prompt":"assertPrints(list.getOrNull(3), \"null\")\n\n val emptyList = emptyList()\n assertPrints(emptyList.getOrNull(0), \"null\")\n }\n\n @Sample\n fun last() {\n val list = listOf(1, 2, 3, 4)\n assertPrints(list.last(), \"4\")","completion":"assertPrints(list.last { it % 2 == 1 }, \"3\")\n assertPrints(list.lastOrNull { it < 0 }, \"null\")\n assertFails { list.last { it < 0 } }\n\n val emptyList = emptyList()\n assertPrints(emptyList.lastOrNull(), \"null\")\n assertFails { emptyList.last() }\n }\n }<|endoftext|>"} {"prompt":"assertEquals(10, atomicIntArr.addAndGet(1, -100), \"addAndGet: FAIL 3\")\n assertEquals(10, atomicIntArr[1], \"addAndGet: FAIL 4\")\n assertFailsWith {\n val res = atomicIntArr.addAndGet(22, 33535)\n }.let { ex ->","completion":"assertEquals(\"The index 22 is out of the bounds of the AtomicIntArray with size 10.\", ex.message)\n }\n assertFailsWith {\n val res = atomicIntArr.addAndGet(-1, 33535)\n }.let { ex ->\n assertEquals(\"The index -1 is out of the bounds of the AtomicIntArray with size 10.\", ex.message)<|endoftext|>"} {"prompt":"forTestsMatching(\"compiler\/testData\/diagnostics\/foreignAnnotationsTests\/tests\/*\") {\n defaultDirectives {\n ANNOTATIONS_PATH with JavaForeignAnnotationType.Annotations\n +WITH_JSR305_TEST_ANNOTATIONS\n }\n }","completion":"forTestsMatching(\"compiler\/testData\/diagnostics\/foreignAnnotationsTests\/java8Tests\/*\") {\n defaultDirectives {\n ANNOTATIONS_PATH with JavaForeignAnnotationType.Java8Annotations\n }\n }\n\n forTestsMatching(\"compiler\/testData\/diagnostics\/foreignAnnotationsTests\/java11Tests\/*\") {\n defaultDirectives {<|endoftext|>"} {"prompt":"val NAMESPACE_RULE: Short\n }\n}\n\n\/**\n * Exposes the JavaScript [CSSNamespaceRule](https:\/\/developer.mozilla.org\/en\/docs\/Web\/API\/CSSNamespaceRule) to Kotlin\n *\/\npublic external abstract class CSSNamespaceRule : CSSRule, JsAny {\n open val namespaceURI: String\n open val prefix: String\n\n companion object {","completion":"val STYLE_RULE: Short\n val CHARSET_RULE: Short\n val IMPORT_RULE: Short\n val MEDIA_RULE: Short\n val FONT_FACE_RULE: Short\n val PAGE_RULE: Short\n val MARGIN_RULE: Short\n val NAMESPACE_RULE: Short\n }\n}\n\n\/**<|endoftext|>"} {"prompt":"internal fun parseOutputDataFile(baseDir: File, registeredDirectives: RegisteredDirectives, location: Location): OutputDataFile? =\n parseFileBasedDirective(baseDir, OUTPUT_DATA_FILE, registeredDirectives, location)?.let { OutputDataFile(file = it) }\n\ninternal fun parseInputDataFile(baseDir: File, registeredDirectives: RegisteredDirectives, location: Location): File? =","completion":"parseFileBasedDirective(baseDir, INPUT_DATA_FILE, registeredDirectives, location)\n\nprivate fun parseFileBasedDirective(\n baseDir: File,\n directive: StringDirective,\n registeredDirectives: RegisteredDirectives,\n location: Location\n): File? {\n if (directive !in registeredDirectives)\n return null\n\n val values = registeredDirectives[directive]<|endoftext|>"} {"prompt":"val Number.SquareMeters: SurfaceArea get() = SurfaceArea(toDouble())\nval Number.CubicMeters: Volume get() = Volume(toDouble())\n\n\/\/ FILE: operators.kt\noperator fun Number.times(length: Length): Length = Length(toDouble() * length.meters)\noperator fun Number.times(surfaceArea: SurfaceArea): SurfaceArea = SurfaceArea(toDouble() * surfaceArea.squareMeters)","completion":"operator fun Number.times(volume: Volume): Volume = Volume(toDouble() * volume.cubicMeters)\n\noperator fun Length.times(factor: Number): Length = Length(meters * factor.toDouble())\noperator fun Length.times(length: Length): SurfaceArea = SurfaceArea(meters * length.meters)<|endoftext|>"} {"prompt":"public abstract class Base_ShouldBeOpen {\n public void baseMethod() {}\n}\n\n\/\/ MODULE: main(lib)\nopen class BaseImpl : Base_ShouldBeOpen() {\n fun baseImplMethod_ShouldBeOpen() {}\n}\n\nclass BaseImpl2_ShouldBeOpen : BaseImpl() {\n fun baseImpl2Method_ShouldBeOpen() {}\n val baseImpl2Property_ShouldBeOpen = \"\"\n}","completion":"open class IntfImpl : Intf {\n fun intfImplMethod_ShouldBeOpen() {}\n}\n\nclass IntfImpl2_ShouldBeOpen : IntfImpl() {\n fun intfImpl2Method_ShouldBeOpen() {}\n}\n\nfun box() = \"OK\"<|endoftext|>"} {"prompt":"* @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].\n * \n * @sample samples.collections.Arrays.Sorting.sortRangeOfArray\n *\/\n@SinceKotlin(\"1.4\")\n@Suppress(\"ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS\")","completion":"public actual fun ShortArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {\n AbstractList.checkRangeIndexes(fromIndex, toIndex, size)\n sortArray(this, fromIndex, toIndex)\n}\n\n\/**\n * Sorts a range in the array in-place.\n * \n * @param fromIndex the start of the range (inclusive) to sort, 0 by default.<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: NATIVE\n\/\/ FILECHECK_STAGE: CStubs\n\n\/\/ CHECK-AAPCS-OPT-LABEL: define i1 @\"kfun:kotlin.UIntArray#equals(kotlin.Any?){}kotlin.Boolean\"(%struct.ObjHeader* %0, %struct.ObjHeader* %1)","completion":"\/\/ CHECK-DEFAULTABI-OPT-LABEL: define zeroext i1 @\"kfun:kotlin.UIntArray#equals(kotlin.Any?){}kotlin.Boolean\"(%struct.ObjHeader* %0, %struct.ObjHeader* %1)<|endoftext|>"} {"prompt":"* IncrementalJvmCompilationConfiguration provides single-property API for forward-compatibility.\n *\n * configurationAdapters are there to regroup the properties and work with higher-level interfaces.\n *\/\n\ninternal fun ICConfiguration.extractIncrementalCompilationFeatures(): IncrementalCompilationFeatures {\n return IncrementalCompilationFeatures(\n withAbiSnapshot = false,","completion":"preciseCompilationResultsBackup = preciseCompilationResultsBackupEnabled,\n keepIncrementalCompilationCachesInMemory = incrementalCompilationCachesKeptInMemory,\n )\n}<|endoftext|>"} {"prompt":">>\")!>test15(first, second)\n >>\")!>test16(first, second)","completion":">>\")!>test17(first, second)\n >>\")!>test18(first, second)\n}\n\ninterface Bound1\ninterface Bound2\nobject First : Bound1, Bound2<|endoftext|>"} {"prompt":"* Activities that contain this fragment must implement the\n * [StartFragment.OnFragmentInteractionListener] interface\n * to handle interaction events.\n * Use the [StartFragment.newInstance] factory method to\n * create an instance of this fragment.\n *\/\nclass StartFragment : Fragment() {\n \/\/ TODO: Rename and change types of parameters\n private var param1: String? = null","completion":"private var param2: String? = null\n private var listener: OnFragmentInteractionListener? = null\n\n override fun onCreate(savedInstanceState: Bundle?) {\n super.onCreate(savedInstanceState)\n arguments?.let {\n param1 = it.getString(ARG_PARAM1)\n param2 = it.getString(ARG_PARAM2)\n }<|endoftext|>"} {"prompt":"var wasCalled = false\nclass Controller {\n val postponedActions = mutableListOf<() -> Unit>()\n\n suspend fun suspendWithValue(v: String): String = suspendCoroutineUninterceptedOrReturn { x ->\n postponedActions.add {\n x.resume(v)\n }\n\n COROUTINE_SUSPENDED\n }","completion":"suspend fun suspendWithException(e: Exception): String = suspendCoroutineUninterceptedOrReturn { x ->\n postponedActions.add {\n x.resumeWithException(e)\n }\n\n COROUTINE_SUSPENDED\n }\n\n fun run(c: suspend Controller.() -> String) {\n c.startCoroutine(this, handleResultContinuation {<|endoftext|>"} {"prompt":"override var onpointerdown: ((PointerEvent) -> dynamic)?\n override var onpointermove: ((PointerEvent) -> dynamic)?\n override var onpointerup: ((PointerEvent) -> dynamic)?\n override var onpointercancel: ((PointerEvent) -> dynamic)?\n override var onpointerover: ((PointerEvent) -> dynamic)?","completion":"override var onpointerout: ((PointerEvent) -> dynamic)?\n override var onpointerenter: ((PointerEvent) -> dynamic)?\n override var onpointerleave: ((PointerEvent) -> dynamic)?\n override var oncopy: ((ClipboardEvent) -> dynamic)?\n override var oncut: ((ClipboardEvent) -> dynamic)?<|endoftext|>"} {"prompt":"\/\/ TODO (KT-60899): implement this checker for JS, similarly to K1's JsReflectionAPICallChecker.\nabstract class AbstractFirReflectionApiCallChecker : FirBasicExpressionChecker(MppCheckerKind.Common) {\n protected abstract fun isWholeReflectionApiAvailable(context: CheckerContext): Boolean","completion":"protected abstract fun report(source: KtSourceElement?, context: CheckerContext, reporter: DiagnosticReporter)\n\n protected open fun isAllowedKClassMember(name: Name, context: CheckerContext): Boolean = when (name) {\n K_CLASS_SIMPLE_NAME, K_CLASS_IS_INSTANCE -> true<|endoftext|>"} {"prompt":"global = \"\"\n outer@ while(try { global += \"A\"; i++ } finally {} < 3) {\n j = 0\n while( try {global += \"B\"; j++ } finally {} < 2) {\n if (j==1) continue@outer\n }\n }\n assertEquals(\"ABABABA\", global)\n assertEquals(4, i)","completion":"assertEquals(1, j)\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION\n\/\/ SKIP_TXT\n\n\/*\n * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)\n *\n * SPEC VERSION: 0.1-387","completion":"* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1\n * PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 4<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.descriptorUtil.module\nimport org.jetbrains.kotlin.util.findImplementationFromInterface\nimport org.jetbrains.kotlin.util.findInterfaceImplementation\n\nfun generateBridgesForFunctionDescriptor(\n descriptor: FunctionDescriptor,\n signature: (FunctionDescriptor) -> Signature","completion":"): Set> {\n return generateBridges(DescriptorBasedFunctionHandle(descriptor), { signature(it.descriptor) })\n}\n\n\/**\n * An implementation of FunctionHandle based on descriptors.\n *\n * This implementation workarounds a minor inconvenience in descriptor hierarchy regarding traits with implementations.\n * Consider the following hierarchy:\n *<|endoftext|>"} {"prompt":"@kotlin.internal.InlineOnly\npublic inline operator fun ShortArray.component5(): Short {\n return get(4)\n}\n\n\/**\n * Returns 5th *element* from the array.\n * \n * If the size of this array is less than 5, throws an [IndexOutOfBoundsException] except in Kotlin\/JS\n * where the behavior is unspecified.\n *\/","completion":"@kotlin.internal.InlineOnly\npublic inline operator fun IntArray.component5(): Int {\n return get(4)\n}\n\n\/**\n * Returns 5th *element* from the array.\n * \n * If the size of this array is less than 5, throws an [IndexOutOfBoundsException] except in Kotlin\/JS\n * where the behavior is unspecified.\n *\/<|endoftext|>"} {"prompt":"override val foo: String\n get() = \"foo\"\n\n override val foo2: String = \"foo2\"\n\n override var foo3: String = \"foo3\"\n}\n\nfun box(): String {\n val bar = Bar()\n if (bar.foo != \"foo\") return \"fail 1\"\n if (bar.foo2 != \"foo2\") return \"fail 2\"","completion":"if (bar.foo3 != \"foo3\") return \"fail 3\"\n bar.foo3 = \"foo4\"\n if (bar.foo3 != \"foo4\") return \"fail 4\"\n\n val bay = Bay()\n if (bay.baz1 != \"baz1\") return \"fail 5\"\n if (bay.baz2 != \"baz2\") return \"fail 6\"<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.fir.analysis.checkers.expression\n\nimport org.jetbrains.kotlin.diagnostics.DiagnosticReporter\nimport org.jetbrains.kotlin.fir.analysis.checkers.MppCheckerKind\nimport org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext","completion":"import org.jetbrains.kotlin.fir.expressions.FirFunctionCall\nimport org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression\nimport org.jetbrains.kotlin.fir.expressions.toResolvedCallableSymbol<|endoftext|>"} {"prompt":"fun ltest4(a: Long, b: Long) = a <= b\n\nfun ftest1(a: Float, b: Float) = a > b\nfun ftest2(a: Float, b: Float) = a < b\nfun ftest3(a: Float, b: Float) = a >= b\nfun ftest4(a: Float, b: Float) = a <= b","completion":"fun dtest1(a: Double, b: Double) = a > b\nfun dtest2(a: Double, b: Double) = a < b\nfun dtest3(a: Double, b: Double) = a >= b\nfun dtest4(a: Double, b: Double) = a <= b<|endoftext|>"} {"prompt":"val parcelerSuperType = parcelerClass.defaultType.supertypes().firstOrNull { it.fqName() == PARCELER_FQN } ?: return\n val expectedType = parcelerSuperType.arguments.singleOrNull()?.type ?: return\n\n if (!actualType.isSubtypeOf(expectedType)) {","completion":"context.trace.report(ErrorsParcelize.PARCELER_TYPE_INCOMPATIBLE.on(reportElement(), expectedType, actualType))\n }\n }\n\n private fun checkIfTheContainingClassIsParcelize(\n containingClass: KtClassOrObject?,\n annotationEntry: KtAnnotationEntry,\n context: CallCheckerContext\n ) {<|endoftext|>"} {"prompt":"\/\/ library.kt:15 box: $i$f$foo\\1\\64:int=0:int, array\\1:java.lang.Integer[]=java.lang.Integer[], myClass\\1:MyClass=MyClass, this_\\7:MyClass=MyClass, $i$f$f2\\7\\427:int=0:int","completion":"\/\/ library.kt:16 box: $i$f$foo\\1\\64:int=0:int, array\\1:java.lang.Integer[]=java.lang.Integer[], myClass\\1:MyClass=MyClass, this_\\7:MyClass=MyClass, $i$f$f2\\7\\427:int=0:int<|endoftext|>"} {"prompt":"private val configuration: CheckerConfiguration,\n private val packagePart1: KmPackageParts,\n private val packagePart2: KmPackageParts,\n private val packagePartsReport: MetadataPropertyReport\n): Runnable {\n override fun run() {\n for (checker in configuration.enabledPackagePartsMetadataCheckers) {\n checker.check(packagePart1, packagePart2, packagePartsReport)","completion":"}\n }\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.descriptors.Modality\nimport org.jetbrains.kotlin.ir.IrElement\nimport org.jetbrains.kotlin.ir.declarations.IrClass\nimport org.jetbrains.kotlin.ir.declarations.IrFile\nimport org.jetbrains.kotlin.ir.declarations.IrSimpleFunction","completion":"import org.jetbrains.kotlin.ir.types.*\nimport org.jetbrains.kotlin.ir.util.*\nimport org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid\nimport org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid\nimport org.jetbrains.kotlin.util.OperatorNameConventions\n\n\/**<|endoftext|>"} {"prompt":"override val returnType: KtType\n get() = withValidityAssertion { _returnType }\n override val receiverType: KtType?\n get() = withValidityAssertion { _receiverType }\n override val valueParameters: List>\n get() = withValidityAssertion { _valueParameters }","completion":"override fun substitute(substitutor: KtSubstitutor): KtFunctionLikeSignature = withValidityAssertion {\n KtFe10FunctionLikeSignature(\n symbol,\n substitutor.substitute(returnType),\n receiverType?.let { substitutor.substitute(it) },\n valueParameters.map { valueParameter -><|endoftext|>"} {"prompt":"* This function can be implemented to produce more precise result for [x] near zero.\n *\n * Special cases:\n * - `ln1p(NaN)` is `NaN`\n * - `ln1p(x)` is `NaN` where `x < -1.0`\n * - `ln1p(-1.0)` is `-Inf`","completion":"* - `ln1p(+Inf)` is `+Inf`\n *\n * @see [ln] function\n * @see [expm1] function\n *\/\n@SinceKotlin(\"1.2\")\npublic actual fun ln1p(x: Float): Float = kotlin.math.fdlibm.log1p(x.toDouble()).toFloat()\n\n\/**<|endoftext|>"} {"prompt":"throw new RuntimeException();\n }\n}\n\n\/\/ FILE: UtilNullMarkedGeneric.java\nimport org.jspecify.nullness.*;\n\n@NullMarked\npublic class UtilNullMarkedGeneric {\n public static Foo getFooOfK() {\n throw new RuntimeException();\n }\n}\n\n\/\/ FILE: UtilNullMarkedGenericNullableBound.java","completion":"import org.jspecify.nullness.*;\n\n@NullMarked\npublic class UtilNullMarkedGenericNullableBound {\n public static Foo getFooOfK() {\n throw new RuntimeException();\n }\n}\n\n\/\/ FILE: UtilGenericNullableBound.java\nimport org.jspecify.nullness.*;<|endoftext|>"} {"prompt":"?: ((this as IrFunction).parent as IrClass).annotations.first { it.symbol.owner.parentAsClass.fqNameWhenAvailable == annotation }\n}\n\ninternal fun IrAnnotationContainer.getEvaluateIntrinsicValue(): String? {\n if (this is IrClass && this.fqName.startsWith(\"java\")) return this.fqName","completion":"if (!this.hasAnnotation(evaluateIntrinsicAnnotation)) return null\n return (this.getAnnotation(evaluateIntrinsicAnnotation).getValueArgument(0) as IrConst<*>).value.toString()\n}\n\ninternal fun getPrimitiveClass(irType: IrType, asObject: Boolean = false): Class<*>? =\n when (irType.getPrimitiveType()) {<|endoftext|>"} {"prompt":"* ensures that parameter\/return types of IR stubs are remapped correctly.\n * Classes extending fun interfaces with composable types will be processed by visitFunction\n * above as normal.\n *\/\n val type = expression.typeOperand\n val clsSymbol = type.classOrNull ?: return super.visitTypeOperator(expression)\n\n \/\/ Unbound symbols indicate they are in the current module and have not been","completion":"\/\/ processed by copier yet.\n if (\n clsSymbol.isBound &&\n clsSymbol.owner.origin == IrDeclarationOrigin.IR_EXTERNAL_DECLARATION_STUB &&\n \/\/ Only process fun interfaces with @Composable types\n clsSymbol.owner.isFun &&<|endoftext|>"} {"prompt":"when {\n columnName == \"scenario\" -> DataColumn.createValueColumn(\n columnName,\n columns().map {\n if (it.name.contains(currentKotlinVersion)) {\n it.name.substringBefore(currentKotlinVersion) + currentKotlinVersion\n } else {\n it.name.substringBefore(stableKotlinVersions) + stableKotlinVersions","completion":"}\n }.drop(1)\n )\n columnName == \"version\" -> DataColumn.createValueColumn(\n columnName,\n rowToColumn(columnName) { it.toString() }\n )\n columnName == \"tasks\" -> DataColumn.createValueColumn(\n columnName,\n rowToColumn(columnName) { it.toString() }\n )<|endoftext|>"} {"prompt":"public infix fun ULong.until(to: ULong): ULongRange {\n if (to <= ULong.MIN_VALUE) return ULongRange.EMPTY\n return this .. (to - 1u).toULong()\n}\n\npublic infix fun UShort.until(to: UShort): UIntRange {\n if (to <= UShort.MIN_VALUE) return UIntRange.EMPTY","completion":"return this.toUInt() .. (to - 1u).toUInt()\n}<|endoftext|>"} {"prompt":"it.exists()\n }?.rootDir?.let {\n objectFactory.fileTree().from(it)\n }\n }\n\n private enum class AppleArchitecture(val clangMacro: String) {\n X64(\"__x86_64__\"),\n X86(\"__i386__\"),\n ARM32(\"__arm__\"),","completion":"\/\/ We need to distinguish between variants of aarch64, because there are two WatchOS ARM64 targets that we support\n \/\/ watchOsArm64 that compiles to arm64_32 architecture\n \/\/ watchOsDeviceArm64 that compiles to arm64 architecture<|endoftext|>"} {"prompt":"@kotlin.internal.IntrinsicConstEvaluation\n @WasmOp(WasmOp.I32_XOR)\n public infix fun xor(other: Int): Int =\n implementedAsIntrinsic\n\n \/** Inverts the bits in this value. *\/\n @kotlin.internal.IntrinsicConstEvaluation\n public inline fun inv(): Int =","completion":"this.xor(-1)\n\n \/**\n * Converts this [Int] value to [Byte].\n *\n * If this value is in [Byte.MIN_VALUE]..[Byte.MAX_VALUE], the resulting `Byte` value represents\n * the same numerical value as this `Int`.\n *\n * The resulting `Byte` value is represented by the least significant 8 bits of this `Int` value.<|endoftext|>"} {"prompt":"factory.createValueParameter(\n startOffset = startOffset,\n endOffset = endOffset,\n origin = origin,\n name = name,\n type = type.substitute(substitutionMap),\n isAssignable = isAssignable,\n symbol = IrValueParameterSymbolImpl(),\n index = index,","completion":"varargElementType = varargElementType?.substitute(substitutionMap),\n isCrossinline = isCrossinline,\n isNoinline = isNoinline,\n isHidden = isHidden,\n ).also { parameter ->\n parameter.parent = this@copyReceiverParametersFrom\n }\n }\n extensionReceiverParameter = from.extensionReceiverParameter?.copyTo(this)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.utils.bind\nimport java.lang.Boolean.getBoolean\n\n\nopen class AbstractFirJsTest(\n pathToTestDir: String = \"${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}\/box\/\",\n testGroupOutputDirPrefix: String,\n targetBackend: TargetBackend = TargetBackend.JS_IR,","completion":"val parser: FirParser = FirParser.Psi,\n) : AbstractJsBlackBoxCodegenTestBase(\n FrontendKinds.FIR, targetBackend, pathToTestDir, testGroupOutputDirPrefix, skipMinification = true\n) {<|endoftext|>"} {"prompt":"open class WH : WarningDeprecated, HiddenDeprecated {\n override fun f() {\n\n }\n}\n\nopen class EH : ErrorDeprecated, HiddenDeprecated {\n override fun f() {\n\n }\n}\n\nopen class NW : WarningDeprecated, NotDeprecated {","completion":"override fun f() {\n\n }\n}\n\nopen class NE : ErrorDeprecated, NotDeprecated {\n override fun f() {\n\n }\n}\n\nopen class NH : HiddenDeprecated, NotDeprecated {<|endoftext|>"} {"prompt":"testR0xE0()\n testR0xE1()\n testR0xE2()\n testR0xE3()\n testR0xE4()\n testR1xE0()\n testR1xE1()\n testR1xE2()\n testR1xE3()\n testR1xE4()\n return \"OK\"\n}","completion":"fun testR0xE0() {\n \/\/ with possible local optimizations\n if (0uL in 1uL..3uL != range0.contains(0uL)) throw AssertionError()\n if (0uL !in 1uL..3uL != !range0.contains(0uL)) throw AssertionError()<|endoftext|>"} {"prompt":"firTypeScope.processFunctionsByName(callableId.callableName) { }\n firTypeScope.processOverriddenFunctions(this) {\n overriddenFunctions.add(it)\n ProcessorAction.NEXT\n }\n\n \/*\n * The original symbol may appear in `processOverriddenFunctions`, so it should be removed from the resulting","completion":"* list to not confuse the caller with a situation when the function directly overrides itself\n *\n * For details see FirTypeScope.processDirectOverriddenFunctionsWithBaseScope\n *\/\n overriddenFunctions -= this\n\n return overriddenFunctions\n}<|endoftext|>"} {"prompt":"x.length\n}\n\n\/*\n * TESTCASE NUMBER: 6\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-29482\n *\/\nfun case_6(x: String?) {\n do {\n try {","completion":"if (x == null) {\n throw Exception()\n }\n } catch (e: Exception) {\n break\n }\n } while (true)\n x<|endoftext|>"} {"prompt":"if (defaultArgsIncompatibleMembers.isNotEmpty()) { \/\/ report a nicer diagnostic for DefaultArgumentsInExpectActualizedByFakeOverride\n val problematicExpectMembers = defaultArgsIncompatibleMembers\n .map {\n it.first as? FirNamedFunctionSymbol","completion":"?: error(\"${ExpectActualCheckingCompatibility.DefaultArgumentsInExpectActualizedByFakeOverride} can be reported only for ${FirNamedFunctionSymbol::class}\")\n }\n reporter.reportOn(\n source,\n FirErrors.DEFAULT_ARGUMENTS_IN_EXPECT_ACTUALIZED_BY_FAKE_OVERRIDE,<|endoftext|>"} {"prompt":"private fun IrSymbol.dumpInternal(label: String? = null) {\n if (isBound)\n owner.dumpInternal(label)\n else\n printer.println(\"$label: UNBOUND ${javaClass.simpleName}\")\n }\n\n private fun IrElement.dumpInternal(label: String? = null) {\n if (label != null) {","completion":"printer.println(\"$label: \", accept(elementRenderer, null))\n } else {\n printer.println(accept(elementRenderer, null))\n }\n\n }\n\n private inline fun indented(label: String, body: () -> Unit) {\n printer.println(\"$label:\")\n indented(body)\n }<|endoftext|>"} {"prompt":".map { ExportedType.PropertyType(exportType(it), ExportedType.LiteralType.StringLiteralType(magicPropertyName)) }\n .reduce(ExportedType::IntersectionType)\n .let { if (klass.shouldNotBeImplemented()) ExportedType.IntersectionType(klass.generateTagType(), it) else it }","completion":"add(ExportedProperty(name = magicPropertyName, type = intersectionOfTypes, mutable = false, isMember = true, isField = true))\n }\n\n private fun IrType.shouldAddMagicPropertyOfSuper(): Boolean {\n return classOrNull?.owner?.isOwnMagicPropertyAdded() ?: false\n }\n\n private fun IrClass.isOwnMagicPropertyAdded(): Boolean {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.expressions.FirFunctionCall\nimport org.jetbrains.kotlin.fir.expressions.FirReturnExpression\nimport org.jetbrains.kotlin.fir.references.toResolvedCallableSymbol\nimport org.jetbrains.kotlin.fir.resolve.toSymbol","completion":"import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenFunctions\nimport org.jetbrains.kotlin.fir.scopes.getDirectOverriddenProperties\nimport org.jetbrains.kotlin.fir.symbols.FirBasedSymbol\nimport org.jetbrains.kotlin.fir.symbols.SymbolInternals<|endoftext|>"} {"prompt":"\/\/ test.kt:25 baz: param:int=6:int, b:int=2:int, $i$a$-bar-TestKt$box$2\\1\\14\\0:int=0:int\n\/\/ EXPECTATIONS JVM_IR +USE_INLINE_SCOPES_NUMBERS","completion":"\/\/ test.kt:26 baz: param:int=6:int, b:int=2:int, $i$a$-bar-TestKt$box$2\\1\\14\\0:int=0:int, d\\1:int=4:int\n\/\/ test.kt:14 baz: param:int=6:int, b:int=2:int<|endoftext|>"} {"prompt":"if (fir is FirVariableAssignment && (baseExpression is KtDotQualifiedExpression ||\n baseExpression is KtNameReferenceExpression)\n ) {\n val variablePartiallyAppliedSymbol = fir.toPartiallyAppliedSymbol() ?: return null\n val operationPartiallyAppliedSymbol =","completion":"getOperationPartiallyAppliedSymbolsForCompoundVariableAccess(fir, baseExpression) ?: return null\n return if (resolveFragmentOfCall) {\n KtSimpleVariableAccessCall(\n variablePartiallyAppliedSymbol,\n fir.unwrapLValue()?.toTypeArgumentsMapping(variablePartiallyAppliedSymbol) ?: emptyMap(),<|endoftext|>"} {"prompt":"private fun getSimulatorRuntimesFor(\n descriptors: List,\n family: Family,\n osMinVersion: String\n): List {\n val osName = simulatorOsName(family)\n return descriptors.filter {","completion":"it.checkAvailability() && it.name.startsWith(osName) && compareStringsAsVersions(it.version, osMinVersion) >= 0\n }\n}\n\n\/**\n * Returns first available simulator runtime for [target] with at least [osMinVersion] OS version.\n * *\/\nfun Xcode.getLatestSimulatorRuntimeFor(family: Family, osMinVersion: String): SimulatorRuntimeDescriptor? =<|endoftext|>"} {"prompt":"\/\/ FILE: Test.kt\npackage testPack\nimport libMyIteratorPackage.*\n\/\/import libPackage1.getValue\n\/\/import libPackage1.setValue\nimport libPackage2.*\nimport kotlin.reflect.KProperty\n\nclass Delegate {}\n\nfun box() : String {\n class Test {\n var p: String by Delegate()\n }\n\n val test = Test()","completion":"assert(!isGetCalled && !isSetCalled)\n test.p = \"NEW\"\n if (isSetCalled && !isGetCalled) {\n isSetCalled = false\n val x = test.p\n if (!isSetCalled && isGetCalled)\n return \"OK\"\n }\n return \"NOK\"\n}<|endoftext|>"} {"prompt":"project, CliAndroidOnDestroyClassBuilderInterceptorExtension(globalCacheImpl)\n )\n\n PackageFragmentProviderExtension.registerExtension(project,\n CliAndroidPackageFragmentProviderExtension(isExperimental))\n }\n\n fun parseCacheImplementationType(s: String?): CacheImplementation = when (s) {\n \"sparseArray\" -> CacheImplementation.SPARSE_ARRAY","completion":"\"none\" -> CacheImplementation.NO_CACHE\n else -> CacheImplementation.DEFAULT\n }\n }\n\n override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {\n reportRemovedError(configuration)\n\n val features = configuration.get(AndroidConfigurationKeys.FEATURES) ?: AndroidExtensionsFeature.values().toSet()<|endoftext|>"} {"prompt":"\/\/ CHECK-OPT: call %struct.ObjHeader* @\"kfun:codegen.stringConcatenationTypeNarrowing.kt53119_plus_extension.Foo#toString(){}kotlin.String\"\n\/\/ CHECK-OPT-NOT: Foo#toString(){}kotlin.String","completion":"\/\/ CHECK-OPT: call %struct.ObjHeader* @Kotlin_String_plusImpl\n\/\/ CHECK-OPT-NOT: call %struct.ObjHeader* @Kotlin_String_plusImpl\n\n\/\/ CHECK-OPT-NOT: call %struct.ObjHeader* @\"kfun:kotlin.String#toString(){}kotlin.String\"<|endoftext|>"} {"prompt":"if (this@getterIfProperty is PropertyDescriptor) this@getterIfProperty.getter else this@getterIfProperty\n\n private inner class UltraLightModifierListForMember(\n private val declaration: KtDeclaration,\n private val accessedProperty: KtProperty?,\n private val outerDeclaration: KtDeclaration,\n private val forceStatic: Boolean,","completion":"private val forcePrivate: Boolean = false,\n private val forceNonFinal: Boolean = false,\n ) : LightModifierList(declaration.manager, declaration.language) {\n\n override fun hasModifierProperty(name: String): Boolean {\n\n val hasModifierByDeclaration = hasModifier(name)\n if (name != PsiModifier.FINAL) return hasModifierByDeclaration<|endoftext|>"} {"prompt":"object MyObject : Foo(MyObject.prop)\n}\n\nfun box(): String? {","completion":"if (Foo.MyObject == null) return null\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.name.SpecialNames\nimport org.jetbrains.kotlin.utils.memoryOptimizedMapIndexed\nimport org.jetbrains.kotlin.utils.memoryOptimizedPlus\n\nclass CallableReferenceLowering(private val context: JsCommonBackendContext) : BodyLoweringPass {","completion":"override fun lower(irFile: IrFile) {\n runOnFilePostfix(irFile, withLocalDeclarations = true)\n }\n\n override fun lower(irBody: IrBody, container: IrDeclaration) {\n val realContainer = container as? IrDeclarationParent ?: container.parent\n irBody.transformChildrenVoid(ReferenceTransformer(realContainer))\n }<|endoftext|>"} {"prompt":"\/\/ CHECK-NOT: call void @\"kfun:$s8$lambda${{[0-9]*}}COROUTINE${{[0-9]*}}.\n run {\n println(\"s8\")\n return@builderInt sInt()\n }\n }\n \/\/ CHECK-LABEL: epilogue:\n}\n\nfun s9() {","completion":"\/\/ CHECK-LABEL: define internal %struct.ObjHeader* @\"kfun:s9$lambda${{[0-9]*}}\n builderUnit {\n \/\/ CHECK-NOT: call void @\"kfun:$s9$lambda${{[0-9]*}}COROUTINE${{[0-9]*}}.\n run {\n println(\"s9-1\")<|endoftext|>"} {"prompt":"if (position.kind != ConstraintPositionKind.RECEIVER_POSITION) it else it.makeNotNullable()\n } ?: return false\n val resultSuperType = superType.substitute() ?: return false\n when (kind) {\n SUB_TYPE -> KotlinTypeChecker.DEFAULT.isSubtypeOf(resultSubType, resultSuperType)","completion":"EQUAL -> KotlinTypeChecker.DEFAULT.equalTypes(resultSubType, resultSuperType)\n }\n }\n }\n\n override fun toBuilder(filterConstraintPosition: (ConstraintPosition) -> Boolean): ConstraintSystem.Builder {\n val result = ConstraintSystemBuilderImpl()\n for ((typeParameter, typeBounds) in allTypeParameterBounds) {<|endoftext|>"} {"prompt":"val result = data - sequenceOf(\"foo\", \"g\")\n assertEquals(listOf(\"bar\"), result)\n }\n\n @Test\n @Suppress(\"USELESS_CAST\") \/\/ remove suppress and casts when tests are finally compiled only with K2\n fun minusAssign() {\n \/\/ lets use a mutable variable\n var result: Iterable = data\n result -= \"foo\"","completion":"assertEquals(listOf(\"bar\"), result as? List)\n result = data\n result -= listOf(\"beer\", \"bar\")\n assertEquals(listOf(\"foo\"), result as? List)\n result = data\n result -= arrayOf(\"bar\", \"foo\")\n assertEquals(emptyList(), result as? List)\n result = data\n result -= sequenceOf(\"foo\", \"g\")<|endoftext|>"} {"prompt":"if (name == SerialEntityNames.SERIAL_DESC_FIELD_NAME && result.none(thisDescriptor::checkSerializableClassPropertyResult) &&\n fromSupertypes.none { thisDescriptor.checkSerializableClassPropertyResult(it) && it.modality == Modality.FINAL }\n ) {","completion":"result.add(createSerializableClassPropertyDescriptor(thisDescriptor, classDescriptor))\n }\n \/\/ don't add local serializer fields if typed constructor is not synthetic\n if (classDescriptor.declaredTypeParameters.isNotEmpty() &&\n findSerializerConstructorForTypeArgumentsSerializers(thisDescriptor, onlyIfSynthetic = true) != null\n ) {<|endoftext|>"} {"prompt":"if (!(funWithReturnsNotNullAndTypeCheck(value_1) != null)) println(value_1.length)","completion":"if (!!(funWithReturnsNotNullAndTypeCheck(value_1) == null)) println(value_1.length)<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ USE_PSI_CLASS_FILES_READING\n\/\/ MODULE: lib\n\/\/ FILE: J.java\n\npublic @interface J {\n double minusInf() default Double.NEGATIVE_INFINITY;\n double plusInf() default Double.POSITIVE_INFINITY;\n double nan() default Double.NaN;","completion":"double divisionByZero() default 1.0 \/ 0.0;\n\n float minusInfFloat() default Float.NEGATIVE_INFINITY;\n float plusInfFloat() default Float.POSITIVE_INFINITY;\n float nanFloat() default Float.NaN;\n float divisionByZeroFloat() default 1.0f \/ 0.0f;\n}\n\n\/\/ MODULE: main(lib)<|endoftext|>"} {"prompt":"* @param mainFile a dedicated main file if it exists (see [findMainFile])\n *\n * @see findMainModule\n * @see isMainModule\n * @see AnalysisApiTestDirectives.MAIN_MODULE\n *\/\n protected open fun doTestByMainModuleAndOptionalMainFile(mainFile: KtFile?, mainModule: KtTestModule, testServices: TestServices) {","completion":"doTestByMainFile(mainFile ?: error(\"The main file is not found\"), mainModule, testServices)\n }\n\n \/**\n * Consider implementing this method if your test logic needs the whole\n * [KtTestModuleStructure][org.jetbrains.kotlin.analysis.test.framework.project.structure.KtTestModuleStructure].\n *\n * Examples of use cases:<|endoftext|>"} {"prompt":"override fun serializeTypeParameter(typeParameter: FirTypeParameter, proto: ProtoBuf.TypeParameter.Builder) {\n typeParameter.serializeAnnotations(\n session,\n additionalMetadataProvider,\n annotationSerializer,\n proto,\n protocol.typeParameterAnnotation\n )\n }\n\n @Suppress(\"Reformat\")\n private fun <","completion":"MessageType : GeneratedMessageLite.ExtendableMessage,\n BuilderType : GeneratedMessageLite.ExtendableBuilder,\n > List.serializeAnnotations(\n proto: GeneratedMessageLite.ExtendableBuilder,<|endoftext|>"} {"prompt":"0x3ff1e3779b97574eUL, 0x3ff1e3779b989201UL, 0x3fe6a09e667f3bcdUL, 0x40007e0f66afed07UL,","completion":"0x3fe1e3779b97f4a8UL, 0x40101fe03f61bad0UL, 0x7ff0000000000000UL, 0x7ff0000000000000UL, \n 0x4000000000000000UL, 0x7fefffffffffffffUL, 0x7ff8000000000000UL, 0x6a83b03385a2fc07UL,<|endoftext|>"} {"prompt":"object TestAllFilesPresentMethodKind : MethodModel.Kind()\n\n inner class TestAllFilesPresentMethodModel : MethodModel {\n override val kind: MethodModel.Kind\n get() = TestAllFilesPresentMethodKind\n\n override val name: String\n get() = \"testAllFilesPresentIn$testClassName\"\n\n override val dataString: String?\n get() = null","completion":"val classModel: SimpleTestClassModel\n get() = this@SimpleTestClassModel\n\n override fun shouldBeGenerated(): Boolean {\n return true\n }\n\n override val tags: List\n get() = emptyList()\n }\n\n companion object {\n private val BY_NAME = Comparator.comparing(TestEntityModel::name)<|endoftext|>"} {"prompt":"if (lastIndex == 0) return minElem\n var minValue = selector(minElem)\n for (i in 1..lastIndex) {\n val e = this[i]\n val v = selector(e)\n if (minValue > v) {\n minElem = e\n minValue = v\n }\n }\n return minElem\n}\n\n\/**","completion":"* Returns the first element yielding the smallest value of the given function or `null` if there are no elements.\n * \n * @sample samples.collections.Collections.Aggregates.minByOrNull\n *\/\n@SinceKotlin(\"1.4\")\n@ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"\"MUST_BE_INITIALIZED_OR_FINAL_OR_ABSTRACT\",\n \"EXTENSION_PROPERTY_MUST_HAVE_ACCESSORS_OR_BE_ABSTRACT\",\n \"BACKING_FIELD_IN_INTERFACE\",\n \"EXTENSION_PROPERTY_WITH_BACKING_FIELD\",","completion":"\"PROPERTY_INITIALIZER_NO_BACKING_FIELD\",\n \"ABSTRACT_DELEGATED_PROPERTY\",\n \"DELEGATED_PROPERTY_IN_INTERFACE\",\n \"ABSTRACT_PROPERTY_WITH_GETTER\",\n \"ABSTRACT_PROPERTY_WITH_SETTER\",<|endoftext|>"} {"prompt":"it.dependsOn(packageJsonTask)\n }\n }\n\n val publicPackageJsonConfiguration = createPublicPackageJsonConfiguration()\n\n target.project.artifacts.add(publicPackageJsonConfiguration.name, packageJsonTask.map { it.packageJsonFile }) {\n it.builtBy(packageJsonTask)\n }\n }\n }\n }","completion":"override fun toString(): String = \"KotlinCompilationNpmResolver(${npmProject.name})\"\n\n val aggregatedConfiguration: Configuration = run {\n createAggregatedConfiguration()\n }\n\n private var _compilationNpmResolution: KotlinCompilationNpmResolution? = null\n\n val compilationNpmResolution: KotlinCompilationNpmResolution\n get() {<|endoftext|>"} {"prompt":"if (a != z == true && b != implicitNullableNothingProperty == true) {\n val x = a(b)","completion":"if (x != implicitNullableNothingProperty == true || z !== x) {\n x<|endoftext|>"} {"prompt":"* @sample samples.collections.Collections.Aggregates.maxBy\n *\/\n@SinceKotlin(\"1.7\")\n@kotlin.jvm.JvmName(\"maxByOrThrow\")\n@Suppress(\"CONFLICTING_OVERLOADS\")\npublic inline fun > FloatArray.maxBy(selector: (Float) -> R): Float {","completion":"if (isEmpty()) throw NoSuchElementException()\n var maxElem = this[0]\n val lastIndex = this.lastIndex\n if (lastIndex == 0) return maxElem\n var maxValue = selector(maxElem)\n for (i in 1..lastIndex) {\n val e = this[i]\n val v = selector(e)\n if (maxValue < v) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.types.KotlinType\n\nopen class FragmentDeclarationGenerator(\n override val context: GeneratorContext,\n private val fragmentInfo: EvaluatorFragmentInfo\n) : Generator {\n\n fun generateClassForCodeFragment(ktFile: KtBlockCodeFragment): IrClass {\n val classDescriptor = fragmentInfo.classDescriptor","completion":"val startOffset = UNDEFINED_OFFSET\n val endOffset = UNDEFINED_OFFSET\n\n return context.symbolTable.descriptorExtension.declareClass(classDescriptor) {\n context.irFactory.createIrClassFromDescriptor(\n startOffset, endOffset,\n IrDeclarationOrigin.DEFINED,\n symbol = it,\n classDescriptor,<|endoftext|>"} {"prompt":"val prevPrev = fieldNode.previous?.previous as? VarInsnNode\n\n fieldNode.opcode == Opcodes.PUTFIELD &&\n isCapturedFieldName(fieldNode.name) &&\n fieldNode.previous is VarInsnNode && prevPrev != null && prevPrev.`var` == 0\n }\n}","completion":"fun AbstractInsnNode.getNextMeaningful(): AbstractInsnNode? {\n var result: AbstractInsnNode? = next\n while (result != null && !result.isMeaningful) {\n result = result.next\n }\n return result\n}\n\n\/\/ Interpreter, that analyzes functional arguments only, to replace SourceInterpreter, since SourceInterpreter's merge has O(N\u00b2) complexity<|endoftext|>"} {"prompt":"scope: Scope.FunctionScope,\n changedParam: IrChangedBitMaskValue,\n defaultParam: IrDefaultBitMaskValue?,\n numRealValueParameters: Int\n ): IrExpression {\n val function = scope.function\n\n \/\/ Save the dispatch receiver into a temporary created in\n \/\/ the outer scope because direct references to the\n \/\/ receiver sometimes cause an invalid name, \"$\", to\n \/\/ be generated.","completion":"val dispatchReceiverParameter = function.dispatchReceiverParameter\n val outerReceiver = if (dispatchReceiverParameter != null) irTemporary(\n value = irGet(dispatchReceiverParameter),\n nameHint = \"rcvr\"\n ) else null\n\n \/\/ Create self-invoke lambda\n val parameterCount = function.valueParameters.size\n val contextParameterCount = function.contextReceiverParametersCount<|endoftext|>"} {"prompt":"\/\/ generic signature: ()LOutPair;\n\n\/\/ method: A::foo3\n\/\/ generic signature: ()LOutPair;Ljava\/lang\/Number;>;\n\n\/\/ method: A::foo4","completion":"\/\/ generic signature: ()LIn;\n\n\/\/ method: A::foo5\n\/\/ generic signature: ()LIn;\n\n\/\/ method: A::getProp1\n\/\/ generic signature: ()LOutPair;\n\n\/\/ method: A::getProp2<|endoftext|>"} {"prompt":"val outer = accessedProperty ?: declaration\n\n val manager = declaration.manager\n val language = declaration.language\n\n return LightMethodBuilder(\n manager, language, name,\n LightParameterListBuilder(manager, language),\n UltraLightModifierListForMember(declaration, accessedProperty, outer, forceStatic, forcePrivate, forceNonFinal)\n ).setConstructor(declaration is KtConstructor<*>)","completion":"}\n\n private enum class MethodType {\n REGULAR,\n GETTER,\n SETTER\n }\n\n private fun computeMethodName(declaration: KtDeclaration, name: String, type: MethodType): String {\n\n fun tryCompute(declaration: KtDeclaration, type: MethodType): String? {<|endoftext|>"} {"prompt":"override val hasSpecificCallablePackageNamesComputation: Boolean get() = true\n\n override fun computePackageNamesWithTopLevelCallables(): Set =\n buildPackageNamesSetFrom(index.topLevelPropertyMap.keys, index.topLevelFunctionMap.keys)\n\n @Suppress(\"NOTHING_TO_INLINE\")","completion":"private inline fun buildPackageNamesSetFrom(vararg fqNameSets: Set): Set =\n buildSet {\n for (fqNameSet in fqNameSets) {\n fqNameSet.mapTo(this, FqName::asString)\n }\n }<|endoftext|>"} {"prompt":"0xbfaff55bb72cfdeaUL, 0xc0072c43f4b1650aUL, 0xc0072c43f4b15e74UL, 0xc0072c43f4b16ba1UL,","completion":"0xc0056c6e7397f5aeUL, 0xc008234d7f6ecb9dUL, 0xc002d97c7f3321d2UL, 0xc008a225e5677921UL,<|endoftext|>"} {"prompt":".filter { it.isNativeSourceSet.getOrThrow() }\n .associate { sourceSet -> sourceSet.name to cinteropMetadataDirectoryPath(sourceSet.name) },\n hostSpecificSourceSets = project.future { getHostSpecificSourceSets(project) }.getOrThrow()\n .filter { it in sourceSetsWithMetadataCompilations }.map { it.name }","completion":".toSet(),\n sourceSetBinaryLayout = sourceSetsWithMetadataCompilations.keys.associate { sourceSet ->\n sourceSet.name to SourceSetMetadataLayout.chooseForProducingProject()\n },\n isPublishedAsRoot = true,\n sourceSetNames = sourceSetsWithMetadataCompilations.keys.map { it.name }.toSet(),\n )\n}<|endoftext|>"} {"prompt":"}\n\nclass DeserializedClassDescriptor : ClassDescriptor {\n private val modality = ProtoEnumFlags.modality()\n\n override fun getModality() = modality\n}\n\nfun modality(): Modality = Modality.FINAL\n\nclass DeserializedClassDescriptor2 : ClassDescriptor {\n private val modality = modality()","completion":"override fun getModality() = modality\n}<|endoftext|>"} {"prompt":"KotlinToolingVersion(\"1.8.0-dev----999\").apply {\n assertEquals(DEV, maturity)\n assertEquals(1, major)\n assertEquals(8, minor)\n assertEquals(0, patch)\n assertEquals(\"dev----999\", classifier)\n assertNull(classifierNumber)\n assertEquals(999, buildNumber)\n }","completion":"KotlinToolingVersion(\"1.6.20-dev-google-pr-510\").apply {\n assertEquals(DEV, maturity)\n assertEquals(1, major)\n assertEquals(6, minor)\n assertEquals(20, patch)\n assertEquals(\"dev-google-pr-510\", classifier)\n assertNull(classifierNumber)<|endoftext|>"} {"prompt":"fun indexFile(file: FirFile) {\n val location = locationForFile(file)\n index.files[file] = location\n file.accept(index.visitor(location))\n }\n\n fun generateFile(file: FirFile) {\n require(inModule)\n\n val dumpOutput = index.files[file] ?: error(\"No location for ${file.name}\")","completion":"val dumper = HtmlFirDump(LinkResolver(dumpOutput), file.moduleData.session)\n val builder = StringBuilder()\n dumper.generate(file, builder)\n\n dumpOutput.writeText(builder.toString())\n packageForFile(file).apply {\n errors[file.name] = dumper.errors<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1289\npackage foo\n\nimport kotlin.reflect.KProperty1\n\nclass A {\n val x = 23\n}\n\nfun box(): String {\n assertEquals(true, (A::x as Any) is KProperty1<*, *>)","completion":"assertEquals(23, ((A::x as Any) as KProperty1)(A()))\n assertEquals(false, (23 as Any) is KProperty1<*, *>)\n assertEquals(false, ({ A().x } as Any) is KProperty1<*, *>)\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"assertTrue(items.maxOf { it.compareTo(middle).toDouble().pow(0.5) }.isNaN())\n assertTrue(items.maxOfOrNull { it.compareTo(middle).toDouble().pow(0.5) }!!.isNaN())\n \n assertIsNegativeZero(items.minOf { it.compareTo(middle) * 0.0 })","completion":"assertIsNegativeZero(items.minOfOrNull { it.compareTo(middle) * 0.0 }!!)\n assertIsPositiveZero(items.maxOf { it.compareTo(middle) * 0.0 })\n assertIsPositiveZero(items.maxOfOrNull { it.compareTo(middle) * 0.0 }!!)\n }\n \n @Test<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1315\n\nopen class Ex0(msg: String, cs: Throwable): Throwable(msg, cs)\n\nopen class Ex1: Ex0(\"A\", Error(\"fail2\")) {\n override val cause = Error(\"B\")\n}\n\nopen class Ex2: Ex0(\"fail3\", Error(\"C\")) {\n override val message = \"D\"\n}","completion":"open class Ex3: Ex0(\"fail\", Error(\"fail\")) {\n override val message get() = \"O\"\n\n override val cause get() = Error(\"K\")\n}\n\nopen class Ex4: Ex3()\n\nclass Ex5: Ex4() {\n override val message: String\n get() = \"!\"\n}\n\n@JsExport\nopen class A : Throwable(\"AM\", Error(\"AC\"))<|endoftext|>"} {"prompt":"override val reason: String get() = \"Ambiguity: $name, ${candidateSymbols.map { describeSymbol(it) }}\"\n override val candidateSymbols: Collection> get() = candidates.map { it.symbol }\n}","completion":"class ConeOperatorAmbiguityError(override val candidates: Collection) : ConeDiagnosticWithCandidates {\n override val reason: String get() = \"Operator overload ambiguity. Compatible candidates: ${candidateSymbols.map { describeSymbol(it) }}\"\n}\n\nobject ConeVariableExpectedError : ConeDiagnostic {<|endoftext|>"} {"prompt":"C2581, C2582, C2583, C2584, C2585, C2586, C2587, C2588, C2589, C2590,\n C2591, C2592, C2593, C2594, C2595, C2596, C2597, C2598, C2599, C2600,","completion":"C2601, C2602, C2603, C2604, C2605, C2606, C2607, C2608, C2609, C2610,\n C2611, C2612, C2613, C2614, C2615, C2616, C2617, C2618, C2619, C2620,<|endoftext|>"} {"prompt":"val classifier = symbol.fir\n val classifierId = getClassifierId(classifier)\n if (classifier is FirTypeAlias) {\n builder.typeAliasName = classifierId\n } else {\n builder.className = classifierId\n }\n for (i in 0 until classifier.typeParameters.size) {\n \/\/ Next type parameter is not for this type but for an outer type.","completion":"if (classifier.typeParameters[i] !is FirTypeParameter) break\n \/\/ No explicit type argument provided. For example: `Map.Entry` when we get to `Map`\n \/\/ it has type parameters, but no explicit type arguments are provided for it.\n if (argumentIndex >= typeArguments.size) return<|endoftext|>"} {"prompt":"fun interface FI2: SISuper, ISuper {\n}\n\ninterface I2: SISuper, ISuper {\n}","completion":"object O2: SISuper, ISuper {\n override suspend fun invoke() {\n }\n}<|endoftext|>"} {"prompt":"a.foo(\"\", \"\", \"\")\n a.foo(*y)","completion":"\/\/ TODO: TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS probably redundant\n a.foo(*y, \"\")\n}<|endoftext|>"} {"prompt":"if (classBounds.upperBounds[0].annotations.joinToString() != \"@foo.TypeAnn(name=Class)\") return \"fail 3: ${classBounds.upperBounds[0].annotations.joinToString()}\"","completion":"if ((classBounds.upperBounds[0].classifier as KClass<*>).simpleName != \"SimpleClass\") return \"fail 3.1: ${classBounds.upperBounds[0].classifier}\"<|endoftext|>"} {"prompt":"private fun computeFunctions(name: Name) =\n computeDescriptors(\n name,\n functionProtosBytes,\n ProtoBuf.Function.PARSER,\n { c.memberDeserializer.loadFunction(it).takeIf(::isDeclaredFunctionAvailable) },\n { computeNonDeclaredFunctions(name, it) }\n )","completion":"private inline fun computeDescriptors(\n name: Name,\n bytesByName: Map,\n parser: Parser,\n factory: (M) -> D?,\n computeNonDeclared: (MutableList) -> Unit\n ): Collection =\n computeDescriptors(<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.codegen.optimization.temporaryVals.TemporaryVariablesEliminationTransformer\nimport org.jetbrains.kotlin.codegen.optimization.transformer.CompositeMethodTransformer\nimport org.jetbrains.kotlin.codegen.state.GenerationState\nimport org.jetbrains.org.objectweb.asm.MethodVisitor","completion":"import org.jetbrains.org.objectweb.asm.Opcodes\nimport org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode\nimport org.jetbrains.org.objectweb.asm.tree.MethodNode\n\nclass OptimizationMethodVisitor(\n delegate: MethodVisitor,\n private val mandatoryTransformationsOnly: Boolean,\n private val generationState: GenerationState,<|endoftext|>"} {"prompt":"@kotlin.DeprecatedSinceKotlin(warningSince = \"1.5\")\n@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly","completion":"public inline fun kotlin.UIntArray.sumBy(selector: (kotlin.UInt) -> kotlin.UInt): kotlin.UInt\n\n@kotlin.Deprecated(message = \"Use sumOf instead.\", replaceWith = kotlin.ReplaceWith(expression = \"this.sumOf(selector)\", imports = {}))<|endoftext|>"} {"prompt":"override fun resolveMethodGenerics(): JavaResolveResult = JavaResolveResult.EMPTY\n\n override fun hasInitializer() = true\n override fun computeConstantValue() = this\n\n override fun getName(): String = enumEntryName\n\n private val _type: PsiType by lazyPub {\n withEnumEntrySymbol { enumEntrySymbol ->\n enumEntrySymbol.returnType","completion":".asPsiType(this@SymbolLightFieldForEnumEntry, allowErrorTypes = true)\n ?: nonExistentType()\n }\n }\n\n override fun getType(): PsiType = _type\n override fun getInitializer(): PsiExpression? = null\n\n override fun isValid(): Boolean = enumEntry.isValid<|endoftext|>"} {"prompt":"private fun String.startsWithWords(words: String) = this.startsWith(words) &&\n (this.length == words.length || !this[words.length].isLowerCase())\n\n private inner class GenericTypeParameterNameMapping {\n private val elementToName = mutableMapOf()","completion":"private val typeParameterNameClassOverrides = mutableMapOf>()\n\n fun getOrPut(element: TypeParameterDescriptor, nameCandidates: () -> Sequence): String {\n getIfAssigned(element)?.let { return it }\n\n nameCandidates().forEach {\n if (tryAssign(element, it)) {\n return it<|endoftext|>"} {"prompt":"return kniBridge42(location.getPointer(memScope).rawValue, file?.getPointer(memScope).rawValue, line?.getPointer(memScope).rawValue, column?.getPointer(memScope).rawValue, offset?.getPointer(memScope).rawValue)\n }\n}","completion":"fun clang_getRangeStart(range: CValue): CValue {\n memScoped {\n val kniRetVal = nativeHeap.alloc()\n try {\n kniBridge43(range.getPointer(memScope).rawValue, kniRetVal.rawPtr)\n return kniRetVal.readValue()<|endoftext|>"} {"prompt":"val original = descriptor.getOriginalDescriptor()\n if (!visitedDescriptors.add(original)) return\n val overridden = original.getTypedOverriddenDescriptors().map { it.getOriginalDescriptor() }\n\n overridden.forEach { walk(it) }\n }","completion":"asSequence().flatMap { it.getTypedOverriddenDescriptors().asSequence() }.forEach { walk(it.getOriginalDescriptor()) }\n return filter { it.getOriginalDescriptor() !in visitedDescriptors }\n }\n\n private fun generateBridgeMethods(descriptor: ClassDescriptor, model: JsClassModel) {<|endoftext|>"} {"prompt":"public inline fun kotlin.sequences.Sequence.none(predicate: (T) -> kotlin.Boolean): kotlin.Boolean\n\n@kotlin.SinceKotlin(version = \"1.1\")","completion":"public fun kotlin.sequences.Sequence.onEach(action: (T) -> kotlin.Unit): kotlin.sequences.Sequence\n\n@kotlin.SinceKotlin(version = \"1.4\")<|endoftext|>"} {"prompt":"override fun visitIntersectionTypeRef(intersectionTypeRef: FirIntersectionTypeRef) = visitTypeRefWithNullability(intersectionTypeRef)\n\n override fun visitImplicitTypeRef(implicitTypeRef: FirImplicitTypeRef) = visitTypeRef(implicitTypeRef)\n\n override fun visitEffectDeclaration(effectDeclaration: FirEffectDeclaration) = visitContractElementDeclaration(effectDeclaration)","completion":"override fun visitLegacyRawContractDescription(legacyRawContractDescription: FirLegacyRawContractDescription) = visitContractDescription(legacyRawContractDescription)\n\n override fun visitRawContractDescription(rawContractDescription: FirRawContractDescription) = visitContractDescription(rawContractDescription)\n\n override fun visitResolvedContractDescription(resolvedContractDescription: FirResolvedContractDescription) = visitContractDescription(resolvedContractDescription)<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.fir.analysis.checkers.declaration\n\nimport org.jetbrains.kotlin.diagnostics.DiagnosticReporter\nimport org.jetbrains.kotlin.diagnostics.reportOn\nimport org.jetbrains.kotlin.fir.analysis.checkers.MppCheckerKind","completion":"import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext\nimport org.jetbrains.kotlin.fir.analysis.checkers.findNonInterfaceSupertype\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors\nimport org.jetbrains.kotlin.fir.declarations.FirRegularClass<|endoftext|>"} {"prompt":"private fun findParameter(param: KtParameter): FirDeclaration {\n val ownerFunction = param.ownerFunction ?: errorWithFirSpecificEntries(\"Unsupported compiled parameter\", psi = param)\n val firDeclaration = findNonLocalDeclaration(ownerFunction)\n val firFunction = firDeclaration as? FirFunction ?: errorWithFirSpecificEntries(\n \"No fir function found by ktFunction\",","completion":"psi = ownerFunction,\n fir = firDeclaration\n )\n return firFunction.valueParameters.find { firElementByPsiElementChooser.isMatchingValueParameter(param, it) }\n ?: errorWithFirSpecificEntries(\"No fir value parameter found\", psi = param, fir = firFunction)\n }<|endoftext|>"} {"prompt":"val deltaSubUnitDuration = delta.toDuration(subUnit)\n val mark1s = baseMark + deltaSubUnitDuration\n assertDifferentMarks(mark1s, baseMark, 1)\n assertEquals(deltaSubUnitDuration, mark1s - baseMark)\n }\n\n \/\/ compared saturated reading from time source and saturated time mark as a result of plus operation\n run {\n val delta = 1000","completion":"val deltaDuration = delta.toDuration(unit)\n timeSource.reading = baseReading + 1000\n val mark2 = timeSource.markNow()\n assertEquals(deltaDuration, mark2 - baseMark)\n val offset = Long.MAX_VALUE.nanoseconds\n val mark2e = mark2 + offset\n val mark2d = baseMark + offset + deltaDuration<|endoftext|>"} {"prompt":"when (this) {\n is SimpleCallReceiver -> builder.withReceivers(dispatchReceiverValue, extensionReceiverValue, contextReceiverValues)\n else -> call(builder)\n }\n }\n }\n\n private fun generateDynamicFunctionCall(\n startOffset: Int,\n endOffset: Int,\n functionDescriptor: FunctionDescriptor,\n call: CallBuilder,","completion":"dispatchReceiverValue: IntermediateValue?,\n extensionReceiverValue: IntermediateValue?,\n ): IrDynamicOperatorExpressionImpl {\n fun makeDynamicOperatorExpression(operator: IrDynamicOperator) =\n IrDynamicOperatorExpressionImpl(\n startOffset, endOffset,\n functionDescriptor.returnType!!.toIrType(),\n operator\n )<|endoftext|>"} {"prompt":"fun foo(s: String, p: String): String = \"more args overload $s\"\n\nfun bar(s: String?): String = \"initial overload $s\"\nfun bar(s: String): String = \"non-nullable overload $s\"\n\nfun qux(s: Any): String = \"initial any overload $s\"\nfun qux(s: String): String = \"initial narrower overload $s\"","completion":"\/\/ MODULE: mainLib(lib)\n\/\/ FILE: mainLib.kt\n\nval x = X()\n\nfun lib(): String = when {\n x.foo(\"first\") != \"initial overload first\" -> \"fail 1\"\n x.bar(\"second\") != \"initial overload second\" -> \"fail 2\"\n x.qux(\"third\") != \"initial any overload third\" -> \"fail 3\"<|endoftext|>"} {"prompt":"\/\/ IGNORE_BACKEND: JS_IR\n\/\/ IGNORE_BACKEND: JS_IR_ES6\n\/\/ TODO: muted automatically, investigate should it be ran for JS or not\n\/\/ IGNORE_BACKEND: JS\n\n\/\/ WITH_STDLIB\n\/\/ This is a big, ugly, semi-auto generated test.\n\/\/ Use corresponding 'Small' test for debug.\n\nimport kotlin.test.*\n\nfun fn0() {}","completion":"fun fn1(x0: Any) {}\nfun fn2(x0: Any, x1: Any) {}\nfun fn3(x0: Any, x1: Any, x2: Any) {}\nfun fn4(x0: Any, x1: Any, x2: Any, x3: Any) {}<|endoftext|>"} {"prompt":"mapOf(1L to \"1\", 2L to \"2\", 3L to \"3\"),\n longArrayOf(1, 2, 3).associateWith { it.toString() }\n )\n assertEquals(\n mapOf(1f to \"1\", 2f to \"2\", 3f to \"3\"),","completion":"floatArrayOf(1f, 2f, 3f).associateWith { if (it == 1f) \"1\" else if (it == 2f) \"2\" else \"3\" }\n )\n assertEquals(\n mapOf(1.0 to \"1\", 2.0 to \"2\", 3.0 to \"3\"),<|endoftext|>"} {"prompt":"val test4 = Outer.Obj\n\nval test5 = Outer\n\nval test6 = Outer.Nested\n\nval test7 = Outer.Inner","completion":"val test8 = Outer.Obj<|endoftext|>"} {"prompt":"* - This function is allowed to attach data to a given [IdeaKotlinDependency]\n * - This function is not allowed to remove data from a given [IdeaKotlinBinaryDependency]\n * - This function is not supposed to modify the [sourceSet]\n *\n * @param sourceSet: The current SourceSet which shall resolve additional dependencies","completion":"* @param dependencies: The already resolved dependencies from prior stages\n *\/\n fun resolve(sourceSet: KotlinSourceSet, dependencies: Set)\n\n @ExternalKotlinTargetApi\n companion object {\n \/**\n * Empty [IdeAdditionalArtifactResolver] that will not resolve any artifact (noop)\n *\/<|endoftext|>"} {"prompt":"@OptIn(ExperimentalTypeInference::class)\nfun build7(@BuilderInference builderAction: MutableMap.() -> MutableMap) = mutableMapOf()\n\n@ExperimentalStdlibApi\nfun box(): String {\n buildList {\n add(\"\")","completion":"val x: MutableList = this@buildList\n }\n buildMap {\n val x: Function2 = ::put\n }\n\n build {\n get(\"\")\n \"\"\n }\n\n build2 {\n val x: String = this.values.first()\n 1\n }\n\n build2 {<|endoftext|>"} {"prompt":"private fun Printer.generateMetadata(testDataSource: TestEntityModel) {\n val dataString = testDataSource.dataString\n if (dataString != null) {\n println(\"@TestMetadata(\\\"\", dataString, \"\\\")\")\n }\n }\n\n private fun Printer.generateTestAnnotation() {\n println(\"@Test\")\n }","completion":"private fun Printer.generateNestedAnnotation(isNested: Boolean) {\n if (isNested) {\n println(\"@Nested\")\n }\n }\n\n private fun Printer.generateTestDataPath(testClassModel: TestClassModel) {\n val dataPathRoot = testClassModel.dataPathRoot\n if (dataPathRoot != null) {<|endoftext|>"} {"prompt":"while (iterator.hasNext()) {\n val e = iterator.next()\n max = maxOf(max, e)\n }\n return max\n}\n\n\/**\n * Returns the largest element or `null` if there are no elements.\n *\n * The operation is _terminal_.\n *\/\n@SinceKotlin(\"1.4\")","completion":"public fun > Sequence.maxOrNull(): T? {\n val iterator = iterator()\n if (!iterator.hasNext()) return null\n var max = iterator.next()\n while (iterator.hasNext()) {\n val e = iterator.next()\n if (max < e) max = e\n }\n return max\n}\n\n\/**<|endoftext|>"} {"prompt":"* and puts to the [destination] map each group key associated with a list of corresponding values.\n * \n * @return The [destination] map.\n * \n * @sample samples.collections.Collections.Transformations.groupByKeysAndValues\n *\/","completion":"public inline fun >> FloatArray.groupByTo(destination: M, keySelector: (Float) -> K, valueTransform: (Float) -> V): M {\n for (element in this) {\n val key = keySelector(element)\n val list = destination.getOrPut(key) { ArrayList() }<|endoftext|>"} {"prompt":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.OverloadsInterface\n\ninternal class OverloadsLocalImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.OverloadsLocal\n\ninternal class OverloadsAnnotationClassConstructorErrorImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"name: Name,\n vararg packageNameSegments: String,\n ): Map {\n return getFunctionsByKey(\n name,\n *packageNameSegments,\n mapKey = { it.fir.returnTypeRef.toIrType(c).classifierOrNull },\n mapValue = { _, irSymbol -> irSymbol }","completion":")\n }\n\n fun getNonBuiltInFunctionsWithFirCounterpartByExtensionReceiver(\n name: Name,\n vararg packageNameSegments: String,\n ): Map> {\n return getFunctionsByKey(\n name,\n *packageNameSegments,<|endoftext|>"} {"prompt":"private fun lowerEnumConstructorsBody(constructor: IrConstructor) {\n IrEnumClassConstructorTransformer(constructor).transformBody()\n }\n\n private inner class IrEnumClassConstructorTransformer(val constructor: IrConstructor) : IrElementTransformerVoid() {\n val builder = context.createIrBuilder(constructor.symbol)\n\n fun transformBody() {","completion":"constructor.body?.transformChildrenVoid(this)\n }\n\n override fun visitEnumConstructorCall(expression: IrEnumConstructorCall) =\n builder.irDelegatingConstructorCall(expression.symbol.owner).apply {\n for (i in 0..1) {\n putValueArgument(i, builder.irGet(constructor.valueParameters[i]))\n }<|endoftext|>"} {"prompt":"bar(null)\n bar(null)\n\n return null\n}\n\nfun baz(): T? = null\n\nfun foobar(): T = null","completion":"class A {\n fun xyz(x: F) {}\n\n fun foo(): F {\n val x1: F = null\n val x2: F? = null\n\n xyz(null)\n bar(null)<|endoftext|>"} {"prompt":"mainFunctionDetectorFactory: MainFunctionDetector.Factory,\n sealedProvider: SealedClassInheritorsProvider,\n controlFlowInformationProviderFactory: ControlFlowInformationProvider.Factory\n): StorageComponentContainer = createContainerForLazyBodyResolve(\n moduleContext,\n kotlinCodeAnalyzer,\n bindingTrace,\n platform,\n bodyResolveCache,\n analyzerServices,","completion":"languageVersionSettings,\n moduleStructureOracle,\n mainFunctionDetectorFactory,\n sealedProvider,\n controlFlowInformationProviderFactory,\n null,\n null,\n)\n@Deprecated(\n level = DeprecationLevel.WARNING,\n message = \"consider to use createContainerForLazyBodyResolve with AbsentDescriptorHandler\",\n replaceWith = ReplaceWith(\n \"\"\"<|endoftext|>"} {"prompt":"\/\/ !WTIH_NEW_INFERENCE\n\/\/ SKIP_TXT\n\nclass ExcA : Exception()\nclass ExcB : Exception()\n\nfun test0(x: Int?) {\n val y = try {\n x\n } finally {\n\n }\n\n if (x != null) {\n x.inc()","completion":"y.inc()\n }\n\n if (y != null) {\n x.inc()\n y.inc()\n }\n}\n\nfun test1(x: Int?) {\n val y = try {\n x\n }<|endoftext|>"} {"prompt":"if (it.name == \"compileKotlinJvm\") {\n it.compilerOptions.progressiveMode.set(false)\n }\n }\n\n with(multiplatformExtension) {\n jvm {\n compilerOptions {\n progressiveMode.set(true)\n }\n }\n\n applyDefaultHierarchyTemplate()\n }\n }","completion":"project.evaluate()\n\n assertEquals(false, project.kotlinJvmTask(\"compileKotlinJvm\").compilerOptions.progressiveMode.get())\n }\n\n @Test\n fun jvmLanguageSettingsOverridesTargetOptions() {\n val project = buildProjectWithMPP {\n with(multiplatformExtension) {\n jvm {\n compilerOptions {<|endoftext|>"} {"prompt":"override fun getTypeArguments(): List = emptyList()\n override fun getTypeArgumentList(): KtTypeArgumentList? = null\n override fun getCallElement(): KtElement = KtPsiFactory(context.config.project).createExpression(\"COROUTINE_SUSPENDED\")","completion":"override fun getCallType(): Call.CallType = Call.CallType.DEFAULT\n }\n\n override fun getCandidateDescriptor() = suspendPropertyDescriptor\n override fun getResultingDescriptor() = suspendPropertyDescriptor\n override fun getExtensionReceiver() = null\n override fun getDispatchReceiver() = null<|endoftext|>"} {"prompt":"\/\/ library.kt:57 box: $i$f$foo\\1\\64:int=0:int, array\\1:java.lang.Integer[]=java.lang.Integer[], myClass\\1:MyClass=MyClass, this_\\43:MyClass=MyClass, $i$f$f2\\43\\477:int=0:int,","completion":"$i$f$test\\44\\491:int=0:int, testVal\\44:int=1:int<|endoftext|>"} {"prompt":"var x2 = 2\n}\n\n\/\/ TESTCASE NUMBER: 9","completion":"fun case_9(y: Boolean?) = when (val x = y) {\n true -> null\n false -> null\n null -> null\n}\n\n\/\/ TESTCASE NUMBER: 10<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\nimport kotlinx.serialization.*\nimport kotlinx.serialization.descriptors.*\nimport kotlinx.serialization.builtins.*\n\n\n@Serializable\ndata class Main(val fields: MainFields) {\n companion object {\n fun fieldsSerializer(): KSerializer = MainFields.serializer()\n }\n}","completion":"@Serializable\ndata class MainFields(val firstName: String?)\n\n@Serializable\ndata class Box(val boxed: T) {\n companion object {\n fun serializerLike(tSer: KSerializer): KSerializer>> = ListSerializer(serializer(tSer))\n }\n}\n\n\nfun box(): String {<|endoftext|>"} {"prompt":"override fun computePackageNames(): Set? = providers.flatMapToNullableSet { it.getPackageNames() }\n\n override val hasSpecificClassifierPackageNamesComputation: Boolean = providers.any { it.hasSpecificClassifierPackageNamesComputation }\n\n override fun computePackageNamesWithTopLevelClassifiers(): Set? =","completion":"providers.flatMapToNullableSet { it.getPackageNamesWithTopLevelClassifiers() }\n\n override fun computeTopLevelClassifierNames(packageFqName: FqName): Set? =\n providers.flatMapToNullableSet { it.getTopLevelClassifierNamesInPackage(packageFqName) }<|endoftext|>"} {"prompt":"if (descriptors.size > 1 && descriptors.any { it is ClassifierDescriptor }) {\n for (descriptor in descriptors) {\n reportOnDeclaration(trace, descriptor) { REDECLARATION.on(it, descriptors) }\n }\n }\n }\n }\n\n fun checkRedeclarationsInPackages(","completion":"topLevelDescriptorProvider: TopLevelDescriptorProvider,\n topLevelFqNames: Multimap\n ) {\n for ((fqName, declarationsOrPackageDirectives) in topLevelFqNames.asMap()) {\n if (fqName.isRoot) continue\n\n \/\/ TODO: report error on expected class and actual val, or vice versa<|endoftext|>"} {"prompt":"@Deprecated(\"Use minOrNull instead.\", ReplaceWith(\"this.minOrNull()\"))\n@DeprecatedSinceKotlin(warningSince = \"1.4\", errorSince = \"1.5\", hiddenSince = \"1.6\")\n@SinceKotlin(\"1.1\")\n@Suppress(\"CONFLICTING_OVERLOADS\")\npublic fun Sequence.min(): Float? {\n return minOrNull()","completion":"}\n\n@Deprecated(\"Use minOrNull instead.\", ReplaceWith(\"this.minOrNull()\"))\n@DeprecatedSinceKotlin(warningSince = \"1.4\", errorSince = \"1.5\", hiddenSince = \"1.6\")\n@Suppress(\"CONFLICTING_OVERLOADS\")\npublic fun > Sequence.min(): T? {\n return minOrNull()\n}<|endoftext|>"} {"prompt":"fun TestTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {}\n\n class TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse where T: UserInterfaceA, T: UserInterfaceB {","completion":"constructor(arg: Invariant)\n }<|endoftext|>"} {"prompt":"* @property step the number by which the value is incremented on each step.\n *\/\ninternal class ${t}ProgressionIterator(first: $t, last: $t, val step: $incrementType) : ${t}Iterator() {\n private val finalElement: $incrementType = last$toInt\n private var hasNext: Boolean = if (step > 0) first <= last else first >= last","completion":"private var next: $incrementType = if (hasNext) first$toInt else finalElement\n\n override fun hasNext(): Boolean = hasNext\n\n override fun next$t(): $t {\n val value = next\n if (value == finalElement) {\n if (!hasNext) throw kotlin.NoSuchElementException()\n hasNext = false\n }\n else {\n next += step<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.backend.konan.objcexport.ObjCProperty\nimport org.jetbrains.kotlin.backend.konan.objcexport.swiftNameAttribute\nimport org.jetbrains.kotlin.objcexport.analysisApiUtils.isCompanion","completion":"import org.jetbrains.kotlin.objcexport.extras.objCTypeExtras\nimport org.jetbrains.kotlin.objcexport.extras.originClassId\nimport org.jetbrains.kotlin.objcexport.extras.requiresForwardDeclaration\n\n\/**\n * If object class has companion object it needs to have property which returns this companion.<|endoftext|>"} {"prompt":"override fun foo(value: String): String = value\n}\n\n\/\/ FILE: test.js\nfunction box() {\n var a = new this[\"bridge_saving_after_export\"].A()\n var aFoo = a.foo(\"ok\")\n if (aFoo != \"ok\") return \"fail 1\"\n\n var b = new this[\"bridge_saving_after_export\"].B()","completion":"var bFoo = b.foo(\"ok\")\n if (bFoo != \"ok\") return \"fail 2\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"+irIfThenElse(compilerContext.irBuiltIns.unitType, propNotSeenTest, ifNotSeenExpr, assignParamExpr)\n\n statementsAfterSerializableProperty[prop.ir]?.forEach { +it }\n }\n\n \/\/ Handle function-intialized interface delegates\n irClass.declarations\n .filterIsInstance()","completion":".filter { it.origin == IrDeclarationOrigin.DELEGATE }\n .forEach {\n val receiver = if (!it.isStatic) irGet(thiz) else null\n +irSetField(\n receiver,\n it,\n initializerAdapter(it.initializer!!),\n IrStatementOrigin.INITIALIZE_FIELD\n )\n }\n }<|endoftext|>"} {"prompt":"if (!(4 !in 3..1) != range1.contains(4)) throw AssertionError()\n \/\/ no local optimizations\n if (element22 in 3..1 != range1.contains(element22)) throw AssertionError()\n if (element22 !in 3..1 != !range1.contains(element22)) throw AssertionError()","completion":"if (!(element22 in 3..1) != !range1.contains(element22)) throw AssertionError()\n if (!(element22 !in 3..1) != range1.contains(element22)) throw AssertionError()\n}\n\nfun testR1xE23() {\n \/\/ with possible local optimizations<|endoftext|>"} {"prompt":"return \"Wrong elements for MaxS..MaxS step 1: $list3\"\n }\n\n val list4 = ArrayList()\n val range4 = MaxL..MaxL step 1\n for (i in range4) {\n list4.add(i)\n if (list4.size > 23) break\n }\n if (list4 != listOf(MaxL)) {","completion":"return \"Wrong elements for MaxL..MaxL step 1: $list4\"\n }\n\n val list5 = ArrayList()\n val range5 = MaxC..MaxC step 1\n for (i in range5) {\n list5.add(i)\n if (list5.size > 23) break\n }\n if (list5 != listOf(MaxC)) {<|endoftext|>"} {"prompt":"\/\/ Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit!\n\/\/ WITH_STDLIB\nimport kotlin.test.*\n\nfun box(): String {\n val intList = mutableListOf()\n for (i in 10 downTo 1 step 3 step 2) {\n intList += i\n }","completion":"assertEquals(listOf(10, 8, 6, 4, 2), intList)\n\n val longList = mutableListOf()\n for (i in 10L downTo 1L step 3L step 2L) {\n longList += i\n }\n assertEquals(listOf(10L, 8L, 6L, 4L, 2L), longList)<|endoftext|>"} {"prompt":"internal class KtFirDelegatedMemberScope(\n firScope: FirContainingNamesAwareScope,\n builder: KtSymbolByFirBuilder\n) : KtFirDelegatingNamesAwareScope(firScope, builder) {\n\n override fun getCallableSymbols(nameFilter: KtScopeNameFilter): Sequence = withValidityAssertion {","completion":"return super.getCallableSymbols(nameFilter).filter { it.origin == KtSymbolOrigin.DELEGATED }\n }\n\n override fun getCallableSymbols(names: Collection): Sequence = withValidityAssertion {<|endoftext|>"} {"prompt":"val secondaryConstructors = members.filterIsInstanceAnd { it.isStatic }\n val bindConstructor = JsName(\"__bind_constructor_\", false)\n\n val blockStatements = mutableListOf(\n JsVars(JsVars.JsVar(bindConstructor, innerClassRef.bindToThis(innerClassRef)))\n )","completion":"if (companionObject != null) {\n val companionName = companionObject.getJsNameOrKotlinName().identifier\n blockStatements.add(\n jsAssignment(\n JsNameRef(companionName, bindConstructor.makeRef()),\n JsNameRef(companionName, innerClassRef),\n ).makeStmt()\n )\n }\n\n secondaryConstructors.forEach {<|endoftext|>"} {"prompt":"descriptorResolver.resolveGenericBounds(function, functionDescriptor, headerScope, typeParameterDescriptors, trace)\n\n val receiverTypeRef = function.receiverTypeReference\n val receiverType =\n if (receiverTypeRef != null) {\n typeResolver.resolveType(headerScope, receiverTypeRef, trace, true)\n } else {","completion":"if (function is KtFunctionLiteral) expectedFunctionType.getReceiverType() else null\n }\n\n val contextReceivers = function.contextReceivers\n val contextReceiverTypes =\n if (function is KtFunctionLiteral) expectedFunctionType.getContextReceiversTypes()\n else contextReceivers\n .mapNotNull {<|endoftext|>"} {"prompt":"val IrClass.superClass: IrClass?\n get() = superTypes\n .firstOrNull { !it.isInterface() && !it.isAny() }\n ?.classOrNull\n ?.owner\n\n\/\/ This declaration accesses IrDeclarationContainer.declarations, which is marked with this opt-in\n@UnsafeDuringIrConstructionAPI\nval IrClassSymbol.functions: Sequence","completion":"get() = owner.functions.map { it.symbol }\n\n\/\/ This declaration accesses IrDeclarationContainer.declarations, which is marked with this opt-in\n@UnsafeDuringIrConstructionAPI\nval IrClass.constructors: Sequence\n get() = declarations.asSequence().filterIsInstance()<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\n\/\/FILE:a.kt\npackage test_visibility\n\nprotected class ProtectedClass\nprotected interface ProtectedTrait","completion":"protected val protected_val : Int = 4\nprotected fun protected_fun() {}\n\nprivate val private_val : Int = 4\nprivate fun private_fun() {}\n\nval internal_val : Int = 34\nfun internal_fun() {}\n\nfun test1() {\n private_fun();<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\ninterface Foo {\n val foo: suspend () -> Unit\n}\n\ninterface Bar {\n val bar: T\n}\n\nclass Test1 : Foo {\n override val foo = {}\n}\n\nclass Test2 : Foo {\n override val foo: suspend () -> Unit = {}\n}","completion":"class Test3 : Bar Unit> {\n override val bar = {}\n}\n\nclass Test4 : Bar Unit> {\n override val bar: suspend () -> Unit = {}\n}<|endoftext|>"} {"prompt":"if (buffer >= 0) {\n result.add(buffer)\n }\n buffer = ']'.toInt()\n lexemes.next()\n }\n\n Lexer.CHAR_LEFT_SQUARE_BRACKET -> {\n if (buffer >= 0) {\n result.add(buffer)\n buffer = -1\n }\n lexemes.next()","completion":"var negative = false\n if (lexemes.currentChar == Lexer.CHAR_CARET) {\n lexemes.next()\n negative = true\n }\n\n if (intersection)\n result.intersection(processRangeExpression(negative))\n else\n result.union(processRangeExpression(negative))\n intersection = false\n lexemes.next()\n }<|endoftext|>"} {"prompt":"\/\/ SKIP_KT_DUMP\n\/\/ TARGET_BACKEND: JVM\n\n\/\/ FILE: Java1.java\npublic class Java1 {\n public Void foo(){\n return null;\n }\n}\n\n\/\/ FILE: Java2.java\npublic interface Java2 {\n public Object foo();\n}\n\n\/\/ FILE: 1.kt\nclass C : Java1(), Java2","completion":"class D : Java1(), Java2 {\n override fun foo(): Void {\n return null!!\n }\n}\n\nfun test() {\n val k1: Any = C().foo()\n val k2: Void = C().foo()\n val k3: Void = D().foo()\n}<|endoftext|>"} {"prompt":"public inline fun arrayOf(vararg elements: T): Array = elements.unsafeCast>()\n\n\/**\n * Returns an array containing the specified [Double] numbers.\n *\/\npublic inline fun doubleArrayOf(vararg elements: Double): DoubleArray = elements\n\n\/**\n * Returns an array containing the specified [Float] numbers.\n *\/","completion":"public inline fun floatArrayOf(vararg elements: Float): FloatArray = elements\n\n\/**\n * Returns an array containing the specified [Long] numbers.\n *\/\npublic inline fun longArrayOf(vararg elements: Long): LongArray = elements\n\n\/**\n * Returns an array containing the specified [Int] numbers.\n *\/\npublic inline fun intArrayOf(vararg elements: Int): IntArray = elements\n\n\/**<|endoftext|>"} {"prompt":"val mapping = state.loadCompiledModule() ?: return this.toList()\n\n state.incrementalCacheForThisTarget?.getObsoletePackageParts()?.forEach { internalName ->\n val qualifier = JvmClassName.byInternalName(internalName).packageFqName.asString()\n mapping.findPackageParts(qualifier)?.removePart(internalName)\n }","completion":"return (this + mapping.packageFqName2Parts.values)\n .groupBy { it.packageFqName }\n .map { (packageFqName, allOldPackageParts) ->\n PackageParts(packageFqName).apply {\n allOldPackageParts.forEach { packageParts -> this += packageParts }\n }\n }\n}<|endoftext|>"} {"prompt":"P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R): CPointer R>>","completion":"@ExperimentalForeignApi\n@TypedIntrinsic(IntrinsicType.INTEROP_STATIC_C_FUNCTION)<|endoftext|>"} {"prompt":"override fun transform(transformer: FirTransformer, data: D): E =\n transformer.transformErrorAnnotationCall(this, data) as E\n\n abstract override fun replaceConeTypeOrNull(newConeTypeOrNull: ConeKotlinType?)\n\n abstract override fun replaceAnnotations(newAnnotations: List)","completion":"abstract override fun replaceUseSiteTarget(newUseSiteTarget: AnnotationUseSiteTarget?)\n\n abstract override fun replaceAnnotationTypeRef(newAnnotationTypeRef: FirTypeRef)\n\n abstract override fun replaceTypeArguments(newTypeArguments: List)\n\n abstract override fun replaceArgumentList(newArgumentList: FirArgumentList)<|endoftext|>"} {"prompt":"val dst = createTempDirectory().cleanupRecursively()\n\n val restrictedDir = src.resolve(\"1\/3\")\n val restrictedFile = src.resolve(\"7.txt\")\n\n withRestrictedWrite(restrictedDir, restrictedFile, alsoReset = listOf(dst.resolve(\"1\/3\"), dst.resolve(\"7.txt\"))) {","completion":"val accessDeniedFiles = mutableListOf()\n src.copyToRecursively(dst, followLinks = false, onError = { _, target, exception ->\n assertIs(exception)\n assertEquals(target.toString(), exception.file)\n accessDeniedFiles.add(target.relativePathString(dst))<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ LAMBDAS: CLASS\n\/\/ SAM_CONVERSIONS: CLASS\n\/\/ ^ Lambdas generated by LambdaMetafactory do not have 'enclosingMethod' or 'enclosingClass'\n\/\/ WITH_REFLECT\n\npackage test\n\nvar lambda = {}\n\nclass A {\n val prop = Runnable {\n lambda = { println(\"\") }\n }\n}","completion":"fun box(): String {\n A().prop.run()\n\n val javaClass = lambda.javaClass\n\n val enclosingMethod = javaClass.getEnclosingMethod()\n if (enclosingMethod?.getName() != \"run\") return \"enclosing method: $enclosingMethod\"\n\n val enclosingClass = javaClass.getEnclosingClass()!!.getName()<|endoftext|>"} {"prompt":".sortedBy { it.nameWithoutExtension }\n\n val junitCoreResourceName = JUnitCore::class.java.name.replace('.', '\/') + \".class\"\n val junitJar = File(\n JUnitCore::class.java.classLoader.getResource(junitCoreResourceName)!!.file\n .substringAfter(\"file:\")\n .substringBeforeLast('!')","completion":")\n\n val parcelizeRuntimeJars = System.getProperty(\"parcelizeRuntime.classpath\")?.split(File.pathSeparator)?.map(::File)\n ?: error(\"Unable to get a valid classpath from 'parcelizeRuntime.classpath' property\")\n\n val tempDir = testServices.temporaryDirectoryManager.getOrCreateTempDirectory(\"additionalClassFiles\")\n tempDir<|endoftext|>"} {"prompt":"override fun getValueIfComputed(key: K): V? = map[key]?.nullValueToNull()\n\n override fun fixInconsistentValue(\n key: K,\n context: CONTEXT & Any,\n inconsistencyMessage: String,\n mapping: (oldValue: V, newValue: V & Any) -> V & Any,\n ): V & Any {","completion":"val newValue = createValue(key, context)\n checkWithAttachment(\n newValue != null,\n message = { \"A value for requested key & context must not be null due to the contract\" },\n ) {\n buildAttachments(key, context, newValue)\n }\n\n LOG.logErrorWithAttachment(inconsistencyMessage) {<|endoftext|>"} {"prompt":"companion object AbcCompanion {\n fun xyz(): String = \"Companion object method OK\"\n\n val prop: String\n get() = \"Companion object property OK\"\n }\n}\n\nclass Foo {\n companion object {\n fun xyz(): String = \"Companion object method OK\"\n\n val prop: String\n get() = \"Companion object property OK\"\n }\n}","completion":"sealed class MyEnum(val name: String) {\n object A: MyEnum(\"A\")\n object B: MyEnum(\"B\")\n object C: MyEnum(\"C\")\n}\n\nobject MyObject {\n object A {\n fun valueA() = \"OK\"\n }\n object B {\n fun valueB() = \"OK\"\n }\n object C {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.calls.tasks.TracingStrategy\nimport org.jetbrains.kotlin.resolve.calls.tower.ImplicitScopeTower\nimport org.jetbrains.kotlin.resolve.calls.tower.NewResolutionOldInference","completion":"import org.jetbrains.kotlin.resolve.calls.tower.PSICallResolver\nimport org.jetbrains.kotlin.resolve.scopes.ResolutionScope\nimport org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValueWithSmartCastInfo\nimport org.jetbrains.kotlin.types.KotlinType<|endoftext|>"} {"prompt":"append(\"Commits:
\")\n val commitsList = (JsonTreeParser.parse(\"{${currentBuild.commits}}\") as JsonObject).getArray(\"commits\").map {\n it as JsonObject\n Commit(\n it.getPrimitive(\"revision\").content,\n it.getPrimitive(\"developer\").content\n )\n }","completion":"val commits = if (commitsList.size > 3) commitsList.slice(0..2) else commitsList\n commits.forEach {\n append(\"${it.revision.substring(0, 7)} by ${it.developer}
\")\n }\n if (commitsList.size > 3) {\n append(\"...\")\n }\n }<|endoftext|>"} {"prompt":"fun count() {\n assertEquals(1, ubyteArrayOf(0u, 1u, 2u).count { it >= 2u })\n assertEquals(2, ushortArrayOf(0u, 1u, 2u).count { it % 2u == 0u })\n assertEquals(0, uintArrayOf(0u, 2u, 4u).count { it % 2u != 0u })","completion":"assertEquals(3, ulongArrayOf(2u, 3u, 4u).count { it > 1uL })\n }\n\n @Suppress(\"DEPRECATION\")\n @Test\n fun sumBy() {\n assertEquals(3u, ubyteArrayOf(0u, 1u, 2u).sumBy { it.toUInt() })<|endoftext|>"} {"prompt":"inline fun makeAllUnderImportsIndexed(imports: Collection) : IndexedImports =\n IndexedImports(imports.filter { it.isAllUnder }.toTypedArray())\n\n\nclass ExplicitImportsIndexed(\n imports: Array,\n storageManager: StorageManager","completion":") : IndexedImports(imports) {\n\n private val nameToDirectives: NotNullLazyValue> = storageManager.createLazyValue {\n val builder = ImmutableListMultimap.builder()\n\n for (directive in imports) {\n val importedName = directive.importedName ?: continue \/\/ parse error<|endoftext|>"} {"prompt":"interface D1 : JA, KB\ninterface E1 : D1 {\n override fun getFoo(): String\n override fun getBar(): String\n}\n\ninterface D2 : KB, JA\ninterface E2 : D2 {\n override fun getFoo(): String\n override fun getBar(): String\n}\n\nfun main(","completion":"d1: D1, e1: E1,\n d2: D2, e2: E2,\n) {\n d1.foo\n d1.bar\n e1.foo\n e1.bar\n\n d2.foo<|endoftext|>"} {"prompt":"if (it.asText == \"set\") isGetter = false\n when (it.tokenType) {\n SET_KEYWORD -> isGetter = false\n MODIFIER_LIST -> {\n modifiers = convertModifierList(it)\n accessorAnnotations += convertAnnotationList(it)\n }\n TYPE_REFERENCE -> returnType = convertType(it)","completion":"VALUE_PARAMETER_LIST -> firValueParameters = convertSetterParameter(\n it, accessorSymbol, propertyTypeRefToUse, propertyAnnotations.filterUseSiteTarget(SETTER_PARAMETER)\n )\n CONTRACT_EFFECT_LIST -> outerContractDescription = obtainContractDescription(it)\n BLOCK -> block = it\n else -> if (it.isExpression()) expression = it<|endoftext|>"} {"prompt":"?: throw KotlinExceptionWithAttachments(\"No parent KtNamedDeclaration for of type ${element.javaClass}\")\n .withPsiAttachment(\"element.kt\", element)\n return if (declaration is KtFunctionLiteral) {\n getEnclosingDescriptor(context, declaration)\n } else {\n context.get(DECLARATION_TO_DESCRIPTOR, declaration)","completion":"?: throw KotlinExceptionWithAttachments(\"No descriptor for named declaration of type ${declaration.javaClass}\")\n .withPsiAttachment(\"declaration.kt\", declaration)\n }\n}\n\nfun getEnclosingFunctionDescriptor(context: BindingContext, element: KtElement, skipInlineFunctionLiterals: Boolean): FunctionDescriptor? {\n var current = element\n while (true) {<|endoftext|>"} {"prompt":"assertFailsWith {\n val res = atomicIntArr[22]\n }.let { ex ->\n assertEquals(\"The index 22 is out of the bounds of the AtomicIntArray with size 10.\", ex.message)\n }\n assertFailsWith {\n val res = atomicIntArr[-1]\n }.let { ex ->","completion":"assertEquals(\"The index -1 is out of the bounds of the AtomicIntArray with size 10.\", ex.message)\n }\n }\n\n @Test fun setter() {\n val atomicIntArr = AtomicIntArray(10)\n for (i in 0 until atomicIntArr.length) {\n atomicIntArr[i] = i * 10\n }<|endoftext|>"} {"prompt":"typeProjection: [Error type: Unresolved type for adad>]>\n psi: adad>\n type: [Error type: Unresolved type for adad>]>\n typeParameter: null","completion":"typeProjection: List<[Error type: Unresolved type for dd]>\n psi: List

\n type: List<[Error type: Unresolved type for dd]>\n typeParameter: defined in kotlin.collections.List\n typeProjection: [Error type: Unresolved type for dd]\n psi: dd<|endoftext|>"} {"prompt":"if (value_1.case_5_3() != null) println(value_1.length)\n if (value_1.case_5_4() == null) println(value_1.length)\n}\n\n\/\/ TESTCASE NUMBER: 6","completion":"fun case_6(value_1: Number) {\n when { value_1.case_6_1() -> println(value_1.inv()) }\n when { !value_1.case_6_2() -> println(value_1.inv()) }<|endoftext|>"} {"prompt":"@WasExperimental(ExperimentalStdlibApi::class)\n public operator fun rangeUntil(other: Long): LongRange =\n this until other\n\n \/**\n * Converts this [Short] value to [Byte].\n *\n * If this value is in [Byte.MIN_VALUE]..[Byte.MAX_VALUE], the resulting `Byte` value represents\n * the same numerical value as this `Short`.","completion":"*\n * The resulting `Byte` value is represented by the least significant 8 bits of this `Short` value.\n *\/\n @kotlin.internal.IntrinsicConstEvaluation\n @TypedIntrinsic(IntrinsicType.INT_TRUNCATE)\n public external override fun toByte(): Byte\n\n \/**\n * Converts this [Short] value to [Char].<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ IGNORE_BACKEND: ANDROID\n\/\/ ^ D8 merges method references with empty closure created by 'invokedynamic'\n\nfun checkNotEqual(marker: String, x: Any, y: Any) {\n if (x == y || y == x) throw AssertionError(\"$marker: $x and $y should NOT be equal\")\n}","completion":"private fun id(f: Runnable): Any = f\n\nfun box(): String {\n \/\/ Since 1.0, SAM wrappers for Java do not implement equals\/hashCode\n\n fun local1() {}\n fun local2() {}\n\n checkNotEqual(\"id(::local1), id(::local1)\", id(::local1), id(::local1))<|endoftext|>"} {"prompt":"inner class ErrorInnerExn : Exception()\n }\n}\n\nfun genericFoo() {\n class ErrorLocalExnInGenericFun : Exception()","completion":"val errorkAnonymousObjectExnInGenericFun = object : Exception() {}\n}<|endoftext|>"} {"prompt":"asyncProfilerControl.beforePass(pass, reportDateStr)\n }\n\n override fun afterPass(pass: Int) {\n asyncProfilerControl.afterPass(pass, reportDateStr)\n\n createReport(finalReport = pass == PASSES - 1)\n require(totalModules.isNotEmpty()) { \"No modules were analyzed\" }","completion":"require(okModules.isNotEmpty()) { \"All of $totalModules is failed\" }\n }\n\n protected fun formatReportTable(stream: PrintStream) {\n val total = totalPassResult\n var totalGcTimeMs = 0L\n var totalGcCount = 0L\n printTable(stream) {\n row(\"Name\", \"Time\", \"Count\")\n separator()<|endoftext|>"} {"prompt":"in methodOriginsWithoutAnnotations -> false\n IrDeclarationOrigin.ENUM_CLASS_SPECIAL_MEMBER -> name.asString() == \"\"\n else -> true\n }\n }\n}\n\n\nprivate fun IrValueParameter.isSyntheticMarkerParameter(): Boolean =\n origin == IrDeclarationOrigin.DEFAULT_CONSTRUCTOR_MARKER","completion":"private fun generateParameterNames(irFunction: IrFunction, mv: MethodVisitor, config: JvmBackendConfig) {\n irFunction.extensionReceiverParameter?.let {\n mv.visitParameter(irFunction.extensionReceiverName(config), 0)\n }\n for (irParameter in irFunction.valueParameters) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.REQUIRE_KOTLIN_VERSION\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.SYMBOL","completion":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.SYMBOLS_ON_NEWLINE_WITH_INDENT\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.SYMBOLS_ON_NEXT_LINES<|endoftext|>"} {"prompt":"original.dispatchReceiverParameter?.copyTo(newFunction)\n newFunction.extensionReceiverParameter =\n original.extensionReceiverParameter?.copyWithNewTypeParams(original, newFunction)\n\n newFunction.body = original.moveBodyTo(newFunction)\n ?.copyWithNewTypeParams(original, newFunction)","completion":"newFunction.addDecoyImplementationAnnotation(newName.asString(), original.getSignatureId())\n\n newFunction.valueParameters.forEach {\n it.defaultValue?.transformDefaultValue(\n originalFunction = original,\n newFunction = newFunction\n )\n }\n\n return newFunction\n }\n\n \/**\n * Expressions for default values can use other parameters.<|endoftext|>"} {"prompt":"val callExpression = parent as? KtCallExpression ?: return null\n val possibleQualifiedExpression = callExpression.parent\n\n val targetExpression = if (possibleQualifiedExpression is KtQualifiedExpression) {\n if (possibleQualifiedExpression.selectorExpression != callExpression) return null\n possibleQualifiedExpression\n } else {\n callExpression","completion":"}\n\n return targetExpression.topParenthesizedParentOrMe().parent as? KtBinaryExpressionWithTypeRHS\n}\n\nfun KtExpression.topParenthesizedParentOrMe(): KtExpression {\n var result: KtExpression = this\n while (KtPsiUtil.deparenthesizeOnce(result.parent as? KtExpression) == result) {<|endoftext|>"} {"prompt":"val initializer = declaration.initializerList?.initializers?.firstIsInstanceOrNull() ?: return\n val bindingTrace = context.trace\n val visitor = Visitor(\n enumDescriptor,\n enumCompanion,\n bindingTrace.bindingContext,\n bindingTrace,","completion":"reportError = context.languageVersionSettings.supportsFeature(LanguageFeature.ProhibitAccessToEnumCompanionMembersInEnumConstructorCall)\n )\n initializer.acceptChildren(visitor)\n }\n\n private class Visitor(\n val enumDescriptor: ClassDescriptor,\n val companionDescriptor: ClassDescriptor,\n val context: BindingContext,<|endoftext|>"} {"prompt":"\/\/ test.kt:12 g\n\/\/ test.kt:5 invoke\n\/\/ test.kt:9 f\n\/\/ test.kt:10 f\n\/\/ test.kt:6 box\n\n\/\/ EXPECTATIONS JS_IR\n\/\/ test.kt:4 box\n\/\/ test.kt:5 box\n\/\/ test.kt:5 g$ref\n\/\/ test.kt:5 box\n\/\/ test.kt:9 f\n\/\/ test.kt:12 g","completion":"\/\/ test.kt:10 f\n\/\/ test.kt:6 box\n\n\/\/ EXPECTATIONS WASM\n\/\/ test.kt:4 $box (12, 4)\n\/\/ test.kt:5 $box\n\/\/ test.kt:9 $f\n\/\/ test.kt:12 $g\n\/\/ test.kt:10 $f\n\/\/ test.kt:6 $box<|endoftext|>"} {"prompt":"* override suspend fun KotlinGradleProjectCheckerContext.runChecks(collector: KotlinToolingDiagnosticsCollector) {\n * \u21aa KotlinPluginLifecycle.Stage.ReadyForExecution.await()\n * \/\/ ... run my check on fully configured project\n * }\n * ```\n * However, this approach is discouraged and shall only be used if there are no suspend functions available to express the","completion":"* requirements of this checker.\n *\n *\/\ninternal interface KotlinGradleProjectChecker {\n suspend fun KotlinGradleProjectCheckerContext.runChecks(collector: KotlinToolingDiagnosticsCollector)\n\n companion object {\n val extensionPoint = KotlinGradlePluginExtensionPoint()\n }\n}<|endoftext|>"} {"prompt":"\/\/ IMPORTANT!\n\/\/ Please, when your changes cause failures in bytecodeText tests for 'for' loops,\n\/\/ examine the resulting bytecode shape carefully.\n\/\/ Range and progression-based loops generated with Kotlin compiler should be\n\/\/ as close as possible to Java counter loops ('for (int i = a; i < b; ++i) { ... }').\n\/\/ Otherwise it may result in performance regression due to missing HotSpot optimizations.","completion":"\/\/ Run Kotlin compiler benchmarks (https:\/\/github.com\/Kotlin\/kotlin-benchmarks)\n\/\/ with compiler built from your changes if you are not sure.\n\nval xs = listOf(\"a\", \"b\", \"c\", \"d\")\n\nfun box(): String {\n val s = StringBuilder()\n\n for ((_, x) in xs.withIndex()) {<|endoftext|>"} {"prompt":"!is dynamic? -> {}\n }\n\n dl as List\n dl is List\n\n when (dl) {","completion":"is List -> {}\n }\n}<|endoftext|>"} {"prompt":"\/\/ so the parameters are captured and assigning to them requires temporarily rewriting their types (see\n \/\/ `SharedVariablesLowering`), and that we can't do. So we have to create new `var`s for this purpose.\n \/\/ TODO: an optimization pass will rewrite the types of vars back since the lambdas are guaranteed to be inlined","completion":"\/\/ in place (otherwise they can't jump to the start of the function at all), so this is all a waste of CPU time.\n val parameterToVariable = irFunction.explicitParameters.associateWith {\n if (someCallsAreFromOtherFunctions || !it.isAssignable)<|endoftext|>"} {"prompt":"package kotlin.reflect\n\n\/**\n * Represents a property, such as a named `val` or `var` declaration.\n * Instances of this class are obtainable by the `::` operator.\n *\n * See the [Kotlin language documentation](https:\/\/kotlinlang.org\/docs\/reference\/reflection.html)\n * for more information.\n *\n * @param V the type of the property value.","completion":"*\/\npublic actual interface KProperty : KCallable\n\npublic actual interface KProperty0 : kotlin.reflect.KProperty, () -> V {\n\n public actual fun get(): V\n\n public override abstract operator fun invoke(): V\n}<|endoftext|>"} {"prompt":"val inv = ::bar2 in setOf(::foo2)\n inv()\n }\n}\n\nfun poll82(): Flow {\n return flow {\n val inv = ::bar3 in setOf(::foo3)","completion":"inv()\n }\n}\n\nfun poll83(): Flow {\n return flow {\n val inv = ::bar4 in setOf(::foo4)\n inv\n }\n}\n\nfun poll84(): Flow {<|endoftext|>"} {"prompt":"if (descriptor.hasReadonlyComposableAnnotation()) {\n \/\/ enforce that the original call was readonly\n if (!resolvedCall.isReadOnlyComposableInvocation()) {\n illegalCallMustBeReadonly(\n context,\n reportOn\n )\n }\n }\n return\n }\n is KtCallableReferenceExpression -> {","completion":"illegalComposableFunctionReference(context, node)\n return\n }\n is KtFile -> {\n \/\/ if we've made it this far, the call was made in a non-composable context.\n illegalCall(context, reportOn)\n return\n }\n is KtClass -> {\n \/\/ composable calls are never allowed in the initializers of a class<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.util\n\nimport com.intellij.psi.PsiElement\nimport org.jetbrains.kotlin.diagnostics.PsiDiagnosticUtils\nimport org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments","completion":"class KotlinFrontEndException(message: String, cause: Throwable) : KotlinExceptionWithAttachments(message, cause) {\n constructor(\n message: String,\n cause: Throwable,\n element: PsiElement\n ) : this(getExceptionMessage(\"Front-end\", message, cause, PsiDiagnosticUtils.atLocation(element)), cause) {<|endoftext|>"} {"prompt":"* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1\n * type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 8\n *\/\nclass A\n\nfun test(a: Any) {\n var q: String? = null\n\n when (a) {\n is A -> q = \"1\"\n }\n \/\/ When is not exhaustive","completion":"return q\n}<|endoftext|>"} {"prompt":"CAPTURED_VARIABLE(\"captured var\", \"local variable that is mutated in a capturing closure\"),\n\n \/\/ Member variable regardless of its visibility\n \/\/ Smart casts are not safe\n MUTABLE_PROPERTY(\"member\", \"mutable property that could be mutated concurrently\"),\n\n \/\/ A delegated property.\n \/\/ Smart casts are not safe","completion":"DELEGATED_PROPERTY(\"delegate\", \"delegated property\"),\n}<|endoftext|>"} {"prompt":"fun visitPropertyAccessor(propertyAccessor: PropertyAccessor): PropertyAccessor\n\n fun visitSimpleStubContainer(simpleStubContainer: SimpleStubContainer): SimpleStubContainer\n\n fun visitFunctionParameter(element: FunctionParameterStub): FunctionParameterStub\n\n fun visitAnnotation(element: AnnotationStub): AnnotationStub","completion":"fun visitReceiverParameter(element: ReceiverParameterStub): ReceiverParameterStub\n\n}<|endoftext|>"} {"prompt":"* **Q:** Why not just use the [IrSimpleFunction] class itself?\n *\n * **A:** Because a symbol, unlike a declaration, can be bound or unbound (see [isBound]).\n *\n * We need this distinction to work with IR before the linkage phase. In pre-linkage IR the symbols referencing declarations from\n * other modules are not yet bound.\n *","completion":"* During the linkage phase, we collect all the unbound symbols in the IR tree and try to resolve them to the declarations they should\n * refer to. For unbound symbols for public declarations from other modules, [signature] is used to resolve those declarations.\n *\n * @see IdSignature\n * @see SymbolTable\n *\/\ninterface IrSymbol : DeclarationSymbolMarker {\n\n \/**<|endoftext|>"} {"prompt":" & Inv<*>?\")!>a.propT\n & Inv<*>?\")!>a.propAny\n & Inv<*>?\")!>a.propNullableT","completion":" & Inv<*>?\")!>a.propNullableAny\n & Inv<*>?\")!>a.funT()\n & Inv<*>?\")!>a.funAny()<|endoftext|>"} {"prompt":"* The (contents-based) header id.\n * Its [value] remains valid across different runs of the indexer and the process,\n * and thus can be used to 'serialize' the id.\n *\/\ndata class HeaderId(val value: String)\n\ndata class Location(val headerId: HeaderId)\n\ninterface LocatableDeclaration {\n val location: Location\n}\n\ninterface TypeDeclaration : LocatableDeclaration","completion":"sealed class StructMember(val name: String) {\n abstract val offset: Long?\n}\n\n\/**\n * C struct field.\n *\/\nclass Field(name: String, val type: Type, override val offset: Long, val typeSize: Long, val typeAlign: Long)\n : StructMember(name)\n\nval Field.isAligned: Boolean<|endoftext|>"} {"prompt":"return klass\n }\n}\n\nprivate fun reflectFunctionClassFqn(shortName: Name): FqName = KOTLIN_REFLECT_FQ_NAME.child(shortName)\nprivate fun reflectionFunctionClassName(isSuspend: Boolean, arity: Int): Name =\n Name.identifier(\"K${if (isSuspend) \"Suspend\" else \"\"}Function$arity\")","completion":"fun KotlinBuiltIns.functionClassDescriptor(arity: Int): FunctionClassDescriptor =\n getFunction(arity) as FunctionClassDescriptor\n\nfun KotlinBuiltIns.suspendFunctionClassDescriptor(arity: Int): FunctionClassDescriptor =\n getSuspendFunction(arity) as FunctionClassDescriptor<|endoftext|>"} {"prompt":"(LFooImpl;I)V\n public final invoke(Landroidx\/compose\/runtime\/Composer;I)V\n public synthetic bridge invoke(Ljava\/lang\/Object;Ljava\/lang\/Object;)Ljava\/lang\/Object;\n final synthetic LFooImpl; %tmp0_rcvr\n final synthetic I %%changed","completion":"OUTERCLASS FooImpl bar (Landroidx\/compose\/runtime\/Composer;I)V\n final static INNERCLASS FooImpl%bar%1 null null\n }\n \"\"\"\n )\n\n @Test\n fun testSealedClassEtc() = checkApi(\n \"\"\"\n sealed class CompositionLocal2 {\n inline val current: T\n @Composable<|endoftext|>"} {"prompt":"val type = getterDescriptor.returnType ?: return@let\n report(\"getters\", type, getterDescriptor.annotations)\n }\n descriptor.setter?.valueParameters?.single()?.let { report(\"parameters\", it.type, it.annotations) }","completion":"descriptor.extensionReceiverParameter?.let { report(\"receivers\", it.type, it.annotations) }\n descriptor.contextReceiverParameters.forEach { report(\"receivers\", it.type, it.annotations) }\n }\n is PropertyAccessorDescriptor -> Unit\n is LocalVariableDescriptor -> {<|endoftext|>"} {"prompt":"val CANNOT_WEAKEN_ACCESS_PRIVILEGE: KtDiagnosticFactory3, Name> by error3, Name>(SourceElementPositioningStrategies.VISIBILITY_MODIFIER)","completion":"val CANNOT_WEAKEN_ACCESS_PRIVILEGE_WARNING: KtDiagnosticFactory3, Name> by warning3, Name>(SourceElementPositioningStrategies.VISIBILITY_MODIFIER)<|endoftext|>"} {"prompt":"\":app:kaptDebugKotlin\",\n \":app:kaptGenerateStubsDebugKotlin\"\n )\n }\n }\n\n @DisplayName(\"works in android project\")\n @GradleAndroidTest\n fun testKotlinAndroidProject(\n gradleVersion: GradleVersion,\n agpVersion: String,\n jdkVersion: JdkVersions.ProvidedJdk,","completion":") {\n project(\n \"AndroidProject\",\n gradleVersion,\n buildOptions = defaultBuildOptions.copy(androidVersion = agpVersion),\n buildJdk = jdkVersion.location\n ) {\n testConfigurationCacheOf(\n \":Lib:compileFlavor1DebugKotlin\",\n \":Android:compileFlavor1DebugKotlin\"\n )\n }\n }<|endoftext|>"} {"prompt":"return conversionScope.withFunction(irConstructor) {\n memberGenerator.convertFunctionContent(irConstructor, constructor, containingClass = conversionScope.containerFirClass())\n }\n }\n\n override fun visitAnonymousInitializer(\n anonymousInitializer: FirAnonymousInitializer,\n data: Any?\n ): IrElement = whileAnalysing(session, anonymousInitializer) {","completion":"val irAnonymousInitializer = declarationStorage.getIrAnonymousInitializer(anonymousInitializer)\n declarationStorage.enterScope(irAnonymousInitializer.symbol)\n irAnonymousInitializer.body = convertToIrBlockBody(anonymousInitializer.body!!)\n declarationStorage.leaveScope(irAnonymousInitializer.symbol)\n return irAnonymousInitializer\n }<|endoftext|>"} {"prompt":"\/\/ LANGUAGE: +MultiPlatformProjects\n\/\/ WITH_STDLIB\n\n\/\/ MODULE: common\n\/\/ FILE: common.kt\n\nexpect class Foo(a: String, b: Int = 0, c: Double? = null)\n\n\/\/ MODULE: platform()()(common)\n\/\/ FILE: platform.kt\n\nimport kotlin.test.assertEquals","completion":"actual class Foo actual constructor(a: String, b: Int, c: Double?) {\n val result: String = a + \",\" + b + \",\" + c\n}\n\nfun box(): String {\n assertEquals(\"OK,0,null\", Foo(\"OK\").result)\n assertEquals(\"OK,42,null\", Foo(\"OK\", 42).result)<|endoftext|>"} {"prompt":"* @throws IndexOutOfBoundsException if [index] is less than zero or greater than the length of this string builder.\n *\/\n@SinceKotlin(\"1.4\")\npublic expect fun StringBuilder.insertRange(index: Int, value: CharArray, startIndex: Int, endIndex: Int): StringBuilder\n\n\/**","completion":"* Inserts characters in a subsequence of the specified character sequence [value] into this string builder at the specified [index] and returns this instance.\n *\n * The inserted characters go in the same order as in the [value] character sequence, starting at [index].\n *\n * @param index the position in this string builder to insert at.\n * @param value the character sequence from which a subsequence is inserted.<|endoftext|>"} {"prompt":"val uintList = mutableListOf()\n for (i in (1u..<9u).reversed() step 2) {\n uintList += i\n }\n assertEquals(listOf(8u, 6u, 4u, 2u), uintList)\n\n val ulongList = mutableListOf()","completion":"for (i in (1uL..<9uL).reversed() step 2L) {\n ulongList += i\n }\n assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList)\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"buildWithCocoapodsWrapper(\":linkPodDebugFrameworkIOS\") {\n assertHasDiagnostic(CocoapodsPluginDiagnostics.LinkOnlyUsedWithStaticFramework)\n }\n }\n }\n\n @DisplayName(\"Add pod-dependencies together with noPodspec\")\n @GradleTest\n fun testPodDependenciesWithNoPodspec(gradleVersion: GradleVersion) {","completion":"nativeProjectWithCocoapodsAndIosAppPodFile(gradleVersion = gradleVersion) {\n buildGradleKts.addCocoapodsBlock(\n \"\"\"\n noPodspec()\n \n pod(\"Base64\", version = \"1.1.2\")\n \"\"\".trimIndent()\n )\n buildWithCocoapodsWrapper(\":linkPodDebugFrameworkIOS\") {<|endoftext|>"} {"prompt":"val qualifier = trace.bindingContext[BindingContext.QUALIFIER, qualifierExpression]\n if (qualifier != null && generateQualifier(expression, qualifier)) return\n }\n if (!generateCall(expression) && expression.parent !is KtCallExpression) {\n createNonSyntheticValue(expression, MagicKind.UNRESOLVED_CALL, generateAndGetReceiverIfAny(expression))","completion":"}\n }\n }\n\n override fun visitLabeledExpression(expression: KtLabeledExpression) {\n mark(expression)\n val baseExpression = expression.baseExpression\n if (baseExpression != null) {\n generateInstructions(baseExpression)\n copyValue(baseExpression, expression)\n }\n\n val labelNameExpression = expression.getTargetLabel()<|endoftext|>"} {"prompt":"println(C().propAI.x())\n println(C().propG.x())\n println(C().propOI.df())\n println(C().propL.l())","completion":"println(C().propL2.l2())\n}<|endoftext|>"} {"prompt":"val symbol = innerDeclaration.initializer?.toResolvedCallableSymbol(context.session)\n if (context.languageVersionSettings.supportsFeature(LanguageFeature.InlineClassImplementationByDelegation) &&\n symbol != null && symbol in primaryConstructorParametersSymbolsSet\n ) {\n continue\n }","completion":"val delegatedTypeRefSource = (innerDeclaration.returnTypeRef as FirResolvedTypeRef).delegatedTypeRef?.source\n reporter.reportOn(\n delegatedTypeRefSource,\n FirErrors.VALUE_CLASS_CANNOT_IMPLEMENT_INTERFACE_BY_DELEGATION,\n context\n )\n }\n }\n\n is FirProperty -> {<|endoftext|>"} {"prompt":"class C {\n suspend fun get(x: Int) = 1\n suspend fun set(x: Int, v: String) {}\n\n suspend fun contains(y: String): Boolean = true\n}\n\nclass D\nsuspend fun D.get(x: Int) =1\nsuspend fun D.set(x: Int, v: String) {}","completion":"suspend fun D.contains(y: String): Boolean = true<|endoftext|>"} {"prompt":"suspendWithValue(\"456\")\n } catch (e: RuntimeException) {\n suspendWithValue(\"fail\")\n throw RuntimeException(\"fail 8\")\n } catch (e: Exception) {\n if (e.message != \"M3\") throw Exception(\"fail 9: ${e.message}\")\n suspendWithValue(\"OK\")\n } finally {\n suspendWithValue(\"ignored 7\")","completion":"wasCalled = true\n }\n }\n\n return globalResult\n}<|endoftext|>"} {"prompt":"\/\/ EXPECTATIONS JVM_IR\n\/\/ test.kt:30 box\n\/\/ test.kt:5 stringSwitch\n\/\/ test.kt:6 stringSwitch\n\/\/ test.kt:5 stringSwitch\n\/\/ test.kt:12 stringSwitch\n\/\/ test.kt:13 stringSwitch\n\/\/ test.kt:12 stringSwitch\n\/\/ test.kt:20 stringSwitch\n\/\/ test.kt:19 stringSwitch\n\/\/ test.kt:22 stringSwitch","completion":"\/\/ test.kt:19 stringSwitch\n\/\/ test.kt:27 stringSwitch\n\/\/ test.kt:31 box\n\/\/ test.kt:5 stringSwitch\n\/\/ test.kt:7 stringSwitch\n\/\/ test.kt:5 stringSwitch\n\/\/ test.kt:12 stringSwitch\n\/\/ test.kt:14 stringSwitch\n\/\/ test.kt:12 stringSwitch\n\/\/ test.kt:20 stringSwitch\n\/\/ test.kt:19 stringSwitch<|endoftext|>"} {"prompt":"interface TypeMappingConfiguration {\n fun commonSupertype(types: Collection<@JvmSuppressWildcards KotlinType>): KotlinType\n fun getPredefinedTypeForClass(classDescriptor: ClassDescriptor): T?\n fun getPredefinedInternalNameForClass(classDescriptor: ClassDescriptor): String?","completion":"fun getPredefinedFullInternalNameForClass(classDescriptor: ClassDescriptor): String? = null\n fun processErrorType(kotlinType: KotlinType, descriptor: ClassDescriptor)\n\n \/\/ returns null when type doesn't need to be preprocessed\n fun preprocessType(kotlinType: KotlinType): KotlinType? = null\n}\n\nfun mapType(<|endoftext|>"} {"prompt":"assertArrayContentEquals(uintArrayOf(2u, 3u, 9u), uintArrayOf(2u, 3u, 9u, 2u, 3u, 9u).sliceArray(listOf(3, 1, 2)))\n assertArrayContentEquals(ubyteArrayOf(127u, 100u), ubyteArrayOf(50u, 100u, 127u).sliceArray(listOf(2, 1)))","completion":"assertArrayContentEquals(ushortArrayOf(200u, 100u), ushortArrayOf(50u, 100u, 200u).sliceArray(listOf(2, 1)))\n assertArrayContentEquals(ulongArrayOf(100u, 200u, 30u), ulongArrayOf(50u, 100u, 200u, 30u).sliceArray(1..3))<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.konan.test.blackbox.support.compilation.TestCompilationResult.Success\nimport org.jetbrains.kotlin.konan.test.blackbox.support.util.DumpedTestListing\nimport org.jetbrains.kotlin.konan.test.blackbox.support.util.startsWith","completion":"import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertFalse\nimport org.jetbrains.kotlin.test.services.JUnit5Assertions.fail\nimport org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull\nimport java.io.File\nimport java.io.IOException\n\nclass TestExecutable(<|endoftext|>"} {"prompt":"\/\/ For multiplatform tests it's expected that LL and FIR diverge,\n \/\/ because IR actualizer doesn't run in IDE mode tests.\n forTestsNotMatching(\"compiler\/testData\/diagnostics\/tests\/multiplatform\/*\") {\n useAfterAnalysisCheckers(::LLFirDivergenceCommentChecker)\n }\n\n useAfterAnalysisCheckers(::LLFirTestSuppressor)\n }","completion":"abstract fun configureTest(builder: TestConfigurationBuilder)\n\n inner class LowLevelFirFrontendFacade(\n testServices: TestServices,\n private val facadeFactory: LLFirAnalyzerFacadeFactory,\n ) : FirFrontendFacade(testServices) {\n override val additionalServices: List\n get() = emptyList()<|endoftext|>"} {"prompt":"override fun createDescriptorExtension(): DescriptorSymbolTableExtension {\n return ExtensionDecorator()\n }\n\n private inner class ExtensionDecorator : DescriptorSymbolTableExtension(this) {\n override fun referenceValueParameter(declaration: ParameterDescriptor): IrValueParameterSymbol {\n val fi = fragmentInfo ?: return super.referenceValueParameter(declaration)","completion":"if (declaration !is ReceiverParameterDescriptor) return super.referenceValueParameter(declaration)\n\n val finderPredicate = when (val receiverValue = declaration.value) {\n is ExtensionReceiver, is ContextReceiver -> { (targetDescriptor, _): EvaluatorFragmentParameterInfo ->\n receiverValue == (targetDescriptor as? ReceiverParameterDescriptor)?.value\n }<|endoftext|>"} {"prompt":"return evaluateCall(calleeExpression, receiverExpression, expectedType)\n }\n\n if (selectorExpression is KtSimpleNameExpression) {\n val result = evaluateCall(selectorExpression, expression.receiverExpression, expectedType)\n if (result != null) return result\n }\n\n \/\/ MyEnum.A, Integer.MAX_VALUE","completion":"if (selectorExpression != null) {\n return evaluate(selectorExpression, expectedType)\n }\n\n return null\n }\n\n override fun visitCallExpression(expression: KtCallExpression, expectedType: KotlinType?): CompileTimeConstant<*>? {\n val call = expression.getResolvedCall(trace.bindingContext) ?: return null<|endoftext|>"} {"prompt":"if (!equalsBy(expectedValueParameters, actualValueParameters) { it.isVararg }) {\n return ExpectActualCheckingCompatibility.ValueParameterVararg\n }\n\n \/\/ Adding noinline\/crossinline to parameters is disallowed, except if the expected declaration was not inline at all\n if (expectDeclaration is SimpleFunctionSymbolMarker && expectDeclaration.isInline) {","completion":"if (expectedValueParameters.indices.any { i -> !expectedValueParameters[i].isNoinline && actualValueParameters[i].isNoinline }) {\n return ExpectActualCheckingCompatibility.ValueParameterNoinline\n }\n if (expectedValueParameters.indices.any { i -> !expectedValueParameters[i].isCrossinline && actualValueParameters[i].isCrossinline }) {<|endoftext|>"} {"prompt":"public fun Array.minWithOrNull(comparator: Comparator): T? {\n if (isEmpty()) return null\n var min = this[0]\n for (i in 1..lastIndex) {\n val e = this[i]\n if (comparator.compare(min, e) > 0) min = e\n }\n return min\n}","completion":"\/**\n * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements.\n *\/\n@SinceKotlin(\"1.4\")\npublic fun ByteArray.minWithOrNull(comparator: Comparator): Byte? {\n if (isEmpty()) return null\n var min = this[0]\n for (i in 1..lastIndex) {<|endoftext|>"} {"prompt":"var firstInClass = true\n\n var notClosed = lexemes.currentChar != Lexer.CHAR_RIGHT_SQUARE_BRACKET\n while (!lexemes.isEmpty() && (notClosed || firstInClass)) {\n when (lexemes.currentChar) {\n\n Lexer.CHAR_RIGHT_SQUARE_BRACKET -> {","completion":"if (buffer >= 0) {\n result.add(buffer)\n }\n buffer = ']'.toInt()\n lexemes.next()\n }\n\n Lexer.CHAR_LEFT_SQUARE_BRACKET -> {\n if (buffer >= 0) {\n result.add(buffer)\n buffer = -1\n }\n lexemes.next()<|endoftext|>"} {"prompt":"val clInit = classCodegen.createOrGetClInitCodegen()\n with(clInit.v) {\n getstatic(threadSafeModeType.internalName, LAZY_PUBLICATION_MODE_NAME.identifier, threadSafeModeType.descriptor)\n getstatic(lambdaType.internalName, JvmAbi.INSTANCE_FIELD, lambdaType.descriptor)","completion":"checkcast(function0Type)\n invokestatic(\n \"kotlin\/LazyKt\",\n \"lazy\",\n \"(${threadSafeModeType.descriptor}${function0Type.descriptor})${kotlinLazyType.descriptor}\",\n false\n )<|endoftext|>"} {"prompt":"Returns a set containing all elements of the original set and the given [elements] array,\n which aren't already in this set.\n\n The returned set preserves the element iteration order of the original set.\n \"\"\"\n }\n body {\n \"\"\"\n val result = LinkedHashSet(mapCapacity(this.size + elements.size))\n result.addAll(this)","completion":"result.addAll(elements)\n return result\n \"\"\"\n }\n }\n specialFor(Sequences) {\n doc {\n \"\"\"\n Returns a sequence containing all elements of original sequence and then all elements of the given [elements] array.\n\n Note that the source sequence and the array being added are iterated only when an `iterator` is requested from<|endoftext|>"} {"prompt":"override fun isTypeParameterUpperBoundClass(property: IrPropertySymbol, index: Int, expected: IrClassSymbol): Boolean {\n return property.owner.getter?.typeParameters?.getOrNull(index)?.superTypes?.any { it.classOrNull == expected } ?: false\n }","completion":"override fun isValueParameterClass(function: IrFunctionSymbol, index: Int, expected: IrClassSymbol?): Boolean {\n return function.owner.valueParameters.getOrNull(index)?.type?.classOrNull == expected\n }\n\n override fun isReturnClass(function: IrFunctionSymbol, expected: IrClassSymbol): Boolean {\n return function.owner.returnType.classOrNull == expected<|endoftext|>"} {"prompt":").buildWithScope { irProperty ->\n irProperty.backingField =\n if (propertyDescriptor.actuallyHasBackingField(context.bindingContext))\n generatePropertyBackingField(ktProperty, propertyDescriptor) { irField ->\n ktProperty.initializer?.let evaluateInitializer@{ ktInitializer ->\n val compileTimeConst = propertyDescriptor.compileTimeInitializer","completion":"if (compileTimeConst != null) {\n val constantInfo = context.bindingContext.get(BindingContext.COMPILE_TIME_VALUE, ktInitializer)\n if (propertyDescriptor.isConst ||\n (constantInfo?.usesNonConstValAsConstant == false &&\n (!constantInfo.usesVariableAsConstant ||<|endoftext|>"} {"prompt":"}\n\n return result.toTypedArray()\n}\n\nfun stringsToBytes(strings: Array): ByteArray {\n val resultLength = strings.sumOf { it.length }\n val result = ByteArray(resultLength)\n\n var i = 0\n for (s in strings) {\n for (si in 0..s.length - 1) {","completion":"result[i++] = s[si].code.toByte()\n }\n }\n\n assert(i == result.size) { \"Should have reached the end\" }\n\n return result\n}<|endoftext|>"} {"prompt":"* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses\n *\/\n\n\/*\n * TESTCASE NUMBER: 1\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-28489\n *\/\nfun case_1(x: Boolean?) {\n l1@ while (true) {\n l2@ while (true || x as Boolean) {","completion":"break@l1\n }\n }\n\n x\n x.not()\n}\n\n\/*<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.psi.KtCallableReferenceExpression\nimport org.jetbrains.kotlin.psi.KtElement\nimport org.jetbrains.kotlin.resolve.scopes.MemberScope\nimport org.jetbrains.kotlin.resolve.source.getPsi","completion":"import org.jetbrains.kotlin.resolve.source.toSourceElement\nimport org.jetbrains.kotlin.storage.LockBasedStorageManager\nimport org.jetbrains.kotlin.types.KotlinType\n\nclass SyntheticClassDescriptorForLambda(\n containingDeclaration: DeclarationDescriptor,\n name: Name,\n supertypes: Collection,<|endoftext|>"} {"prompt":"if (!checkEqualsClassMultiFieldValueClassUnderlyingName(old, new)) return false\n\n if (!checkEqualsClassMultiFieldValueClassUnderlyingType(old, new)) return false\n\n if (!checkEqualsClassMultiFieldValueClassUnderlyingTypeId(old, new)) return false\n\n if (!checkEqualsClassVersionRequirement(old, new)) return false","completion":"if (old.hasVersionRequirementTable() != new.hasVersionRequirementTable()) return false\n if (old.hasVersionRequirementTable()) {\n if (!checkEquals(old.versionRequirementTable, new.versionRequirementTable)) return false\n }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.fir.analysis.wasm.checkers.expression\n\nimport org.jetbrains.kotlin.diagnostics.DiagnosticReporter\nimport org.jetbrains.kotlin.diagnostics.reportOn\nimport org.jetbrains.kotlin.fir.analysis.checkers.MppCheckerKind","completion":"import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext\nimport org.jetbrains.kotlin.fir.analysis.checkers.expression.FirFunctionCallChecker\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.wasm.FirWasmErrors<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.calls.inference.model.*\nimport org.jetbrains.kotlin.types.model.TypeVariableMarker\n\nclass ConeDeclaredUpperBoundConstraintPosition : DeclaredUpperBoundConstraintPosition(null) {\n override fun toString(): String = \"DeclaredUpperBound\"\n}","completion":"class ConeSemiFixVariableConstraintPosition(variable: TypeVariableMarker) : SemiFixVariableConstraintPosition(variable) {\n override fun toString(): String = \"Fix variable ${(variable as ConeTypeVariable).typeConstructor.name}\"\n}\n\nclass ConeFixVariableConstraintPosition(variable: TypeVariableMarker) : FixVariableConstraintPosition(variable, null) {<|endoftext|>"} {"prompt":"if (j >= length || !codePoint.isCased()) {\n return true\n }\n }\n }\n return false\n }\n \"\"\".trimIndent()\n\n private fun lowercaseImpl(): String = \"\"\"\n internal fun String.lowercaseImpl(): String {\n var unchangedIndex = 0\n while (unchangedIndex < this.length) {","completion":"val codePoint = codePointAt(unchangedIndex)\n if (codePoint.lowercaseCodePoint() != codePoint) { \/\/ '\\u0130' and '\\u03A3' have lowercase corresponding mapping in UnicodeData.txt, no need to check them separately\n break\n }\n unchangedIndex += codePoint.charCount()\n }\n if (unchangedIndex == this.length) {<|endoftext|>"} {"prompt":"override fun lower(irFile: IrFile) {\n runOnFilePostfix(irFile, withLocalDeclarations = true)\n }\n\n override fun lower(irBody: IrBody, container: IrDeclaration) {\n val realContainer = container as? IrDeclarationParent ?: container.parent\n irBody.transformChildrenVoid(ReferenceTransformer(realContainer))\n }","completion":"private val nothingType = context.irBuiltIns.nothingType\n private val stringType = context.irBuiltIns.stringType\n\n private inner class ReferenceTransformer(private val container: IrDeclarationParent) : IrElementTransformerVoid() {\n\n override fun visitBody(body: IrBody): IrBody {\n return body\n }<|endoftext|>"} {"prompt":"override fun restoreSymbol(analysisSession: KtAnalysisSession): T? {\n require(analysisSession is KtFirAnalysisSession)\n val classLikeSymbol = analysisSession.firSymbolBuilder.classifierBuilder.buildClassLikeSymbolByClassId(classId) ?: return null\n if (!expectedClass.isInstance(classLikeSymbol)) return null","completion":"@Suppress(\"UNCHECKED_CAST\")\n return classLikeSymbol as T\n }\n\n override fun pointsToTheSameSymbolAs(other: KtSymbolPointer): Boolean = other === this ||\n other is KtFirClassLikeSymbolPointer &&\n other.classId == classId &&\n other.expectedClass == expectedClass\n}<|endoftext|>"} {"prompt":"@GCUnsafeCall(\"Kotlin_String_lastIndexOfChar\")\ninternal actual external fun String.nativeLastIndexOf(ch: Char, fromIndex: Int): Int\n\n\/**\n * Returns the index within this string of the last occurrence of the specified character, starting from the specified offset.\n *\/\n@GCUnsafeCall(\"Kotlin_String_lastIndexOfString\")","completion":"internal actual external fun String.nativeLastIndexOf(str: String, fromIndex: Int): Int\n\n\/**\n * Returns `true` if this string is equal to [other], optionally ignoring character case.\n *\n * Two strings are considered to be equal if they have the same length and the same character at the same index.<|endoftext|>"} {"prompt":"p.printWithNoIndent(\"@\")\n p.printWithNoIndent(it)\n }\n }\n\n override fun visitTry(aTry: IrTry, data: IrDeclaration?) = wrap(aTry, data) {\n p.printWithNoIndent(\"try \")\n aTry.tryResult.accept(this, data)\n p.printlnWithNoIndent()","completion":"aTry.catches.forEach { it.accept(this, data) }\n\n aTry.finallyExpression?.let {\n p.print(\"finally \")\n it.accept(this, data)\n }\n }\n\n override fun visitCatch(aCatch: IrCatch, data: IrDeclaration?) = wrap(aCatch, data) {<|endoftext|>"} {"prompt":"open class T(var value: Int) {}\n\nfun localExtensionOnNullableParameter(): T {\n\n fun T.local(s: Int) {\n value += s\n }\n\n var t: T? = T(1)\n t?.local(2)\n\n return t!!\n}\n\n\nfun box(): String {\n val result = localExtensionOnNullableParameter().value","completion":"if (result != 3) return \"fail 2: $result\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.declarations.utils.superConeTypes\nimport org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol\nimport org.jetbrains.kotlin.fir.types.ConeClassLikeType\nimport org.jetbrains.kotlin.fir.types.toRegularClassSymbol","completion":"import org.jetbrains.kotlin.name.JsStandardClassIds.Annotations.JsExternalInheritorsOnly\nimport org.jetbrains.kotlin.utils.addToStdlib.popLast\n\nsealed class FirJsExternalInheritorOnlyChecker(mppKind: MppCheckerKind) : FirClassChecker(mppKind) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.expressions.IrLoop\nimport org.jetbrains.kotlin.ir.symbols.IrReturnableBlockSymbol\nimport org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol\nimport org.jetbrains.kotlin.ir.symbols.IrValueSymbol","completion":"import org.jetbrains.kotlin.wasm.ir.*\nimport java.util.LinkedList\n\nenum class LoopLabelType { BREAK, CONTINUE }\nenum class SyntheticLocalType { IS_INTERFACE_PARAMETER, TABLE_SWITCH_SELECTOR }\n\nclass WasmFunctionCodegenContext(\n val irFunction: IrFunction,\n private val wasmFunction: WasmFunction.Defined,<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.backend.jvm.lower\n\nimport org.jetbrains.kotlin.backend.common.FileLoweringPass\nimport org.jetbrains.kotlin.backend.common.phaser.PhaseDescription\nimport org.jetbrains.kotlin.backend.jvm.JvmBackendContext","completion":"import org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin\nimport org.jetbrains.kotlin.config.LanguageFeature\nimport org.jetbrains.kotlin.ir.IrElement\nimport org.jetbrains.kotlin.ir.IrStatement\nimport org.jetbrains.kotlin.ir.builders.declarations.addValueParameter<|endoftext|>"} {"prompt":"@JvmField\n override val i: Int = 0\n @JvmField\n override final val j: Int = 0\n}\n\nclass JK(\n override val i: Int,","completion":"@JvmField override val j: Int,\n) : K\n\nannotation class L {\n companion object {\n @JvmField\n var c = 3\n }\n}\n\nobject O {\n @JvmField\n val c = 3\n}<|endoftext|>"} {"prompt":"val x13 = >\")!>foo1(y!!)\n\n val x20 = >\")!>foo2(x)","completion":"val x21 = >\")!>foo2(y)\n\n val x30 = >\")!>foo3(x)<|endoftext|>"} {"prompt":"project(\"instantExecutionToJs\", gradleVersion) {\n assertSimpleConfigurationCacheScenarioWorks(\n \"assemble\",\n buildOptions = defaultBuildOptions,\n executedTaskNames = listOf(\":compileKotlinJs\")\n )\n }\n }\n\n @DisplayName(\"configuration cache is working for kotlin\/js browser project\")\n @GradleTest","completion":"fun testBrowserDistribution(gradleVersion: GradleVersion) {\n project(\"kotlin-js-browser-project\", gradleVersion) {\n assertSimpleConfigurationCacheScenarioWorks(\n \":app:build\",\n buildOptions = defaultBuildOptions,\n executedTaskNames = listOf(\n \":app:packageJson\",\n \":app:publicPackageJson\",<|endoftext|>"} {"prompt":"c: TypeResolutionContext,\n constructor: TypeConstructor,\n argumentElements: List\n ): List {\n return argumentElements.mapIndexed { i, argumentElement ->\n val projectionKind = argumentElement.projectionKind\n ModifierCheckerCore.check(argumentElement, c.trace, null, languageVersionSettings)","completion":"if (projectionKind == KtProjectionKind.STAR) {\n val parameters = constructor.parameters\n if (parameters.size > i) {\n val parameterDescriptor = parameters[i]\n TypeUtils.makeStarProjection(parameterDescriptor)\n } else {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.incremental.storage.ProtoMapValue\nimport org.jetbrains.kotlin.metadata.ProtoBuf\nimport org.jetbrains.kotlin.metadata.ProtoBuf.Type\nimport org.jetbrains.kotlin.metadata.deserialization.Flags\nimport org.jetbrains.kotlin.metadata.deserialization.NameResolver","completion":"import org.jetbrains.kotlin.metadata.deserialization.TypeTable\nimport org.jetbrains.kotlin.metadata.jvm.deserialization.JvmProtoBufUtil\nimport org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.protobuf.MessageLite<|endoftext|>"} {"prompt":"\/\/ KJS_WITH_FULL_RUNTIME\nclass C(val i: Int) {\n}\n\nclass M {\n operator fun C.component1() = i + 1\n operator fun C.component2() = i + 2\n\n fun doTest(l : ArrayList): String {\n var s = \"\"\n for ((a, b) in l) {","completion":"s += \"$a:$b;\"\n }\n return s\n }\n}\n\nfun box(): String {\n val l = ArrayList()\n l.add(C(0))\n l.add(C(1))\n l.add(C(2))\n val s = M().doTest(l)<|endoftext|>"} {"prompt":"}\n\n\/**\n * @suppress TODO: KT-58858 add documentation\n * Defines a subplugin option that should be excluded from Gradle input\/output checks\n *\/\nopen class InternalSubpluginOption(key: String, value: String) : SubpluginOption(key, value)\n\n\/**\n * @suppress TODO: KT-58858 add documentation\n * Keeps one or more compiler options for one of more compiler plugins.\n *\/","completion":"open class CompilerPluginConfig {\n @get:Internal\n protected val optionsByPluginId = mutableMapOf>()\n\n fun allOptions(): Map> = optionsByPluginId\n\n fun addPluginArgument(pluginId: String, option: SubpluginOption) {<|endoftext|>"} {"prompt":"fun generateMethodNode(method: IrFunction): SMAPAndMethodNode {\n if (!method.isInline && !method.isSuspendCapturingCrossinline()) {\n \/\/ Inline methods can be used multiple times by `IrSourceCompilerForInline`, suspend methods\n \/\/ are used twice (`f` and `f$$forInline`) if they capture crossinline lambdas, and everything","completion":"\/\/ else is only generated by `generateMethod` below so does not need caching.\n \/\/ TODO: inline lambdas are not marked `isInline`, and are generally used once, but may be needed\n \/\/ multiple times if declared in a `finally` block - should they be cached?\n return FunctionCodegen(method, this).generate()\n }<|endoftext|>"} {"prompt":"block: TestInterface.() -> Unit\n): R = TODO()\n\nclass Inv\n\ninterface TestInterface {\n fun emit(r: R)\n fun get(): R\n fun getInv(): Inv\n}\n\nfun id(x: U) = x\n\nfun test() {\n val ret = build {\n emit(\"1\")\n get()","completion":"getInv()\n \"\"\n }\n}<|endoftext|>"} {"prompt":"val test6 = \"\"\"\\n\"\"\"\n if (test6 != \"\\\\n\") return \"Fail 6: $test6\"\n\n val test7 = \"\"\"\\${'$'}foo\"\"\"\n if (test7 != \"\\\\\\$foo\") return \"Fail 7: $test7\"\n\n val test8 = \"\"\"$ foo\"\"\"\n if (test8 != \"$ foo\") return \"Fail 8: $test8\"","completion":"return \"OK\"\n}\n\n\nfun new() : String {\n return \"\"\"\n sdfasdf\n ${a}\n ds\"asdfas\n $b\n asgfaf\n \"\"\"\n\n}<|endoftext|>"} {"prompt":"} else {\n emptyList()\n }\n\n LazyObjCInterfaceImpl(\n name,\n attributes,\n generics = translateGenerics(ktClassOrObject),\n psi = ktClassOrObject,\n lazy = this\n )\n }\n }","completion":"private fun translateGenerics(ktClassOrObject: KtClassOrObject): List = if (configuration.objcGenerics) {\n ktClassOrObject.typeParametersWithOuter\n .map {\n ObjCGenericTypeRawDeclaration(\n nameTranslator.getTypeParameterName(it),\n ObjCVariance.fromKotlinVariance(it.variance)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REIFIED_TYPE_PARAMETER_IN_OVERRIDE\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REIFIED_TYPE_PARAMETER_NO_INLINE","completion":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REPEATED_ANNOTATION\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REPEATED_ANNOTATION_WARNING\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REPEATED_BOUND<|endoftext|>"} {"prompt":"expect(null) { ubyteArrayOf().minWithOrNull(reverseOrder()) }\n expect(1u) { ushortArrayOf(1u).minWithOrNull(reverseOrder()) }\n expect(3u) { uintArrayOf(2u, 3u).minWithOrNull(reverseOrder()) }","completion":"expect(3uL) { ulongArrayOf(3u, 2u).minWithOrNull(reverseOrder()) }\n }\n\n @Test\n fun maxWithOrNull() {\n expect(null) { arrayOf().maxWithOrNull(naturalOrder()) }\n expect(1u) { arrayOf(1u).maxWithOrNull(naturalOrder()) }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.descriptors.toIrBasedDescriptor\nimport org.jetbrains.kotlin.ir.expressions.IrBlockBody\nimport org.jetbrains.kotlin.ir.expressions.IrExpression\nimport org.jetbrains.kotlin.ir.expressions.IrExpressionBody","completion":"import org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl\nimport org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBodyImpl\nimport org.jetbrains.kotlin.ir.symbols.*\nimport org.jetbrains.kotlin.ir.types.IrType\nimport org.jetbrains.kotlin.name.Name<|endoftext|>"} {"prompt":"call\n )\n }\n val bindRef = JsNameRef(Namer.BIND_FUNCTION, jsBindTarget)\n JsInvocation(bindRef, jsReceiver)\n }\n\n add(intrinsics.jsContexfulRef) { call, context: JsGenerationContext ->\n val receiver = call.getValueArgument(0)!!","completion":"val jsReceiver = receiver.accept(IrElementToJsExpressionTransformer(), context)\n val target = call.getValueArgument(1) as IrRawFunctionReference\n val jsTarget = context.getNameForMemberFunction(target.symbol.owner as IrSimpleFunction)\n\n JsNameRef(jsTarget, jsReceiver)\n }<|endoftext|>"} {"prompt":"MEMBER_PROPERTY_WITHOUT_FIELD_OR_DELEGATE(\"member property without backing field or delegate\", false),\n TOP_LEVEL_PROPERTY(\"top level property\", false), \/\/ with and without field\/delegate\n TOP_LEVEL_PROPERTY_WITH_BACKING_FIELD(\"top level property with backing field\", false),","completion":"TOP_LEVEL_PROPERTY_WITH_DELEGATE(\"top level property with delegate\", false),\n TOP_LEVEL_PROPERTY_WITHOUT_FIELD_OR_DELEGATE(\"top level property without backing field or delegate\", false),\n\n BACKING_FIELD(\"backing field\"),\n\n INITIALIZER(\"initializer\", false),<|endoftext|>"} {"prompt":"public fun kotlin.UByteArray.dropLast(n: kotlin.Int): kotlin.collections.List\n\n@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes","completion":"public fun kotlin.UIntArray.dropLast(n: kotlin.Int): kotlin.collections.List\n\n@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes<|endoftext|>"} {"prompt":"val expected = \" Hello World! \"\n val v = UserValueClass(1)\n\n assertEquals(expected, \" $v \", \"testUserValueClass - template\")\n assertEquals(expected, toStringTemplateAny(v), \"testUserValueClass - toStringTemplateAny(v)\")\n assertEquals(expected, toStringTemplateGeneric(v), \"testUserValueClass - toStringTemplateGeneric(v)\")","completion":"assertEquals(expected, toStringTemplateInlineGeneric(v), \"testUserValueClass - toStringTemplateInlineGeneric(v)\")\n assertEquals(expected, toStringTemplateInlineReifiedGeneric(v), \"testUserValueClass - toStringTemplateInlineReifiedGeneric(v)\")<|endoftext|>"} {"prompt":"private inline val CirHasModality.kmModality: KmModality\n get() = when (modality) {\n Modality.FINAL -> KmModality.FINAL\n Modality.ABSTRACT -> KmModality.ABSTRACT\n Modality.OPEN -> KmModality.OPEN\n Modality.SEALED -> KmModality.SEALED\n }","completion":"private inline val CallableMemberDescriptor.Kind.kmMemberKind: MemberKind\n get() = when (this) {\n CallableMemberDescriptor.Kind.DECLARATION -> MemberKind.DECLARATION\n CallableMemberDescriptor.Kind.FAKE_OVERRIDE -> MemberKind.FAKE_OVERRIDE<|endoftext|>"} {"prompt":"return registryDir.walk()\n .map { Pair(it, portExtractor(it.name)) }\n .filter { (file, port) -> port != null && filter(file, port) }\n .mapNotNull { (file, port) ->","completion":"assert(port!! in COMPILE_DAEMON_PORTS_RANGE_START.."} {"prompt":"declaration is FirPropertyAccessor && containingPropertyModality != null -> containingPropertyModality\n declaration.isOverride -> Modality.OPEN\n else -> Modality.FINAL\n }\n }\n\n else -> Modality.FINAL\n }\n\n }\n}\n\nprivate val FirClass.modality: Modality?\n get() = when (this) {","completion":"is FirRegularClass -> status.modality\n is FirAnonymousObject -> Modality.FINAL\n else -> error(\"Unknown kind of class: ${this::class}\")\n }\n\nprivate fun FirDeclaration.hasOwnBodyOrAccessorBody(): Boolean {\n return when (this) {\n is FirSimpleFunction -> this.body != null<|endoftext|>"} {"prompt":"public fun kotlin.DoubleArray.dropLast(n: kotlin.Int): kotlin.collections.List\n\npublic fun kotlin.FloatArray.dropLast(n: kotlin.Int): kotlin.collections.List","completion":"public fun kotlin.IntArray.dropLast(n: kotlin.Int): kotlin.collections.List\n\npublic fun kotlin.LongArray.dropLast(n: kotlin.Int): kotlin.collections.List<|endoftext|>"} {"prompt":"$i$f$x6\\6\\54:int=0:int, y6\\6$iv:int=6:int","completion":"\/\/ library.kt:29 box: m:int=1:int, $i$f$foo:int=0:int, fooVar$iv:int=100:int, x4Var\\4$iv:int=4:int, $i$f$x4\\4\\8:int=0:int, y4\\4$iv:int=4:int<|endoftext|>"} {"prompt":"override val stringBuilder = irBuiltIns.findClass(Name.identifier(\"StringBuilder\"),\"kotlin\", \"text\")!!\n\n override val defaultConstructorMarker = internalClass(\"DefaultConstructorMarker\")\n\n private fun arrayToExtensionSymbolMap(name: String, filter: (IrFunctionSymbol) -> Boolean = { true }) =\n arrays.associateWith { classSymbol ->","completion":"irBuiltIns.findFunctions(Name.identifier(name), \"kotlin\", \"collections\")\n .singleOrNull { function ->\n lookup.isExtensionReceiverClass(function, classSymbol) && !lookup.isExpect(function) && filter(function)\n } ?: error(\"No function $name for $classSymbol\")\n }<|endoftext|>"} {"prompt":"Thus, by default, there is no need for the main code to receive the same dependency versions as tests.\n However, the other way around works in the opposite. See, for example, test [commonMainWithHigherVersion] *\/\n api(\"commonMain\", \"lib\", \"1.0\")\n api(\"commonTest\", \"lib\", \"2.0\")\n }\n }\n\n @Test","completion":"@Ignore(\"TODO: KT-66375\")\n fun leafSourceSetsDependsOnDifferentVersionsAndCommonCodeDoesNot() {\n assertSourceSetDependenciesResolution(\"leafSourceSetsDependsOnDifferentVersionsAndCommonCodeDoesNot.txt\") { project ->\n project.defaultTargets()\n\n \/** Even though commonMain has no dependency on lib, thus there is no connection between<|endoftext|>"} {"prompt":"public inline fun kotlin.DoubleArray.reduceRightIndexedOrNull(operation: (index: kotlin.Int, kotlin.Double, acc: kotlin.Double) -> kotlin.Double): kotlin.Double?\n\n@kotlin.SinceKotlin(version = \"1.4\")","completion":"public inline fun kotlin.FloatArray.reduceRightIndexedOrNull(operation: (index: kotlin.Int, kotlin.Float, acc: kotlin.Float) -> kotlin.Float): kotlin.Float?\n\n@kotlin.SinceKotlin(version = \"1.4\")<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: +ContextReceivers\n\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\nclass A\nclass B(val x: X)\n\ncontext(T)\nfun T.f(t: B) {}\n\nfun Int.main(a: A, b: B) {","completion":"a.f(b)\n}<|endoftext|>"} {"prompt":"if (element is KtTypeProjection && element.projectionKind == KtProjectionKind.STAR) {\n return markElement(element)\n }\n\n val modifierList = element.modifierList.sure { \"No modifier list, but modifier has been found by the analyzer\" }\n modifierList.getModifier(KtTokens.IN_KEYWORD)?.let { return markElement(it) }","completion":"modifierList.getModifier(KtTokens.OUT_KEYWORD)?.let { return markElement(it) }\n\n throw IllegalStateException(\"None of the modifiers is found: in, out\")\n }\n }\n }\n\n @JvmField<|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-63377\n\/\/ FIR_DUMP\n\nclass OuterClassWithObject {\n object OuterParam {\n fun foo() {}\n }\n\n val k = ::OuterParam","completion":"val l = OuterParam::foo\n\n fun foo() {\n val k = ::OuterParam<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: +ContextReceivers\n\ninterface A\ninterface B\n\ncontext(A, B)\nfun f(): Unit = TODO()\n\ncontext(A, B)\nfun f(): Unit = TODO()\n\nfun test(a: A, b: B) {","completion":"with(a) {\n with(b) {\n f()\n }\n }\n}<|endoftext|>"} {"prompt":"): IrExpression = with(returnValuePassing) {\n returnValue(cCallBuilder.build(targetFunctionName))\n}\n\ninternal sealed class ObjCCallReceiver {\n class Regular(val rawPtr: IrExpression) : ObjCCallReceiver()\n class Retained(val rawPtr: IrExpression) : ObjCCallReceiver()\n}\n\ninternal fun KotlinStubs.generateObjCCall(","completion":"builder: IrBuilderWithScope,\n method: IrSimpleFunction,\n isStret: Boolean,\n selector: String,\n directSymbolName: String?,\n call: IrFunctionAccessExpression,\n superQualifier: IrClassSymbol?,\n receiver: ObjCCallReceiver,\n arguments: List\n) = builder.irBlock {<|endoftext|>"} {"prompt":"val irClass = irClassSymbol.owner\n\n require(irClass.kind == ClassKind.ENUM_CLASS)\n\n fun IrClass.findStaticMethod(name: Name) = simpleFunctions().single {\n it.name == name && it.dispatchReceiverParameter == null\n }\n\n return when (intrinsicType) {\n IntrinsicType.ENUM_VALUES -> {","completion":"val function = irClass.findStaticMethod(Name.identifier(\"values\"))\n data.irCall(function)\n }\n IntrinsicType.ENUM_VALUE_OF -> {\n val function = irClass.findStaticMethod(Name.identifier(\"valueOf\"))\n data.irCall(function).apply {\n putValueArgument(0, expression.getValueArgument(0)!!)<|endoftext|>"} {"prompt":"binaryOperation(DOUBLE, INT, \"minus\", { a, b -> a.minus(b) }, emptyBinaryFun),\n binaryOperation(DOUBLE, LONG, \"minus\", { a, b -> a.minus(b) }, emptyBinaryFun),\n binaryOperation(DOUBLE, SHORT, \"minus\", { a, b -> a.minus(b) }, emptyBinaryFun),","completion":"binaryOperation(DOUBLE, BYTE, \"compareTo\", { a, b -> a.compareTo(b) }, emptyBinaryFun),\n binaryOperation(DOUBLE, DOUBLE, \"compareTo\", { a, b -> a.compareTo(b) }, emptyBinaryFun),<|endoftext|>"} {"prompt":"private fun loadClassBuilderInterceptors(): List {\n \/\/ Using Class.forName here because we're in the old JVM backend, and we need to load extensions declared in the JVM IR backend.","completion":"val adapted = Class.forName(\"org.jetbrains.kotlin.backend.jvm.extensions.ClassBuilderExtensionAdapter\")\n .getDeclaredMethod(\"getExtensions\", Project::class.java)\n .invoke(null, project) as List<|endoftext|>"} {"prompt":"if (comparator.compare(minValue, v) > 0) {\n minValue = v\n }\n }\n return minValue\n}\n\n\/**\n * Returns the smallest value according to the provided [comparator]\n * among all values produced by [selector] function applied to each element in the array or `null` if there are no elements.\n *\/\n@SinceKotlin(\"1.4\")","completion":"@OptIn(kotlin.experimental.ExperimentalTypeInference::class)\n@OverloadResolutionByLambdaReturnType\n@kotlin.internal.InlineOnly\npublic inline fun IntArray.minOfWithOrNull(comparator: Comparator, selector: (Int) -> R): R? {\n if (isEmpty()) return null<|endoftext|>"} {"prompt":"if (isEqualAnyRight(null, A(\"\"))) return \"Fail 13\"\n if (!isEqualAnyRight(A(\"\"), A(\"\"))) return \"Fail 14\"\n if (!isEqualSameNullable(null, null)) return \"Fail 15\"\n if (!isEqualSameNullable(A(\"\"), A(\"\"))) return \"Fail 16\"","completion":"if (isEqualSameNullable(null, A(\"\"))) return \"Fail 17\"\n if (isEqualSameNullable(A(\"\"), null)) return \"Fail 18\"\n if (isEqualSameNullable(A(\"\"), A(\"a\"))) return \"Fail 19\"\n if (!isEqualAnyNullableLeft(null, null)) return \"Fail 20\"<|endoftext|>"} {"prompt":"val isTailStatement = if (index == expression.statements.lastIndex) {\n \/\/ The last statement defines the result of the container expression, so it has the same kind.\n data.isTailExpression\n } else {\n \/\/ In a Unit-returning function, any statement directly followed by a `return` is a tail statement.\n isUnitReturn && expression.statements[index + 1].let {","completion":"it is IrReturn && it.returnTargetSymbol == irFunction.symbol && it.value.isUnitRead()\n }\n }\n irStatement.accept(this, VisitorState(isTailStatement, data.inOtherFunction))\n }\n }\n\n private fun IrExpression.isUnitRead(): Boolean =<|endoftext|>"} {"prompt":"if (header.packageName.isNotEmpty()) {\n visit(METADATA_PACKAGE_NAME_FIELD_NAME, header.packageName)\n }\n if (header.extraInt != 0) {\n visit(METADATA_EXTRA_INT_FIELD_NAME, header.extraInt)\n }\n visitEnd()\n}\n\nprivate fun KmClass.removePrivateDeclarations(","completion":"removeCopyAlongWithConstructor: Boolean,\n preserveDeclarationOrder: Boolean,\n classesToBeDeleted: Set,\n pruneClass: Boolean,\n treatInternalAsPrivate: Boolean,\n) {\n constructors.removeIf { pruneClass || it.visibility.shouldRemove(treatInternalAsPrivate) }\n (this as KmDeclarationContainer).removePrivateDeclarations(<|endoftext|>"} {"prompt":"options.processorsStatsReportFile?.let { dumpProcessorStats(wrappedProcessors, it, logger::info) }\n\n options.fileReadHistoryReportFile?.let {\n dumpFileReadHistory(fileManager, it, logger::info)\n }\n\n if (logger.isVerbose) {\n filer.displayState()\n }","completion":"if (log.nerrors > 0) {\n throw KaptBaseError(KaptBaseError.Kind.ERROR_RAISED)\n }\n } finally {\n processingEnvironment.close()\n this@doAnnotationProcessing.close()\n }\n}\n\nprivate fun showProcessorStats(wrappedProcessors: List, logger: (String) -> Unit) {<|endoftext|>"} {"prompt":"stubGenerator.unboundSymbolGeneration = true\n\n object : IrDeserializer {\n override fun getDeclaration(symbol: IrSymbol) = functionIrClassFactory.getDeclaration(symbol)\n ?: stubGenerator.getDeclaration(symbol)","completion":"override fun resolveBySignatureInModule(signature: IdSignature, kind: IrDeserializer.TopLevelSymbolKind, moduleName: Name): IrSymbol {\n error(\"Should not be called\")\n }\n\n override fun postProcess(inOrAfterLinkageStep: Boolean) = Unit\n }\n } else {<|endoftext|>"} {"prompt":"* Sorts the array in-place.\n * \n * @sample samples.collections.Arrays.Sorting.sortArray\n *\/\npublic actual fun FloatArray.sort(): Unit {\n nativeSort()\n}\n\n\/**\n * Sorts the array in-place.\n * \n * @sample samples.collections.Arrays.Sorting.sortArray\n *\/\npublic actual fun CharArray.sort(): Unit {","completion":"nativeSort(::primitiveCompareTo)\n}\n\n\/**\n * Sorts the array in-place according to the natural order of its elements.\n * \n * The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.\n * \n * @sample samples.collections.Arrays.Sorting.sortArrayOfComparable\n *\/<|endoftext|>"} {"prompt":"val nullableDoubleIeee754Equals = getInternalFunction(\"nullableDoubleIeee754Equals\")\n\n val unsafeGetScratchRawMemory = getInternalFunction(\"unsafeGetScratchRawMemory\")\n val returnArgumentIfItIsKotlinAny = getInternalFunction(\"returnArgumentIfItIsKotlinAny\")\n\n val startCoroutineUninterceptedOrReturnIntrinsics =","completion":"(0..2).map { getInternalFunction(\"startCoroutineUninterceptedOrReturnIntrinsic$it\") }\n\n \/\/ KProperty implementations\n val kLocalDelegatedPropertyImpl: IrClassSymbol = this.getInternalClass(\"KLocalDelegatedPropertyImpl\")<|endoftext|>"} {"prompt":"assertNull(inferCommonizerTarget(commonMain), \"Expected commonMain to have no commonizer target\")\n assertNull(inferCommonizerTarget(commonTest), \"Expected commonTest to have no commonizer target\")\n }\n\n @Test\n fun `nativeMain with non hmpp workaround`() {\n val linux1 = kotlin.linuxX64(\"linux1\")","completion":"val linux2 = kotlin.linuxArm64(\"linux2\")\n\n val nativeMain = kotlin.sourceSets.create(\"nativeMain\")\n\n listOf(linux1, linux2).forEach { target ->\n @Suppress(\"DEPRECATION\")\n target.compilations.getByName(\"main\").source(nativeMain)\n }\n\n assertEquals(<|endoftext|>"} {"prompt":"0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, \n 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL,","completion":"0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, \n 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL,<|endoftext|>"} {"prompt":"tree: FlyweightCapableTreeStructure\n ): List {\n return markElement(tree.typeParametersList(node) ?: node, startOffset, endOffset, tree, node)\n }\n }\n\n val NAME_IDENTIFIER: LightTreePositioningStrategy = object : LightTreePositioningStrategy() {\n override fun mark(","completion":"node: LighterASTNode,\n startOffset: Int,\n endOffset: Int,\n tree: FlyweightCapableTreeStructure\n ): List {\n val nameIdentifier = tree.nameIdentifier(node)\n if (nameIdentifier != null) {\n return markElement(nameIdentifier, startOffset, endOffset, tree, node)\n }<|endoftext|>"} {"prompt":"* This includes replacing all `if` expressions with corresponding `when` expressions,\n * converting `for` loops into blocks with an `iterator` variable declaration and a `while` loop, and similar.\n *\/\n RAW_FIR(noProcessor = true),\n\n \/**\n * The compiler resolves all imports in the file.\n *","completion":"* Effectively, this means that the compiler splits all imports on the longest existing package part and the related class qualifier.\n * More specifically, if an import is `import aaa.bbb.ccc.D`, the compiler tries to resolve the package `aaa.bbb.ccc` first.<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ FILE: Component.java\n\npublic abstract class Component {\n public void setPreferredSize(Object preferredSize) {}\n public Object getPreferredSize() { return new Object(); }\n}\n\n\/\/ FILE: ProjectMain.kt\n\nclass ComboBox: Component() {\n override fun getPreferredSize(): Any? = \"OK\"\n}\n\nfun box(): String {","completion":"val comboBox = ComboBox()\n comboBox.preferredSize = Any()\n return comboBox.preferredSize as String\n}<|endoftext|>"} {"prompt":"\/\/ Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit!\n\/\/ WITH_STDLIB\nimport kotlin.test.*\n\nfun box(): String {\n val intList = mutableListOf()\n for (i in 7 downTo 1 step 7) {\n intList += i\n }\n assertEquals(listOf(7), intList)","completion":"val longList = mutableListOf()\n for (i in 7L downTo 1L step 7L) {\n longList += i\n }\n assertEquals(listOf(7L), longList)\n\n val charList = mutableListOf()\n for (i in 'g' downTo 'a' step 7) {\n charList += i\n }<|endoftext|>"} {"prompt":"override fun transformTypeParameters(transformer: FirTransformer, data: D): FirField {\n typeParameters.transformInplace(transformer, data)\n return this\n }\n\n override fun replaceDelegate(newDelegate: FirExpression?) {}\n override val delegate: FirExpression?\n get() = null","completion":"override var containerSource: DeserializedContainerSource? = null\n\n override fun transformInitializer(transformer: FirTransformer, data: D): FirField {\n return this\n }\n\n override fun replaceReceiverParameter(newReceiverParameter: FirReceiverParameter?) {}\n override fun replaceDeprecationsProvider(newDeprecationsProvider: DeprecationsProvider) {}<|endoftext|>"} {"prompt":"* The overall effect is exactly as if the [value] were converted to a string by the `value.toString()` method,\n * and then that string was inserted into this string builder at the specified [index].\n *\n * @throws IndexOutOfBoundsException if [index] is less than zero or greater than the length of this string builder.\n *\/\n @SinceKotlin(\"1.9\")","completion":"public fun insert(index: Int, value: Int): StringBuilder\n\n \/**\n * Inserts the string representation of the specified long [value] into this string builder at the specified [index] and returns this instance.\n *\n * The overall effect is exactly as if the [value] were converted to a string by the `value.toString()` method,<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: +WarningOnMainUnusedParameter\n\/\/ !DIAGNOSTICS: +UNUSED_PARAMETER\n\n\/\/ FILE: a.kt\nfun main(args: Array) {}\n\n\/\/ FILE: b.kt\nfun main(args: Array) {}\n\n\/\/ FILE: c.kt","completion":"fun foo() { main(arrayOf(\"a\", \"b\")) }<|endoftext|>"} {"prompt":"return PsiClassImplUtil.getAllWithSubstitutorsByMap(this, PsiClassImplUtil.MemberType.METHOD)\n }\n\n override fun getRBrace(): PsiElement? = null\n\n override fun getLBrace(): PsiElement? = null","completion":"override fun getInitializers(): Array = PsiClassInitializer.EMPTY_ARRAY\n\n override fun getElementIcon(flags: Int): Icon? = throw UnsupportedOperationException(\"This should be done by KotlinIconProvider\")<|endoftext|>"} {"prompt":"private val enumWhenTracker: EnumWhenTracker?\n) : ControlFlowInformationProvider {\n private val pseudocodeVariablesData by lazy {\n PseudocodeVariablesData(pseudocode, trace.bindingContext)\n }\n\n constructor(\n declaration: KtElement,\n trace: BindingTrace,\n languageVersionSettings: LanguageVersionSettings,","completion":"diagnosticSuppressor: PlatformDiagnosticSuppressor,\n enumWhenTracker: EnumWhenTracker? = null\n ) : this(\n declaration,\n trace,\n ControlFlowProcessor(trace, languageVersionSettings).generatePseudocode(declaration),\n languageVersionSettings,\n diagnosticSuppressor,\n enumWhenTracker\n )<|endoftext|>"} {"prompt":"protected val irBuiltIns: IrBuiltIns,\n private val replaceTypesInsideInlinedFunctionBlock: Boolean = false\n) : IrElementTransformerVoid() {\n\n protected open fun IrExpression.useAs(type: IrType): IrExpression = this\n\n protected open fun IrExpression.useAsStatement(): IrExpression = this","completion":"protected open fun IrExpression.useInTypeOperator(operator: IrTypeOperator, typeOperand: IrType): IrExpression =\n this\n\n protected open fun IrExpression.useAsValue(value: IrValueDeclaration): IrExpression = this.useAs(value.type)\n\n protected open fun IrExpression.useAsArgument(parameter: IrValueParameter): IrExpression =<|endoftext|>"} {"prompt":"bridgeInvokeFunction.initialize(\n null,\n lambdaCodegen.descriptor.thisAsReceiverParameter,\n emptyList(),\n emptyList(),\n emptyList(),\n lambdaCodegen.descriptor.builtIns.anyType,\n Modality.FINAL,\n DescriptorVisibilities.PUBLIC\n )","completion":"lambdaCodegen.generateMethod(bridgeInvokeFunction) { _, _ ->\n load(0, lambdaType)\n invokevirtual(lambdaType.internalName, \"invoke\", \"()L${resultSimpleType.toClassDescriptor.classId!!.internalName};\", false)\n areturn(kSerializerType)\n }<|endoftext|>"} {"prompt":"if (f != null) f.funNullableAny()\n if (f != null) f","completion":"if (x != null) x.equals(null)<|endoftext|>"} {"prompt":"val insnsToRemove = ArrayList()\n\n val insns = methodNode.instructions.toArray()\n for (i in insns.indices) {\n val insn = insns[i]\n if (shouldRemove(insn, i, liveness)) {\n insnsToRemove.add(insn)\n }\n }","completion":"methodNode.remove(insnsToRemove)\n\n \/\/ Remove empty try-catch blocks to make sure we don't break data flow analysis invariants by dead code elimination.\n methodNode.removeEmptyCatchBlocks()\n\n methodNode.removeUnusedLocalVariables()\n }\n\n private fun shouldRemove(insn: AbstractInsnNode, index: Int, liveness: BooleanArray): Boolean {<|endoftext|>"} {"prompt":"h = Holder()\n test0 = test0(h, false, throwExternalFinEx1 = true, res = \"OK\")\n if (test0 != \"EXCEPTION_IN_EXTERNAL_FINALLY\" || h.value != \"OK_NON_LOCAL, OK_FINALLY1, OK_FINALLY2\") return \"test0_2: ${test0}, holder: ${h.value}\"","completion":"h = Holder()\n test0 = test0(h, false, throwExternalFinEx2 = true, res = \"OK\")\n if (test0 != \"EXCEPTION222_IN_EXTERNAL_FINALLY\" || h.value != \"OK_NON_LOCAL, OK_FINALLY1, OK_FINALLY2\") return \"test0_4: ${test0}, holder: ${h.value}\"<|endoftext|>"} {"prompt":"override fun toString() = \"$value.toLong()\"\n}\n\nclass NullValue : ConstantValue(null) {\n override fun getType(module: ModuleDescriptor) = module.builtIns.nullableNothingType","completion":"override fun accept(visitor: AnnotationArgumentVisitor, data: D) = visitor.visitNullValue(this, data)\n}\n\nclass ShortValue(value: Short) : IntegerValueConstant(value) {\n override fun getType(module: ModuleDescriptor) = module.builtIns.shortType<|endoftext|>"} {"prompt":"return javaSupplier != null && type.isSubtypeOfClass(javaSupplier) &&\n type is IrSimpleType && (type.arguments.size == 1 && isStringSupertype(type.arguments.first()))\n }\n\n private fun isStringSupertype(argument: IrTypeArgument): Boolean =\n argument is IrTypeProjection && isStringSupertype(argument.type)","completion":"private fun isStringSupertype(type: IrType): Boolean =\n context.irBuiltIns.stringType.isSubtypeOf(type, irTypeSystemContext)\n\n private fun IrType?.isAssignableTo(type: IrType?): Boolean {\n if (this != null && type != null) {\n if (isSubtypeOf(type, irTypeSystemContext)) return true<|endoftext|>"} {"prompt":"package testPackNew\n\nclass A() {\n fun foo(i: Int) {}\n infix fun A.foo(i: Int) {}\n\n fun bar(a: A) {\n \/\/todo: add info if function is infix one\n a foo 1","completion":"}\n\n fun buz(a: A){\n fun foo(i: Int) {}\n \/\/todo: add info if function is infix one\n a foo 1\n }\n\n fun boo(a: A){<|endoftext|>"} {"prompt":"\/\/ library.kt:45 baz: param:int=6:int, b:int=2:int, inlineCallParam1\\20:int=1:int, inlineCallParam2\\20:int=2:int, $i$f$inlineCall\\20\\17:int=0:int, e\\20:int=5:int, baz1Param\\21:int=1:int,","completion":"$i$f$baz1\\21\\109:int=0:int, baz1Var\\21:int=3:int, baz2Param\\22:int=1:int, $i$f$baz2\\22\\111:int=0:int, baz2Var\\22:int=3:int<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\nimport kotlin.jvm.Synchronized\n\ninterface My {\n @Synchronized fun foo()\n\n @Synchronized fun bar() = 1","completion":"@Synchronized fun baz(): String {\n return \"abc\"\n }\n\n var v: String\n @Synchronized get() = \"\"<|endoftext|>"} {"prompt":"val reportDir = workDir.resolve(\"buildReport\")\n\n @Suppress(\"UNREACHABLE_CODE\")\n fun getReportFile(): File {\n return Files.list(reportDir.toPath()).let {\n val files = it.toArray()\n val singleFile = (files.singleOrNull() as Path?).also {","completion":"it ?: fail(\"The directory must contain a single file, but got: $files\")\n }\n\n return singleFile?.toFile()!!\n }\n }\n\n fun assertFileContains(\n file: File,\n vararg expectedText: String,\n ) {\n val text = file.readText()<|endoftext|>"} {"prompt":"x = 1\n }\n\n\n fun foo() {\n val a : Int\n doSmth(a)\n }\n }\n}\n\nfun foo() {\n val a = object {\n val x : Int","completion":"val y : Int\n val z : Int\n init {\n x = 1\n z = 3\n }\n fun foo() {\n y = 10\n z = 13\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.descriptorUtil.classId\n\ninternal object ActualTypealiasToSpecialAnnotationChecker : DeclarationChecker {\n override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {\n if (!context.languageVersionSettings.supportsFeature(LanguageFeature.MultiplatformRestrictions)) return","completion":"if (declaration !is KtTypeAlias || descriptor !is TypeAliasDescriptor || !descriptor.isActual) {\n return\n }\n val classDescriptor = descriptor.classDescriptor ?: return\n if (classDescriptor.kind != ClassKind.ANNOTATION_CLASS) {\n return\n }\n val classId = classDescriptor.classId ?: return<|endoftext|>"} {"prompt":"COMPLETED SUCCESS \/\/ iosTest\/my.company.product.MyTest\/my.company.product.MyTest.MyTestNested\/my.company.product.MyTest.MyTestNested.myTest4","completion":"STARTED TEST displayName: myTest5, classDisplayName: MyTestNested, className: my.company.product.MyTest.MyTestNested, name: myTest5 \/\/ iosTest\/my.company.product.MyTest\/my.company.product.MyTest.MyTestNested\/my.company.product.MyTest.MyTestNested.myTest5<|endoftext|>"} {"prompt":"getContributedFunctionsAndIntercept(\n name,\n location,\n contextReceiver,\n extensionReceiver,\n scopeTower\n ) + it.getInnerConstructors(\n name,\n location\n ) + syntheticScopes.collectSyntheticMemberFunctions(listOfNotNull(it), name, location)\n }\n }","completion":"return contextReceiversGroup.map(collectMembers).flatten()\n }\n\n override fun recordLookup(name: Name) {\n for (type in contextReceiversGroup.map { it.allOriginalTypes }.flatten()) {\n type.memberScope.recordLookup(name, location)\n }\n }\n}<|endoftext|>"} {"prompt":"val parameters = mutableMapOf(\"target\" to \"Linux\", \"type\" to \"dev\", \"build\" to \"\", \"branch\" to \"master\")\n parametersPart.forEach {\n val parsedParameter = it.split(\"=\", limit = 2)\n if (parsedParameter.size == 2) {\n val (key, value) = parsedParameter\n parameters[key] = value\n }","completion":"}\n\n buildsNumberToShow = parameters[\"count\"]?.toInt() ?: buildsNumberToShow\n beforeDate = parameters[\"before\"]?.let { decodeURIComponent(it) }\n afterDate = parameters[\"after\"]?.let { decodeURIComponent(it) }\n\n \/\/ Get branches.\n val branchesUrl = \"$serverUrl\/branches\"<|endoftext|>"} {"prompt":"@CompileTimeCalculation\nclass Person(val name: String, val surname: String) {\n var age: Int\n val wholeName: String\n\n init {\n wholeName = name + \" \" + surname\n }\n\n init {\n age = -1\n }\n\n constructor(name: String) : this(name, \"\") {}","completion":"constructor() : this(\"\") {}\n\n constructor(name: String, age: Int): this(name) {\n this.age = age\n }\n}\n\nconst val a1 = Person(\"Ivan\", \"Ivanov\").age<|endoftext|>"} {"prompt":"interface KotlinCompilationTask : Task {\n\n \/**\n * Represents the compiler options used by a Kotlin compilation process.\n *\n * This can be used to get the values of currently configured options or modify them.\n *\/\n @get:Nested\n val compilerOptions: CO\n\n \/**\n * Configures the [compilerOptions] with the provided configuration.","completion":"*\/\n fun compilerOptions(configure: CO.() -> Unit) {\n configure(compilerOptions)\n }\n\n \/**\n * Configures the [compilerOptions] with the provided configuration.\n *\/\n fun compilerOptions(configure: Action) {\n configure.execute(compilerOptions)\n }\n}<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) open fun testDifferencesInReturnTypePresenceReverse() {}","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) open fun testDifferentReturnTypes(): UserKlassA = UserKlassA()\n open fun testDifferentReturnTypes(): UserKlassB = UserKlassB()<|endoftext|>"} {"prompt":"if (source.getChild(KtNodeTypes.TYPE_REFERENCE, depth = 1) != null) return false\n \/\/ Do not check if the containing file is not a physical file.\n val containingFile = context.containingDeclarations.first()\n if (containingFile.source?.elementType in codeFragmentTypes) return false\n\n return when (source.elementType) {","completion":"\/\/ Only require return type if the function is defined via `=`. If it has a block body or is abstract, we don't require return\n \/\/ type because not declaring means it returns `Unit`.\n KtNodeTypes.FUN -> source.getChild(KtTokens.EQ, depth = 1) != null\n KtNodeTypes.PROPERTY -> true\n else -> false\n }\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.descriptors.Modality\nimport org.jetbrains.kotlin.fir.FirImplementationDetail\nimport org.jetbrains.kotlin.fir.FirModuleData\nimport org.jetbrains.kotlin.fir.MutableOrEmptyList\nimport org.jetbrains.kotlin.fir.builder.toMutableOrEmpty","completion":"import org.jetbrains.kotlin.fir.contracts.FirContractDescription\nimport org.jetbrains.kotlin.fir.declarations.*\nimport org.jetbrains.kotlin.fir.expressions.FirAnnotation\nimport org.jetbrains.kotlin.fir.expressions.FirBlock<|endoftext|>"} {"prompt":"import org.junit.jupiter.api.Tag\nimport org.junit.jupiter.api.Test\nimport java.io.File\n\n@Tag(\"infrastructure\")\n@TestMetadata(TEST_SUITE_PATH)\n@TestDataPath(\"\\$PROJECT_ROOT\")\nclass InfrastructureDumpedTestListingTest : AbstractNativeSimpleTest() {\n @Test","completion":"@TestMetadata(TEST_CASE_NAME)\n fun testListingCompiledFromSources() {\n doTest(TEST_CASE_PATH, fromSources = true)\n }\n\n @Test\n @TestMetadata(TEST_CASE_NAME)\n fun testListingCompiledFromIncludedLibrary() {\n doTest(TEST_CASE_PATH, fromSources = false)<|endoftext|>"} {"prompt":"\/\/ Copyright (C) 2020-2023 Brian Norman\n\/\/\n\/\/ Licensed under the Apache License, Version 2.0 (the \"License\");\n\/\/ you may not use this file except in compliance with the License.\n\/\/ You may obtain a copy of the License at\n\/\/\n\/\/ http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n\/\/\n\/\/ Unless required by applicable law or agreed to in writing, software","completion":"\/\/ distributed under the License is distributed on an \"AS IS\" BASIS,\n\/\/ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\/\/ See the License for the specific language governing permissions and\n\/\/ limitations under the License.\n\npackage org.jetbrains.kotlin.powerassert.diagram\n\nimport org.jetbrains.kotlin.ir.builders.*<|endoftext|>"} {"prompt":"name,\n NoLookupLocation.FROM_BACKEND\n ).single()\n\n Predefined.anyMethodSelectors.forEach { (name, selector) ->\n methodSelectors.forceAssign(any.method(name), selector)\n }\n\n Predefined.anyMethodSwiftNames.forEach { (name, swiftName) ->","completion":"methodSwiftNames.forceAssign(any.method(name), swiftName)\n }\n }\n\n private object Predefined {\n val anyMethodSelectors = mapOf(\n \"hashCode\" to \"hash\",\n \"toString\" to \"description\",\n \"equals\" to \"isEqual:\"\n ).mapKeys { Name.identifier(it.key) }<|endoftext|>"} {"prompt":"assertEquals(arr[0], -51)\n assertEquals(arr[1], -19)\n arr[0] = 51\n arr[1] = 19\n assertEquals(arr[0], 51)\n assertEquals(arr[1], 19)\n\n assertEquals(true, b)\n b = false\n assertEquals(false, b)","completion":"\/\/ Check that subtyping via Nothing-returning functions does not break compiler.\n assertFailsWith {\n ui = TODO()\n t.i = TODO()\n next = TODO()\n e = TODO()\n nonStrict = TODO()\n b = TODO()\n }\n }\n memScoped {<|endoftext|>"} {"prompt":"val baseC: BaseBuildee\n get() = this@build\n }\n }\n\n \/\/ initialization of a mutable property's backing field\n build {\n class LocalWrapper {\n var baseD: BaseBuildee = this@build\n set(value) {\n field = BaseBuildee()\n }\n }\n }","completion":"\/\/ body of a setter of a mutable property\n build {\n class LocalWrapper {\n var baseE: BaseBuildee = BaseBuildee()\n set(value) {\n field = this@build\n }\n }\n }\n\n \/\/ assignment via a mutable property's setter\n build {\n baseF = this\n }<|endoftext|>"} {"prompt":"public fun LongArray.randomOrNull(random: Random): Long? {\n if (isEmpty())\n return null\n return get(random.nextInt(size))\n}\n\n\/**\n * Returns a random element from this array using the specified source of randomness, or `null` if this array is empty.\n *\/\n@SinceKotlin(\"1.4\")","completion":"public fun FloatArray.randomOrNull(random: Random): Float? {\n if (isEmpty())\n return null\n return get(random.nextInt(size))\n}\n\n\/**\n * Returns a random element from this array using the specified source of randomness, or `null` if this array is empty.\n *\/\n@SinceKotlin(\"1.4\")<|endoftext|>"} {"prompt":"\/\/ MODULE: context\n\n\/\/ FILE: context.kt\nfun test() {\n var x = 0\n\n fun call() {\n x = 1\n }\n\n call()\n}\n\n\n\/\/ MODULE: main\n\/\/ MODULE_KIND: CodeFragment\n\/\/ CONTEXT_MODULE: context\n\n\/\/ FILE: fragment.kt\n\/\/ CODE_FRAGMENT_KIND: EXPRESSION","completion":"call()<|endoftext|>"} {"prompt":"val allReverseAdapters = createReverseAdapters(types)\n\n return types.map {\n val reverseAdapters = allReverseAdapters.getValue(it).adapters\n when (it) {\n objCClassForAny -> {\n createTypeAdapter(it, superClass = null, reverseAdapters)\n }\n\n is ObjCClassForKotlinClass -> {","completion":"val superClass = it.superClassNotAny ?: objCClassForAny\n\n dataGenerator.emitEmptyClass(it.binaryName, superClass.binaryName)\n \/\/ Note: it is generated only to be visible for linker.\n \/\/ Methods will be added at runtime.\n\n createTypeAdapter(it, superClass, reverseAdapters)\n }<|endoftext|>"} {"prompt":"add(FirErrors.INCORRECT_CHARACTER_LITERAL) { firDiagnostic ->\n IncorrectCharacterLiteralImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n add(FirErrors.EMPTY_CHARACTER_LITERAL) { firDiagnostic ->\n EmptyCharacterLiteralImpl(","completion":"firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n add(FirErrors.TOO_MANY_CHARACTERS_IN_CHARACTER_LITERAL) { firDiagnostic ->\n TooManyCharactersInCharacterLiteralImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }<|endoftext|>"} {"prompt":"\/\/ LANGUAGE: +BreakContinueInInlineLambdas\n\/\/ TARGET_BACKEND: JVM_IR\n\/\/ TARGET_BACKEND: JS_IR\n\/\/ TARGET_BACKEND: JS_IR_ES6\n\/\/ TARGET_BACKEND: NATIVE\n\/\/ TARGET_BACKEND: WASM\n\ninline fun foo(block: () -> Unit) { block() }\n\nfun box(): String {","completion":"while (true) {\n foo { break }\n return \"FAIL\"\n }\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"@JvmField\nval JVM_THROWS_ANNOTATION_FQ_NAME = FqName(\"kotlin.jvm.Throws\")\n\nval KOTLIN_THROWS_ANNOTATION_FQ_NAME = FqName(\"kotlin.Throws\")","completion":"val KOTLIN_NATIVE_THROWS_ANNOTATION_FQ_NAME = FqName(\"kotlin.native.Throws\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.test.framework\n\nimport com.intellij.openapi.Disposable\nimport com.intellij.openapi.util.Disposer\nimport org.junit.jupiter.api.AfterEach\nimport org.junit.jupiter.api.BeforeEach\nimport org.junit.jupiter.api.TestInfo","completion":"abstract class TestWithDisposable {\n private var _disposable: Disposable? = Disposer.newDisposable(\"Disposable for Analysis Api tests\")\n protected val disposable: Disposable get() = _disposable!!\n\n @BeforeEach\n fun initDisposable(testInfo: TestInfo) {<|endoftext|>"} {"prompt":"a?.b += c","completion":"a?.b.plusAssign(c)\n\n val x = {<|endoftext|>"} {"prompt":"get() = \"Interface with Getter\"\n\n var interfaceVarOpen: String\n}\n\n@JsExport\nopen class Owner {\n open val classOpenReadonly: String = \"Class Readonly Open\"\n open var classOpenVar: String = \"Class Var Open\"\n open lateinit var classOpenLateinitVar: String;\n\n lateinit var classLateinitVar: String;","completion":"val classFinalReadonly: String = \"Class Readonly Final\"\n var classFinalVar: String = \"Class Default\"\n\n val classGetterOnly: String\n get() = \"Class with Final Getter\"\n\n open val classOpenGetterOnly: String\n get() = \"Class with Open Getter\"\n\n var classSetterOnly: String = \"Class setter only\"<|endoftext|>"} {"prompt":"enum class EnumerationBCE constructor(arg1: UserKlass = UserKlass(), arg2: UserKlass = UserKlass()) {\n ENTRY1 {\n override fun abstractFunc() {\n TODO(\"Not yet implemented\")\n }\n },\n ENTRY2() {\n override fun abstractFunc() {\n TODO(\"Not yet implemented\")\n }\n };","completion":"abstract fun abstractFunc()\n }\n\n enum class EnumerationBDA constructor(arg1: UserKlass = UserKlass(), arg2: UserKlass = UserKlass()) {\n ENTRY;\n\n constructor(arg: UserKlass = UserKlass()) : this(arg, UserKlass())<|endoftext|>"} {"prompt":"override fun acceptChildren(visitor: FirVisitor, data: D) {\n annotations.forEach { it.accept(visitor, data) }\n calleeReference.accept(visitor, data)\n }\n\n override fun transformChildren(transformer: FirTransformer, data: D): FirInaccessibleReceiverExpressionImpl {","completion":"transformAnnotations(transformer, data)\n transformCalleeReference(transformer, data)\n return this\n }\n\n override fun transformAnnotations(transformer: FirTransformer, data: D): FirInaccessibleReceiverExpressionImpl {\n annotations.transformInplace(transformer, data)\n return this\n }<|endoftext|>"} {"prompt":"private fun JCDiagnostic.Factory.errorJava9Aware(\n source: DiagnosticSource?,\n pos: JCDiagnostic.DiagnosticPosition?,\n key: String,\n vararg args: String\n): JCDiagnostic {\n return if (isJava9OrLater()) {\n val errorMethod = this::class.java.getDeclaredMethod(\n \"error\",","completion":"JCDiagnostic.DiagnosticFlag::class.java,\n DiagnosticSource::class.java,\n JCDiagnostic.DiagnosticPosition::class.java,\n String::class.java,\n Array::class.java\n )<|endoftext|>"} {"prompt":"analysisResult: AnalysisResult, sourceFiles: List, kotlinCompilerConfiguration: CompilerConfiguration,\n messageCollector: MessageCollector\n): GenerationState {\n val diagnosticsReporter = DiagnosticReporterFactory.createReporter()\n return GenerationState.Builder(\n sourceFiles.first().project,\n ClassBuilderFactories.BINARIES,\n analysisResult.moduleDescriptor,","completion":"analysisResult.bindingContext,\n kotlinCompilerConfiguration\n ).diagnosticReporter(\n diagnosticsReporter\n ).build().also {\n KotlinCodegenFacade.compileCorrectFiles(\n sourceFiles,\n it,\n if (kotlinCompilerConfiguration.getBoolean(JVMConfigurationKeys.IR))\n JvmIrCodegenFactory(<|endoftext|>"} {"prompt":"is KtAnnotatedExpression -> parent.annotationEntries\n is KtLabeledExpression -> parent.getAnnotationEntries()\n else -> emptyList()\n }\n}\n\nfun KtAnnotationsContainer.collectAnnotationEntriesFromStubOrPsi(): List {\n return when (this) {","completion":"is StubBasedPsiElementBase<*> -> stub?.collectAnnotationEntriesFromStubElement() ?: collectAnnotationEntriesFromPsi()\n else -> collectAnnotationEntriesFromPsi()\n }\n}\n\nprivate fun StubElement<*>.collectAnnotationEntriesFromStubElement(): List {\n return childrenStubs.flatMap { child -><|endoftext|>"} {"prompt":"KtSymbolKind.CLASS_MEMBER, KtSymbolKind.ACCESSOR,\n -> SirCallableKind.INSTANCE_METHOD\n KtSymbolKind.LOCAL,\n KtSymbolKind.SAM_CONSTRUCTOR,\n -> TODO(\"encountered callable kind($symbolKind) that is not translatable currently. Fix this crash during KT-65980.\")\n }","completion":"internal fun KtSymbol.documentation(): String? = this.psiSafe()?.docComment?.text<|endoftext|>"} {"prompt":"However in our class hierarchy JsArrayLiteral is subclass of JsLiteral,\nwhich makes very easy to implement incorrect aliasing logic.\n *\/\n\npackage foo\n\n\/\/ CHECK_NOT_CALLED: moveTo\n\ninline fun Array.push(element: Int): Unit = asDynamic().push(element)","completion":"inline fun Array.splice(index: Int, howMany: Int): Unit = asDynamic().splice(index, howMany)\n\ndata class PairArray(val fst: Array, val snd: Array)\n\ninline fun moveTo(source: Array, sink: Array): PairArray {\n val size = source.size<|endoftext|>"} {"prompt":"context,\n reporter,\n when (context.session.languageVersionSettings.supportsFeature(LanguageFeature.ProhibitUseSiteGetTargetAnnotations)) {\n true -> FirErrors.INAPPLICABLE_TARGET_ON_PROPERTY\n false -> FirErrors.INAPPLICABLE_TARGET_ON_PROPERTY_WARNING\n }\n )\n }\n FIELD -> {","completion":"if (annotated is FirBackingField) {\n val propertySymbol = annotated.propertySymbol\n if (propertySymbol.delegateFieldSymbol != null && !propertySymbol.hasBackingField) {\n reporter.reportOn(annotation.source, FirErrors.INAPPLICABLE_TARGET_PROPERTY_HAS_NO_BACKING_FIELD, context)\n }\n }<|endoftext|>"} {"prompt":"((T) -> kotlin.CharSequence)? = ...): A","completion":"public fun kotlin.Array.joinToString(separator: kotlin.CharSequence = ..., prefix: kotlin.CharSequence = ..., postfix: kotlin.CharSequence = ..., limit: kotlin.Int = ..., truncated: kotlin.CharSequence = ..., transform: ((T) -> kotlin.CharSequence)? = ...):<|endoftext|>"} {"prompt":"test(::test1) {\n check(a.contentEquals(intArrayOf(1, 2, 11, 0)), \"Fail 1: ${a.joinToString()}\")\n check(b.contentEquals(arrayOf(\"hello\", \"helloc\", \"hello, Kotlin\", \"cc\")), \"Fail 2: ${b.joinToString()}\")\n }\n\n return \"OK\"","completion":"}<|endoftext|>"} {"prompt":"return Platform.values().firstOrNull { it.version == version }\n ?: error(\"Can't find platform $version\")\n }\n }\n}\n\nenum class Ide(val platform: Platform) : CompatibilityPredicate {\n IJ213(Platform.P213);\n\n val kind = Kind.values().first { it.shortName == name.take(2) }","completion":"val version = name.dropWhile { !it.isDigit() }.toInt()\n\n val displayVersion: String = when (kind) {\n Kind.IntelliJ -> \"IJ${platform.displayVersion}\"\n Kind.AndroidStudio -> \"Studio${name.substringAfter(\"AS\").toCharArray().joinToString(separator = \".\")}\"\n }<|endoftext|>"} {"prompt":"if (upperBound !is ConeClassLikeType) return false\n\n if (fir.name.asString() in ERASED_COLLECTION_PARAMETER_NAMES) {\n require(upperBound.lookupTag.classId == StandardClassIds.Collection) {\n \"Unexpected type: ${upperBound.lookupTag.classId}\"\n }","completion":"return upperBound.typeArguments.singleOrNull() is ConeStarProjection\n }\n\n return upperBound.classId == StandardClassIds.Any\n }\n\n private fun FirProperty.computeJvmDescriptorForGetter(customName: String? = null, includeReturnType: Boolean = false): String {<|endoftext|>"} {"prompt":"* @return true if this symbol shouldn't be processed as the owner of an annotation call\n *\/\ninternal fun FirBasedSymbol<*>.cannotResolveAnnotationsOnDemand(): Boolean {\n return this is FirCallableSymbol<*> && isLocalForLazyResolutionPurposes\n}\n\n\/**\n * Invoke [action] on each callable declaration that can have postponed symbols\n *","completion":"* @see postponedSymbolsForAnnotationResolution\n *\/\ninternal fun FirDeclaration.forEachDeclarationWhichCanHavePostponedSymbols(action: (FirCallableDeclaration) -> Unit) {\n when (this) {\n is FirCallableDeclaration -> action(this)\n else -> {}\n }\n}\n\n\/**<|endoftext|>"} {"prompt":"* @throws IndexOutOfBoundsException or [IllegalArgumentException] when [startIndex] or [endIndex] is out of range of this string builder indices or when `startIndex > endIndex`.\n * @throws IndexOutOfBoundsException when the subrange doesn't fit into the [destination] array starting at the specified [destinationOffset],\n * or when that index is out of the [destination] array indices range.","completion":"*\/\n@SinceKotlin(\"2.0\")\n@Suppress(\"ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS\")\npublic actual fun String.toCharArray(\n destination: CharArray,\n destinationOffset: Int = 0,\n startIndex: Int = 0,\n endIndex: Int = length\n): CharArray {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.backend.konan.driver.phases.Fir2IrOutput\nimport org.jetbrains.kotlin.backend.konan.driver.phases.FirOutput\nimport org.jetbrains.kotlin.backend.konan.ir.KonanSymbols","completion":"import org.jetbrains.kotlin.backend.konan.ir.SymbolOverIrLookupUtils\nimport org.jetbrains.kotlin.backend.konan.serialization.KonanIdSignaturer\nimport org.jetbrains.kotlin.backend.konan.serialization.KonanManglerDesc<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: +ProperFinally\n\/\/ NO_CHECK_LAMBDA_INLINING\n\/\/ FILE: 1.kt\n\npackage test\n\nvar result = \"\"\n\nclass A {\n var field = 0\n inline fun a(f: () -> Any): Any {\n try {\n val value = f()\n return value\n } finally {\n field--\n }\n }","completion":"fun c(vararg functions: () -> Any): Any = a {\n for (function in functions) {\n try { return function() } catch (fail: Throwable) { }\n }\n throw RuntimeException()\n }\n}\n\n\/\/ FILE: 2.kt\nimport test.*\n\n\nfun box(): String {\n val a = A()<|endoftext|>"} {"prompt":"supertypes.forEach { supertype ->\n kotlin.test.assertNull(supertype.outerType, \"Expected no outerType\")\n kotlin.test.assertTrue(supertype.arguments.isEmpty(), \"Expected no arguments. Found ${supertype.arguments}\")","completion":"kotlin.test.assertFalse(supertype.isMarkedNullable, \"Expected supertype to be marked *not* nullable\")\n }\n }\n\n fun `test single nullable supertype from module`() {\n val module = createCirTreeFromSourceCode(\n \"\"\"\n interface A\n class X: A\n \"\"\".trimIndent()\n )<|endoftext|>"} {"prompt":"class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB {\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor()\n}","completion":"fun TestTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {}\n\nclass TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse where T: UserInterfaceB {\n constructor()\n}<|endoftext|>"} {"prompt":"val irCall = if (isArrayReceiver) {\n transformAtomicUpdateCallOnArrayElement(\n expression = expression,\n functionName = functionName,\n valueType = valueType,\n getPropertyReceiver = propertyGetterCall,\n parentFunction = data\n )\n } else {\n transformAtomicUpdateCallOnProperty(\n expression = expression,\n functionName = functionName,","completion":"valueType = valueType,\n castType = if (it is IrTypeOperatorCall) valueType else null,\n getPropertyReceiver = propertyGetterCall,\n parentFunction = data\n )\n }\n return super.visitExpression(irCall, data)\n }\n if (expression.symbol.owner.isInline && expression.extensionReceiver != null) {\n \/**<|endoftext|>"} {"prompt":"public inline fun kotlin.CharArray.scanIndexed(initial: R, operation: (index: kotlin.Int, acc: R, kotlin.Char) -> R): kotlin.collections.List\n\n@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.internal.InlineOnly","completion":"public inline fun kotlin.DoubleArray.scanIndexed(initial: R, operation: (index: kotlin.Int, acc: R, kotlin.Double) -> R): kotlin.collections.List\n\n@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.plugin.mpp.resources.KotlinTargetResourcesPublicationImpl\nimport org.jetbrains.kotlin.incremental.deleteDirectoryContents\nimport javax.inject.Inject\n\n@DisableCachingByDefault\ninternal abstract class ResolveResourcesFromDependenciesTask : DefaultTask() {\n\n @get:Inject","completion":"abstract val fileSystem: FileSystemOperations\n\n @get:Inject\n abstract val archiveOperations: ArchiveOperations\n\n @get:Input\n abstract val filterResourcesByExtension: Property\n\n @get:PathSensitive(PathSensitivity.NONE)\n @get:InputFiles\n abstract val archivesFromDependencies: ConfigurableFileCollection<|endoftext|>"} {"prompt":"fun findEmbeddableOptions(options: List): List> {\n val result = mutableListOf>()\n val iterator = options.iterator()\n loop@while (iterator.hasNext()) {\n val option = iterator.next()\n result += when {\n option.startsWith(\"-l\") -> listOf(option)","completion":"option == \"-framework\" && iterator.hasNext() -> listOf(option, iterator.next())\n else -> break@loop \/\/ Ignore the rest.\n }\n }\n return result\n }\n\n val optionsToEmbed = findEmbeddableOptions(config.platform.configurables.linkerKonanFlags) +<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.builtins.KotlinBuiltIns\nimport org.jetbrains.kotlin.cfg.ControlFlowBuilder.PredefinedOperation.NOT_NULL_ASSERTION\nimport org.jetbrains.kotlin.cfg.ControlFlowBuilder.PredefinedOperation.OR\nimport org.jetbrains.kotlin.cfg.pseudocode.ControlFlowInstructionsGenerator","completion":"import org.jetbrains.kotlin.cfg.pseudocode.PseudoValue\nimport org.jetbrains.kotlin.cfg.pseudocode.Pseudocode\nimport org.jetbrains.kotlin.cfg.pseudocode.PseudocodeImpl\nimport org.jetbrains.kotlin.cfg.pseudocode.instructions.eval.AccessTarget<|endoftext|>"} {"prompt":"x.equals(10)\n}\n\n\/\/ TESTCASE NUMBER: 3\nfun case_3() {\n var x: Boolean? = true\n x!!\n val y = {\n var x: Int? = 10\n }","completion":"x\n x.equals(10)\n}<|endoftext|>"} {"prompt":"scientists.associateByTo(byLastName) { it.lastName }\n\n assertTrue(byLastName.isNotEmpty())\n \/\/ Jacob Bernoulli does not occur in the map because only the last pair with the same key gets added\n assertPrints(byLastName, \"{Hopper=Grace Hopper, Bernoulli=Johann Bernoulli}\")\n }\n\n @Sample","completion":"fun associateByToWithValueTransform() {\n data class Person(val firstName: String, val lastName: String)\n\n val scientists = listOf(Person(\"Grace\", \"Hopper\"), Person(\"Jacob\", \"Bernoulli\"), Person(\"Johann\", \"Bernoulli\"))\n\n val byLastName = mutableMapOf()\n assertTrue(byLastName.isEmpty())<|endoftext|>"} {"prompt":"class TestMultipleIdenticalValueParameters {\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB)\n }\n fun TestMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {}\n\n class TestMultipleIdenticalValueParametersReverse {","completion":"constructor(arg1: UserKlassA, arg2: UserKlassB)\n }\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalValueParametersReverse(arg1: UserKlassA, arg2: UserKlassB) {}\n\n class TestMultipleDifferentlyNamedValueParametersA {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.targets.js.testing\n\ndata class KotlinTestRunnerCliArgs(\n val moduleNames: List = listOf(),\n val include: Collection = listOf(),\n val exclude: Collection = listOf(),","completion":"val ignoredTestSuites: IgnoredTestSuitesReporting = IgnoredTestSuitesReporting.reportAllInnerTestsAsIgnored\n) {\n fun toList(): List = mutableListOf().also { args ->\n if (include.isNotEmpty()) {\n args.add(\"--include\")\n args.add(include.joinToString(\",\"))\n }<|endoftext|>"} {"prompt":"package org.jetbrains.sir.lightclasses\n\nimport org.jetbrains.kotlin.analysis.api.KtAnalysisSession\nimport org.jetbrains.kotlin.analysis.api.symbols.*\nimport org.jetbrains.kotlin.sir.*\nimport org.jetbrains.kotlin.sir.builder.buildTypealias","completion":"import org.jetbrains.kotlin.sir.providers.SirDeclarationProvider\nimport org.jetbrains.kotlin.sir.providers.SirSession\nimport org.jetbrains.kotlin.sir.providers.source.KotlinSource\nimport org.jetbrains.kotlin.sir.providers.utils.withSirAnalyse<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceB {}\nfun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceC {}","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {}\nfun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {}<|endoftext|>"} {"prompt":"return toConeKotlinTypeProbablyFlexible(\n session, typeParameterStack, source?.fakeElement(KtFakeSourceElementKind.Enhancement)\n )\n }\n\n \/\/ It's either overrides Collection.contains(Object) or Collection.containsAll(Collection) or similar methods\n private fun FirNamedFunctionSymbol.hasErasedParameters(): Boolean {","completion":"\/\/ We're only interested in Java declarations with erased parameters.\n \/\/ Removing this check would also return true for substitution overrides for raw types,\n \/\/ which leads to false positives like NOTHING_TO_OVERRIDE.\n \/\/ See compiler\/testData\/diagnostics\/tests\/rawTypes\/rawTypeOverrides.kt.\n if (!this.isJavaOrEnhancement) return false<|endoftext|>"} {"prompt":"assertCompilerArgument(\":compileKotlin\", \"-language-version $nextKotlinLanguageVersion\")\n }\n }\n }\n\n @DisplayName(\"JVM: build report is not printed\")\n @JvmGradlePluginTests\n @GradleTest\n fun buildReportNotPrinted(gradleVersion: GradleVersion) {\n project(\n \"incrementalMultiproject\",","completion":"gradleVersion,\n buildOptions = defaultBuildOptions.copy(logLevel = LogLevel.WARN)\n ) {\n build(\"build\") {\n assertOutputDoesNotContain(\n \"##### 'kotlin.experimental.tryNext' results #####\"\n )\n }\n }\n }\n\n @DisplayName(\"JVM: report is printed at the end of the build\")<|endoftext|>"} {"prompt":"assertEquals(\"super\", `super`)\n assertEquals(\"this\", `this`)\n assertEquals(\"throw\", `throw`)\n assertEquals(\"true\", `true`)\n assertEquals(\"try\", `try`)\n assertEquals(\"typealias\", `typealias`)\n assertEquals(\"val\", `val`)\n assertEquals(\"var\", `var`)","completion":"assertEquals(\"when\", `when`)\n return \"OK\"\n}<|endoftext|>"} {"prompt":"if (!context.config.languageVersionSettings.supportsFeature(LanguageFeature.EnumEntries)) {\n return\n }\n irFile.transformChildrenVoid(this)\n }\n\n private var state: EntriesMappingState? = null\n\n private inner class EntriesMappingState {\n val mappings = mutableMapOf()","completion":"val mappingsClass by lazy {\n context.irFactory.buildClass {\n name = Name.identifier(\"EntriesMappings\")\n origin = JvmLoweredDeclarationOrigin.ENUM_MAPPINGS_FOR_ENTRIES\n }.apply {\n createImplicitParameterDeclarationWithWrappedDescriptor()\n }\n }<|endoftext|>"} {"prompt":"public fun containsMatchIn(input: CharSequence): Boolean\n\n \/**\n * Replaces all occurrences of this regular expression in the specified [input] string with specified [replacement] expression.\n *\n * The replacement string may contain references to the captured groups during a match. Occurrences of `${name}` or `$index`","completion":"* in the replacement string will be substituted with the subsequences corresponding to the captured groups with the specified name or index.\n * In case of `$index`, the first digit after '$' is always treated as a part of group reference. Subsequent digits are incorporated\n * into `index` only if they would form a valid group reference. Only the digits '0'..'9' are considered as potential components<|endoftext|>"} {"prompt":"val next = current.originalForSubstitutionOverride ?: return current\n current = next\n } while (true)\n}\n\ninline fun D.unwrapUseSiteSubstitutionOverrides(): D {\n var current = this\n\n do {\n if (current.origin != FirDeclarationOrigin.SubstitutionOverride.CallSite) return current","completion":"val next = current.originalForSubstitutionOverride ?: return current\n current = next\n } while (true)\n}\n\ninline fun > S.unwrapUseSiteSubstitutionOverrides(): S {\n return fir.unwrapUseSiteSubstitutionOverrides().symbol as S\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.objcexport.tests\n\nimport org.jetbrains.kotlin.objcexport.KtObjCExportFile\nimport org.jetbrains.kotlin.objcexport.StableFileOrder\nimport org.jetbrains.kotlin.objcexport.testUtils.InlineSourceCodeAnalysis","completion":"import org.junit.jupiter.api.Test\nimport kotlin.test.assertEquals\nimport kotlin.test.assertNotEquals\n\nclass TranslationOrderTest(\n private val inlineSourceCodeAnalysis: InlineSourceCodeAnalysis,\n) {\n\n @Test\n fun `test - StableFileOrder - sort by packageName`() {\n val files = inlineSourceCodeAnalysis.createKtFiles {<|endoftext|>"} {"prompt":"fun getsBaseProp(): String = super.baseProp\n\n fun callsInterfaceFun(): String = super.interfaceFun()\n}\n\nfun box(): String {\n val d = Derived()\n\n val test1 = d.callsBaseFun()\n if (test1 != \"Base.baseFun()\") return \"Failed: d.callsBaseFun()==$test1\"","completion":"val test2 = d.callsUnambiguousFun()\n if (test2 != \"Base.unambiguous()\") return \"Failed: d.callsUnambiguousFun()==$test2\"\n\n val test3 = d.getsBaseProp()\n if (test3 != \"Base.baseProp\") return \"Failed: d.getsBaseProp()==$test3\"<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.backend.jvm.codegen\n\nimport org.jetbrains.annotations.NotNull\nimport org.jetbrains.annotations.Nullable\nimport org.jetbrains.kotlin.backend.jvm.JvmBackendContext\nimport org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin","completion":"import org.jetbrains.kotlin.backend.jvm.JvmSymbols\nimport org.jetbrains.kotlin.backend.jvm.ir.erasedUpperBound\nimport org.jetbrains.kotlin.backend.jvm.ir.isInlineClassType\nimport org.jetbrains.kotlin.backend.jvm.ir.isOptionalAnnotationClass<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.symbols.KtSymbolOrigin\nimport org.jetbrains.kotlin.analysis.api.symbols.KtValueParameterSymbol\nimport org.jetbrains.kotlin.analysis.api.symbols.pointers.KtSymbolPointer\nimport org.jetbrains.kotlin.analysis.api.types.KtType","completion":"import org.jetbrains.kotlin.descriptors.Modality\nimport org.jetbrains.kotlin.descriptors.PropertyDescriptor\nimport org.jetbrains.kotlin.descriptors.Visibility\nimport org.jetbrains.kotlin.name.CallableId\n\nclass KtFe10DescDefaultPropertyGetterSymbol(<|endoftext|>"} {"prompt":"public fun ShortArray.maxWith(comparator: Comparator): Short? {\n return maxWithOrNull(comparator)\n}\n\n@Deprecated(\"Use maxWithOrNull instead.\", ReplaceWith(\"this.maxWithOrNull(comparator)\"))\n@DeprecatedSinceKotlin(warningSince = \"1.4\", errorSince = \"1.5\", hiddenSince = \"1.6\")","completion":"@Suppress(\"CONFLICTING_OVERLOADS\")\npublic fun IntArray.maxWith(comparator: Comparator): Int? {\n return maxWithOrNull(comparator)\n}\n\n@Deprecated(\"Use maxWithOrNull instead.\", ReplaceWith(\"this.maxWithOrNull(comparator)\"))<|endoftext|>"} {"prompt":"\/\/ EXPECTATIONS FIR JVM_IR\n\/\/ test.kt:17 box:\n\/\/ test.kt:4 : x:java.lang.String=\"X\":java.lang.String, y:java.lang.String=\"Y\":java.lang.String\n\/\/ test.kt:17 box:","completion":"\/\/ test.kt:14 foo: a:MyPair=MyPair, block:kotlin.jvm.functions.Function1=TestKt$\n\/\/ test.kt:20 box$lambda$0:\n\/\/ test.kt:6 component1:\n\/\/ test.kt:20 box$lambda$0:<|endoftext|>"} {"prompt":"assert(symbol.owner.isAssignable) { \"Only assignable IrValues can be set\" }\n }\n return IrSetValueImpl(\n constructorIndicator = null,\n startOffset = startOffset,\n endOffset = endOffset,\n type = type,\n symbol = symbol,\n value = value,\n origin = origin,\n )\n}\n\nfun IrSpreadElementImpl(","completion":"startOffset: Int,\n endOffset: Int,\n expression: IrExpression,\n) = IrSpreadElementImpl(\n constructorIndicator = null,\n startOffset = startOffset,\n endOffset = endOffset,\n expression = expression,\n)\n\nfun IrStringConcatenationImpl(\n startOffset: Int,\n endOffset: Int,\n type: IrType,<|endoftext|>"} {"prompt":"abstract class AbstractDeclarationVisitor : TranslatorVisitor() {\n override fun emptyResult(context: TranslationContext) { }\n\n open val enumInitializerName: JsName?\n get() = null\n\n override fun visitClassOrObject(classOrObject: KtClassOrObject, context: TranslationContext) {","completion":"ClassTranslator.translate(classOrObject, context, enumInitializerName)\n val descriptor = BindingUtils.getClassDescriptor(context.bindingContext(), classOrObject)\n context.export(descriptor)\n }\n\n override fun visitProperty(expression: KtProperty, context: TranslationContext) {\n val descriptor = BindingUtils.getPropertyDescriptor(context.bindingContext(), expression)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.declarations.FirTypeParameter\nimport org.jetbrains.kotlin.fir.resolve.diagnostics.ConeUnresolvedSymbolError\nimport org.jetbrains.kotlin.fir.resolve.providers.symbolProvider\nimport org.jetbrains.kotlin.fir.scopes.impl.toConeType","completion":"import org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol\nimport org.jetbrains.kotlin.fir.types.ConeErrorType\nimport org.jetbrains.kotlin.fir.types.ConeClassLikeType\nimport org.jetbrains.kotlin.fir.types.typeContext<|endoftext|>"} {"prompt":"val mlitr = MLItr()\n\n safeAsReturnsNull(\"litr as? MutableIterator\") { litr as? MutableIterator<*> }\n safeAsReturnsNull(\"litr as? MutableListIterator\") { litr as? MutableListIterator<*> }\n safeAsReturnsNonNull(\"mlitr as? MutableIterator\") { mlitr as? MutableIterator<*> }","completion":"safeAsReturnsNonNull(\"mlitr as? MutableListIterator\") { mlitr as? MutableListIterator<*> }\n\n val it = It() as Any\n val mit = MIt()\n val arrayList = ArrayList()\n\n safeAsReturnsNull(\"it as? MutableIterable\") { it as? MutableIterable<*> }<|endoftext|>"} {"prompt":"override fun getTextRange() = kotlinOrigin?.textRange ?: TextRange.EMPTY_RANGE\n override fun getTextOffset() = kotlinOrigin?.textOffset ?: 0\n override fun getStartOffsetInParent() = kotlinOrigin?.startOffsetInParent ?: 0\n override fun isWritable() = kotlinOrigin?.isWritable ?: false","completion":"override fun getNavigationElement() = kotlinOrigin?.navigationElement ?: this\n override fun getUseScope() = kotlinOrigin?.useScope ?: super.getUseScope()\n override fun getContainingFile() = parent.containingFile\n override fun getPresentation() = (kotlinOrigin ?: this).let { ItemPresentationProviders.getItemPresentation(it) }<|endoftext|>"} {"prompt":"import kotlin.test.assertNull\nimport kotlin.test.assertTrue\n\n\/\/ Compile .def and .kt files in most straightforward way to check the structure of packages created by `cinterop` tool into interop klib.\n\/\/ Same test sources are also checked with new native test infra using its package renaming feature.\n\n\/\/ This demonstrates the behavior of cinterop tool:","completion":"\/\/ how the packages are arranged in klib in different combinations of compound filenames and package directives.\n\/\/ Cinterop tool here is executed directly, not under new test system, which might modify sources before compilation.\n\/\/ The most important test is dotFnameRoot.kt, where the order of package parts is counterintuitive:\n\/\/ filename is `root1.root2.def`, and the resulting package is `root2.root1`<|endoftext|>"} {"prompt":"\"LinkedListWithAtomicsBenchmark\" to BenchmarkEntryWithInit.create(::LinkedListWithAtomicsBenchmark, { ensureNext() }),\n \"Inheritance.baseCalls\" to BenchmarkEntryWithInit.create(::InheritanceBenchmark, { baseCalls() }),","completion":"\"ChainableBenchmark.testChainable\" to BenchmarkEntryWithInit.create(::ChainableBenchmark, { testChainable() }),\n \"BunnymarkBenchmark.testBunnymark\" to BenchmarkEntryWithInit.create(::BunnymarkBenchmark, { testBunnymark() }),<|endoftext|>"} {"prompt":"fun FirSymbolProvider.getClassDeclaredPropertySymbols(classId: ClassId, name: Name): List> {\n val classMemberScope = getClassDeclaredMemberScope(classId)\n return classMemberScope?.getProperties(name).orEmpty()\n}","completion":"inline fun > FirSymbolProvider.getSymbolByTypeRef(typeRef: FirTypeRef): T? {\n val lookupTag = (typeRef.coneTypeSafe()?.fullyExpandedType(session) as? ConeLookupTagBasedType)?.lookupTag\n ?: return null<|endoftext|>"} {"prompt":"builder.setOuterType(outerBuilder)\n }\n }\n }\n\n private fun typeArgument(typeProjection: TypeProjection): ProtoBuf.Type.Argument.Builder {\n val builder = ProtoBuf.Type.Argument.newBuilder()\n\n if (typeProjection.isStarProjection) {","completion":"builder.projection = ProtoBuf.Type.Argument.Projection.STAR\n } else {\n val projection = projection(typeProjection.projectionKind)\n\n if (projection != builder.projection) {\n builder.projection = projection\n }\n\n if (useTypeTable()) {\n builder.typeId = typeId(typeProjection.type)\n } else {<|endoftext|>"} {"prompt":"takeByte(2 % 1)\n\n takeByte(2.plus(1))\n takeByte(2.minus(1))","completion":"takeByte(2.times(1))\n takeByte(2.div(1))<|endoftext|>"} {"prompt":"p02: Any, p03: Any, p04: Any, p05: Any, p06: Any, p07: Any, p08: Any, p09: Any, p10: Any,\n p11: Any, p12: Any, p13: Any, p14: Any, p15: Any, p16: Any, p17: Any, p18: Any, p19: Any, p20: Any,","completion":"p21: Any, p22: Any, p23: Any, p24: Any, p25: Any, p26: Any, p27: Any, p28: Any, p29: Any, p30: Any\n): Any = Any()\n\nfun box(): String {\n @Suppress(\"DEPRECATION_ERROR\")\n Test.test(::f as kotlin.jvm.functions.FunctionN)<|endoftext|>"} {"prompt":"return getBooleanOptionValue(BooleanOption.KAPT_VERBOSE)\n }\n\n fun Project.isIncrementalKapt(): Boolean {\n return getBooleanOptionValue(BooleanOption.KAPT_INCREMENTAL_APT)\n }\n\n fun Project.isInfoAsWarnings(): Boolean {","completion":"return getBooleanOptionValue(BooleanOption.KAPT_INFO_AS_WARNINGS)\n }\n\n fun Project.isIncludeCompileClasspath(): Boolean {\n return getBooleanOptionValue(BooleanOption.KAPT_INCLUDE_COMPILE_CLASSPATH)\n }\n\n fun Project.isKaptKeepKdocCommentsInStubs(): Boolean {<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ MODULE: m1\n\/\/ FILE: a.kt\npackage a.b\n\nclass c {\n fun ab_c() {}\n}\n\n\/\/ MODULE: m2\n\/\/ FILE: b.kt\npackage a\n\nclass b {\n class c {\n fun a_bc() {}\n }\n}\n\n\/\/ MODULE: m3(m1, m2)","completion":"\/\/ FILE: c.kt\nimport a.b.c\n\nfun test(ab_c: c) {\n ab_c.ab_c()\n\n val ab_c2: a.b.c = a.b.c()\n ab_c2.ab_c()\n\n val ab_c3 = a.b.c()\n ab_c3.ab_c()\n}<|endoftext|>"} {"prompt":"p19: Any?): Any? = call(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)","completion":"override fun invoke(p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?, p10: Any?, p11: Any?, p12: Any?, p13: Any?, p14: Any?, p15: Any?, p16: Any?, p17: Any?, p18: Any?,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.expressions.IrCall\nimport org.jetbrains.kotlin.ir.expressions.IrExpression\nimport org.jetbrains.kotlin.ir.expressions.IrTypeOperator\nimport org.jetbrains.kotlin.ir.expressions.impl.IrTypeOperatorCallImpl","completion":"import org.jetbrains.kotlin.ir.expressions.putArgument\nimport org.jetbrains.kotlin.ir.types.IrType\nimport org.jetbrains.kotlin.ir.util.*\nimport org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid\nimport org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid<|endoftext|>"} {"prompt":"}\n\nfun loadPluginsForTests(configuration: CompilerConfiguration): ExitCode {\n var pluginClasspath: Iterable = emptyList()\n val kotlinPaths = PathUtil.kotlinPathsForCompiler\n val libPath = kotlinPaths.libPath.takeIf { it.exists() && it.isDirectory } ?: File(\".\")","completion":"val (jars, _) =\n PathUtil.KOTLIN_SCRIPTING_PLUGIN_CLASSPATH_JARS.map { File(libPath, it) }.partition { it.exists() }\n pluginClasspath = jars.map { it.canonicalPath } + pluginClasspath<|endoftext|>"} {"prompt":"public fun kotlin.CharArray.sortedArray(): kotlin.CharArray\n\npublic fun kotlin.DoubleArray.sortedArray(): kotlin.DoubleArray\n\npublic fun kotlin.FloatArray.sortedArray(): kotlin.FloatArray\n\npublic fun kotlin.IntArray.sortedArray(): kotlin.IntArray","completion":"public fun kotlin.LongArray.sortedArray(): kotlin.LongArray\n\npublic fun kotlin.ShortArray.sortedArray(): kotlin.ShortArray\n\n@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes\npublic fun kotlin.UByteArray.sortedArray(): kotlin.UByteArray<|endoftext|>"} {"prompt":"declarations.filter { it is IrFunction && it.isAtomicExtension() }.forEach { atomicExtension ->\n atomicExtension as IrFunction\n declarations.add(transformAtomicExtension(atomicExtension, this, false))\n declarations.add(transformAtomicExtension(atomicExtension, this, true))\n \/\/ the original atomic extension is removed\n declarations.remove(atomicExtension)","completion":"}\n }\n\n private fun transformAtomicExtension(\n atomicExtension: IrFunction,\n parent: IrDeclarationContainer,\n isArrayReceiver: Boolean\n ): IrFunction {\n \/**\n * At this step, only signature of the atomic extension is changed,\n * the body is just copied and will be transformed at the next step by AtomicFunctionCallTransformer.\n *<|endoftext|>"} {"prompt":"@DeprecatedSinceKotlin(warningSince = \"1.9\")\npublic object Debugging {\n public var forceCheckedShutdown: Boolean by kotlin.native.runtime.Debugging::forceCheckedShutdown\n\n public val isThreadStateRunnable: Boolean by kotlin.native.runtime.Debugging::isThreadStateRunnable\n}","completion":"@GCUnsafeCall(\"Kotlin_Debugging_isPermanent\")\n@InternalForKotlinNative\npublic external fun Any.isPermanent() : Boolean\n\n@GCUnsafeCall(\"Kotlin_Debugging_isLocal\")\n@InternalForKotlinNative\npublic external fun Any.isLocal() : Boolean<|endoftext|>"} {"prompt":"0x0UL, 0x0UL, 0x0UL, 0x0UL, \n 0x0UL, 0x400921fb54442d18UL, 0x400921fb54442d18UL, 0x400921fb54442d18UL,","completion":"0x400921fb54442d18UL, 0x400921fb54442d18UL, 0x400921fb54442d18UL, 0x400921fb54442d18UL, \n 0xc00921fb54442d18UL, 0x8000000000000000UL, 0x8000000000000000UL, 0x8000000000000000UL,<|endoftext|>"} {"prompt":"private fun errorType() = ErrorUtils.createErrorType(ErrorTypeKind.SYNTHETIC_ELEMENT_ERROR_TYPE)\n val ERROR_CONTEXT = SyntheticElementResolveContext(errorType(), errorType(), null, errorType(), null, null, null)\n }\n\n private val widgetReceivers by lazy {\n val receivers = ArrayList(4)","completion":"receivers += WidgetReceiver(activity, mayHaveCache = true)\n receivers += WidgetReceiver(dialog, mayHaveCache = false)\n fragment?.let { receivers += WidgetReceiver(it, mayHaveCache = true) }\n supportFragment?.let { receivers += WidgetReceiver(it, mayHaveCache = true) }\n receivers\n }<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant)\n }\n fun TestTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {}","completion":"class TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse where T: UserInterfaceB {\n constructor(arg: Invariant)\n }<|endoftext|>"} {"prompt":"assertNotEquals(nullProtoObj2.hashCode(), obj1.hashCode())\n assertNotEquals(nullProtoObj2.hashCode(), obj2.hashCode())\n assertNotEquals(nullProtoObj2.hashCode(), nullProtoObj1.hashCode())\n assertNotEquals(nullProtoObj2.hashCode(), arr1.hashCode())","completion":"assertNotEquals(nullProtoObj2.hashCode(), arr2.hashCode())\n\n assertNotEquals(arr1.hashCode(), obj1.hashCode())\n assertNotEquals(arr1.hashCode(), obj2.hashCode())\n assertNotEquals(arr1.hashCode(), nullProtoObj1.hashCode())<|endoftext|>"} {"prompt":"\/\/ !OPT_IN: kotlin.contracts.ExperimentalContracts\n\n\/*\n * KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (NEGATIVE)\n *\n * SECTIONS: contracts, declarations, contractBuilder, effects, returns\n * NUMBER: 1\n * DESCRIPTION: Using equality with expressions in implies.\n * ISSUES: KT-26178\n *\/\n\nimport kotlin.contracts.*","completion":"\/\/ TESTCASE NUMBER: 1\nfun case_1(x: Any?): Boolean {\n contract { returns(true) implies (x == -.15f) }\n return x !is Number\n}\n\n\/\/ TESTCASE NUMBER: 2\nfun case_2(x: Any?): Boolean {<|endoftext|>"} {"prompt":"if (declaration.isExpect) return\n super.check(declaration, context, reporter)\n }\n }\n\n object ForExpectClass : FirNotImplementedOverrideSimpleEnumEntryChecker(MppCheckerKind.Common) {\n override fun check(declaration: FirClass, context: CheckerContext, reporter: DiagnosticReporter) {","completion":"if (!declaration.isExpect) return\n super.check(declaration, context, reporter)\n }\n }\n\n override fun check(declaration: FirClass, context: CheckerContext, reporter: DiagnosticReporter) {\n if (!declaration.isEnumClass) return<|endoftext|>"} {"prompt":"@kotlin.internal.InlineOnly\npublic inline fun IntArray.minOfWith(comparator: Comparator, selector: (Int) -> R): R {\n if (isEmpty()) throw NoSuchElementException()\n var minValue = selector(this[0])\n for (i in 1..lastIndex) {\n val v = selector(this[i])","completion":"if (comparator.compare(minValue, v) > 0) {\n minValue = v\n }\n }\n return minValue\n}\n\n\/**\n * Returns the smallest value according to the provided [comparator]\n * among all values produced by [selector] function applied to each element in the array.\n * \n * @throws NoSuchElementException if the array is empty.\n *\/<|endoftext|>"} {"prompt":"val methodSignature = JvmMemberSignature.Method(name = methodNode.name, desc = methodNode.desc)\n inlineFunctionsAndAccessors[methodSignature]!! to snapshotMethod(methodNode, classNode.version)\n }\n\n return ExtraInfo(classSnapshotExcludingMembers, constantSnapshots, inlineFunctionOrAccessorSnapshots)\n}\n\n\/**","completion":"* [ClassVisitor] which visits only members satisfying the given criteria (`[shouldVisitField] == true` or `[shouldVisitMethod] == true`).\n *\/\nclass SelectiveClassVisitor(\n cv: ClassVisitor,\n private val shouldVisitField: (JvmMemberSignature.Field, isPrivate: Boolean, isConstant: Boolean) -> Boolean,<|endoftext|>"} {"prompt":"assertEquals(kclasses[Double::class], 4)\n assertEquals(kclasses[DoubleArray::class], 5)\n assertEquals(kclasses[Float::class], 6)\n assertEquals(kclasses[FloatArray::class], 7)\n assertEquals(kclasses[Long::class], 8)\n assertEquals(kclasses[LongArray::class], 9)","completion":"assertEquals(kclasses[ULong::class], 10)\n assertEquals(kclasses[ULongArray::class], 11)\n assertEquals(kclasses[Int::class], 12)\n assertEquals(kclasses[IntArray::class], 13)\n assertEquals(kclasses[UInt::class], 14)\n assertEquals(kclasses[UIntArray::class], 15)<|endoftext|>"} {"prompt":"add(FirWebCommonErrors.NAMED_COMPANION_IN_EXTERNAL_INTERFACE) { firDiagnostic ->\n NamedCompanionInExternalInterfaceImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }","completion":"add(FirWebCommonErrors.JSCODE_ARGUMENT_NON_CONST_EXPRESSION) { firDiagnostic ->\n JscodeArgumentNonConstExpressionImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n}<|endoftext|>"} {"prompt":"assertEquals(null, TestClass.fooNWrapperN?.fooN?.s)\n TestClass.fooNWrapperN = null\n assertEquals(\"null (object)\", describeValueOfProperty(TestClass, \"fooNWrapperN\"))\n assertEquals(null, TestClass.fooNWrapperN?.fooN?.s)","completion":"assertEquals(\"null (object)\", describeValueOfProperty(TestClass, \"nativeFooWrapper\"))\n TestClass.nativeFooWrapper = NativeFooWrapper(NativeFoo(\"Berlin\"))\n assertEquals(\"NativeFoo('Berlin') (object)\", describeValueOfProperty(TestClass, \"nativeFooWrapper\"))<|endoftext|>"} {"prompt":"package test.time\n\nimport kotlin.test.*\nimport kotlin.time.*\nimport kotlin.time.Duration.Companion.nanoseconds\n\nclass TimeMarkJVMTest {\n\n @Test\n fun longDurationElapsed() {","completion":"TimeMarkTest().testLongAdjustmentElapsedPrecision(TimeSource.Monotonic, { waitDuration -> Thread.sleep((waitDuration * 1.1).inWholeMilliseconds) })\n }\n\n @Test\n fun defaultTimeMarkAdjustmentInfinite() {\n val baseMark = TimeSource.Monotonic.markNow()\n val longDuration = Long.MAX_VALUE.nanoseconds<|endoftext|>"} {"prompt":"private val declarationsProvider: SirDeclarationProvider,\n) : SirDeclarationProvider {\n\n private val visitedDeclarations: MutableMap = mutableMapOf()\n\n override fun KtDeclarationSymbol.sirDeclaration(): SirDeclaration {\n return visitedDeclarations.getOrPut(this@sirDeclaration) {","completion":"with(declarationsProvider) { this@sirDeclaration.sirDeclaration() }\n }\n }\n\n}<|endoftext|>"} {"prompt":"* expressions, prefix-expressions, logical-not-expression -> paragraph 1 -> sentence 2\n * expressions, prefix-expressions, logical-not-expression -> paragraph 3 -> sentence 1\n * NUMBER: 1\n * DESCRIPTION:\n *\/\n\nclass A(var a: Int) {\n var isCalled = false\n operator fun not(): A {\n isCalled = true\n return A(a)\n }\n}","completion":"fun box(): String {\n val a = A(-1)\n val a1 = !a\n if (!a1.isCalled && a.isCalled) {\n return \"OK\"\n }\n return \"NOK\"\n}<|endoftext|>"} {"prompt":"fun main(p: String?, p2: String?) {\n \/\/ Generates IFNULL and GOTO\n while (!(p == null)) {\n \"loop\"\n }\n\n \/\/ Generates IFNULL and GOTO\n while (p2 != null) {\n \"loop\"\n }\n}\n\n\/\/0 ICONST_0\n\/\/0 ICONST_1\n\/\/0 ACONST_NULL","completion":"\/\/2 IFNULL\n\/\/2 IF\n\/\/2 GOTO<|endoftext|>"} {"prompt":"_size++\n modCount = list.modCount\n }\n\n override fun get(index: Int): E {\n checkForComodification()\n AbstractList.checkElementIndex(index, _size)\n\n return list[fromIndex + index]\n }\n\n override fun removeAt(index: Int): E {\n checkForComodification()","completion":"AbstractList.checkElementIndex(index, _size)\n\n val result = list.removeAt(fromIndex + index)\n _size--\n modCount = list.modCount\n return result\n }\n\n override fun set(index: Int, element: E): E {\n checkForComodification()\n AbstractList.checkElementIndex(index, _size)<|endoftext|>"} {"prompt":"fun testR0xE10() {\n \/\/ with possible local optimizations\n if (1 in 1L..<3L != range0.contains(1)) throw AssertionError()\n if (1 !in 1L..<3L != !range0.contains(1)) throw AssertionError()","completion":"if (!(1 in 1L..<3L) != !range0.contains(1)) throw AssertionError()\n if (!(1 !in 1L..<3L) != range0.contains(1)) throw AssertionError()\n \/\/ no local optimizations\n if (element10 in 1L..<3L != range0.contains(element10)) throw AssertionError()<|endoftext|>"} {"prompt":"abstract var a: \/*p:local.declarations*\/Int\n abstract fun foo()\n }\n\n class LocalC : LocalI() {\n override var a = 1\n\n override fun foo() {}\n\n var b = \"bbb\"\n\n fun bar() = b\n }\n\n val o = object {\n val a = \"aaa\"","completion":"fun foo(): LocalI = \/*p:kotlin(Nothing)*\/null as LocalI\n }\n\n localFun()\n 1.\/*p:kotlin.Int(getLOCALExtFun) p:kotlin.Int(getLocalExtFun)*\/localExtFun()\n\n val c = LocalC()\n c.a\n c.b\n c.foo()\n c.bar()<|endoftext|>"} {"prompt":"*\/\n public fun getAndSet(newValue: T): T = this::value.getAndSetField(newValue)\n\n \/**\n * Atomically sets the value to the given [new value][newValue] if the current value equals the [expected value][expected],\n * returns true if the operation was successful and false only if the current value was not equal to the expected value.\n *","completion":"* Provides sequential consistent ordering guarantees and cannot fail spuriously.\n *\n * Comparison of values is done by reference.\n *\/\n public fun compareAndSet(expected: T, newValue: T): Boolean = this::value.compareAndSetField(expected, newValue)\n\n \/**\n * Atomically sets the value to the given [new value][newValue] if the current value equals the [expected value][expected]<|endoftext|>"} {"prompt":"6 -> null\n }\n}\n\n\/\/ TESTCASE NUMBER: 2\nfun case_2(value_1: Int, value_2: Byte, value_3: TypesProvider) {\n when (value_1) {\n 1 -> -.09 % 10L\n 3 -> value_2 \/ -5\n 2 -> value_3.getChar() - 11 + 90\n 4 -> 100\n }","completion":"}\n\n\/\/ TESTCASE NUMBER: 3\nfun case_3(value_1: Int, value_2: Boolean, value_3: Long) {\n when (value_1) {\n 1 -> value_2\n 2 -> !value_2\n 3 -> getBoolean() && value_2\n 5 -> getChar() != 'a'\n 6 -> getList() === getAny()<|endoftext|>"} {"prompt":"private val K_PACKAGE_CACHE = createCache { KPackageImpl(it) }\n\n\/\/ This function is invoked on each reflection access to Java classes, properties, etc. Performance is critical here.\n@Suppress(\"UNCHECKED_CAST\")","completion":"internal fun getOrCreateKotlinClass(jClass: Class): KClassImpl = K_CLASS_CACHE.get(jClass) as KClassImpl\n\ninternal fun getOrCreateKotlinPackage(jClass: Class): KDeclarationContainer = K_PACKAGE_CACHE.get(jClass)<|endoftext|>"} {"prompt":"* If any of elements is `NaN` returns `NaN`.\n *\/\n@SinceKotlin(\"1.4\")\npublic fun Array.minOrNull(): Float? {\n if (isEmpty()) return null\n var min = this[0]\n for (i in 1..lastIndex) {\n val e = this[i]\n min = minOf(min, e)\n }","completion":"return min\n}\n\n\/**\n * Returns the smallest element or `null` if there are no elements.\n *\/\n@SinceKotlin(\"1.4\")\npublic fun > Array.minOrNull(): T? {\n if (isEmpty()) return null\n var min = this[0]\n for (i in 1..lastIndex) {\n val e = this[i]<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion\n\/\/ see https:\/\/youtrack.jetbrains.com\/issue\/KT-21515\n\nabstract class DerivedAbstract : C.Base() {\n open class Data\n}\n\npublic class C {","completion":"open class Base ()\n\n class Foo : Data()\n\n companion object : DerivedAbstract()\n}<|endoftext|>"} {"prompt":"lateinit var sourceModule: KtSourceModule\n val currentArchitectureTarget = HostManager.host\n val nativePlatform = NativePlatforms.nativePlatformByTargets(listOf(currentArchitectureTarget))\n val session = buildStandaloneAnalysisAPISession {\n registerProjectService(KtLifetimeTokenProvider::class.java, KtAlwaysAccessibleLifetimeTokenProvider())","completion":"buildKtModuleProvider {\n platform = nativePlatform\n val kLib = addModule(\n buildKtLibraryModule {\n val compiledKLibRoot = compileToNativeKLib(testDataPath(\"resolveAgainstNativeKLib\/klibSrc\"))\n addBinaryRoot(compiledKLibRoot)\n platform = nativePlatform\n libraryName = \"klib\"\n }\n )<|endoftext|>"} {"prompt":"public fun kotlin.sequences.Sequence.average(): kotlin.Double\n\n@kotlin.jvm.JvmName(name = \"averageOfInt\")\npublic fun kotlin.sequences.Sequence.average(): kotlin.Double\n\n@kotlin.jvm.JvmName(name = \"averageOfLong\")","completion":"public fun kotlin.sequences.Sequence.average(): kotlin.Double\n\n@kotlin.jvm.JvmName(name = \"averageOfShort\")\npublic fun kotlin.sequences.Sequence.average(): kotlin.Double\n\n@kotlin.SinceKotlin(version = \"1.2\")<|endoftext|>"} {"prompt":"* Used for the primary script definition selection as well as to assign a kotlin-specific file type to the files with the extension in Intellij IDEA\n * For Intellij IDEA support, it is important to have this extension set to a non-ambiguous name.\n * See also {@link ScriptCompilationConfigurationKeys#filePathPattern} parameter for more fine-grained script definition selection\n *\/","completion":"val ScriptCompilationConfigurationKeys.fileExtension by PropertiesCollection.key(\"kts\")\n\n\/**\n * Additional (to the filename extension) RegEx pattern with that the script file path is checked\n * It is used in the hosts that may have several script definitions registered and need to distinguish script file types not only by extension<|endoftext|>"} {"prompt":"staticY1; staticY2; staticY4; staticY5; staticY6\n staticY1.x; staticY1.y; staticY2.x; staticY2.y; staticY4.x; staticY4.y; staticY5.x; staticY5.y; staticY6.x; staticY6.y","completion":"staticY1 = staticY1; staticY2 = staticY2; staticY6 = staticY6\n\n staticZ1; staticZ2; staticZ4; staticZ5; staticZ6\n staticZ1 = staticZ1; staticZ2 = staticZ2; staticZ6 = staticZ6<|endoftext|>"} {"prompt":"\/\/ The library's directory is added in libraries.repos.\n addArg(\"-library\", it.absolutePath)\n }\n }\n addFileArgs(\"-library\", libraries.klibFiles)\n addArgs(\"-library\", libraries.artifacts.map { it.artifact.canonicalPath })\n\n addArgIfNotNull(\"-target\", konanTarget.visibleName)","completion":"addArgIfNotNull(\"-language-version\", languageVersion)\n addArgIfNotNull(\"-api-version\", apiVersion)\n addArgIfNotNull(\"-entry\", entryPoint)\n\n addKey(\"-g\", enableDebug)\n addKey(\"-nostdlib\", noStdLib)\n addKey(\"-nomain\", noMain)\n addKey(\"-opt\", enableOptimizations)<|endoftext|>"} {"prompt":"} else if ((j and 0x7fffffff) >= 0x4090cc00) { \/* z <= -1075 *\/\n if (((j - 0xc090cc00) or i.toLong()) != 0L) \/* z < -1075 *\/\n return s * tiny * tiny \/* underflow *\/\n else {","completion":"if (p_l <= z - p_h) return s * tiny * tiny \/* underflow *\/\n }\n }\n \/*\n * compute 2**(p_h+p_l)\n *\/\n i = j and 0x7fffffff\n k = (i shr 20) - 0x3ff\n n = 0<|endoftext|>"} {"prompt":"val inv = ::bar4 in setOf(::foo4)\n inv\n }\n}\n\nfun poll84(): Flow {\n return flow {","completion":"val inv = ::bar5 in setOf(::foo5)\n inv\n }\n}\n\nfun poll85(): Flow {\n return flow {\n val inv = ::Foo6 in setOf(::Foo6)\n inv\n }\n}\n\nfun poll86(): Flow {\n return flow {<|endoftext|>"} {"prompt":"\/\/ FILE: test.kt\n\nclass A\n\nfun bar(a: A) = A()\n\nfun box() {\n val a = A()\n bar(\n bar(\n bar(a)\n )\n )\n}\n\n\/\/ EXPECTATIONS JVM_IR\n\/\/ test.kt:9 box\n\/\/ test.kt:4 \n\/\/ test.kt:9 box","completion":"\/\/ test.kt:12 box\n\/\/ test.kt:6 bar\n\/\/ test.kt:4 \n\/\/ test.kt:6 bar\n\/\/ test.kt:11 box\n\/\/ test.kt:6 bar\n\/\/ test.kt:4 \n\/\/ test.kt:6 bar\n\/\/ test.kt:10 box\n\/\/ test.kt:6 bar\n\/\/ test.kt:4 <|endoftext|>"} {"prompt":"val bar = Bar2()\n bar.value = 1\n takeStarBar2(bar)\n println(bar.value) \/\/ CCE: String cannot be cast to Number\n}\n\n\/\/ --- from Java (not-null) --- \/\/\n\nfun takeStarFoo3(x: Foo3<*>) {","completion":"x.value = \"test\"\n x.value += \"test\"\n}\n\nfun main5() {\n val foo = Foo3()\n foo.value = 1\n takeStarFoo3(foo)<|endoftext|>"} {"prompt":"private fun applySourceMap(nodes: List) {\n var lastGroup: SourceMapGroup? = null\n var lastGroupIndex = 0\n var lastSegment: SourceMapSegment? = null\n var lastSegmentIndex = 0\n\n fun findCorrespondingSegment(node: SourceInfoAwareJsNode): SourceMapSegment? {","completion":"val source = node.source as? JsLocation ?: return null\n val group = sourceMap.groups.getOrElse(source.startLine) { return null }\n\n if (lastGroup != group) {\n if (lastGroup != null) {\n val segmentsToSkip = lastGroup!!.segments.drop(lastSegmentIndex).toMutableList()<|endoftext|>"} {"prompt":"@GradleTest\n override fun testAbiChangeInLib_changeMethodSignature_tracked(gradleVersion: GradleVersion) {\n super.testAbiChangeInLib_changeMethodSignature_tracked(gradleVersion)\n }\n\n @Disabled(\"KT-57147\")\n @GradleTest","completion":"override fun testNonAbiChangeInLib_changeMethodBody_tracked(gradleVersion: GradleVersion) {\n super.testNonAbiChangeInLib_changeMethodBody_tracked(gradleVersion)\n }\n\n @Disabled(\"KT-57147\")\n @GradleTest\n override fun testAbiChangeInLib_changeMethodSignature(gradleVersion: GradleVersion) {<|endoftext|>"} {"prompt":"import java.lang.reflect.Method\n\ninternal fun wrapWithMuteInDatabase(testCase: TestCase, f: () -> Unit): (() -> Unit)? {\n return wrapWithMuteInDatabase(testCase.javaClass, testCase.name, f)\n}\n\nclass RunnerFactoryWithMuteInDatabase : ParametersRunnerFactory {","completion":"override fun createRunnerForTestWithParameters(testWithParameters: TestWithParameters?): Runner {\n return object : BlockJUnit4ClassRunnerWithParameters(testWithParameters) {\n override fun isIgnored(child: FrameworkMethod): Boolean {\n val methodWithParametersKey = parametrizedMethodKey(child, name)\n\n return super.isIgnored(child)<|endoftext|>"} {"prompt":"override fun headerFilterOnly(vararg includeDirs: Any) = headerFilterOnly(includeDirs.toList())\n override fun headerFilterOnly(includeDirs: Collection) {\n headerFilterDirs += files(*includeDirs.toTypedArray())\n }\n }\n\n override fun getName(): String = params.name\n\n internal val identifier = params.identifier","completion":"override var dependencyFiles: FileCollection = files()\n\n val interopProcessingTaskName get() = params.interopProcessingTaskName\n\n\n @Deprecated(\"Deprecated. Please, use definitionFile.\", ReplaceWith(\"definitionFile\"))\n val defFileProperty: Property = params.services.objectFactory.property().convention(<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.resolve.jvm.JvmClassName\nimport java.io.File\nimport java.security.MessageDigest\n\nconst val KOTLIN_CACHE_DIRECTORY_NAME = \"kotlin\"\n\nopen class IncrementalJvmCache(\n targetDataRoot: File,","completion":"icContext: IncrementalCompilationContext,\n targetOutputDir: File?,\n) : AbstractIncrementalCache(\n workingDir = File(targetDataRoot, KOTLIN_CACHE_DIRECTORY_NAME),\n icContext,\n), IncrementalCache {\n companion object {\n private const val PROTO_MAP = \"proto\"<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.expressions.FirWhileLoop\nimport org.jetbrains.kotlin.analysis.api.fir.getResolvedSymbolOfNameReference\nimport org.jetbrains.kotlin.analysis.low.level.api.fir.api.getOrBuildFirSafe\nimport org.jetbrains.kotlin.analysis.api.KtAnalysisSession","completion":"import org.jetbrains.kotlin.analysis.api.fir.KtFirAnalysisSession\nimport org.jetbrains.kotlin.analysis.api.fir.buildSymbol\nimport org.jetbrains.kotlin.analysis.api.symbols.KtSymbol\nimport org.jetbrains.kotlin.psi.KtForExpression<|endoftext|>"} {"prompt":"copyBuilder.moduleData = original.moduleData\n copyBuilder.origin = original.origin\n copyBuilder.attributes = original.attributes.copy()\n copyBuilder.status = original.status\n copyBuilder.returnTypeRef = original.returnTypeRef\n copyBuilder.receiverParameter = original.receiverParameter\n copyBuilder.deprecationsProvider = original.deprecationsProvider","completion":"copyBuilder.containerSource = original.containerSource\n copyBuilder.dispatchReceiverType = original.dispatchReceiverType\n copyBuilder.contextReceivers.addAll(original.contextReceivers)\n copyBuilder.valueParameters.addAll(original.valueParameters)\n copyBuilder.body = original.body\n copyBuilder.contractDescription = original.contractDescription\n copyBuilder.name = original.name<|endoftext|>"} {"prompt":"get() = get(CommonConfigurationKeys.LANGUAGE_VERSION_SETTINGS, LanguageVersionSettingsImpl.DEFAULT)\n set(value) = put(CommonConfigurationKeys.LANGUAGE_VERSION_SETTINGS, value)\n\nval LanguageVersionSettings.isLibraryToSourceAnalysisEnabled: Boolean\n get() = getFlag(AnalysisFlags.libraryToSourceAnalysis)","completion":"val LanguageVersionSettings.areExpectActualClassesStable: Boolean\n get() {\n return getFlag(AnalysisFlags.muteExpectActualClassesWarning) || supportsFeature(LanguageFeature.ExpectActualClasses)\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.psi.KtWhenEntry\nimport org.jetbrains.kotlin.psi.KtWhenExpression\nimport org.jetbrains.kotlin.resolve.BindingContext\nimport org.jetbrains.kotlin.resolve.constants.ConstantValue\nimport org.jetbrains.kotlin.resolve.constants.NullValue","completion":"import org.jetbrains.kotlin.types.KotlinType\nimport org.jetbrains.kotlin.types.TypeUtils\nimport org.jetbrains.org.objectweb.asm.Label\nimport org.jetbrains.org.objectweb.asm.Type\nimport org.jetbrains.org.objectweb.asm.commons.InstructionAdapter\nimport java.util.*<|endoftext|>"} {"prompt":"private fun addMethodsFromDataClass(result: MutableList, classOrObjectSymbol: KtNamedClassOrObjectSymbol) {\n if (!classOrObjectSymbol.isData) return\n\n fun createMethodFromAny(ktFunctionSymbol: KtFunctionSymbol) {","completion":"\/\/ Similar to `copy`, synthetic members from `Any` should refer to `data` class as origin, not the function in `Any`.\n val lightMemberOrigin = classOrObjectDeclaration?.let { LightMemberOriginForDeclaration(it, JvmDeclarationOriginKind.OTHER) }\n result.add(\n SymbolLightSimpleMethod(\n ktAnalysisSession = this@KtAnalysisSession,\n ktFunctionSymbol,<|endoftext|>"} {"prompt":"0xbff921fb54442d18UL, 0xbff921fb54442d18UL, 0xbff921fb54434d1bUL, 0xbff921fb54450d16UL,","completion":"0xbff921fb54442d18UL, 0xbff921fb54442d18UL, 0xbff921fb54442d18UL, 0xbff921fb54442d18UL,<|endoftext|>"} {"prompt":"this.supertypes = mutableListOf().apply {\n addIfNotNull(superName?.convertInternalNameToClassifierType())\n interfaces?.forEach {\n addIfNotNull(it.convertInternalNameToClassifierType())\n }\n }\n }\n }\n\n private fun parseClassSignature(signature: String) {","completion":"val iterator = StringCharacterIterator(signature)\n this.typeParameters =\n signatureParser\n .parseTypeParametersDeclaration(iterator, context)\n .also(context::addTypeParameters)\n\n val supertypes = SmartList()\n supertypes.addIfNotNull(signatureParser.parseClassifierRefSignature(iterator, context))<|endoftext|>"} {"prompt":"\/\/ library.kt:25 box: $i$f$foo\\56\\65:int=0:int, array\\56:java.lang.Integer[]=java.lang.Integer[], myClass\\56:MyClass=MyClass, this_\\62:MyClass=MyClass, $i$f$f2\\62\\506:int=0:int,","completion":"$i$a$-f2-LibraryKt$foo$2\\64\\510\\56:int=0:int<|endoftext|>"} {"prompt":"\/\/ library.kt:53 box: $i$f$foo\\1\\64:int=0:int, array\\1:java.lang.Integer[]=java.lang.Integer[], myClass\\1:MyClass=MyClass","completion":"\/\/ library.kt:14 box: $i$f$foo\\1\\64:int=0:int, array\\1:java.lang.Integer[]=java.lang.Integer[], myClass\\1:MyClass=MyClass, this_\\52:MyClass=MyClass, $i$f$f2\\52\\480:int=0:int<|endoftext|>"} {"prompt":"val b: B = B(a)\n \/\/ crash here\n }\n}\n\nclass C\n\nclass D(foo: C) {\n fun test(a: C) {","completion":"val d: D = D(a)\n }\n}<|endoftext|>"} {"prompt":"return builtIns.getArrayType(Variance.INVARIANT, componentType)\n }\n\n override fun KotlinTypeMarker.isArrayOrNullableArray(): Boolean {\n require(this is KotlinType, this::errorMessage)\n return KotlinBuiltIns.isArray(this)\n }","completion":"override fun KotlinTypeMarker.hasAnnotation(fqName: FqName): Boolean {\n require(this is KotlinType, this::errorMessage)\n return annotations.hasAnnotation(fqName)\n }\n\n override fun KotlinTypeMarker.getAnnotationFirstArgumentValue(fqName: FqName): Any? {<|endoftext|>"} {"prompt":"fun incrementAndGetOrdinal(): Long\n}\n\n\/**\n * This class is used for counting builds involving Kotlin withing one Gradle daemon\n * One instance is kept available via JMX bean after build completion. If other builds are executed with other version\n * of Kotlin plugin, they are still able to reuse this build counter vis JXM interface\n *\/\nclass DaemonReuseCounter private constructor() : IDaemonReuseCounterMXBean {","completion":"private val count = AtomicLong()\n\n override fun getOrdinal(): Long {\n return count.get()\n }\n\n override fun incrementAndGetOrdinal(): Long {\n return count.incrementAndGet()\n }\n\n companion object {\n \/\/ Do not rename this bean otherwise compatibility with the older Kotlin Gradle Plugins would be lost<|endoftext|>"} {"prompt":"} else if (contracts.case_4(value_1, value_2) == false) {\n println(value_2)\n } else if (contracts.case_4(value_1, value_2) == null) {\n value_2()\n }\n}","completion":"\/\/ TESTCASE NUMBER: 5\nfun case_5(value_1: Number?, value_2: String?) {\n when (value_2.case_5(value_1)) {\n true -> {\n println(value_2.length)\n println(value_1.toByte())\n }<|endoftext|>"} {"prompt":"fun shouldCheckGradleRegisteredTasks(gradleVersion: GradleVersion) {\n buildNewKnLibraryDslCocoapodsProjectWithTasks(gradleVersion) {\n buildAndAssertAllTasks(\n listOf(\n \"shared:generateMylibStaticLibraryLinuxX64Podspec\",\n \"shared:generateMyslibSharedLibraryLinuxX64Podspec\",","completion":"\"shared:generateMyframeFrameworkIosArm64Podspec\",\n \"shared:generateMyfatframeFatFrameworkPodspec\",\n \"shared:generateSharedXCFrameworkPodspec\",\n \"lib:generateGrooframeFrameworkIosArm64Podspec\",\n \"lib:generateGrooxcframeXCFrameworkPodspec\",<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.cfg.pseudocode.instructions.special\n\nimport org.jetbrains.kotlin.psi.KtElement\nimport org.jetbrains.kotlin.cfg.pseudocode.instructions.BlockScope\nimport org.jetbrains.kotlin.cfg.pseudocode.instructions.InstructionWithNext","completion":"import org.jetbrains.kotlin.cfg.pseudocode.instructions.InstructionVisitor\nimport org.jetbrains.kotlin.cfg.pseudocode.instructions.InstructionVisitorWithResult\n\nclass MarkInstruction(\n element: KtElement,\n blockScope: BlockScope\n) : InstructionWithNext(element, blockScope) {<|endoftext|>"} {"prompt":"sideEffects = SideEffectKind.DEPENDS_ON_STATE\n source = callElement\n coroutineResult = true\n synthetic = true\n }\n}\n\nfun KotlinType.refineType() =\n TypeUtils.getAllSupertypes(this).find(KotlinBuiltIns::isPrimitiveTypeOrNullablePrimitiveType) ?: this\n\n\/**","completion":"* Tries to get precise statically known primitive type. Takes generic supertypes into account. Doesn't handle smart-casts.\n * This is needed to be compatible with JVM NaN behaviour:\n *\n * \/\/ Generics with Double super-type\n * fun foo(v: T) = println(v == v)\n * foo(Double.NaN) \/\/ false\n *<|endoftext|>"} {"prompt":"override fun toString(): String = ${\"if (step > 0) \\\"\\$first..\\$last step \\$step\\\" else \\\"\\$first downTo \\$last step \\${-step}\\\"\"}\n\n public companion object {\n \/**\n * Creates $progression within the specified bounds of a closed range.\n *","completion":"* The progression starts with the [rangeStart] value and goes toward the [rangeEnd] value not excluding it, with the specified [step].\n * In order to go backwards the [step] must be negative.\n *\n * [step] must be greater than `$stepMinValue` and not equal to zero.\n *\/<|endoftext|>"} {"prompt":"abstract class AbstractCollectDiagnosticsTest : AbstractAnalysisApiBasedTest() {\n override fun doTestByMainFile(mainFile: KtFile, mainModule: KtTestModule, testServices: TestServices) {\n doTestByKtFile(mainFile, testServices)\n }\n\n \/**\n * [ktFile] may be a fake file for dangling module tests.\n *\/","completion":"protected fun doTestByKtFile(ktFile: KtFile, testServices: TestServices) {\n fun TextRange.asLineColumnRange(): String {\n return getLineAndColumnRangeInPsiFile(ktFile, this).toString()\n }\n\n analyseForTest(ktFile) {\n val diagnosticsInFile =<|endoftext|>"} {"prompt":"@kotlin.internal.InlineOnly\n public final inline operator fun times(other: kotlin.UByte): kotlin.UInt\n\n @kotlin.internal.InlineOnly\n public final inline operator fun times(other: kotlin.UInt): kotlin.UInt\n\n @kotlin.internal.InlineOnly","completion":"public final inline operator fun times(other: kotlin.ULong): kotlin.ULong\n\n @kotlin.internal.InlineOnly\n public final inline operator fun times(other: kotlin.UShort): kotlin.UInt\n\n @kotlin.internal.InlineOnly\n public final inline fun toByte(): kotlin.Byte<|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-42130\n\ninterface A\ninterface B : A\n\nfun B.foo(): Boolean = true\nfun run(action: () -> T): T = action()\n\nfun foo(a: A): String {\n return when (a) {\n is B -> when {\n run { a.foo() } -> \"OK\"\n else -> \"Fail 1\"\n }","completion":"else -> \"Fail 2\"\n }\n}\n\nclass C : B\n\nfun box(): String = foo(C())<|endoftext|>"} {"prompt":"* Checks if the specified [high] and [low] chars are [Char.isHighSurrogate] and [Char.isLowSurrogate] correspondingly.\n *\/\n@ExperimentalNativeApi\n\/\/ TODO: Consider removing from public API\npublic fun Char.Companion.isSurrogatePair(high: Char, low: Char): Boolean = high.isHighSurrogate() && low.isLowSurrogate()","completion":"\/**\n * Converts the codepoint specified to a char array. If the codepoint is not supplementary, the method will\n * return an array with one element otherwise it will return an array A with a high surrogate in A[0] and\n * a low surrogate in A[1].\n *\n *\n * Note that this function is unstable.\n * In the future it could be deprecated in favour of an overload that would accept a `CodePoint` type.<|endoftext|>"} {"prompt":"require(reifiedIs>(w)) { \"reifiedIs>(w)\" }\n\n reifiedAsSucceeds>(w, \"reified w as Iterator<*>\")","completion":"reifiedAsFailsWithCCE>(w, \"reified w as MutableIterator<*>\")\n reifiedAsSucceeds>(w, \"reified w as MutableIterable<*>\")<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.android.synthetic.descriptors.AndroidSyntheticPackageFragmentDescriptor\nimport org.jetbrains.kotlin.android.synthetic.descriptors.LazySyntheticElementResolveContext\nimport org.jetbrains.kotlin.android.synthetic.descriptors.PredefinedPackageFragmentDescriptor","completion":"import org.jetbrains.kotlin.android.synthetic.descriptors.PredefinedPackageFragmentDescriptor.LazyAndroidExtensionsPackageFragmentDescriptor\nimport org.jetbrains.kotlin.android.synthetic.forEachUntilLast\nimport org.jetbrains.kotlin.descriptors.ModuleDescriptor<|endoftext|>"} {"prompt":"assertEquals(\"300m\", opts2.maxMemory)\n assertEquals( -1, DaemonJVMOptionsMemoryComparator().compare(opts, opts2))\n assertEquals(\"300m\", listOf(opts, opts2).maxWithOrNull(DaemonJVMOptionsMemoryComparator())?.maxMemory)","completion":"val myXmxParam = ManagementFactory.getRuntimeMXBean().inputArguments.first { it.startsWith(\"-Xmx\") }\n TestCase.assertNotNull(myXmxParam)\n val myXmxVal = myXmxParam.substring(4)\n System.clearProperty(CompilerSystemProperties.COMPILE_DAEMON_JVM_OPTIONS_PROPERTY.property)<|endoftext|>"} {"prompt":"\"-XX:+UseCodeCacheFlushing\",\n \"-XX:ReservedCodeCacheSize=${reservedCodeCacheSizeMb}m\",\n \"-XX:MaxMetaspaceSize=${maxMetaspaceSizeMb}m\",\n \"-XX:CICompilerCount=2\",\n \"-Djna.nosys=true\"\n )","completion":"val nativeMemoryTracking = project.providers.gradleProperty(\"kotlin.build.test.process.NativeMemoryTracking\")\n if (nativeMemoryTracking.isPresent) {\n jvmArgs(\"-XX:NativeMemoryTracking=${nativeMemoryTracking.get()}\")\n }\n\n val junit5ParallelTestWorkers =<|endoftext|>"} {"prompt":"$i$f$baz1\\21\\109:int=0:int, baz1Var\\21:int=3:int, baz1BlockParam\\23:int=1:int, $i$a$-baz1-LibraryKt$inlineCall$1\\23\\112\\20:int=0:int, baz1LambdaVar\\23:int=1:int,","completion":"baz1Param\\24:int=2:int, $i$f$baz1\\24\\119:int=0:int, baz1Var\\24:int=3:int<|endoftext|>"} {"prompt":"override fun contains(element: T): Boolean = this@asList.contains(element)\n override fun get(index: Int): T = this@asList[index]\n override fun indexOf(element: T): Int = this@asList.indexOf(element)\n override fun lastIndexOf(element: T): Int = this@asList.lastIndexOf(element)\n }\n}","completion":"\/**\n * Returns a [List] that wraps the original array.\n *\/\npublic actual fun ByteArray.asList(): List {\n return object : AbstractList(), RandomAccess {\n override val size: Int get() = this@asList.size\n override fun isEmpty(): Boolean = this@asList.isEmpty()<|endoftext|>"} {"prompt":"NestedType(PossiblyInnerType(classifier, type.arguments, null), emptyList())\n } else {\n NestedType(innerTypesAsList[indexOfParameterizedType], innerTypesAsList.drop(indexOfParameterizedType + 1))\n }\n }\n }\n\n class NestedType(val root: PossiblyInnerType, val nested: List) {","completion":"val allInnerTypes: List\n get() = buildList {\n add(root)\n addAll(nested)\n }\n }\n\n override val typeContext = KtFe10TypeSystemCommonBackendContextForTypeMapping(resolveSession)<|endoftext|>"} {"prompt":"public inline fun Array.groupBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map> {\n return groupByTo(LinkedHashMap>(), keySelector, valueTransform)\n}\n\n\/**\n * Groups values returned by the [valueTransform] function applied to each element of the original array","completion":"* by the key returned by the given [keySelector] function applied to the element\n * and returns a map where each group key is associated with a list of corresponding values.\n * \n * The returned map preserves the entry iteration order of the keys produced from the original array.\n * \n * @sample samples.collections.Collections.Transformations.groupByKeysAndValues\n *\/<|endoftext|>"} {"prompt":"this\n test(this)\n this.a = 20","completion":"}, this) {\n this.a = 30\n }\n}\n\nopen class Base(val x: Int)\n\nclass Derived : Base(this.y) { \/\/ FE 1.0 reports NO_THIS here<|endoftext|>"} {"prompt":"public inline fun FloatArray.sumOf(selector: (Float) -> java.math.BigInteger): java.math.BigInteger {\n var sum: java.math.BigInteger = 0.toBigInteger()\n for (element in this) {\n sum += selector(element)\n }\n return sum\n}\n\n\/**","completion":"* Returns the sum of all values produced by [selector] function applied to each element in the array.\n *\/\n@SinceKotlin(\"1.4\")\n@OptIn(kotlin.experimental.ExperimentalTypeInference::class)\n@OverloadResolutionByLambdaReturnType\n@kotlin.jvm.JvmName(\"sumOfBigInteger\")\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"constructor.startOffset,\n constructor.endOffset,\n OVERRIDING_INITIALIZER_BY_CONSTRUCTOR,\n initMethod.name,\n DescriptorVisibilities.PUBLIC,\n isInline = false,\n isExpect = false,\n irClass.defaultType,\n Modality.OPEN,\n IrSimpleFunctionSymbolImpl(),","completion":"isTailrec = false,\n isSuspend = false,\n isOperator = false,\n isInfix = false,\n ).also { result ->\n result.parent = irClass\n result.createDispatchReceiverParameter()\n result.valueParameters += constructor.valueParameters.map { it.copyTo(result) }\n\n result.overriddenSymbols += initMethod.symbol<|endoftext|>"} {"prompt":"val testDependencyKlibsClasspath = testDependencyKlibs.incoming.files.elements.map { elements ->\n elements.joinToString(File.pathSeparator) { location -> location.asFile.absolutePath }\n }\n\n doFirst {\n systemProperty(\"testDependencyKlibs\", testDependencyKlibsClasspath.get())\n }","completion":"\/* Add dependency files as inputs to this test task *\/\n inputs.files(testDependencyKlibs).withPathSensitivity(PathSensitivity.RELATIVE)\n }\n\n useJUnitPlatform()\n enableJunit5ExtensionsAutodetection()\n\n \/* Special 'Kotlin in Fleet' flag that can switch test mode to 'local development' *\/<|endoftext|>"} {"prompt":"return this\n }\n\n override fun transformAnnotations(transformer: FirTransformer, data: D): FirConstructorImpl {\n annotations.transformInplace(transformer, data)\n return this\n }\n\n override fun transformDelegatedConstructor(transformer: FirTransformer, data: D): FirConstructorImpl {","completion":"delegatedConstructor = delegatedConstructor?.transform(transformer, data)\n return this\n }\n\n override fun transformBody(transformer: FirTransformer, data: D): FirConstructorImpl {\n body = body?.transform(transformer, data)\n return this\n }\n\n override fun replaceStatus(newStatus: FirDeclarationStatus) {<|endoftext|>"} {"prompt":"val descriptorsForImport = descriptorsSelector(getImportScope(directive))\n descriptors = descriptors.concat(descriptorsForImport)\n }\n\n descriptors.orEmpty()\n }\n\n fun getImportScope(directive: KtImportInfo): ImportingScope {\n return importedScopesProvider(directive) ?: ImportingScope.Empty\n }","completion":"val allNames: Set? by components.storageManager.createNullableLazyValue {\n indexedImports.imports.asIterable().flatMapToNullable(ObjectOpenHashSet()) { getImportScope(it).computeImportedNames() }\n }\n\n fun definitelyDoesNotContainName(name: Name): Boolean {<|endoftext|>"} {"prompt":"return DummyDelegate(KtDiagnosticFactory1(prop.name, severity, positioningStrategy, psiType))\n }\n}\n\nclass DiagnosticFactory2DelegateProvider(\n private val severity: Severity,\n private val positioningStrategy: AbstractSourceElementPositioningStrategy,\n private val psiType: KClass<*>\n) {","completion":"operator fun provideDelegate(thisRef: Any?, prop: KProperty<*>): ReadOnlyProperty> {\n return DummyDelegate(KtDiagnosticFactory2(prop.name, severity, positioningStrategy, psiType))\n }\n}\n\nclass DiagnosticFactory3DelegateProvider(\n private val severity: Severity,<|endoftext|>"} {"prompt":"const val b1 = safeClassCast(10)\nconst val b2 = safeClassCast(\"10\")\n\n\/\/ in this example all unsafe cast will be \"successful\", but will fall when trying to assign","completion":"const val c1 = unsafeClassCast()\nconst val c2 = "} {"prompt":"private fun Set.checkNoDuplicates(kind: String) {\n fun Map>.dump(): String = values.flatten().sortedBy { it.moduleName }.joinToString()\n\n val duplicatedModules = groupBy { it.moduleName }.filterValues { it.size > 1 }\n assertTrue(duplicatedModules.isEmpty()) {","completion":"\"There are duplicated $kind module dependencies: ${duplicatedModules.dump()}\"\n }\n\n val duplicatedFiles = groupBy { it.libraryFile.absolutePath }.filterValues { it.size > 1 }\n assertTrue(duplicatedFiles.isEmpty()) {\n \"There are $kind module dependencies with conflicting paths: ${duplicatedFiles.dump()}\"\n }\n }\n }<|endoftext|>"} {"prompt":"expectFailure(linkage(\"Can not get instance of singleton 'EnumClassThatBecomesPrivate.ENTRY': Private enum entry declared in module can not be accessed in module \")) { getAnnotationClassWithParameterThatBecomesPrivate4AsAny().toString() }","completion":"expectFailure(linkage(\"Can not get instance of singleton 'EnumClassThatBecomesPrivate.ENTRY': Private enum entry declared in module can not be accessed in module \")) { getAnnotationClassWithParameterThatBecomesPrivate4AsAnyInline().toString() }<|endoftext|>"} {"prompt":"override fun put(entry: Entry): T? {\n return extras.put(entry.key, entry)?.let { it.value as T }\n }\n\n override fun putAll(from: Iterable>) {\n this.extras.putAll(from.associateBy { it.key })\n }","completion":"override fun get(key: Key): T? {\n return extras[key]?.let { it.value as T }\n }\n\n override fun remove(key: Key): T? {\n return extras.remove(key)?.let { it.value as T }\n }\n\n override fun clear() {\n extras.clear()<|endoftext|>"} {"prompt":"it.resume(a + b)\n COROUTINE_SUSPENDED\n }\n return local(a, b)\n}\n\nfun builder(c: suspend () -> Unit) {\n c.startCoroutine(EmptyContinuation)\n}\n\nfun box(): String {\n var res = \"FAIL\"\n builder {\n res = callLocal(\"O\", \"K\")\n }","completion":"return res\n}<|endoftext|>"} {"prompt":"\/\/ This is a workaround\n \/\/ for TypeParameters having initial parents (old IrFunctions before deepCopy).\n \/\/ Otherwise it doesn't compile on k\/js and k\/native (can't find symbols).\n \/\/ Ideally we will find a solution to remap symbols of TypeParameters in\n \/\/ ComposableSingletons properties after ComposerParamTransformer\n \/\/ (deepCopy in ComposerParamTransformer didn't help).\n return wrapped","completion":"}\n return irGetComposableSingleton(\n lambdaExpression = wrapped,\n lambdaType = expression.type\n )\n } else {\n return wrapped\n }\n }\n\n private fun hasTypeParameter(type: IrType): Boolean {\n return type.anyTypeArgument { true }\n }\n\n private fun irGetComposableSingleton(<|endoftext|>"} {"prompt":"override fun diagnoseUnknownModuleInfo(infos: List) = throw IllegalStateException(\"Should not be called for $infos\")\n\n override fun moduleInfoForModuleDescriptor(moduleDescriptor: ModuleDescriptor): M {\n throw IllegalStateException(\"$moduleDescriptor is not contained in this resolver\")\n }\n}\n\ndata class ModuleContent(","completion":"val moduleInfo: M,\n val syntheticFiles: Collection,\n val moduleContentScope: GlobalSearchScope\n)\n\ninterface PlatformAnalysisParameters {\n object Empty : PlatformAnalysisParameters\n}\n\ninterface CombinedModuleInfo : ModuleInfo {\n val containedModules: List\n val platformModule: ModuleInfo\n}\n\n\/**<|endoftext|>"} {"prompt":"\/\/ old inliner with $iv suffixes.\n val inlineScopesNewFormatToOld = listOf(\"inlineScopes\/newFormatToOld\")\n\n generateTestGroupSuiteWithJUnit5(args, mainClassName) {\n testGroup(testsRoot = \"compiler\/tests-common-new\/tests-gen\", testDataRoot = \"compiler\/testData\") {","completion":"testClass {\n model(\"diagnostics\/tests\", pattern = \"^(.*)\\\\.kts?$\", excludedPattern = excludedCustomTestdataPattern)\n model(\"diagnostics\/testsWithStdLib\", excludedPattern = excludedCustomTestdataPattern)\n }\n\n testClass {<|endoftext|>"} {"prompt":"assertEquals(\"MyObject.Object.Class.a\", MyObject.Object.Class.a)\n assertEquals(\"MyObject.Object.Class.b\", MyObject.Object.Class.b)\n assertEquals(142, MyObject.Object.Class.test())\n\n assertEquals(\"MyObject.Class().a\", MyObject.Class(\"MyObject.Class().a\").a)","completion":"assertEquals(\"MyObject.Class().b\", MyObject.Class(\"something\").b)\n assertEquals(42, MyObject.Class(\"something\").test())\n assertEquals(\"MyObject.Class.a\", MyObject.Class.a)\n assertEquals(\"MyObject.Class.b\", MyObject.Class.b)\n assertEquals(142, MyObject.Class.test())<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\nimport kotlin.test.assertEquals\n\ninline fun foo(x: String, block: (String) -> String) = block(x)\n\nfun box(): String {\n val res = foo(\"abc\") {\n fun bar(y: String) = y + \"cde\"\n bar(it)\n }\n\n assertEquals(\"abccde\", res)","completion":"return \"OK\"\n}<|endoftext|>"} {"prompt":"\/\/language=Gradle\n \"\"\"\n |plugins {\n | id(\"org.jetbrains.kotlin.kapt\")\n |${it.substringAfter(\"plugins {\")}\n \"\"\".trimMargin()\n }\n\n build(\":app:testDebugUnitTest\")","completion":"appProject.kotlinSourcesDir().resolve(\"com\/example\/KotlinActivity.kt\").appendText(\n \/\/language=kt\n \"\"\"\n {\n private val x = 1\n }\n \"\"\".trimIndent()\n )\n\n build(\":app:testDebugUnitTest\") {<|endoftext|>"} {"prompt":"\/\/ See ObjC instanceOf code generation for details.\n if (expression is IrTypeOperatorCall && expression.operator.callsInstanceOf()\n && expression.typeOperand.isObjCObjectType()) {\n val objcObjGetter = IrCallImpl.fromSymbolOwner(expression.startOffset, expression.endOffset,\n objCObjectRawValueGetter.owner.returnType,","completion":"objCObjectRawValueGetter,\n objCObjectRawValueGetter.owner.typeParameters.size,\n objCObjectRawValueGetter.owner.valueParameters.size\n ).apply {\n extensionReceiver = expression.argument\n }\n expressions += objcObjGetter to currentLoop\n }\n\n if (expression is IrReturnableBlock) {<|endoftext|>"} {"prompt":"ObjCClassType(referenceClass(classDescriptor).objCName, typeArgs)\n }\n }\n\n private tailrec fun mapObjCObjectReferenceTypeIgnoringNullability(descriptor: ClassDescriptor): ObjCNonNullReferenceType {\n \/\/ TODO: more precise types can be used.\n\n if (descriptor.isObjCMetaClass()) return ObjCMetaClassType","completion":"if (descriptor.isObjCProtocolClass()) return foreignClassType(\"Protocol\")\n\n if (descriptor.isExternalObjCClass() || descriptor.isObjCForwardDeclaration()) {\n return if (descriptor.isInterface) {\n val name = descriptor.name.asString().removeSuffix(\"Protocol\")\n foreignProtocolType(name)\n } else {<|endoftext|>"} {"prompt":"open val ctrlKey: Boolean\n open val shiftKey: Boolean\n open val altKey: Boolean\n open val metaKey: Boolean\n open val repeat: Boolean\n open val isComposing: Boolean\n open val charCode: Int\n open val keyCode: Int\n open val which: Int\n fun getModifierState(keyArg: String): Boolean\n\n companion object {","completion":"val DOM_KEY_LOCATION_STANDARD: Int\n val DOM_KEY_LOCATION_LEFT: Int\n val DOM_KEY_LOCATION_RIGHT: Int\n val DOM_KEY_LOCATION_NUMPAD: Int\n val NONE: Short\n val CAPTURING_PHASE: Short\n val AT_TARGET: Short\n val BUBBLING_PHASE: Short<|endoftext|>"} {"prompt":"val ARRAY_BUFFER: Int\n val ELEMENT_ARRAY_BUFFER: Int\n val ARRAY_BUFFER_BINDING: Int\n val ELEMENT_ARRAY_BUFFER_BINDING: Int\n val STREAM_DRAW: Int\n val STATIC_DRAW: Int\n val DYNAMIC_DRAW: Int\n val BUFFER_SIZE: Int","completion":"val BUFFER_USAGE: Int\n val CURRENT_VERTEX_ATTRIB: Int\n val FRONT: Int\n val BACK: Int\n val FRONT_AND_BACK: Int\n val CULL_FACE: Int\n val BLEND: Int\n val DITHER: Int\n val STENCIL_TEST: Int\n val DEPTH_TEST: Int<|endoftext|>"} {"prompt":"fun fromString(string: String): BackendKind<*>? {\n return when (string) {\n \"ClassicBackend\" -> ClassicBackend\n \"IrBackend\" -> IrBackend\n \"DeserializedIrBackend\" -> DeserializedIrBackend\n else -> null\n }\n }","completion":"fun fromTargetBackend(targetBackend: TargetBackend?): BackendKind<*> {\n if (targetBackend == null) return BackendKind.NoBackend\n return if (targetBackend.isIR) IrBackend\n else ClassicBackend\n }\n}\n\nobject ArtifactKinds {\n object Jvm : BinaryKind(\"JVM\")<|endoftext|>"} {"prompt":"put(\n FirSerializationErrors.INNER_CLASSES_NOT_SUPPORTED,\n \"Inner (with reference to outer this) serializable classes are not supported. Remove @Serializable annotation or 'inner' keyword.\"\n )\n put(\n FirSerializationErrors.COMPANION_OBJECT_AS_CUSTOM_SERIALIZER_DEPRECATED,","completion":"\"Class {0} has implicit custom serializer as its companion object. This behaviour is not properly reflected by @Serializable annotation without arguments and therefore is deprecated. \" +\n \"To be able to use companion object as the {0} default serializer, please explicitly mention it in the annotation on {0}: @Serializable({0}.Companion::class). \" +<|endoftext|>"} {"prompt":"for (i in (3L downTo 5L).reversed()) {\n list4.add(i)\n if (list4.size > 23) break\n }\n if (list4 != listOf()) {\n return \"Wrong elements for (3L downTo 5L).reversed(): $list4\"\n }\n\n val list5 = ArrayList()","completion":"for (i in ('a' downTo 'c').reversed()) {\n list5.add(i)\n if (list5.size > 23) break\n }\n if (list5 != listOf()) {\n return \"Wrong elements for ('a' downTo 'c').reversed(): $list5\"\n }\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"assertNull(property.setter, \"Expected property to have *no* setter\")\n assertFalse(property.isLateInit, \"Expected property to be *not* lateinit\")\n assertFalse(property.isVar, \"Expected property to be *not* var\")\n assertEquals(Visibilities.Public, property.visibility, \"Expected property to be public\")","completion":"assertNull(property.extensionReceiver, \"Expected property to *not* have extension receiver\")\n }\n\n fun `test simple var property`() {\n val module = createCirTreeFromSourceCode(\"var x: Int = 42\")\n val property = module.assertSingleProperty()\n assertNotNull(property.getter, \"Expected property has getter\")<|endoftext|>"} {"prompt":"* Needed for the implementation of IDE intention.\n *\/\n val actualAnnotationTargetElement: SourceElementMarker,\n val type: IncompatibilityType,\n )\n\n fun areAnnotationsCompatible(\n expectSymbol: DeclarationSymbolMarker,\n actualSymbol: DeclarationSymbolMarker,","completion":"context: K1ExpectActualMatchingContext<*>,\n ): Incompatibility? = with(context) {\n areAnnotationsCompatible(expectSymbol, actualSymbol)\n }\n\n private fun K1ExpectActualMatchingContext<*>.areAnnotationsCompatible(\n expectSymbol: DeclarationSymbolMarker,\n actualSymbol: DeclarationSymbolMarker,<|endoftext|>"} {"prompt":"@Retention(AnnotationRetention.BINARY)\nannotation class RefinesInSwift\n\n@RefinesInSwift\n@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION)\n@Retention(AnnotationRetention.BINARY)\npublic annotation class ShouldRefineInSwift\n\n\/\/ FILE: platform.kt","completion":"actual typealias MyHidesFromObjC = kotlin.native.HidesFromObjC\nactual typealias MyHiddenFromObjC = kotlin.native.HiddenFromObjC\nactual typealias MyRefinesInSwift = kotlin.native.RefinesInSwift\nactual typealias MyShouldRefineInSwift = kotlin.native.ShouldRefineInSwift<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !CHECK_TYPE\n\npackage h\n\/\/+JDK\nimport java.util.*\nimport checkSubtype\n\nfun id(t: T) : T = t\n\nfun id1(t: T) = t\n\nfun elem(t: List): R = t.get(0)","completion":"fun elemAndList(r: R, t: List): R = t.get(0)\n\nfun both(t1: T, t2: T) : T = t1\n\nfun test1() {\n val a = elem(list(2))\n val b = id(elem(list(2)))<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNCHECKED_CAST -OPT_IN_USAGE_ERROR -UNUSED_PARAMETER\n\nclass Bar\n\nfun materialize() = null as T\n\ninterface FlowCollector {\n suspend fun emit(value: T)\n}\n\ninterface Flow","completion":"public fun flow(block: suspend FlowCollector.() -> Unit) = materialize>()\n\nfun foo(total: Int, next: Int) = 10\nfun foo(total: Int, next: Float) = 10\nfun foo(total: Float, next: Int) = 10\n\nfun call(x: String) {}\n\nsuspend fun foo(x: Int) = flow {<|endoftext|>"} {"prompt":"object V : P()\n class M : P()\n }\n\n val p: P = object : P() {\n\n }\n\n val r = object : P() {\n\n }\n}\n\nclass K : P()\n\nobject B {\n class I : P()\n}\n\nfun test() {\n class L : P()\n val a = object : P() {","completion":"}\n}<|endoftext|>"} {"prompt":"expect fun bar(): String\n}","completion":"\/\/ MODULE: m1-jvm()()(m1-common)\n\/\/ FILE: jvm.kt<|endoftext|>"} {"prompt":"}\n\nconst val aSimpleName = A::class.simpleName!!\nconst val aQualifiedName = A::class.qualifiedName!!","completion":"const val aMembers = "} {"prompt":"val parcelCreateLongArray: IrSimpleFunctionSymbol =\n androidOsParcel.owner.addFunction(\n \"createLongArray\",\n irBuiltIns.primitiveArrayForType.getValue(irBuiltIns.longType).defaultType\n ).symbol\n\n val parcelCreateStringArray: IrSimpleFunctionSymbol =","completion":"androidOsParcel.owner.addFunction(\"createStringArray\", irBuiltIns.arrayClass.typeWith(irBuiltIns.stringType)).symbol\n\n val parcelCreateStringArrayList: IrSimpleFunctionSymbol =\n androidOsParcel.owner.addFunction(\"createStringArrayList\", javaUtilArrayList.defaultType).symbol\n\n val parcelReadBundle: IrSimpleFunctionSymbol =<|endoftext|>"} {"prompt":"val argumentSource = sourceAttribute?.source\n\n if (argumentType != null && isExplicitTypeArgumentSource(argumentSource)) {\n if (!isIgnoreTypeParameters || (argumentType.typeArguments.isEmpty() && argumentType !is ConeTypeParameterType)) {\n val intersection =\n typeSystemContext.intersectTypes(typeParameters[index].resolvedBounds.map { it.coneType })","completion":"val upperBound = substitutor.substituteOrSelf(intersection)\n if (!AbstractTypeChecker.isSubtypeOf(\n typeSystemContext,\n argumentType,\n upperBound,\n stubTypesEqualToAnything = true\n )\n ) {\n if (isReportExpansionError && argumentTypeRef == null) {\n reporter.reportOn(<|endoftext|>"} {"prompt":"h.toInt()\n\n i.toInt()\n j.toByte()\n\n k.intValue()\n k.byteValue()\n\n l.intValue()\n l.doubleValue()\n\n m.intValue()\n m.doubleValue()\n\n n.intValue()\n\n o.intValue()\n o.byteValue()\n\n p.intValue()","completion":"p.shortValue()\n\n q.intValue()\n q.toByte()\n\n r.intValue()\n}<|endoftext|>"} {"prompt":"@AndroidGradlePluginTests\nclass ConfigurationCacheForAndroidIT : AbstractConfigurationCacheIT() {\n @DisplayName(\"works in android plus kapt project\")\n @GradleAndroidTest\n fun testAndroidKaptProject(\n gradleVersion: GradleVersion,\n agpVersion: String,\n jdkVersion: JdkVersions.ProvidedJdk,\n ) {\n project(","completion":"\"kapt2\/android-dagger\",\n gradleVersion,\n buildOptions = defaultBuildOptions.copy(androidVersion = agpVersion),\n buildJdk = jdkVersion.location\n ) {\n gradleProperties.append(\"\\nkapt.incremental.apt=false\")\n\n testConfigurationCacheOf(\n \":app:compileDebugKotlin\",<|endoftext|>"} {"prompt":"\/\/ DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS\n\nclass MemberScope {\n\n\n class TestBasic {\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor()","completion":"constructor()\n }\n\n\n class TestIdenticalPrimaryAndSecondaryConstructorsA constructor() {\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor() : this()<|endoftext|>"} {"prompt":"StateMachineChecker.suspendHere()\n StateMachineChecker.suspendHere()\n StateMachineChecker.suspendHere()\n StateMachineChecker.suspendHere()\n StateMachineChecker.suspendHere()\n }\n l()\n l()\n}\n\n\/\/ FILE: inlineSite.kt\nimport kotlin.coroutines.*\nimport helpers.*","completion":"fun builder(c: suspend () -> Unit) {\n c.startCoroutine(CheckStateMachineContinuation)\n}\n\nfun box(): String {\n StateMachineChecker.reset()\n var res = \"OK\"\n builder {\n crossinlineMe {\n res = \"FAIL 1\"\n }\n }\n StateMachineChecker.check(numberOfSuspensions = 10)\n return res\n}<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\nclass Key\nclass Box\n\nfun get(key: Key): T? = null\nfun acceptBox(box: Box) {}\n\nfun test(key: Key>) {\n \/\/ CS of get:","completion":"\/\/ Key)> <: Key\n \/\/ If the type is not approximated to subtype before fixation, the type of the lambda parameter `it` becomes Any?\n get(key)?.let { acceptBox(it) }\n\n val x = get(key)\n x?.let { acceptBox(it) }\n}<|endoftext|>"} {"prompt":"return if (this@case_22_2 == null || this@case_22_2 !is String) true else null\n}\nfun T?.case_22_3(): Boolean? {\n contract { returns(null) implies (this@case_22_3 == null || this@case_22_3 !is String) }","completion":"return if (this@case_22_3 == null || this@case_22_3 !is String) null else true\n}\n\n\/\/ TESTCASE NUMBER: 23\nfun T.case_23_1(): Boolean {<|endoftext|>"} {"prompt":"val konanHome: Provider = kotlinNativeProvider.map { it.bundleDirectory.get().asFile.absolutePath }\n\n private val runnerSettings = KotlinNativeCompilerRunner.Settings.of(\n kotlinNativeProvider.get().bundleDirectory.getFile().absolutePath,\n kotlinNativeProvider.get().konanDataDir.orNull,\n project\n )","completion":"@TaskAction\n fun compile() {\n val metricsReporter = metrics.get()\n\n addBuildMetricsForTaskAction(metricsReporter = metricsReporter, languageVersion = null) {\n validatedExportedLibraries()\n\n val output = outputFile.get()\n output.parentFile.mkdirs()<|endoftext|>"} {"prompt":"if (!(element22 in 1L..3L) != !range0.contains(element22)) throw AssertionError()\n if (!(element22 !in 1L..3L) != range0.contains(element22)) throw AssertionError()\n}\n\nfun testR0xE23() {\n \/\/ with possible local optimizations","completion":"if (4L in 1L..3L != range0.contains(4L)) throw AssertionError()\n if (4L !in 1L..3L != !range0.contains(4L)) throw AssertionError()\n if (!(4L in 1L..3L) != !range0.contains(4L)) throw AssertionError()<|endoftext|>"} {"prompt":"if (c != null) c.funAny()\n\n if (c != null) c.funNullableT()","completion":"if (c != null) c.funNullableAny()\n if (c != null) c<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.FirElement\nimport org.jetbrains.kotlin.fir.visitors.FirTransformer\nimport org.jetbrains.kotlin.fir.visitors.FirVisitor\n\n\/**\n * Generated from: [org.jetbrains.kotlin.fir.tree.generator.FirTreeBuilder.statement]\n *\/","completion":"interface FirStatement : FirAnnotationContainer {\n override val source: KtSourceElement?\n override val annotations: List\n\n override fun accept(visitor: FirVisitor, data: D): R =\n visitor.visitStatement(this, data)\n\n @Suppress(\"UNCHECKED_CAST\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.incremental.storage\n\nimport com.intellij.util.io.DataExternalizer\nimport com.intellij.util.io.IOUtil\nimport com.intellij.util.io.KeyDescriptor\nimport org.jetbrains.annotations.TestOnly\nimport org.jetbrains.kotlin.incremental.IncrementalCompilationContext","completion":"import org.jetbrains.kotlin.utils.Printer\nimport java.io.File\n\n\/** [PersistentStorage] that provides a few extra utility methods. *\/\ninterface BasicMap : PersistentStorage {\n\n \/** Removes all entries. *\/\n fun clear() {\n synchronized(this) {\n keys.forEach { remove(it) }<|endoftext|>"} {"prompt":"private fun checkVarargParameters(function: FirFunction, context: CheckerContext, reporter: DiagnosticReporter) {\n val varargParameters = function.valueParameters.filter { it.isVararg }\n if (varargParameters.size > 1) {\n for (parameter in varargParameters) {","completion":"reporter.reportOn(parameter.source, FirErrors.MULTIPLE_VARARG_PARAMETERS, context)\n }\n }\n\n for (varargParameter in varargParameters) {\n val coneType = varargParameter.returnTypeRef.coneType\n val varargParameterType = when (function) {\n is FirAnonymousFunction -> coneType<|endoftext|>"} {"prompt":"\/\/ TESTCASE NUMBER: 4\nfun case_4(value_1: Any): String = when (value_1) {\n is Any? -> \"\"\n else -> \"\"\n}\n\n\/*\n * TESTCASE NUMBER: 5\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-22996\n *\/","completion":"fun case_5(value_1: Any?): String = when (value_1) {\n is Double -> \"\"\n is Int? -> \"\" \/\/ if value is null then this branch will be executed\n is String -> \"\"\n is Float? -> \"\" \/\/ redundant nullable type check\n is Char -> \"\"\n is Boolean -> \"\"\n else -> \"\"\n}\n\n\/\/ TESTCASE NUMBER: 6<|endoftext|>"} {"prompt":"doTest(build = { map {it.toShort()}.toShortArray() }, sortDescending = { from, to -> sortDescending(from, to) }, snapshot = { toList() })\n doTest(build = { map {it.toFloat()}.toFloatArray() }, sortDescending = { from, to -> sortDescending(from, to) }, snapshot = { toList() })","completion":"doTest(build = { map {it.toDouble()}.toDoubleArray() }, sortDescending = { from, to -> sortDescending(from, to) }, snapshot = { toList() })\n doTest(build = { map {'a' + it}.toCharArray() }, sortDescending = { from, to -> sortDescending(from, to) }, snapshot = { toList() })<|endoftext|>"} {"prompt":"public const val RENDER_DOC_COMMENTS: String = \"RENDER_DOC_COMMENTS\"\n }\n}\n\npublic sealed interface InputModule {\n public val name: String\n public val path: Path\n\n public class Source(\n override val name: String,\n override val path: Path,\n ): InputModule\n\n public class Binary(\n override val name: String,","completion":"override val path: Path,\n ) : InputModule\n}\n\npublic data class SwiftExportOutput(\n val swiftApi: Path,\n val kotlinBridges: Path,\n val cHeaderBridges: Path,\n)\n\n\/**\n * Trivial logging interface that should be implemented\n * by the environment to report messages from Swift export.\n *\/\npublic interface SwiftExportLogger {<|endoftext|>"} {"prompt":"test.allowedMatcher.matchExact(it)\n }\n\n if (notAllowed.isNotEmpty()) {\n append(test.message.format(notAllowed.size, notAllowed.joinToString(\"\\n\")))\n appendLine()\n appendLine()\n }\n\n val unmatched = test.allowedMatcher.unmatchedExact(allowed)","completion":"if (unmatched.isNotEmpty()) {\n val testMessage = test.message.format(unmatched.size, \"NONE\")\n append(\n \"Unused \\\"allowed files\\\" for test:\\n\" +\n \"`$testMessage`\\n\" +\n \"Remove exceptions for the test list:${unmatched.joinToString(\"\\n\", prefix = \"\\n\")}\"\n )\n appendLine()<|endoftext|>"} {"prompt":"targets[x] = if (targetLabel == null) {\n defaultBreakTarget!!\n }\n else {\n breakTargets[targetLabel]!!\n }\n }\n\n override fun visitContinue(x: JsContinue) {\n val targetLabel = x.label?.name\n targets[x] = if (targetLabel == null) {\n defaultContinueTarget!!","completion":"}\n else {\n continueTargets[targetLabel]!!\n }\n }\n\n private fun withBreakAndContinue(\n label: JsName?,\n breakTargetStatement: JsStatement,\n continueTargetStatement: JsStatement? = null,\n action: () -> Unit\n ) {\n val oldDefaultBreakTarget = defaultBreakTarget\n val oldDefaultContinueTarget = defaultContinueTarget<|endoftext|>"} {"prompt":"internal open fun allDefaults(par1: Any = 1, par2: String? = null) {}\n\n internal open fun someDefaults(par1: Any, par2: String? = null) {}\n\n}\n\n\ninterface InterfaceFunctions {\n\n fun withAllDefaults(par1: Int = 1, par2: String? = null)","completion":"fun withSomeDefaults(par1: Int, par2: String? = null)\n\n}<|endoftext|>"} {"prompt":"d checkType { check() }\n}\n\n\n\/\/ TESTCASE NUMBER: 2\nclass Case2(var a: Int) {\n operator fun minus(o: Int): Nothing? { TODO() }\n operator fun minus(o: Case2):Nothing? { TODO() }\n operator fun plus(o: Int): Nothing? { TODO() }","completion":"operator fun plus(o: Case2): Nothing? { TODO() }\n}\n\nfun case2() {\n val a = Case2(1) + 1\n val b = Case2(1) + Case2( 1)\n val c = Case2(1) - 1\n val d = Case2(1) - Case2( 1)\n\n a checkType { check() }<|endoftext|>"} {"prompt":"@RequiresOptIn\nannotation class LookupTagInternals\n\nclass ConeClassLikeLookupTagImpl(override val classId: ClassId) : ConeClassLikeLookupTag() {\n\n init {\n assert(!classId.isLocal) { \"You should use ConeClassLookupTagWithFixedSymbol for local $classId!\" }\n }\n\n @LookupTagInternals","completion":"var boundSymbol: WeakPair?>? = null\n\n override fun equals(other: Any?): Boolean {\n if (this === other) return true\n if (javaClass != other?.javaClass) return false\n\n other as ConeClassLikeLookupTagImpl\n\n if (classId != other.classId) return false<|endoftext|>"} {"prompt":"public operator fun rangeTo(other: Byte): IntRange =\n IntRange(this.toInt(), other.toInt())\n\n \/** Creates a range from this value to the specified [other] value. *\/\n public operator fun rangeTo(other: Short): IntRange =\n IntRange(this.toInt(), other.toInt())\n\n \/** Creates a range from this value to the specified [other] value. *\/","completion":"public operator fun rangeTo(other: Int): IntRange =\n IntRange(this.toInt(), other)\n\n \/** Creates a range from this value to the specified [other] value. *\/\n public operator fun rangeTo(other: Long): LongRange =\n LongRange(this.toLong(), other)\n\n \/**\n * Creates a range from this value up to but excluding the specified [other] value.<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.symbols.pointers.KtSymbolPointer\nimport org.jetbrains.kotlin.analysis.api.types.KtType\nimport org.jetbrains.kotlin.descriptors.Modality\nimport org.jetbrains.kotlin.descriptors.PropertyDescriptor","completion":"import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor\nimport org.jetbrains.kotlin.descriptors.Visibility\nimport org.jetbrains.kotlin.name.CallableId\nimport org.jetbrains.kotlin.name.Name\n\ninternal class KtFe10DescDefaultPropertySetterSymbol(<|endoftext|>"} {"prompt":"infix fun hasHigherPriorityThan(that: ImportKind): Boolean = this < that\n\n companion object {\n fun fromScope(scope: FirScope): ImportKind {\n return when (scope) {\n is FirDefaultStarImportingScope -> DEFAULT_STAR\n is FirAbstractStarImportingScope -> STAR\n is FirPackageMemberScope -> PACKAGE","completion":"is FirDefaultSimpleImportingScope -> DEFAULT_EXPLICIT\n is FirAbstractSimpleImportingScope -> EXPLICIT\n else -> LOCAL\n }\n }\n\n fun fromShortenOption(option: ShortenStrategy): ImportKind? = when (option) {\n ShortenStrategy.SHORTEN_AND_IMPORT -> EXPLICIT<|endoftext|>"} {"prompt":"val last = rBrace.siblings(forward = false, withItself = false).first { it !is PsiWhiteSpace }\n if (last == lBrace) return PsiChildRange.EMPTY\n\n return PsiChildRange(first, last)\n}\n\n\/\/ ----------- Inheritance -----------------------------------------------------------------------------------------------------------------","completion":"fun KtClass.isAbstract(): Boolean = isInterface() || hasModifier(KtTokens.ABSTRACT_KEYWORD)\n\n\/**\n * Returns the list of unqualified names that are indexed as the superclass names of this class. For the names that might be imported\n * via an aliased import, includes both the original and the aliased name (reference resolution during inheritor search will sort this out).\n *<|endoftext|>"} {"prompt":"LiteralExpressionNode(currentGraph, fir, levelCounter)\n\nfun ControlFlowGraphBuilder.createThrowExceptionNode(fir: FirThrowExpression): ThrowExceptionNode =\n ThrowExceptionNode(currentGraph, fir, levelCounter)\n\nfun ControlFlowGraphBuilder.createFinallyBlockExitNode(fir: FirTryExpression): FinallyBlockExitNode =\n FinallyBlockExitNode(currentGraph, fir, levelCounter)","completion":"fun ControlFlowGraphBuilder.createFinallyBlockEnterNode(fir: FirTryExpression): FinallyBlockEnterNode =\n FinallyBlockEnterNode(currentGraph, fir, levelCounter)\n\nfun ControlFlowGraphBuilder.createCatchClauseExitNode(fir: FirCatch): CatchClauseExitNode =\n CatchClauseExitNode(currentGraph, fir, levelCounter)<|endoftext|>"} {"prompt":"if (javaClass != other?.javaClass) return false\n\n other as DescriptorKindFilter\n\n if (excludes != other.excludes) return false\n if (kindMask != other.kindMask) return false\n\n return true\n }\n\n override fun hashCode(): Int {\n var result = excludes.hashCode()\n result = 31 * result + kindMask\n return result\n }","completion":"companion object {\n private var nextMaskValue: Int = 0x01\n private fun nextMask() = nextMaskValue.apply { nextMaskValue = nextMaskValue shl 1 }\n\n val NON_SINGLETON_CLASSIFIERS_MASK: Int = nextMask()\n val SINGLETON_CLASSIFIERS_MASK: Int = nextMask()<|endoftext|>"} {"prompt":"fun Case2.emptyArray(): Array = TODO()\n\npublic fun emptyArray(): Array = TODO()\n\n\/\/ FILE: LibtestsPack2.kt\n\/\/ TESTCASE NUMBER: 2\n\npackage testsCase2\nfun Case2.emptyArray(): Array = TODO()","completion":"public fun emptyArray(): Array = TODO()\n\n\n\/\/ FILE: TestCase3.kt\n\n\/*\n * TESTCASE NUMBER: 3\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-37179\n *\/\npackage testsCase3\nimport libPackageCase3.*\nimport libPackageCase3Explicit.emptyArray\n\nclass Case3(){<|endoftext|>"} {"prompt":"@file:OptIn(KtAnalysisApiInternals::class)\n\npackage org.jetbrains.kotlin.analysis.api\n\nimport com.intellij.psi.PsiFile\nimport org.jetbrains.kotlin.analysis.api.session.KtAnalysisSessionProvider\nimport org.jetbrains.kotlin.analysis.project.structure.DanglingFileResolutionMode","completion":"import org.jetbrains.kotlin.analysis.project.structure.KtModule\nimport org.jetbrains.kotlin.analysis.project.structure.KtModuleStructureInternals\nimport org.jetbrains.kotlin.analysis.project.structure.withDanglingFileResolutionMode\nimport org.jetbrains.kotlin.psi.KtElement\n\n\/**<|endoftext|>"} {"prompt":"@Suppress(\"DEPRECATION\")\n when (option) {\n SOURCE_OUTPUT_DIR_OPTION -> sourcesOutputDir = File(value)\n CLASS_OUTPUT_DIR_OPTION -> classesOutputDir = File(value)\n STUBS_OUTPUT_DIR_OPTION -> stubsOutputDir = File(value)","completion":"INCREMENTAL_DATA_OUTPUT_DIR_OPTION -> incrementalDataOutputDir = File(value)\n\n CHANGED_FILES -> changedFiles.add(File(value))\n COMPILED_SOURCES_DIR -> compiledSources.addAll(value.split(File.pathSeparator).map { File(it) })<|endoftext|>"} {"prompt":"class KtNameReferenceExpression : KtExpressionImplStub, KtSimpleNameExpression {\n constructor(node: ASTNode) : super(node)\n\n constructor(stub: KotlinNameReferenceExpressionStub) : super(stub, KtStubElementTypes.REFERENCE_EXPRESSION)","completion":"override fun getReferencedName(): String {\n val stub = stub\n if (stub != null) {\n return stub.getReferencedName()\n }\n return KtSimpleNameExpressionImpl.getReferencedNameImpl(this)\n }\n\n override fun getReferencedNameAsName(): Name {<|endoftext|>"} {"prompt":"add(CHECKERS_COMPONENT_INTERNAL_FQN)\n addAll(additionalImports)\n }.sorted()\n\n for (fqn in imports) {\n println(\"import $fqn\")\n }\n println()\n }\n\n private val Alias.valDeclaration: String\n get() = \"val $fieldName: $setType\"","completion":"private val Alias.fieldName: String\n get() = removePrefix(\"Fir\").replaceFirstChar(Char::lowercaseChar) + \"s\"\n\n private val Alias.allFieldName: String\n get() = \"all${fieldName.replaceFirstChar(Char::uppercaseChar)}\"\n\n private val Alias.setType: String\n get() = \"Set<$this>\"<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\n\/\/ WITH_STDLIB\n\ninline fun jaggedArrayOfNulls(): Array?> = arrayOfNulls>(1)\n\nfun box(): String {\n val x1 = jaggedArrayOfNulls().javaClass.simpleName","completion":"if (x1 != \"String[][]\") return \"fail1: $x1\"\n\n val x2 = jaggedArrayOfNulls>().javaClass.simpleName\n if (x2 != \"String[][][]\") return \"fail2: $x2\"\n\n val x3 = jaggedArrayOfNulls().javaClass.simpleName<|endoftext|>"} {"prompt":"fun Case2.listOf(vararg elements1: T = TODO(), body: () -> T = { TODO() }): List = TODO()\n listOf(elements1 = arrayOf(1), body = { \"\" })","completion":"fun case1_1() {\n fun Case2.listOf(vararg elements1: T = TODO(), body: () -> T = { TODO() }): List = TODO()<|endoftext|>"} {"prompt":"inheritedFun: CallableMemberDescriptor,\n jvmDefaultMode: JvmDefaultMode\n ): CallableMemberDescriptor? {\n val classDescriptor = inheritedFun.containingDeclaration\n if (classDescriptor !is ClassDescriptor || classDescriptor.getSuperClassNotAny() == null) return null\n val classMembers =","completion":"inheritedFun.overriddenDescriptors.filter { !isInterface(it.containingDeclaration) && !isAnnotationClass(it.containingDeclaration) }\n val implicitDefaultImplsDelegate =\n classMembers.firstOrNull {\n \/\/TODO: additional processing for platform dependent method is required (https:\/\/youtrack.jetbrains.com\/issue\/KT-42697)<|endoftext|>"} {"prompt":"private fun FirTypeProjection.createDeepCopy(): FirTypeProjection {\n return when (val original = this) {\n is FirTypeProjectionWithVariance -> buildTypeProjectionWithVariance {\n source = original.source\n typeRef = when (val originalTypeRef = original.typeRef) {\n is FirUserTypeRef -> createDeepCopyOfTypeRef(originalTypeRef)\n else -> originalTypeRef","completion":"}\n variance = original.variance\n }\n is FirStarProjection -> buildStarProjection { source = original.source }\n is FirPlaceholderProjection -> buildPlaceholderProjection { source = original.source }\n else -> shouldNotBeCalled()\n }\n }\n}<|endoftext|>"} {"prompt":"sourceSet.dependsOn.forEach { it.addReverseDependencyTo(sourceSet) }\n\n val platformCompilations = sourceSet.internal.awaitPlatformCompilations()\n val distinctSourceSetTrees = platformCompilations.map { KotlinSourceSetTree.orNull(it) }.toSet()\n\n val totalDistinctSourceSetTrees = distinctSourceSetTrees.size","completion":"@Suppress(\"KotlinConstantConditions\")\n when {\n totalDistinctSourceSetTrees > 1 -> badSourceSets[sourceSet] = distinctSourceSetTrees\n totalDistinctSourceSetTrees == 1 -> goodSourceSets[sourceSet] = distinctSourceSetTrees.single()\n \/\/ case when source set has no platform compilation and thus its totalDistinctSourceSetTrees == 0<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.builders.CompilerStepsNames.JVM_FROM_K1_AND_K2_ARTIFACTS_HANDLERS_STEP_NAME\nimport org.jetbrains.kotlin.test.builders.CompilerStepsNames.KLIB_ARTIFACTS_HANDLERS_STEP_NAME","completion":"import org.jetbrains.kotlin.test.builders.CompilerStepsNames.RAW_IR_HANDLERS_STEP_NAME\nimport org.jetbrains.kotlin.test.builders.CompilerStepsNames.WASM_ARTIFACTS_HANDLERS_STEP_NAME<|endoftext|>"} {"prompt":"fun main() {\n\n}\n\nfun main(args: Array) {\n\n}\n\nfun main(args: Array) {\n\n}\n\nfun main(args: Array): Unit? {\n\n return Unit\n}\n\nfun Any.main(args: Array) {\n\n}\n\n\/\/ method: ImpostorMainsKt::main","completion":"\/\/ jvm signature: ([Ljava\/lang\/String;)V\n\/\/ generic signature: null<|endoftext|>"} {"prompt":"configuration.add(ComponentRegistrar.PLUGIN_COMPONENT_REGISTRARS, ScriptingCompilerConfigurationComponentRegistrar())\n configuration.add(CompilerPluginRegistrar.COMPILER_PLUGIN_REGISTRARS, ScriptingK2CompilerPluginRegistrar())","completion":"return KotlinCoreEnvironment.createForTests(disposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES)\n }\n\n fun testScriptResolverEnvironmentArgsParsing() {\n\n val longStr = (1..100).joinToString(\"\\\\,\") { \"\"\"\\\" $it aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \\\\\"\"\" }<|endoftext|>"} {"prompt":"public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.LongRange { \/* compiled code *\/ }\n\n @kotlin.SinceKotlin @kotlin.WasExperimental public final operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.LongRange { \/* compiled code *\/ }","completion":"@kotlin.SinceKotlin @kotlin.WasExperimental public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.LongRange { \/* compiled code *\/ }\n\n @kotlin.SinceKotlin @kotlin.WasExperimental public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange { \/* compiled code *\/ }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.util\n\n\/**\n * Cartesian product of two and more collections.\n * Returns a sequence of all possible combinations between given elements.\n * Combination is represented as a list with indexes matching order of inputs\n * i.e.\n * ```","completion":"* cartesianProductOf(listOf(\"a\", \"b\"), listOf(1, 2), listOf(4.3, 6.3)).map { list ->\n * list[0] \/\/ will contain elements of the first argument e.g. \"a\"\n * list[1] \/\/ will contain elements of the second argument e.g. 2<|endoftext|>"} {"prompt":"import kotlin.reflect.KProperty\n\nfun foo(f: () -> Unit) {\n f()\n}\n\nclass Wrapper(var s: String)\n\nfun bar(w: Wrapper?) {\n \/\/ K1: type is () -> Unit, K2: type is () -> Unit?\n val lambda = {\n w?.s = \"X\"\n }","completion":"\/\/ K1: Ok, K2: ARGUMENT_TYPE_MISMATCH\n foo(lambda)\n}\n\nclass Wrapper2(val w: Wrapper?)\n\nfun baz(w2: Wrapper2?) {\n val lambda = {\n w2?.w?.s = \"X\"\n }\n foo(lambda)\n}\n\nobject Indexible {<|endoftext|>"} {"prompt":"result.addIfNotNull(this.setter?.translateToObjCMethod())\n }\n }\n is KtFunctionSymbol -> result.addIfNotNull(translateToObjCMethod())\n else -> Unit\n }\n return result\n}\n\ncontext(KtAnalysisSession, KtObjCExportSession)","completion":"internal fun KtClassOrObjectSymbol.translateToObjCExportStub(): ObjCClass? = when (classKind) {\n KtClassKind.INTERFACE -> translateToObjCProtocol()\n KtClassKind.CLASS -> translateToObjCClass()\n KtClassKind.OBJECT -> translateToObjCObject()\n KtClassKind.ENUM_CLASS -> translateToObjCClass()<|endoftext|>"} {"prompt":"return if (mangler.run { descriptor.isExported(compatibleMode = false) })\n createSignatureBuilder(SpecialDeclarationType.ENUM_ENTRY).buildSignature(descriptor)\n else null\n }\n\n override fun composeFieldSignature(descriptor: PropertyDescriptor): IdSignature? {","completion":"return if (mangler.run { descriptor.isExported(compatibleMode = false) }) {\n createSignatureBuilder(SpecialDeclarationType.BACKING_FIELD).buildSignature(descriptor)\n } else null\n }\n\n override fun composeAnonInitSignature(descriptor: ClassDescriptor): IdSignature? {<|endoftext|>"} {"prompt":"inline fun f(x: T) =\n T::class.simpleName\n\nfun call(c: Consumer) = c.accept(OK())\n\nfun box(): String {\n return call(::f) \/\/ `f` has a reified type parameter and thus isn't callable directly\n}\n\n\/\/ FILE: Consumer.java\n\npublic interface Consumer {\n String accept(T t);","completion":"}<|endoftext|>"} {"prompt":"* interface java.util.Collection {\n * fun contains(element: java.lang.Object): Boolean\n * ...\n * }\n *\n * in Java. In particular, the Java version is not type-safe: it requires us to implement the method\n * given arbitrary objects, even though we know based on the types that our collection can only contain","completion":"* members of type `T`. This is why we have to introduce type-safe wrappers into Kotlin collection classes.\n * In the example above, we produce:\n *\n * abstract class A : java.util.Collection, I {\n * ...\n * fun contains(element: java.lang.Object): Boolean {\n * if (element !is Int) return false\n * return contains(element as Int)\n * }<|endoftext|>"} {"prompt":"val PropertySymbolMarker.isVar: Boolean\n val PropertySymbolMarker.isLateinit: Boolean\n val PropertySymbolMarker.isConst: Boolean\n\n val PropertySymbolMarker.getter: FunctionSymbolMarker?\n val PropertySymbolMarker.setter: FunctionSymbolMarker?\n\n fun createExpectActualTypeParameterSubstitutor(","completion":"expectTypeParameters: List,\n actualTypeParameters: List,\n parentSubstitutor: TypeSubstitutorMarker?\n ): TypeSubstitutorMarker\n\n fun RegularClassSymbolMarker.collectAllMembers(isActualDeclaration: Boolean): List<|endoftext|>"} {"prompt":"import com.intellij.openapi.vfs.VirtualFile\nimport com.intellij.openapi.vfs.VirtualFileWithId\nimport com.intellij.reference.SoftReference\nimport org.jetbrains.kotlin.load.kotlin.KotlinBinaryClassCache\nimport org.jetbrains.kotlin.load.kotlin.KotlinJvmBinaryClass","completion":"import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader\nimport org.jetbrains.kotlin.metadata.jvm.deserialization.JvmMetadataVersion\nimport org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.name.FqName\n\nclass ClsKotlinBinaryClassCache {<|endoftext|>"} {"prompt":"package org.kotlin\n\nfun plus(a: Int, b: Int, c: Int) =\n a + b + c\n\nfun logicalOr(a: Boolean, b: Boolean) = a || b\n\nfun xor(a: Boolean, b: Boolean) = a xor b\n\nfun plus(a: UByte, b: UByte) = a + b","completion":"fun minus(a: UByte, b: UByte) = a - b\n\nfun plus(a: UShort, b: UShort) = a + b\nfun minus(a: UShort, b: UShort) = a - b\n\nfun plus(a: UInt, b: UInt) = a + b\nfun minus(a: UInt, b: UInt) = a - b<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.symbols.SymbolInternals\nimport org.jetbrains.kotlin.fir.symbols.impl.*\nimport org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase\nimport org.jetbrains.kotlin.utils.addToStdlib.flatAssociateBy","completion":"object FirUninitializedEnumChecker : FirQualifiedAccessExpressionChecker(MppCheckerKind.Common) {\n \/\/ Initialization order: member property initializers, enum entries, companion object (including members in it).\n \/\/\n \/\/ When JVM loads a class, the corresponding class initializer, a.k.a. , is executed first.<|endoftext|>"} {"prompt":"builtIns: KotlinBuiltIns,\n callback: (DataFlowValue, D) -> Unit\n) {\n for ((key, setOfValues) in dictionary) {\n val leftDfv = key.toDataFlowValue(builtIns) ?: continue\n setOfValues.forEach { callback(leftDfv, it) }\n }\n}","completion":"private fun ESValue.toDataFlowValue(builtIns: KotlinBuiltIns): DataFlowValue? = when (this) {\n is ESDataFlowValue -> dataFlowValue\n is ESConstant -> when (constantReference) {\n ConstantReference.NULL -> DataFlowValue.nullValue(builtIns)\n else -> DataFlowValue(IdentifierInfo.NO, type.toKotlinType(builtIns))\n }<|endoftext|>"} {"prompt":"if (element17 in emptyCollection.indices != range1.contains(element17)) throw AssertionError()\n if (element17 !in emptyCollection.indices != !range1.contains(element17)) throw AssertionError()\n if (!(element17 in emptyCollection.indices) != !range1.contains(element17)) throw AssertionError()","completion":"if (!(element17 !in emptyCollection.indices) != range1.contains(element17)) throw AssertionError()\n}\n\nfun testR1xE18() {\n \/\/ with possible local optimizations\n if (3 in emptyCollection.indices != range1.contains(3)) throw AssertionError()<|endoftext|>"} {"prompt":"\/\/ _Arrays.kt:... box: $i$f$foo\\56\\65:int=0:int, array\\56:java.lang.Integer[]=java.lang.Integer[], myClass\\56:MyClass=MyClass, $this$map\\87:java.lang.Object[]=java.lang.Integer[], $i$f$map\\87\\552:int=0:int,","completion":"$this$mapTo\\88:java.lang.Object[]=java.lang.Integer[], destination\\88:java.util.Collection=java.util.ArrayList, $i$f$mapTo\\88\\553:int=0:int, item\\88:java.lang.Object=java.lang.Integer<|endoftext|>"} {"prompt":"copyRemappedTypeArgumentsFrom(expression)\n transformValueArguments(expression)\n }\n }\n\n return super.visitCall(expression)\n }\n\n private fun IrSimpleFunctionSymbol.isBoundButNotRemapped(): Boolean {\n return this.isBound && symbolRemapper.getReferencedFunction(this) == this\n }","completion":"private fun IrSimpleFunctionSymbol.isRemappedAndBound(): Boolean {\n val symbol = symbolRemapper.getReferencedFunction(this)\n return symbol.isBound && symbol != this\n }\n\n \/* copied verbatim from DeepCopyIrTreeWithSymbols, except with newCallee as a parameter *\/<|endoftext|>"} {"prompt":"val LINK_VIA_SIGNATURES_K1 by directive(\"Use linkage via signatures instead of descriptors on the K1 frontend\")\n val ENABLE_JVM_IR_INLINER by directive(\"Enable inlining on IR, instead of inlining on bytecode\")\n val USE_INLINE_SCOPES_NUMBERS by directive(\"Use inline scopes numbers for inline marker variables\")","completion":"val GENERATE_PROPERTY_ANNOTATIONS_METHODS by directive(\n description = \"Enables corresponding analysis flag (JvmAnalysisFlags.generatePropertyAnnotationsMethods)\"\n )\n val DONT_WARN_ON_ERROR_SUPPRESSION by directive(\"Don't emit warning when an error is suppressed\")\n\n\n \/\/ --------------------- Utils ---------------------<|endoftext|>"} {"prompt":"E1.A -> {}\n E2.A -> {}\n else -> {}\n }\n\n when (e) {\n e -> {}\n e2 -> {}\n E1.A -> {}\n E2.A -> {}\n else -> {}\n }\n}\n\ninterface MyInterface\nopen class MyOpenClass","completion":"fun foo4(e1: E1, i: MyInterface, c: MyOpenClass) {\n e1 == i\n i == e1\n\n e1 == c<|endoftext|>"} {"prompt":"assertEquals(true, notNullToNotNull(B()), \"B is B\")\n assertEquals(false, notNullToNotNull(C()), \"C is B\")\n assertEquals(true, notNullToNotNull(D()), \"D is B\")\n assertEquals(true, notNullToNotNull(E()), \"E is B\")","completion":"assertEquals(false, notNullToNotNull(F()), \"F is B\")\n assertEquals(false, notNullToNotNull(Any()), \"Any is B\")\n assertEquals(false, dtoB(dyn), \"dynamic is B\")\n\n assertEquals(false, notNullToNotNull({}), \"Function is II\")<|endoftext|>"} {"prompt":"* * It can only add to the end of the [descriptors] list and shall not modify it otherwise (e.g. remove from it).\n * * Before the call, [descriptors] should already contain all declared properties with the [name] name.\n *\/\n protected open fun computeNonDeclaredProperties(name: Name, descriptors: MutableList) {\n }","completion":"private fun getTypeAliasByName(name: Name): TypeAliasDescriptor? {\n return impl.getTypeAliasByName(name)\n }\n\n override fun getContributedVariables(name: Name, location: LookupLocation): Collection {\n return impl.getContributedVariables(name, location)\n }\n\n protected fun computeDescriptors(<|endoftext|>"} {"prompt":"val ret = build {\n emit(\"1\")\n ? & java.io.Serializable?\")!>select1(get(), getIn())\n select1(get(), Test.foo(getIn()))\n select1(Test.foo(get()), Test.foo(getIn()))","completion":"select1(Test.foo(get()), getIn())\n select4(get(), getIn())\n select4(get(), Test.foo(getIn()))\n select4(Test.foo(get()), Test.foo(getIn()))\n select4(Test.foo(get()), getIn())\n\n select4(id(Test.foo(get())), getIn())\n\n build2 {<|endoftext|>"} {"prompt":"if (property.hasGetterFlags() && Flags.IS_INLINE_ACCESSOR.get(property.getterFlags)\n && (!excludePrivateAccessors || !isPrivate(property.getterFlags))\n ) {\n val getter = propertySignature.getter\n inlineAccessors.add(\n InlinePropertyAccessor(","completion":"JvmMemberSignature.Method(name = nameResolver.getString(getter.name), desc = nameResolver.getString(getter.desc)),\n propertyName = nameResolver.getString(property.name)\n )\n )\n }\n if (property.hasSetterFlags() && Flags.IS_INLINE_ACCESSOR.get(property.setterFlags)<|endoftext|>"} {"prompt":"array: CharArray, left: Int, right: Int): Int {\n var i = left\n var j = right\n val pivot = array[(left + right) \/ 2]\n while (i <= j) {\n while (array[i] < pivot)\n i++\n while (array[j] > pivot)\n j--\n if (i <= j) {","completion":"val tmp = array[i]\n array[i] = array[j]\n array[j] = tmp\n i++\n j--\n }\n }\n return i\n}\n\nprivate fun quickSort(\n array: CharArray, left: Int, right: Int) {\n val index = partition(array, left, right)\n if (left < index - 1)<|endoftext|>"} {"prompt":"LanguageVersionSettingsImpl(LanguageVersion.LATEST_STABLE, ApiVersion.LATEST)\n\n override fun build(): KtScriptModule {\n return KtScriptModuleImpl(\n directRegularDependencies,\n directDependsOnDependencies,\n directFriendDependencies,\n platform,\n kotlinCoreProjectEnvironment.project,\n file,\n languageVersionSettings\n )","completion":"}\n}\n\n@OptIn(ExperimentalContracts::class)\npublic inline fun KtModuleProviderBuilder.buildKtScriptModule(init: KtScriptModuleBuilder.() -> Unit): KtScriptModule {\n contract {\n callsInPlace(init, InvocationKind.EXACTLY_ONCE)\n }\n return KtScriptModuleBuilder(kotlinCoreProjectEnvironment).apply(init).build()<|endoftext|>"} {"prompt":"@NullMarked\npublic class NullMarkedTypeWithNullUnmarkedConstructor {\n @NullUnmarked\n public NullMarkedTypeWithNullUnmarkedConstructor(String arg) {}\n}\n\n\/\/ FILE: kotlin.kt\n\ninterface TestA: NullMarkedType.NullUnmarkedType {\n override fun unannotatedProduce(): String?\n}","completion":"interface TestB: NullMarkedType.UnannotatedType {\n override fun nullUnmarkedProduce(): String?\n}\n\nfun test(\n a: NullMarkedType.NullUnmarkedType,\n b: NullMarkedType.UnannotatedType\n) {\n a.unannotatedConsume(null)\n b.nullUnmarkedConsume(null)<|endoftext|>"} {"prompt":"expectFailure(linkage(\"Function 'getInterfaceToFinalClassNestedImpl2Inline' can not be called: Function uses class 'InterfaceToFinalClassImpl' (via class 'InterfaceToFinalClassImpl2') that inherits from final class 'InterfaceToFinalClass'\")) { getInterfaceToFinalClassNestedImpl2Inline() }","completion":"expectFailure(linkage(\"Constructor 'InterfaceToFinalClassImpl2.' can not be called: Class 'InterfaceToFinalClassImpl2' uses class 'InterfaceToFinalClassImpl' that inherits from final class 'InterfaceToFinalClass'\")) { getInterfaceToFinalClassNestedImpl2AsAny() }<|endoftext|>"} {"prompt":"parameter(\"expectedCount\")\n parameter>(\"classifier\")\n }\n val OUTER_CLASS_ARGUMENTS_REQUIRED by error {\n parameter>(\"outer\")\n }","completion":"val TYPE_PARAMETERS_IN_OBJECT by error(PositioningStrategy.TYPE_PARAMETERS_LIST)\n val TYPE_PARAMETERS_IN_ANONYMOUS_OBJECT by error(PositioningStrategy.TYPE_PARAMETERS_LIST)\n val ILLEGAL_PROJECTION_USAGE by error()<|endoftext|>"} {"prompt":"checkNPE { notNull2StructRef(structRef) }\n check (nullStructRef(structRef) == structRef)\n check (null2StructRef(structRef) == null)\n}\n\nfun notNullInt(): Int = js(\"123\")\n\nfun notNull2Int(): Int = js(\"null\")\n\nfun nullInt(): Int? = js(\"123\")","completion":"fun null2Int(): Int? = js(\"null\")\n\nfun testInt() {\n check(notNullInt() == 123)\n check(notNull2Int() == 0)\n check(nullInt() == 123)\n check(null2Int() == null)\n}\n\nfun notNullBoolean(): Boolean = js(\"true\")\n\nfun notNull2Boolean(): Boolean = js(\"null\")<|endoftext|>"} {"prompt":"processedArgs.add(argName)\n }\n }\n return ObjCName(name!!, objCName, swiftName, isExact)\n}\n\ninternal val ModuleDescriptor.objCExportAdditionalNamePrefix: String\n get() {\n if (this.isNativeStdlib()) return \"Kotlin\"","completion":"val fullPrefix = when (val module = this.klibModuleOrigin) {\n CurrentKlibModuleOrigin ->\n error(\"expected deserialized module, got $this (origin = $module)\")\n SyntheticModulesOrigin ->\n this.name.asString().let { it.substring(1, it.lastIndex) }\n is DeserializedKlibModuleOrigin -><|endoftext|>"} {"prompt":"+field(\"constructorTypeArgumentsCount\", int)\n }\n val getSingletonValue: Element by element(Expression) {\n nameInVisitorMethod = \"SingletonReference\"\n\n parent(declarationReference)\n }\n val getObjectValue: Element by element(Expression) {\n\n parent(getSingletonValue)\n\n +symbol(classSymbolType, mutable = true)","completion":"}\n val getEnumValue: Element by element(Expression) {\n\n parent(getSingletonValue)\n\n +symbol(enumEntrySymbolType, mutable = true)\n }\n\n val rawFunctionReference: Element by element(Expression) {\n parent(declarationReference)\n\n kDoc = \"\"\"\n Represents a platform-specific low-level reference to a function.<|endoftext|>"} {"prompt":"}\n else -> {\n args[i++]\n }\n }\n\n if (!getter.returnType.isArray && !visitedArgs.add(argument.value) && value is String && getter(result) != value\n ) {\n errors.value.duplicateArguments[argument.value] = value\n }","completion":"updateField(getter, setter, result, value, argument.resolvedDelimiter, overrideArguments)\n }\n\n result.freeArgs += freeArgs\n result.updateInternalArguments(internalArguments, overrideArguments)\n}\n\nprivate fun A.updateInternalArguments(\n newInternalArguments: ArrayList,\n overrideArguments: Boolean<|endoftext|>"} {"prompt":"fun clang_parseTranslationUnit(CIdx: CXIndex?, source_filename: String?, command_line_args: CValuesRef>?, num_command_line_args: Int, unsaved_files: CValuesRef?, num_unsaved_files: Int, options: Int): CXTranslationUnit? {\n memScoped {","completion":"return interpretCPointer(kniBridge75(CIdx.rawValue, source_filename?.cstr?.getPointer(memScope).rawValue, command_line_args?.getPointer(memScope).rawValue, num_command_line_args, unsaved_files?.getPointer(memScope).rawValue, num_unsaved_files, options))\n }\n}<|endoftext|>"} {"prompt":"ThrowableArguments(message = undefinedValue(), cause = arg)\n }\n }\n }\n }\n\n inner class Transformer : IrElementTransformer {\n private val anyConstructor = context.irBuiltIns.anyClass.constructors.first()","completion":"override fun visitClass(declaration: IrClass, data: IrDeclarationParent) = super.visitClass(declaration, declaration)\n\n override fun visitConstructorCall(expression: IrConstructorCall, data: IrDeclarationParent): IrExpression {\n expression.transformChildren(this, data)\n if (expression.symbol !in throwableConstructors) return expression<|endoftext|>"} {"prompt":"sendTeamCityRequest(\"$teamCityBuildUrl\/startDate\"),\n getBuildType())).then { results ->\n val (buildNumber, branch, startTime, buildType) = results\n val currentTime = Date()\n val timeZone = currentTime.getTimezoneOffset() \/ -60 \/\/ Convert to hours.\n \/\/ Get finish time as current time, because buid on TeamCity isn't finished.","completion":"val finishTime = \"${format(currentTime.getUTCFullYear())}\" +\n \"${format(currentTime.getUTCMonth() + 1)}\" +\n \"${format(currentTime.getUTCDate())}\" +\n \"T${format(currentTime.getUTCHours())}\" +\n \"${format(currentTime.getUTCMinutes())}\" +<|endoftext|>"} {"prompt":"kotlinSourcesDir(sourceSet).resolve(\"ActualFunFoo.kt\").addPrivateVal()\n }\n\n build(\"assemble\", buildOptions = defaultBuildOptions.copy(logLevel = LogLevel.DEBUG)) {\n assertTasksExecuted(\":compileKotlinJvm\", \":compileKotlinJs\", \":compileKotlinNative\")\n assertIncrementalCompilation(","completion":"listOf(\n kotlinSourcesDir(\"jvmMain\").resolve(\"ActualFunFoo.kt\"),\n kotlinSourcesDir(\"jsMain\").resolve(\"ActualFunFoo.kt\"),\n kotlinSourcesDir(\"commonMain\").resolve(\"ExpectFunFoo.kt\")\n ).relativizeTo(projectPath)\n )\n }\n }\n }<|endoftext|>"} {"prompt":"\/\/ library.kt:14 box: xFoo\\1:int=1:int, $i$f$foo\\1\\34:int=0:int, it\\19:int=2:int, $i$a$-foo-TestKt$box$2\\19\\177\\0:int=0:int, y2\\19:int=2:int, xBar1\\20:int=1:int,","completion":"xBar2\\20:int=2:int, xBar3\\20:int=3:int, $i$f$bar\\20\\39:int=0:int<|endoftext|>"} {"prompt":"myClass as KtClassOrObject, bindingContext, descriptor, classAsmType, context, v, state\n ).generate()\n }\n\n private fun generateUnboxMethod() {\n val boxMethodDescriptor = InlineClassDescriptorResolver.createBoxFunctionDescriptor(descriptor)\n\n functionCodegen.generateMethod(","completion":"Synthetic(null, boxMethodDescriptor), boxMethodDescriptor, object : FunctionGenerationStrategy.CodegenBased(state) {\n override fun mapMethodSignature(\n functionDescriptor: FunctionDescriptor,\n typeMapper: KotlinTypeMapper,\n contextKind: OwnerKind,\n hasSpecialBridge: Boolean\n ): JvmMethodGenericSignature {<|endoftext|>"} {"prompt":"\"\"\",\n source = \"\"\"\n import androidx.compose.runtime.*\n\n @Composable fun Icon(\n param: Int,\n defaultParam: Int = LocalColor.current\n ) {\n val remembered = remember(param, defaultParam) { TODO() }\n }\n \"\"\"\n )\n\n @Test\n fun testRememberMethodReference() = verifyGoldenComposeIrTransform(","completion":"source = \"\"\"\n import androidx.compose.runtime.*\n\n @Composable fun Icon(\n param: Int\n ) {\n val remembered = remember(param::toString) { TODO() }\n }\n \"\"\"\n )\n}<|endoftext|>"} {"prompt":"abstract class AbstractSamWithReceiverTest : AbstractDiagnosticTest() {\n override fun configure(builder: TestConfigurationBuilder) {\n super.configure(builder)\n with(builder) {\n configurePlugin()\n }\n }\n}\n\nabstract class AbstractFirPsiSamWithReceiverDiagnosticTest : AbstractFirPsiDiagnosticTest() {","completion":"override fun configure(builder: TestConfigurationBuilder) {\n super.configure(builder)\n with(builder) {\n configurePlugin()\n configurationForClassicAndFirTestsAlongside()\n }\n }\n}\n\n\/\/ ------------------------ codegen ------------------------\n\nopen class AbstractIrBlackBoxCodegenTestForSamWithReceiver : AbstractIrBlackBoxCodegenTest() {<|endoftext|>"} {"prompt":"return CharProgression.fromClosedRange(last, first, -step)\n}\n\n\/**\n * Returns a progression that goes over the same range with the given step.\n * \n * @sample samples.ranges.Ranges.stepInt\n *\/\npublic infix fun IntProgression.step(step: Int): IntProgression {\n checkStepIsPositive(step > 0, step)","completion":"return IntProgression.fromClosedRange(first, last, if (this.step > 0) step else -step)\n}\n\n\/**\n * Returns a progression that goes over the same range with the given step.\n * \n * @sample samples.ranges.Ranges.stepLong\n *\/\npublic infix fun LongProgression.step(step: Long): LongProgression {<|endoftext|>"} {"prompt":"fun BuildResult.getErrorMessages(): String =\n regex.findAll(output).map { it.value }.joinToString(\"\\n\")\n\n fun genJavaErrorString(vararg lines: Int) =\n lines.joinToString(\"\\n\") { \"Test.java:$it: error: GenError element\" }\n\n fun genKotlinErrorString(vararg lines: Int) =","completion":"lines.joinToString(\"\\n\") { \"test.kt:$it: error: GenError element\" }\n\n buildAndFail(\"build\") {\n val actual = getErrorMessages()\n assertEquals(\n expected = genJavaErrorString(\n 7,<|endoftext|>"} {"prompt":"protected fun getStaticVolatileWrapperInstance(volatileWrapperClass: IrClass): IrExpression {\n val volatileWrapperClassInstance = volatileWrapperClass.parentDeclarationContainer.declarations.find {\n it is IrProperty && it.backingField?.type?.classOrNull == volatileWrapperClass.symbol","completion":"} ?: error(\"Instance of ${volatileWrapperClass.name.asString()} was not found in the parent class ${volatileWrapperClass.parentDeclarationContainer.render()}\")\n return with(atomicSymbols.createBuilder(volatileWrapperClass.symbol)) {\n irGetProperty(volatileWrapperClassInstance as IrProperty, null)\n }\n }<|endoftext|>"} {"prompt":"fun KtFunction.getCalleeByLambdaArgument(): KtSimpleNameExpression? {\n val argument = getParentOfTypeAndBranch { getArgumentExpression() } ?: return null\n val callExpression = when (argument) {\n is KtLambdaArgument -> argument.parent as? KtCallExpression","completion":"else -> (argument.parent as? KtValueArgumentList)?.parent as? KtCallExpression\n } ?: return null\n return callExpression.calleeExpression as? KtSimpleNameExpression\n}<|endoftext|>"} {"prompt":"buildAndFail(\"build\") {\n val actual = getErrorMessages()\n assertEquals(expected = genKotlinErrorString(4, 7), actual = actual)\n }\n }\n }\n\n @DisplayName(\"should fail to add dependency into 'kapt' configuration when plugin is not applied\")\n @GradleTest","completion":"fun testNoKaptPluginApplied(gradleVersion: GradleVersion) {\n project(\"nokapt\".withPrefix, gradleVersion) {\n\n buildAndFail(\"build\") {\n assertOutputContains(\"Could not find method kapt() for arguments\")\n }\n }\n }\n\n @DisplayName(\"Should re-run kapt on changes in local annotation processor\")\n @GradleTest<|endoftext|>"} {"prompt":"* val tmp = liveLiteral(\n * \"String$arg-0$call-print$fun-Foo\",\n * this.`String$arg-0$call-print$fun-Foo`\n * )\n * this.`String$arg-0$call-print$fun-Foo` = tmp\n * tmp\n * } else field\n * return field.value\n * }","completion":"* }\n *\n * @see DurableKeyVisitor\n *\/\nopen class LiveLiteralTransformer(\n private val liveLiteralsEnabled: Boolean,\n private val usePerFileEnabledFlag: Boolean,\n private val keyVisitor: DurableKeyVisitor,\n context: IrPluginContext,\n symbolRemapper: DeepCopySymbolRemapper,\n metrics: ModuleMetrics,<|endoftext|>"} {"prompt":"set(value) = definedExternally\n var deltaY: Double? \/* = 0.0 *\/\n get() = definedExternally\n set(value) = definedExternally\n var deltaZ: Double? \/* = 0.0 *\/\n get() = definedExternally\n set(value) = definedExternally\n var deltaMode: Int? \/* = 0 *\/\n get() = definedExternally","completion":"set(value) = definedExternally\n}\n\n@Suppress(\"INVISIBLE_REFERENCE\", \"INVISIBLE_MEMBER\")\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol\nimport org.jetbrains.kotlin.lexer.KtKeywordToken\nimport org.jetbrains.kotlin.lexer.KtModifierKeywordToken\nimport org.jetbrains.kotlin.metadata.deserialization.VersionRequirement.Version","completion":"import org.jetbrains.kotlin.name.CallableId\nimport org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.psi.KtAnnotationEntry<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n@Target(AnnotationTarget.VALUE_PARAMETER) annotation class base\n\n@base annotation class derived","completion":"@base class correct(@base val x: Int, @base w: Int) {\n @base constructor(): this(0, 0)\n}\n\n@base enum class My {<|endoftext|>"} {"prompt":"val selector = JsAstUtils.newJsIf(amdTest, amdBody, JsAstUtils.newJsIf(commonJsTest, commonJsBody, plainBlock))\n adapterBody.statements += selector\n\n return listOf(JsInvocation(adapter, JsName(\"globalThis\", false).makeRef(), function).makeStmt())\n }\n\n private fun wrapAmd(","completion":"function: JsExpression,\n importedModules: List, program: JsProgram\n ): List {\n val scope = program.scope\n val defineName = scope.declareName(\"define\")\n val invocationArgs = listOf(<|endoftext|>"} {"prompt":"!inputChanges.isIncremental -> NotAvailableForNonIncrementalRun(classpathSnapshotFiles)\n \/\/ When `inputChanges.isIncremental == true`, we want to compile incrementally. However, if the incremental state (e.g.\n \/\/ lookup caches or previous classpath snapshot) is missing, we need to compile non-incrementally. There are a few cases:","completion":"\/\/ 1. Previous compilation happened using Kotlin daemon and with IC enabled (the usual case) => Incremental state\n \/\/ including classpath snapshot must have been produced (we have that guarantee in `IncrementalCompilerRunner`).\n \/\/ 2. Previous compilation happened using Kotlin daemon but with IC disabled (e.g., by setting `kotlin.incremental=false`)<|endoftext|>"} {"prompt":"}\n }\n\n return LoweredIrWithExtraArtifacts(allModules, context, typeScriptFragment)\n}\n\nfun compileWasm(\n allModules: List,\n backendContext: WasmBackendContext,\n typeScriptFragment: TypeScriptFragment?,\n baseFileName: String,\n emitNameSection: Boolean = false,","completion":"allowIncompleteImplementations: Boolean = false,\n generateWat: Boolean = false,\n generateSourceMaps: Boolean = false,\n): WasmCompilerResult {\n val compiledWasmModule = WasmCompiledModuleFragment(\n backendContext.irBuiltIns,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.config.JVMConfigurationKeys\nimport org.jetbrains.kotlin.parsing.KotlinParserDefinition\nimport org.jetbrains.kotlin.script.loadScriptingPlugin\nimport org.jetbrains.kotlin.test.Directives\nimport org.jetbrains.kotlin.test.InTextDirectivesUtils","completion":"import org.jetbrains.kotlin.test.KotlinBaseTest\nimport org.jetbrains.kotlin.test.TestFiles\nimport org.jetbrains.kotlin.test.TestFiles.TestFileFactory\nimport org.jetbrains.kotlin.test.util.KtTestUtil\nimport java.io.File<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade\nimport org.jetbrains.kotlin.scripting.compiler.plugin.repl.JvmReplCompilerState\nimport org.jetbrains.kotlin.scripting.compiler.plugin.repl.ReplCodeAnalyzerBase","completion":"import org.jetbrains.kotlin.scripting.compiler.plugin.repl.ReplImplicitsExtensionsResolutionFilter\nimport org.jetbrains.kotlin.scripting.definitions.ScriptDependenciesProvider\nimport org.jetbrains.kotlin.scripting.resolve.skipExtensionsResolutionForImplicits<|endoftext|>"} {"prompt":"\/\/ IGNORE_BACKEND: JS, JVM\n\/\/ WITH_STDLIB\n\n\/\/ MODULE: lib\n\/\/ !LANGUAGE: +EnumEntries\n\/\/ FILE: MyEnum.kt\nenum class MyEnum {\n Nope, OK\n}\n\n\/\/ MODULE: main(lib)\n\/\/ !LANGUAGE: +EnumEntries\n\/\/ FILE: Box.kt","completion":"@OptIn(ExperimentalStdlibApi::class)\nfun box(): String {\n return MyEnum.entries[1].toString()\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.psi.KtCodeFragment\nimport org.jetbrains.kotlin.psi.KtExpression\nimport org.jetbrains.kotlin.psi.KtThisExpression\nimport org.jetbrains.kotlin.psi.psiUtil.getParentOfType","completion":"import org.jetbrains.kotlin.resolve.BindingContext\nimport org.jetbrains.kotlin.resolve.calls.util.isCallableReference\nimport org.jetbrains.kotlin.resolve.calls.model.ResolvedCall\nimport org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe<|endoftext|>"} {"prompt":"var setter: SirSetter? = null\n\n fun build(): SirVariable {\n return SirVariableImpl(\n origin,\n visibility,\n documentation,\n name,\n type,\n getter,\n setter,\n )\n }\n\n}\n\n@OptIn(ExperimentalContracts::class)","completion":"inline fun buildVariable(init: SirVariableBuilder.() -> Unit): SirVariable {\n contract {\n callsInPlace(init, InvocationKind.EXACTLY_ONCE)\n }\n return SirVariableBuilder().apply(init).build()\n}\n\n@OptIn(ExperimentalContracts::class)\ninline fun buildVariableCopy(original: SirVariable, init: SirVariableBuilder.() -> Unit): SirVariable {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.symbols.KtSymbol\nimport org.jetbrains.kotlin.analysis.api.symbols.pointers.KtSymbolPointer\n\ninternal class KtFirBackingFieldSymbolPointer(\n private val propertySymbolPointer: KtSymbolPointer,","completion":") : KtSymbolPointer() {\n @Deprecated(\"Consider using org.jetbrains.kotlin.analysis.api.KtAnalysisSession.restoreSymbol\")\n override fun restoreSymbol(analysisSession: KtAnalysisSession): KtBackingFieldSymbol? {\n require(analysisSession is KtFirAnalysisSession)<|endoftext|>"} {"prompt":"return if (ktDeclaration.isVar) {\n specialSetter != null && specialGetter != null\n } else {\n specialGetter != null\n }\n }\n\n class PropertyAccessorsPsiMethods(\n val getter: PsiMethod?,\n val setter: PsiMethod?,\n val backingField: PsiField?,\n additionalAccessors: List","completion":") : Iterable {\n private val allMethods: List\n val allDeclarations: List\n\n init {\n allMethods = arrayListOf()\n arrayOf(getter, setter).filterNotNullTo(allMethods)<|endoftext|>"} {"prompt":"* If you use this annotation, consider describing your use cases in [KT-58545](https:\/\/youtrack.jetbrains.com\/issue\/KT-58545) comments.\n *\n * # Migration\n *\n * Rewrite the code using explicit `actual typealias`. Unfortunately, it requires you to move your expect declarations into another","completion":"* package. Refer to [KT-58545](https:\/\/youtrack.jetbrains.com\/issue\/KT-58545) for more detailed migration example.\n *\/\n@Retention(AnnotationRetention.BINARY)\n@Target(AnnotationTarget.CLASS)\n@ExperimentalMultiplatform\n@MustBeDocumented\n@SinceKotlin(\"1.9\")<|endoftext|>"} {"prompt":"samConvertedVars[irIndexVar] = irSamConvertedVar\n }\n\n irBlock.transformChildrenVoid(SamConversionsRewriter(samConvertedVars))\n }\n\n private fun createSamConvertedVarInitializer(irIndexVar: IrVariable, mostSpecificSamConversion: IrTypeOperatorCall): IrExpression {\n val irIndexVarInitializer = irIndexVar.initializer!!","completion":"val startOffset = irIndexVarInitializer.startOffset\n val endOffset = irIndexVarInitializer.endOffset\n\n val implicitCast = mostSpecificSamConversion.argument as IrTypeOperatorCall\n\n return IrTypeOperatorCallImpl(\n startOffset, endOffset,\n mostSpecificSamConversion.type,\n IrTypeOperator.SAM_CONVERSION,<|endoftext|>"} {"prompt":"assertEquals(listOf(\"three\" to 20, \"two\" to 3), listOf(\"three\" to 20, \"two\" to 3).sortedBy { it.first })\n assertEquals(listOf(\"three\", \"two\"), listOf(\"two\", \"three\").sortedByDescending { it.length })\n }\n\n @Test fun sortedNullableBy() {","completion":"fun String.nullIfEmpty() = if (isEmpty()) null else this\n listOf(null, \"\", \"a\").let {\n expect(listOf(null, \"\", \"a\")) { it.sortedWith(nullsFirst(compareBy { it })) }<|endoftext|>"} {"prompt":"val conditionExitNode = createLoopConditionExitNode(loop.condition, loop)\n val conditionBooleanValue = loop.condition.booleanLiteralValue\n popAndAddEdge(conditionExitNode)\n val blockEnterNode = lastNodes.pop()\n require(blockEnterNode is LoopBlockEnterNode)\n addBackEdge(conditionExitNode, blockEnterNode, isDead = conditionBooleanValue == false)","completion":"val loopExit = loopExitNodes.remove(loop)!!\n addEdge(conditionExitNode, loopExit, propagateDeadness = false, isDead = conditionBooleanValue == true)\n loopExit.updateDeadStatus()\n lastNodes.push(loopExit)\n return conditionExitNode to loopExit\n }\n\n \/\/ ----------------------------------- Boolean operators -----------------------------------<|endoftext|>"} {"prompt":"val candidatesWithAnnotation = candidates.filter {\n it.resolvedCall.candidateDescriptor.annotations.hasAnnotation(OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION_FQ_NAME)\n }.toSet()\n val candidatesWithoutAnnotation = candidates - candidatesWithAnnotation\n if (candidatesWithAnnotation.isNotEmpty()) {","completion":"@Suppress(\"UNCHECKED_CAST\")\n val newCandidates = kotlinCallCompleter.chooseCandidateRegardingOverloadResolutionByLambdaReturnType(\n maximallySpecificCandidates as Set,\n resolutionCallbacks\n )\n maximallySpecificCandidates = overloadingConflictResolver.chooseMaximallySpecificCandidates(\n newCandidates,<|endoftext|>"} {"prompt":"internal val DECLARATION_ORIGIN_INLINE_CLASS_SPECIAL_FUNCTION = IrDeclarationOriginImpl(\"INLINE_CLASS_SPECIAL_FUNCTION\")\n\nprivate fun IrClass.defaultOrNullableType(hasQuestionMark: Boolean) =\n if (hasQuestionMark) this.defaultType.makeNullable() else this.defaultType","completion":"internal fun Context.getBoxFunction(inlinedClass: IrClass): IrSimpleFunction = mapping.boxFunctions.getOrPut(inlinedClass) {\n require(inlinedClass.isUsedAsBoxClass())\n val classes = mutableListOf(inlinedClass)\n var parent = inlinedClass.parent\n while (parent is IrClass) {\n classes.add(parent)\n parent = parent.parent<|endoftext|>"} {"prompt":"namePrefix: String,\n buildTypes: Collection = NativeBuildType.DEFAULT_BUILD_TYPES,\n configure: Framework.() -> Unit = {}\n ) = createBinaries(namePrefix, namePrefix, NativeOutputKind.FRAMEWORK, buildTypes, ::Framework, configure)","completion":"\/** Creates an Objective-C framework with the empty name prefix for each build type and configures it. *\/\n @JvmOverloads\n fun framework(\n buildTypes: Collection = NativeBuildType.DEFAULT_BUILD_TYPES,\n configure: Framework.() -> Unit = {}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors\nimport org.jetbrains.kotlin.fir.expressions.FirPropertyAccessExpression\nimport org.jetbrains.kotlin.fir.expressions.FirVariableAssignment","completion":"import org.jetbrains.kotlin.fir.expressions.toResolvedCallableSymbol\nimport org.jetbrains.kotlin.fir.resolve.calls.FirSimpleSyntheticPropertySymbol\nimport org.jetbrains.kotlin.fir.resolve.calls.noJavaOrigin<|endoftext|>"} {"prompt":"flagKind: FlagKind = FlagKind.REGULAR\n ) {\n for (flag in flagsToCompare) {\n val valueA = flag.get(flagsA)\n val valueB = flag.get(flagsB)\n\n compareValues(containerContext, valueA, valueB, flagKind, flag.name)\n }\n }\n\n companion object {\n fun compare(","completion":"metadataA: KlibModuleMetadata,\n metadataB: KlibModuleMetadata,\n config: Config = Config.Default\n ): Result = MetadataDeclarationsComparator(config).compareModules(metadataA, metadataB)\n\n private val CLASS_FLAGS: Array> = arrayOf(\n KmClass::hasAnnotations,<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\nfun fooInt(p: Int) = p\nfun fooLong(p: Long) = p\nfun fooByte(p: Byte) = p\nfun fooShort(p: Short) = p\n\nfun test() {\n fooInt(1 % 1)","completion":"fooByte(1 % 1)\n fooLong(1 % 1)\n fooShort(1 % 1)\n}\n\npublic operator fun Int.rem(other: Int): Int = 0<|endoftext|>"} {"prompt":"* @sample samples.collections.Collections.Transformations.distinctAndDistinctBy\n *\/\npublic fun DoubleArray.distinct(): List {\n return this.toMutableSet().toList()\n}\n\n\/**\n * Returns a list containing only distinct elements from the given array.\n * \n * The elements in the resulting list are in the same order as they were in the source array.\n *","completion":"* @sample samples.collections.Collections.Transformations.distinctAndDistinctBy\n *\/\npublic fun BooleanArray.distinct(): List {\n return this.toMutableSet().toList()\n}\n\n\/**\n * Returns a list containing only distinct elements from the given array.\n * \n * The elements in the resulting list are in the same order as they were in the source array.\n *<|endoftext|>"} {"prompt":"abstract class F : KotlinInterface, Java2 { \/\/Kotlin \u2190 Java, Kotlin2 \u2190 Java2\n override fun getFirst(): Int {\n return 2\n }\n}\n\nabstract class G : Java3() \/\/Kotlin \u2190 Java \u2190 Kotlin \u2190 Java\n\ninterface KotlinInterface : SequencedCollection","completion":"fun test(a: A, b: B, c: C, d: D, e: E, f: F, g: G) {\n a.addFirst(1)\n a.addLast(null)\n a.first\n a.last\n a.first()\n a.last()\n a.removeFirst()\n a.removeLast()\n a.reversed()<|endoftext|>"} {"prompt":"return \"Wrong elements for (MaxL - 5).toLong()..MaxL step 3: $list4\"\n }\n\n val list5 = ArrayList()\n val range5 = (MaxC - 5)..MaxC step 3\n for (i in range5) {\n list5.add(i)\n if (list5.size > 23) break\n }","completion":"if (list5 != listOf((MaxC - 5), (MaxC - 2))) {\n return \"Wrong elements for (MaxC - 5)..MaxC step 3: $list5\"\n }\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"configuration.put(WasmConfigurationKeys.WASM_USE_TRAPS_INSTEAD_OF_EXCEPTIONS, arguments.wasmUseTrapsInsteadOfExceptions)\n configuration.put(WasmConfigurationKeys.WASM_USE_NEW_EXCEPTION_PROPOSAL, arguments.wasmUseNewExceptionProposal)","completion":"configuration.putIfNotNull(WasmConfigurationKeys.WASM_TARGET, arguments.wasmTarget?.let(WasmTarget::fromName))\n\n configuration.put(JSConfigurationKeys.OPTIMIZE_GENERATED_JS, arguments.optimizeGeneratedJs)\n\n val commonSourcesArray = arguments.commonSources\n val commonSources = commonSourcesArray?.toSet() ?: emptySet()<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.psi.KtFile\nimport org.jetbrains.kotlin.psi.KtSimpleNameExpression\n\npublic abstract class KtCompletionCandidateChecker : KtAnalysisSessionComponent() {\n public abstract fun createExtensionCandidateChecker(\n originalFile: KtFile,\n nameExpression: KtSimpleNameExpression,","completion":"explicitReceiver: KtExpression?\n ): KtCompletionExtensionCandidateChecker\n\n @Deprecated(\"Use createExtensionCandidateChecker() instead.\")\n public abstract fun checkExtensionFitsCandidate(\n firSymbolForCandidate: KtCallableSymbol,\n originalFile: KtFile,\n nameExpression: KtSimpleNameExpression,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.config.CompilerConfiguration\nimport org.jetbrains.kotlin.config.LanguageVersionSettings\nimport org.jetbrains.kotlin.config.languageVersionSettings\nimport org.jetbrains.kotlin.diagnostics.DiagnosticReporter\nimport org.jetbrains.kotlin.ir.IrBuiltIns","completion":"import org.jetbrains.kotlin.ir.IrDiagnosticReporter\nimport org.jetbrains.kotlin.ir.KtDiagnosticReporterWithImplicitIrBasedContext\nimport org.jetbrains.kotlin.ir.declarations.IrModuleFragment\nimport org.jetbrains.kotlin.library.KotlinLibrary<|endoftext|>"} {"prompt":"override fun getAllClassesByClassId(classId: ClassId): List = emptyList()\n override fun getAllTypeAliasesByClassId(classId: ClassId): List = emptyList()\n override fun getTopLevelKotlinClassLikeDeclarationNamesInPackage(packageFqName: FqName): Set = emptySet()","completion":"override fun getTopLevelProperties(callableId: CallableId): List = emptyList()\n override fun getTopLevelFunctions(callableId: CallableId): List = emptyList()\n override fun getTopLevelCallableFiles(callableId: CallableId): List = emptyList()<|endoftext|>"} {"prompt":"override val source: KtSourceElement?\n val diagnostic: ConeDiagnostic\n\n override fun accept(visitor: FirVisitor, data: D): R =\n visitor.visitDiagnosticHolder(this, data)\n\n @Suppress(\"UNCHECKED_CAST\")","completion":"override fun transform(transformer: FirTransformer, data: D): E =\n transformer.transformDiagnosticHolder(this, data) as E\n}<|endoftext|>"} {"prompt":"override fun MethodBuilder.modifyGeneratedXor() {\n setAsExternal(PrimitiveType.BOOLEAN)\n }\n\n override fun MethodBuilder.modifyGeneratedCompareTo() {\n setAsExternal(PrimitiveType.BOOLEAN)\n }\n\n override fun MethodBuilder.modifyGeneratedToString() {","completion":"\"if (this) \\\"true\\\" else \\\"false\\\"\".setAsExpressionBody()\n }\n\n override fun MethodBuilder.modifyGeneratedEquals() {\n \"other is Boolean && kotlin.native.internal.areEqualByValue(this, other)\".setAsExpressionBody()\n }\n\n private fun ClassBuilder.generateCustomEquals() {\n method {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext\nimport org.jetbrains.kotlin.ir.declarations.IrDeclaration\nimport org.jetbrains.kotlin.ir.declarations.IrFunction\nimport org.jetbrains.kotlin.ir.expressions.IrBody","completion":"import org.jetbrains.kotlin.ir.expressions.IrExpression\nimport org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression\nimport org.jetbrains.kotlin.ir.util.hasAnnotation\nimport org.jetbrains.kotlin.ir.visitors.IrElementTransformer<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER -UNRESOLVED_REFERENCE -UNREACHABLE_CODE\n\/\/ SKIP_TXT\n\n\/*\n * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)\n *\n * SPEC VERSION: 0.1-544","completion":"* MAIN LINK: declarations, classifier-declaration, class-declaration, constructor-declaration -> paragraph 5 -> sentence 2\n * PRIMARY LINKS: declarations, classifier-declaration, class-declaration, constructor-declaration -> paragraph 4 -> sentence 1\n * declarations, classifier-declaration, class-declaration -> paragraph 1 -> sentence 1<|endoftext|>"} {"prompt":"fun case2() {\n try {\n throwException()\n } catch (e: ExcB) {\n } finally\n}\n\n\/\/ TESTCASE NUMBER: 3\n\nfun case3() {\n try {\n throwException()\n } finally","completion":"}<|endoftext|>"} {"prompt":"resourceMap.put(res.id.name, res)\n }\n }\n }\n\n resourceMap.keys.removeAll(resourcesToExclude)\n return resourceMap.values.toList()\n }\n\n companion object {\n fun getInstance(module: Module): AndroidLayoutXmlFileManager? {\n @Suppress(\"DEPRECATION\")","completion":"val service = com.intellij.openapi.module.ModuleServiceManager.getService(module, AndroidLayoutXmlFileManager::class.java)\n return service ?: module.getComponent(AndroidLayoutXmlFileManager::class.java)\n }\n }\n}<|endoftext|>"} {"prompt":"This could happen if the required dependency is missing in the project. Or if there is a dependency of \"org.sample:libb (org.sample:libb-native)\" that has a different version in the project than the version that \"org.sample:libb (org.sample:libb-native): 1.0\" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.","completion":"The list of \"org.sample:libb (org.sample:libb-native): 1.0\" dependencies that may lead to conflicts:\n 1. \"org.sample:liba (org.sample:liba-native): 2.0\" (was initially compiled with \"org.sample:liba (org.sample:liba-native): 1.0\")\n \n Project dependencies:<|endoftext|>"} {"prompt":"fun func() = \"2\"\n}\n\nfun box(): String {\n val expectedKeys = setOf(\"simpleProp\", \"anotherProp\")\n assertEquals(expectedKeys, P().keys())\n\n assertEquals(expectedKeys, object {\n val simpleProp: Int = 100\n val anotherProp: Int = 100\n val propWithGetter: Int\n get() = 1","completion":"fun func() = \"2\"\n }.keys())\n\n return \"OK\"\n}\n\nfun Any.keys(): Set = (js(\"Object\").keys(this) as Array).toSet()<|endoftext|>"} {"prompt":"} catch (e: java.lang.Exception) {\n log()\n } finally {\n x = 42\n }\n }\n\n \/\/ Properly initialized\n x.inc()\n } catch (e: java.lang.Exception) {\n log()\n }\n\n \/\/ Still can be unitialized because we don't know what can happen in try-block","completion":"\/\/ (e.g., OutOfMemory exception could've happened even before myRun was executed)\n x.inc()\n}\n\n\nfun innerFinallyInitializesOuterRethrows() {\n val x: Int\n try {\n myRun {\n try {\n innerComputation()<|endoftext|>"} {"prompt":"++index\n }\n return res\n}\n\n@ExperimentalForeignApi\npublic fun NativePlacement.allocArrayOf(elements: ByteArray): CArrayPointer {\n val result = allocArray(elements.size)\n nativeMemUtils.putByteArray(elements, result.pointed, elements.size)\n return result\n}\n\n@ExperimentalForeignApi","completion":"public fun NativePlacement.allocArrayOf(vararg elements: Float): CArrayPointer {\n val res = allocArray(elements.size)\n var index = 0\n while (index < elements.size) {\n res[index] = elements[index]\n ++index\n }\n return res\n}\n\n@ExperimentalForeignApi<|endoftext|>"} {"prompt":"\/\/ Disabling toolchain feature for checking stable logic with downloading kotlin native\n freeArgs = listOf(\"-Pkotlin.native.toolchain.enabled=false\"),\n \/\/ For each test in this class, we need to provide an isolated .konan directory,\n \/\/ so we create it within each test project folder\n konanDataDir = workingDir.resolve(\".konan\")\n .toFile()","completion":".apply { mkdirs() }.toPath(),\n )\n\n @OptIn(EnvironmentalVariablesOverride::class)\n @DisplayName(\"K\/N Gradle project build (on Linux or Mac) with a dependency from a Maven\")\n @GradleTest\n fun testSetupCommonOptionsForCaches(gradleVersion: GradleVersion, @TempDir tempDir: Path) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.parcelize.fir.diagnostics.KtErrorsParcelize.PARCELER_TYPE_INCOMPATIBLE\nimport org.jetbrains.kotlin.parcelize.fir.diagnostics.KtErrorsParcelize.PROPERTY_WONT_BE_SERIALIZED","completion":"import org.jetbrains.kotlin.parcelize.fir.diagnostics.KtErrorsParcelize.REDUNDANT_TYPE_PARCELER\n\nobject KtDefaultErrorMessagesParcelize : BaseDiagnosticRendererFactory() {\n override val MAP = KtDiagnosticFactoryToRendererMap(\"Parcelize\").also { map ->\n map.put(<|endoftext|>"} {"prompt":"private object B260 { val a = B259.a + Random.nextInt(100) }\nprivate object B261 { val a = B260.a + Random.nextInt(100) }\nprivate object B262 { val a = B261.a + Random.nextInt(100) }\nprivate object B263 { val a = B262.a + Random.nextInt(100) }","completion":"private object B264 { val a = B263.a + Random.nextInt(100) }\nprivate object B265 { val a = B264.a + Random.nextInt(100) }\nprivate object B266 { val a = B265.a + Random.nextInt(100) }\nprivate object B267 { val a = B266.a + Random.nextInt(100) }<|endoftext|>"} {"prompt":"\/\/ !CHECK_TYPE\n\npackage n\n\nimport java.util.*\nimport checkSubtype\n\nfun test() {\n val foo = arrayList(\"\").map { it -> it.length }.fold(0, { x, y -> Math.max(x, y) })\n checkSubtype(foo)\n checkSubtype(foo)\n}","completion":"\/\/from library\nfun arrayList(vararg values: T) : ArrayList {}<|endoftext|>"} {"prompt":"public var b4: Int = 0\n public set\n\n private var b5 = 0\n private set\n\n\n init {\n a1 = 1\n a2 = 1\n a3 = 1\n\n b1 = 1\n b2 = 1\n b3 = 1\n b4 = 1\n b5 = 1\n foo { a1 = 1 }\n bar()\n }","completion":"private inline fun bar() { a1 = 1 }\n}\n\ninline fun foo(x: () -> Unit) = x()\n\n\/\/ Every property should be accessed directly in this example because they all are final class properties with default accessors\n\/\/ 0 INVOKESPECIAL Example\\.set\n\n\/\/ JVM_TEMPLATES\n\/\/ ...except the access in `private inline fun`.\n\/\/ 2 INVOKEVIRTUAL Example\\.set<|endoftext|>"} {"prompt":"private fun maybeGetJavaCacheFromFile(): JavaClassCache {\n return if (javaCacheFile.exists()) {\n try {\n ObjectInputStream(BufferedInputStream(javaCacheFile.inputStream())).use {\n it.readObject() as JavaClassCache\n }\n } catch (e: Throwable) {\n JavaClassCache()\n }\n } else {\n JavaClassCache()","completion":"}\n }\n\n override fun close() {\n if (closed) return\n\n with(javaCacheFile) {\n delete()\n parentFile.mkdirs()\n ObjectOutputStream(BufferedOutputStream(outputStream())).use {\n it.writeObject(javaCache)\n }\n }\n\n with(aptCacheFile) {\n delete()<|endoftext|>"} {"prompt":"override var bar: String = \"barI3\"\n\n override var baz: String = \"bazI3\"\n\n override fun bay(): String = \"bayI3\"\n}\n\nabstract class A : I3\n\n@JsExport\nfun getA(): I3 = object : A() {\n override val foo: String = \"fooA\"","completion":"override var bar: String = \"barA\"\n\n override var baz: String = \"bazA\"\n\n override fun bay(): String = \"bayA\"\n}\n\nopen class B : A() {\n override val foo: String = \"fooB\"\n\n override var bar: String = \"barB\"\n\n override val baz: String = \"bazB\"<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ WITH_STDLIB\n\/\/ MODULE: lib\n\/\/ FILE: JavaAnn.java\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n@Retention(RetentionPolicy.RUNTIME)\n@interface JavaAnn {\n Class[] args();\n}\n\n\/\/ MODULE: main(lib)","completion":"\/\/ FILE: 1.kt\n\nclass O\nclass K\n\n@JavaAnn(args = arrayOf(O::class, K::class)) class MyClass\n\nfun box(): String {\n val args = MyClass::class.java.getAnnotation(JavaAnn::class.java).args\n val argName1 = args[0].java.simpleName ?: \"fail 1\"<|endoftext|>"} {"prompt":"expression: IrFunctionAccessExpression,\n parameter: IrValueParameter\n ): IrExpression {\n\n return this.useAsArgument(expression.target.valueParameters[parameter.index])\n }\n\n override fun useAsVarargElement(element: IrExpression, expression: IrVararg): IrExpression =\n element.useAs(\n \/\/ Do not box primitive inline classes","completion":"if (icUtils.isTypeInlined(element.type) && !icUtils.isTypeInlined(expression.type) && !expression.type.isPrimitiveArray())\n irBuiltIns.anyNType\n else\n if (!expression.type.isPrimitiveArray()) irBuiltIns.anyNType else expression.varargElementType\n )\n}<|endoftext|>"} {"prompt":"val mergedTable = mutableMapOf()\n mergedTable.apply {\n currentBenchmarks.forEach { (name, current) ->\n \/\/ Check existance of benchmark in previous results.\n if (previousBenchmarks == null || name !in previousBenchmarks) {\n getOrPut(name) { SummaryBenchmark(current, null) }\n } else {","completion":"val previousBenchmark = previousBenchmarks.getValue(name)\n getOrPut(name) { SummaryBenchmark(current, previousBenchmarks[name]) }\n \/\/ Explore change of status.\n if (previousBenchmark.status != current.status) {\n val statusChange = FieldChange(\"$name\", previousBenchmark.status, current.status)\n benchmarksWithChangedStatus.add(statusChange)\n }<|endoftext|>"} {"prompt":"if (z != null || this.z != null) z.propAny","completion":"if (z != null || this.z != null) z.propNullableT<|endoftext|>"} {"prompt":"@kotlin.SinceKotlin @kotlin.WasExperimental public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.IntRange { \/* compiled code *\/ }\n\n @kotlin.SinceKotlin @kotlin.WasExperimental public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange { \/* compiled code *\/ }","completion":"@kotlin.SinceKotlin @kotlin.WasExperimental public final operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.IntRange { \/* compiled code *\/ }<|endoftext|>"} {"prompt":"val parameterNameName = StandardNames.NAME\n }\n }\n\n object Callables {\n val suspend = \"suspend\".callableId(BASE_KOTLIN_PACKAGE)\n val coroutineContext = \"coroutineContext\".callableId(BASE_COROUTINES_PACKAGE)\n\n val clone = \"clone\".callableId(Cloneable)","completion":"val not = \"not\".callableId(Boolean)\n\n val contract = \"contract\".callableId(BASE_CONTRACTS_PACKAGE)\n }\n\n object Collections {\n val baseCollectionToMutableEquivalent: Map = mapOf(\n StandardClassIds.Iterable to StandardClassIds.MutableIterable,<|endoftext|>"} {"prompt":"if (!!(x !is TypealiasNullableStringIndirect?)) else {\n x","completion":"x?.length\n }\n}\n\n\/\/ TESTCASE NUMBER: 10\nfun case_10(x: Nothing?) {\n if (!!(x !is Interface3)) else {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.konan.file\n\nval String.isJavaScript \n get() = this.endsWith(\".js\")\n\nval String.isUnixStaticLib\n get() = this.endsWith(\".a\")\n\nval String.isWindowsStaticLib\n get() = this.endsWith(\".lib\")\n\nval String.isBitcode","completion":"get() = this.endsWith(\".bc\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.plugin\n\nimport org.gradle.api.Project\nimport org.jetbrains.kotlin.gradle.plugin.KotlinPluginLifecycle.CoroutineStart.Default\nimport org.jetbrains.kotlin.gradle.plugin.KotlinPluginLifecycle.CoroutineStart.Undispatched","completion":"import org.jetbrains.kotlin.gradle.plugin.KotlinPluginLifecycle.ProjectConfigurationResult\nimport org.jetbrains.kotlin.gradle.utils.whenEvaluated\nimport org.jetbrains.kotlin.gradle.utils.CompletableFuture\nimport org.jetbrains.kotlin.gradle.utils.failures<|endoftext|>"} {"prompt":"if (!areEqual(MOCK_CLASSIFIERS, a[i], b[i]))\n return false\n }\n\n return true\n }\n\n private companion object {\n fun mockValueParams(vararg params: Pair): List {\n check(params.isNotEmpty())\n return params.map { (name, returnTypeClassId) ->","completion":"ValueParameterCommonizerTest.mockValueParam(\n name = name,\n returnTypeClassId = returnTypeClassId\n )\n }\n }\n }\n}<|endoftext|>"} {"prompt":"case389 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 390\nfun case390(){\n val case390 = '\\uc2ff'\n case390\n case390 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 391\nfun case391(){","completion":"val case391 = '\\uc300'\n case391\n case391 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 392\nfun case392(){\n val case392 = '\\uc3ff'<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.library.metadata.resolver.impl.KotlinLibraryResolverImpl\nimport org.jetbrains.kotlin.library.metadata.resolver.impl.libraryResolver\nimport org.jetbrains.kotlin.library.packageFqName\nimport org.jetbrains.kotlin.library.toUnresolvedLibraries","completion":"import org.jetbrains.kotlin.native.interop.gen.*\nimport org.jetbrains.kotlin.native.interop.indexer.*\nimport org.jetbrains.kotlin.native.interop.tool.*\nimport org.jetbrains.kotlin.util.removeSuffixIfPresent\nimport org.jetbrains.kotlin.util.suffixIfNot<|endoftext|>"} {"prompt":"startIndex: Int = 0,\n endIndex: Int = source.size\n ): A {\n val stringResult = platformEncodeToString(source, startIndex, endIndex)\n destination.append(stringResult)\n return destination\n }\n\n \/**\n * Decodes symbols from the specified [source] array or its subrange.\n * Returns a [ByteArray] containing the resulting bytes.\n *","completion":"* The symbols for decoding are not required to be padded.\n * However, if there is a padding character present, the correct amount of padding character(s) must be present.\n * The padding character `'='` is interpreted as the end of the encoded byte data. Subsequent symbols are prohibited.\n *\n * @param source the array to decode symbols from.<|endoftext|>"} {"prompt":"loadClass(StandardClassIds.KFunctionN(arity)).owner\n }\n\n @OptIn(UnsafeDuringIrConstructionAPI::class)\n override fun suspendFunctionN(arity: Int): IrClass = suspendFunctionNMap.getOrPut(arity) {\n loadClass(StandardClassIds.SuspendFunctionN(arity)).owner\n }","completion":"@OptIn(UnsafeDuringIrConstructionAPI::class)\n override fun kSuspendFunctionN(arity: Int): IrClass = kSuspendFunctionNMap.getOrPut(arity) {\n loadClass(StandardClassIds.KSuspendFunctionN(arity)).owner\n }<|endoftext|>"} {"prompt":"is KtValueArgument -> {\n val valueArgumentList = argument.parent as? KtValueArgumentList ?: return null\n valueArgumentList.parent as? KtCallExpression ?: return null\n }\n else -> return null\n }\n\n val call = callExpression.getResolvedCall(bindingContext) ?: return null","completion":"return call.resultingDescriptor.name.asString()\n}\n\nprivate val ARRAY_OF_STRINGS_TYPE = Type.getType(\"[Ljava\/lang\/String;\")\nprivate val METHOD_DESCRIPTOR_FOR_MAIN = Type.getMethodDescriptor(Type.VOID_TYPE, ARRAY_OF_STRINGS_TYPE)\n\nfun generateBridgeForMainFunctionIfNecessary(<|endoftext|>"} {"prompt":"visitContractDescriptionElement(booleanExpression, data)\n\n open fun visitLogicalBinaryOperationContractExpression(binaryLogicExpression: KtBinaryLogicExpression, data: D): R =\n visitBooleanExpression(binaryLogicExpression, data)","completion":"open fun visitLogicalNot(logicalNot: KtLogicalNot, data: D): R = visitBooleanExpression(logicalNot, data)\n\n open fun visitIsInstancePredicate(isInstancePredicate: KtIsInstancePredicate, data: D): R =\n visitBooleanExpression(isInstancePredicate, data)<|endoftext|>"} {"prompt":"parameters = listOf(ObjCParameter(\"zone\", null, ObjCRawType(\"struct _NSZone *\"), null)),\n attributes = listOf(\"unavailable\")\n )\n )\n }\n\n \/\/ Hide \"unimplemented\" super constructors:\n getSuperClassSymbolNotAny()?.getMemberScope()?.getConstructors().orEmpty()","completion":".filter { it.isVisibleInObjC() }\n .forEach { superClassConstructor ->\n val translatedSuperClassConstructor = superClassConstructor.buildObjCMethod(unavailable = true)\n if (result.none { it.name == translatedSuperClassConstructor.name }) {\n result.add(translatedSuperClassConstructor)\n }\n }\n\n return result\n}\n\n\/**<|endoftext|>"} {"prompt":"Assert.assertArrayEquals(msg, arrayOf(exp.value), arrayOf(actVal)) \/\/ tricking Array.deepEquals to compare single element arrays (instead of tedious casting to typed array)\n }\n else {\n Assert.assertEquals(msg, exp.value, actVal)\n }\n }\n }\n }\n}","completion":"private fun foo(i: Int, b: Byte, c: Char, d: Double = 0.0, s: String = \"\", t: Boolean = true, vararg v: Long) {}\n\nprivate fun charArray(c: CharArray) {}\n\nprivate fun varargStrings(vararg s: String) {}\n\nprivate fun notNullNumber(n: Number) {}\n\nprivate fun nullableNumber(n: Number?) {}<|endoftext|>"} {"prompt":"assertFails(\"KClass (not Class) instances should be passed as arguments\") {\n create(mapOf(\"clazz\" to String::class.java, \"string\" to \"Fail\"))\n }\n\n val t5 = create(mapOf(\"clazz\" to String::class, \"string\" to \"OK\"))\n assertEquals(\"OK\", t5.string)","completion":"val t6 = create()\n assertEquals(0, t6.i)\n assertEquals(\"\", t6.s)\n assertEquals(3.14, t6.d)\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"isOperandOfIsOperator = true\n return try {\n block()\n } finally {\n isOperandOfIsOperator = oldValue\n }\n }\n\n @PrivateForInline\n @JvmField\n var currentFile: FirFile? = null\n\n @OptIn(PrivateForInline::class)","completion":"inline fun withFile(file: FirFile?, block: FirSpecificTypeResolverTransformer.() -> R): R {\n val oldValue = currentFile\n currentFile = file\n return try {\n block()\n } finally {\n currentFile = oldValue\n }\n }\n\n @OptIn(PrivateForInline::class)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.test.framework.project.structure.KtTestModule\nimport org.jetbrains.kotlin.analysis.test.framework.project.structure.KtTestModuleStructure\nimport org.jetbrains.kotlin.analysis.test.framework.project.structure.TestModuleStructureFactory","completion":"import org.jetbrains.kotlin.analysis.test.framework.services.configuration.AnalysisApiBinaryLibraryIndexingMode\nimport org.jetbrains.kotlin.analysis.test.framework.services.configuration.AnalysisApiJvmEnvironmentConfigurator\nimport org.jetbrains.kotlin.analysis.test.framework.services.configuration.AnalysisApiIndexingConfiguration<|endoftext|>"} {"prompt":"private fun KotlinHierarchyBuilderImpl.checkCyclicHierarchy(): Nothing? {\n val stack = mutableListOf(node)\n val visited = hashSetOf()\n\n fun checkChild(child: KotlinHierarchyBuilderImpl) {\n if (!visited.add(child)) return\n stack += child.node","completion":"if (this == child) throw CyclicKotlinHierarchyException(stack)\n child.children.forEach { next -> checkChild(next) }\n stack -= child.node\n }\n\n children.forEach { child -> checkChild(child) }\n return null\n}<|endoftext|>"} {"prompt":"BasicJvmScriptingHost().eval(\n script.toScriptSource(), definition.compilationConfiguration, definition.evaluationConfiguration\n ).throwOnFailure()\n }.lines()\n Assert.assertEquals(greeting, output)\n }\n\n @Test\n fun testSimpleImportWithImplicitReceiverRef() {","completion":"val greeting = listOf(\"Hello from helloWithVal script!\", \"Hello from imported helloWithVal script!\")\n val script = \"println(\\\"Hello from imported \\${(::helloScriptName).get()} script!\\\")\"\n val definition = createJvmScriptDefinitionFromTemplate(\n compilation = {\n makeSimpleConfigurationWithTestImport()\n implicitReceivers(String::class)\n },<|endoftext|>"} {"prompt":"val overridden = functionReferenceClass.superTypes.mapNotNull { superType ->\n superType.getClass()\n ?.declarations\n ?.filterIsInstance()\n ?.singleOrNull { it.name.asString() == name }\n ?.symbol\n }\n require(overridden.isNotEmpty())\n val function = functionReferenceClass.addFunction {","completion":"startOffset = SYNTHETIC_OFFSET\n endOffset = SYNTHETIC_OFFSET\n this.name = Name.identifier(name)\n modality = Modality.FINAL\n returnType = overridden[0].owner.returnType\n }\n function.createDispatchReceiverParameter()\n function.overriddenSymbols += overridden<|endoftext|>"} {"prompt":"C::nullableProduce.callSuspend(c)!!.value2\n }.let { assertEquals(-2, it) }\n\n run0U {\n C::nonNull_nonNullConsumeAndProduce.callSuspend(c, Z(3U, -3)).value1\n }.let { assertEquals(3U, it) }\n run0 {","completion":"C::nonNull_nonNullConsumeAndProduce.callSuspend(c, Z(3U, -3)).value2\n }.let { assertEquals(-3, it) }\n\n run0U {\n C::nonNull_nullableConsumeAndProduce.callSuspend(c, Z(4U, -4))!!.value1<|endoftext|>"} {"prompt":"fun ul(init : UL.() -> Unit) = initTag(UL(), init)\n fun a(href : String, init : A.() -> Unit) {\n val a = initTag(A(), init)\n a.href = href\n }\n}\n\nclass Body() : BodyTag(\"body\")\nclass UL() : BodyTag(\"ul\") {","completion":"fun li(init : LI.() -> Unit) = initTag(LI(), init)\n}\n\nclass B() : BodyTag(\"b\")\nclass LI() : BodyTag(\"li\")\nclass P() : BodyTag(\"p\")\nclass H1() : BodyTag(\"h1\")\nclass A() : BodyTag(\"a\") {\n public var href : String?\n get() = attributes[\"href\"]<|endoftext|>"} {"prompt":"skipIgnored,\n tags\n).let { methodModel ->\n if (methodModel.containsWithoutJvmInline()) {\n val isWithAnnotationAndIsWithPostfix = when {\n targetBackend.isRecursivelyCompatibleWith(TargetBackend.JVM) -> listOf(true to false)\n targetBackend == TargetBackend.ANY -> listOf(null to false)","completion":"else -> listOf(false to false)\n }\n isWithAnnotationAndIsWithPostfix.map { (ann, post) -> WithoutJvmInlineTestMethodModel(methodModel, ann, post) }\n } else listOf(methodModel)\n}<|endoftext|>"} {"prompt":"* @param diagnosticReporter Used for reporting serialization-time diagnostics, for example, about clashing IR signatures.\n * @param compatibilityMode The information about KLIB ABI.\n * @param cleanFiles In the case of incremental compilation, the list of files that were not changed and therefore don't need to be\n * serialized again.\n * @param dependencies The list of KLIBs that the KLIB being produced depends on.","completion":"* @param createModuleSerializer Used for creating a backend-specific instance of [IrModuleSerializer].\n * @param metadataSerializer Something capable of serializing the metadata of the source files. See the corresponding interface KDoc.\n * @param runKlibCheckers Additional checks to be run before serializing [irModuleFragment]. Can be used to report serialization-time\n * diagnostics.<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.types.coneTypeSafe\nimport org.jetbrains.kotlin.fir.types.isArrayType\nimport org.jetbrains.kotlin.fir.types.resolvedType\nimport org.jetbrains.kotlin.fir.visitors.FirDefaultTransformer\n\n\/**","completion":"* A transformer that converts resolved arrayOf() call to [FirArrayLiteral].\n *\n * Note that arrayOf() calls only in [FirAnnotation] or the default value of annotation constructor are transformed.\n *\/\nclass FirArrayOfCallTransformer : FirDefaultTransformer() {\n private fun toArrayLiteral(functionCall: FirFunctionCall, session: FirSession): FirExpression? {<|endoftext|>"} {"prompt":"private fun addFieldsForEnumEntries(result: MutableList, classOrObjectSymbol: KtNamedClassOrObjectSymbol) {\n if (!isEnum) return\n\n classOrObjectSymbol.getStaticDeclaredMemberScope().getCallableSymbols()\n .filterIsInstance()\n .mapNotNullTo(result) {","completion":"val enumEntry = it.sourcePsiSafe()\n val name = enumEntry?.name ?: return@mapNotNullTo null\n SymbolLightFieldForEnumEntry(\n enumEntry = enumEntry,\n enumEntryName = name,\n containingClass = this,\n )\n }\n }\n\n override fun isInterface(): Boolean = false<|endoftext|>"} {"prompt":"diagnosticHolder: KotlinDiagnosticsHolder,\n ): ReturnArgumentsAnalysisResult {\n val substitutorAndStubsForLambdaAnalysis = c.createSubstituteFunctorForLambdaAnalysis()\n val substitute = substitutorAndStubsForLambdaAnalysis.substitute\n\n \/\/ Expected type has a higher priority against which lambda should be analyzed","completion":"\/\/ Mostly, this is needed to report more specific diagnostics on lambda parameters\n fun expectedOrActualType(expected: UnwrappedType?, actual: UnwrappedType?): UnwrappedType? {\n val expectedSubstituted = expected?.let(substitute)<|endoftext|>"} {"prompt":"}.filterIsInstance()\n if (!testRun.expectedFailure) {\n verifyExpectation(failedResults.isEmpty()) {\n failedResults.joinToString(\"\\n\")\n }\n } else {\n val runResultInfo = buildString {\n appendLine(\"TestCase Kind: ${testRun.testCase.kind}\")","completion":"appendLine(\"TestCaseId: ${testRun.testCase.id}\")\n appendLine(\"Exit code: ${runResult.exitCode}\")\n appendLine(\"Filtered test output is\")\n appendLine(runResult.processOutput.stdOut.filteredOutput.let {\n if (it.isNotEmpty()) \":\\n$it\" else \" empty.\"\n })<|endoftext|>"} {"prompt":"if (field[i, j])\n \/\/ (i, j) is alive\n n in 2..3 \/\/ It remains alive iff it has 2 or 3 neighbors\n else\n \/\/ (i, j) is dead\n n == 3 \/\/ A new cell is born if there are 3 neighbors alive\n }\n}\n\n\/** A few colony examples here *\/\nfun main(args: Array) {\n \/\/ Simplistic demo","completion":"printField(\"***\", 3)\n \/\/ \"Star burst\"\n printField(\"\"\"\n __*__\n _***_\n __*__\n \"\"\", 10)\n \/\/ Stable colony\n printField(\"\"\"\n __*__\n _*_*_\n __*__\n \"\"\", 3)\n \/\/ Stable from the step 2\n printField(\"\"\"\n __**__<|endoftext|>"} {"prompt":"processor: (FirNamedFunctionSymbol, FirTypeScope) -> ProcessorAction\n ): ProcessorAction =\n doProcessDirectOverriddenCallables(\n functionSymbol, processor, enhancedToOriginalFunctions, FirTypeScope::processDirectOverriddenFunctionsWithBaseScope\n )\n\n override fun processDirectOverriddenPropertiesWithBaseScope(\n propertySymbol: FirPropertySymbol,","completion":"processor: (FirPropertySymbol, FirTypeScope) -> ProcessorAction\n ): ProcessorAction = doProcessDirectOverriddenCallables(\n propertySymbol, processor, enhancedToOriginalProperties, FirTypeScope::processDirectOverriddenPropertiesWithBaseScope\n )\n\n private fun > doProcessDirectOverriddenCallables(\n callableSymbol: S,<|endoftext|>"} {"prompt":"val descriptor = resolvedCall.resultingDescriptor\n if (descriptor !is PropertyDescriptor || descriptor.name.asString() != \"javaClass\") return\n\n val container = descriptor.containingDeclaration\n if (container !is PackageFragmentDescriptor || container.fqName.asString() != \"kotlin.jvm\") return\n\n val actualType = descriptor.type","completion":"val companionObject = actualType.arguments.singleOrNull()?.type?.constructor?.declarationDescriptor as? ClassDescriptor ?: return\n if (companionObject.isCompanionObject) {\n val containingClass = companionObject.containingDeclaration as ClassDescriptor\n val javaLangClass = actualType.constructor.declarationDescriptor as? ClassDescriptor ?: return<|endoftext|>"} {"prompt":"if (suspendNoninlineReturnsVCStringNullable_Null() != null) throw IllegalStateException(\"suspendNoninlineReturnsVCStringNullable_Null\")\n\n if (suspendNoninlineReturnsVCAny_Null() != null) throw IllegalStateException(\"suspendNoninlineReturnsVCAny_Null\")","completion":"if (suspendNoninlineReturnsVCAnyNullable_Null() != null) throw IllegalStateException(\"suspendNoninlineReturnsVCAnyNullable_Null\")\n\n if (suspendNoninlineReturnsVCInt_Null() != null) throw IllegalStateException(\"suspendNoninlineReturnsVCInt_Null\")<|endoftext|>"} {"prompt":"if (!correctErrorTypes) {\n return defaultSuperTypes\n }\n\n val declaration = kaptContext.origins[clazz]?.element as? KtClassOrObject ?: return defaultSuperTypes\n val declarationDescriptor = kaptContext.bindingContext[BindingContext.CLASS, declaration] ?: return defaultSuperTypes","completion":"if (typeMapper.mapType(declarationDescriptor.defaultType) != Type.getObjectType(clazz.name)) {\n return defaultSuperTypes\n }\n\n val (superClass, superInterfaces) = partitionSuperTypes(declaration) ?: return defaultSuperTypes\n\n val sameSuperClassCount = (superClass == null) == (defaultSuperTypes.superClass == null)<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\/\/ MODULE: lib\n\/\/ FILE: common.kt\n\nenum class FooEnum(val s: String) {\n O(\"O\"),\n FAIL(\"FAIL\"),\n K(\"K\");\n}\n\n\n\/\/ MODULE: bar(lib)\n\/\/ FILE: second.kt\n\nfun bar(): String = FooEnum.valueOf(\"O\").s + FooEnum.values()[2].s","completion":"\/\/ MODULE: main(bar)\n\/\/ FILE: main.kt\n\nfun box(): String {\n return bar()\n}<|endoftext|>"} {"prompt":"d += 1\n d -= 1\n d *= 1\n d \/= 1","completion":"d %= 1\n\n d[1] += 1\n d[1] -= 1<|endoftext|>"} {"prompt":"Opcodes.IF_ICMPEQ -> Opcodes.IFEQ\n Opcodes.IF_ICMPNE -> Opcodes.IFNE\n Opcodes.IF_ICMPLE -> Opcodes.IFLE\n Opcodes.IF_ICMPLT -> Opcodes.IFLT\n Opcodes.IF_ICMPGE -> Opcodes.IFGE","completion":"Opcodes.IF_ICMPGT -> Opcodes.IFGT\n else -> throw AssertionError(\"Unexpected instruction: ${insn.insnText}\")\n }\n set(insn, JumpInsnNode(cmpWith0Opcode, insn.label))\n }\n }\n }\n }<|endoftext|>"} {"prompt":"sourceModules.flatMapToSet { module -> module.files.map { \"-Xfragment-sources=${module.name}:${it.location.path}\" } }\n .sorted().forEach { add(it) }\n }\n }\n}\n\ninternal class LibraryCompilation(\n settings: Settings,\n freeCompilerArgs: TestCompilerArgs,","completion":"sourceModules: Collection,\n dependencies: Iterable>,\n expectedArtifact: KLIB\n) : SourceBasedCompilation(\n targets = settings.get(),\n home = settings.get(),\n classLoader = settings.get(),\n optimizationMode = settings.get(),\n compilerOutputInterceptor = settings.get(),<|endoftext|>"} {"prompt":"else -> \"Fail: not Derived\"\n }\n }\n}\n\nclass Derived_1: Base() {\n override val a: CharSequence\n get() = \"Fail: Derived_1\"\n}\n\nclass Derived_2: Base() {\n override val a: CharSequence\n get() = \"OK\"\n}\n\nfun box(): String {","completion":"val x = Derived_2()\n return x.test(x)\n}<|endoftext|>"} {"prompt":"private fun getPreviousIncludingSubGraphInstructions(\n instruction: Instruction,\n traversalOrder: TraversalOrder,\n startInstruction: Instruction,\n previousSubGraphInstructions: Collection\n): Collection {\n val previous = instruction.getPreviousInstructions(traversalOrder)\n if (instruction != startInstruction || previousSubGraphInstructions.isEmpty()) {","completion":"return previous\n }\n val result = ArrayList(previous)\n result.addAll(previousSubGraphInstructions)\n return result\n}\n\nprivate fun > updateEdgeDataForInstruction(\n instruction: Instruction,\n previousValue: Edges?,\n newValue: Edges?,<|endoftext|>"} {"prompt":"else -> privateSymbolFactory().also {\n it.privateSignature = signature\n }\n }\n }\n\n \/\/ ------------------------------------ property ------------------------------------\n\n fun declareProperty(\n signature: IdSignature,\n symbolFactory: () -> IrPropertySymbol,\n propertyFactory: (IrPropertySymbol) -> IrProperty,\n ): IrProperty {\n return propertySlice.declare(","completion":"signature,\n symbolFactory,\n propertyFactory\n )\n }\n\n fun declarePropertyIfNotExists(\n signature: IdSignature,\n symbolFactory: () -> IrPropertySymbol,\n propertyFactory: (IrPropertySymbol) -> IrProperty,\n ): IrProperty {\n return propertySlice.declareIfNotExists(signature, symbolFactory, propertyFactory)<|endoftext|>"} {"prompt":"cacheKind: String\n): File {\n val cacheBaseName = CachedLibraries.getCachedLibraryName(libraryName)\n val cacheOutputKind = CompilerOutputKind.valueOf(cacheKind.uppercase())\n return OutputFiles(cacheDirectory.child(cacheBaseName).absolutePath, target, cacheOutputKind).mainFile\n}\n\nprivate fun buildCache(\n target: KonanTarget,","completion":"def: DefFile,\n outputDirectory: File,\n cacheInfo: CacheInfo,\n rebuild: Boolean,\n logger: Logger\n) = with(cacheInfo) {\n val libraryCacheDir = getLibraryCacheDir(def.name, target, cacheDirectory, cacheKind)\n if (libraryCacheDir.listFilesOrEmpty.isNotEmpty() && !rebuild) {<|endoftext|>"} {"prompt":"is SubAandB -> 1\n }\n return i\n}\n\nfun testIntersection(both: A): Int {\n check(both is B)\n\n var i = 0\n i += when(both) {\n is SubAandB -> 1\n }\n i += when(both) {","completion":"is SubB -> 1\n is SubAandB -> 1\n }\n i += when(both) {\n is SubA -> 1\n is SubAandB -> 1\n }\n i += when(both) {<|endoftext|>"} {"prompt":"stackTrace.joinToString(separator = \"\\n\")) }\n }\n\n fun checkStateMachineIn(method: String) {\n stackTrace.find { it?.methodName?.startsWith(method) == true } ?: error(\"tail-call optimization hit: method \" + method + \" has no state-machine \" +","completion":"stackTrace.joinToString(separator = \"\\n\"))\n }\n}\n\nval TailCallOptimizationChecker = TailCallOptimizationCheckerClass()<|endoftext|>"} {"prompt":"fun setDesiredAssertionStatus(v: Boolean): Checker {\n val loader = Checker::class.java.classLoader\n loader.setPackageAssertionStatus(\"localAnonymousFunction\", v)\n val c = loader.loadClass(if (v) \"localAnonymousFunction.ShouldBeEnabled\" else \"localAnonymousFunction.ShouldBeDisabled\")\n return c.newInstance() as Checker\n}","completion":"fun box(): String {\n var c = setDesiredAssertionStatus(false)\n if (c.checkTrue()) return \"FAIL 0\"\n if (c.checkTrueWithMessage()) return \"FAIL 1\"\n if (c.checkFalse()) return \"FAIL 2\"\n if (c.checkFalseWithMessage()) return \"FAIL 3\"\n c = setDesiredAssertionStatus(true)<|endoftext|>"} {"prompt":"private fun translateForPropertyAccessor(\n call: ResolvedCall,\n expression: KtExpression,\n descriptor: PropertyDescriptor,\n context: TranslationContext,\n receiver: JsExpression?,\n isSetter: Boolean,","completion":"translator: (TranslationContext, ResolvedCall, JsExpression, JsExpression?) -> JsExpression\n ): JsExpression {\n val accessorFunction = JsFunction(context.scope(), JsBlock(), \"\")\n accessorFunction.source = expression\n val accessorContext = context.innerBlock(accessorFunction.body)<|endoftext|>"} {"prompt":"internal fun createAnnotationInstance(\n annotationClass: Class,\n values: Map,\n methods: List = values.keys.map { name -> annotationClass.getDeclaredMethod(name) }\n): T {\n fun equals(other: Any?): Boolean =\n (other as? Annotation)?.annotationClass?.java == annotationClass &&","completion":"methods.all { method ->\n val ours = values[method.name]\n val theirs = method(other)\n when (ours) {\n is BooleanArray -> ours contentEquals theirs as BooleanArray\n is CharArray -> ours contentEquals theirs as CharArray\n is ByteArray -> ours contentEquals theirs as ByteArray\n is ShortArray -> ours contentEquals theirs as ShortArray<|endoftext|>"} {"prompt":"override fun serialize(value: Extras): ByteArray = IdeaExtrasProto(value).toByteArray()\n override fun deserialize(data: ByteArray): Extras = Extras(IdeaExtrasProto.parseFrom(data))\n override fun normalize(value: Extras): Extras = value.filter { (_, value) -> value !is Ignored }.toExtras()\n\n class Ignored","completion":"@Test\n fun `serialize - deserialize - sample 0`() {\n\n val extras = mutableExtrasOf(\n extrasKeyOf() withValue \"myValue\",\n extrasKeyOf(\"a\") withValue \"myValueA\",\n extrasKeyOf() withValue 2411,\n extrasKeyOf() withValue Ignored()<|endoftext|>"} {"prompt":"private const val ADVANCED_ARGUMENT_PREFIX = \"-X\"\nprivate const val FREE_ARGS_DELIMITER = \"--\"\n\ndata class ArgumentParseErrors(\n val unknownArgs: MutableList = SmartList(),\n\n val unknownExtraFlags: MutableList = SmartList(),","completion":"\/\/ Names of extra (-X...) arguments which have been passed in an obsolete form (\"-Xaaa bbb\", instead of \"-Xaaa=bbb\")\n val extraArgumentsPassedInObsoleteForm: MutableList = SmartList(),\n\n \/\/ Non-boolean arguments which have been passed multiple times, possibly with different values.\n \/\/ The key in the map is the name of the argument, the value is the last passed value.<|endoftext|>"} {"prompt":"node.remove(InsnSequence(capturedFieldAccess[0], insnNode))\n return capturedFieldAccess[capturedFieldAccess.size - 1]\n }\n\n return null\n }\n\n protected open fun getFieldNameForFolding(insnNode: FieldInsnNode): String = insnNode.name\n\n @JvmOverloads","completion":"open fun findField(fieldInsnNode: FieldInsnNode, captured: Collection = parameters.captured): CapturedParamInfo? {\n for (valueDescriptor in captured) {\n if (valueDescriptor.originalFieldName == fieldInsnNode.name && valueDescriptor.containingLambdaName == fieldInsnNode.owner) {\n return valueDescriptor\n }<|endoftext|>"} {"prompt":"if (context.languageVersionSettings.getFlag(JvmAnalysisFlags.suppressMissingBuiltinsError)) return\n\n val descriptor = resolvedCall.resultingDescriptor\n val error = diagnosticFor(descriptor, reportOn)\n ?: diagnosticFor(descriptor.returnType?.takeUnless(this::isComputingDeferredType)?.constructor?.declarationDescriptor, reportOn)","completion":"error?.let(context.trace::report)\n }\n\n private fun diagnosticFor(descriptor: DeclarationDescriptor?, reportOn: PsiElement): Diagnostic? {\n if (descriptor == null) return null\n\n val containingClassOrPackage = DescriptorUtils.getParentOfType(descriptor, ClassOrPackageFragmentDescriptor::class.java)<|endoftext|>"} {"prompt":"* It's allowed to pass the same array in the [destination] and even specify the subrange so that it overlaps with the destination range.\n * \n * @param destination the array to copy to.\n * @param destinationOffset the position in the [destination] array to copy to, 0 by default.\n * @param startIndex the beginning (inclusive) of the subrange to copy, 0 by default.","completion":"* @param endIndex the end (exclusive) of the subrange to copy, size of this array by default.\n * \n * @throws IndexOutOfBoundsException or [IllegalArgumentException] when [startIndex] or [endIndex] is out of range of this array indices or when `startIndex > endIndex`.<|endoftext|>"} {"prompt":"firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n add(FirErrors.ACTUAL_MISSING) { firDiagnostic ->\n ActualMissingImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }","completion":"add(FirErrors.EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING) { firDiagnostic ->\n ExpectActualClassifiersAreInBetaWarningImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }<|endoftext|>"} {"prompt":"\/\/ test.kt:46 box: xFoo\\24:int=1:int, $i$f$foo\\24\\42:int=0:int, it\\42:int=2:int, $i$a$-foo-TestKt$box$4\\42\\266\\0:int=0:int","completion":"\/\/ test.kt:47 box: xFoo\\24:int=1:int, $i$f$foo\\24\\42:int=0:int, it\\42:int=2:int, $i$a$-foo-TestKt$box$4\\42\\266\\0:int=0:int, y2\\42:int=2:int<|endoftext|>"} {"prompt":"require(x is String)\n for (i in 1..10) {\n x.length\n for (j in 1..10) {\n x.length\n }\n x += \"\"\n }\n}\n\nfun test33() {\n var x: Any? = materialize()\n require(x is Int)\n for (i in 1..10) {\n x.inc()","completion":"for (j in 1..10) {\n x.inc()\n }\n x++\n }\n}\n\n\/\/ Result is saved in var\n\nfun test34() {\n var x: Any? = materialize()\n val state: Boolean = x is String\n for(i in 1..10) {\n if (state) {\n x.length\n }\n }\n}<|endoftext|>"} {"prompt":"importsToAdd = listOf(\"org.jetbrains.kotlin.fir.declarations.FirTypeParameter\")\n ),\n FirValueParameter::class to HLFunctionCallConversion(\n \"firSymbolBuilder.buildSymbol({0}.symbol)\",\n KtSymbol::class.createType(),","completion":"importsToAdd = listOf(\"org.jetbrains.kotlin.fir.declarations.FirDeclaration\")\n ),\n FirFunction::class to HLFunctionCallConversion(\n \"firSymbolBuilder.buildSymbol({0})\",\n KtSymbol::class.createType(),<|endoftext|>"} {"prompt":"description = \"Path to konan and dependencies root folder\")\n\n argParser.parse(args)\n\n val distribution = Distribution(\n KotlinNativePaths.homePath.absolutePath,\n onlyDefaultProfiles = false,\n runtimeFileOverride = null,\n propertyOverrides = parseKeyValuePairs(overrideKonanProperties),\n konanDataDir = konanDataDir","completion":")\n\n val platformManager = PlatformManager(distribution)\n val target = platformManager.targetByName(targetName)\n val targetCacheArgs = platformManager.let {\n target.let(it::loader).additionalCacheFlags\n }\n val inputDirectory = inputDirectoryPath?.File()\n ?: File(distribution.konanSubdir, \"platformDef\").child(target.visibleName)<|endoftext|>"} {"prompt":"\"()\" + type.descriptor,\n false\n )\n }\n }\n\n \/\/ Type.CHAR_TYPE -> \"Char\"\n private fun getKotlinPrimitiveClassName(type: Type): Name {\n return JvmPrimitiveType.get(type.className).primitiveType.typeName\n }\n\n \/\/ \"Char\" -> type for kotlin.collections.CharIterator","completion":"private fun getPrimitiveIteratorType(primitiveClassName: Name): Type {\n val iteratorName = Name.identifier(primitiveClassName.asString() + \"Iterator\")\n return Type.getObjectType(COLLECTIONS_PACKAGE_FQ_NAME.child(iteratorName).internalNameWithoutInnerClasses)\n }\n}<|endoftext|>"} {"prompt":"private var topStackStart: Int = 0\n\n fun buildFor(exception: Throwable): String {\n exception.dumpFullTrace(\"\", \"\")\n return target.toString()\n }\n\n private fun hasSeen(exception: Throwable): Boolean = visited.any { it === exception }\n\n private fun Throwable.dumpFullTrace(indent: String, qualifier: String) {","completion":"this.dumpSelfTrace(indent, qualifier) || return\n\n var cause = this.cause\n while (cause != null) {\n cause.dumpSelfTrace(indent, \"Caused by: \") || return\n cause = cause.cause\n }\n }\n\n private fun Throwable.dumpSelfTrace(indent: String, qualifier: String): Boolean {<|endoftext|>"} {"prompt":"val companion = jvmStaticFunction.parentAsClass\n assert(companion.isCompanion)\n if (jvmStaticFunction.isExternal) {\n \/\/ We move external functions to the enclosing class and potentially add accessors there.\n \/\/ The JVM backend also adds accessors in the companion object, but these are superfluous.\n val staticExternal = context.irFactory.buildFun {","completion":"updateFrom(jvmStaticFunction)\n name = jvmStaticFunction.name\n returnType = jvmStaticFunction.returnType\n }.apply {\n parent = companion.parent\n copyAttributes(jvmStaticFunction)\n copyAnnotationsFrom(jvmStaticFunction)\n copyCorrespondingPropertyFrom(jvmStaticFunction)\n copyParameterDeclarationsFrom(jvmStaticFunction)<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM_IR\n\n\/\/ WITH_STDLIB\n\/\/ !LANGUAGE: +InstantiationOfAnnotationClasses\n\nfun f(): Metadata = Metadata(\n kind = 0,\n metadataVersion = intArrayOf(),\n data1 = arrayOf(),\n data2 = arrayOf(),\n extraString = \"\",\n packageName = \"foo\",\n extraInt = 0,","completion":"bytecodeVersion = intArrayOf(1, 0, 3),\n)\n\nfun box(): String {\n val m = f()\n if (m.toString() == \"\"\"@kotlin.Metadata(bytecodeVersion=[1, 0, 3], data1=[], data2=[], extraInt=0, extraString=, kind=0, metadataVersion=[], packageName=foo)\"\"\")\n return \"OK\"<|endoftext|>"} {"prompt":"inline fun buildCodeFragment(init: FirCodeFragmentBuilder.() -> Unit): FirCodeFragment {\n contract {\n callsInPlace(init, InvocationKind.EXACTLY_ONCE)\n }\n return FirCodeFragmentBuilder().apply(init).build()\n}\n\n@OptIn(ExperimentalContracts::class)","completion":"inline fun buildCodeFragmentCopy(original: FirCodeFragment, init: FirCodeFragmentBuilder.() -> Unit): FirCodeFragment {\n contract {\n callsInPlace(init, InvocationKind.EXACTLY_ONCE)\n }\n val copyBuilder = FirCodeFragmentBuilder()\n copyBuilder.source = original.source\n copyBuilder.resolvePhase = original.resolvePhase<|endoftext|>"} {"prompt":"val VALUE_ARGUMENTS_LIST: PositioningStrategy = object : PositioningStrategy() {\n override fun mark(element: KtElement): List {\n return markElement(element.getChildOfType() ?: element)\n }\n }\n\n @JvmField","completion":"val FUNCTION_PARAMETERS: PositioningStrategy = object : PositioningStrategy() {\n override fun mark(element: KtFunction): List {\n val valueParameterList = element.valueParameterList\n if (valueParameterList != null) {\n return markElement(valueParameterList)\n }<|endoftext|>"} {"prompt":"return Lateinit().apply(builder).value\n}\n\nval p = false\n\nfun test1() {\n var y: String? = null\n val x: String = run {\n if (p)\n return@run build { y as String; value = \"...\" }\n else\n return@run \"\"\n }\n y.length \/\/ bad","completion":"}\n\nfun test2() {\n val x: String = run {\n while (true) {\n try {\n return@run build { value = \"...\" }\n } catch (e: Throwable) {}\n }\n throw Exception()\n }\n x.length\n}\n\nfun test3() {\n var y: String?\n y = \"\"\n val x: String = run {<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\nimport kotlin.experimental.ExperimentalTypeInference\nobject Hello {\n val hello = \"hello\"\n}\n\n@OptIn(ExperimentalTypeInference::class)\nfun buildList0(builder: MutableList.() -> Unit): List = mutableListOf().apply { builder() }\n\nval numbers = buildList0 {","completion":"add(Hello.let { it::hello }.get())\n}\n\nfun box(): String {\n numbers\n return \"OK\"\n}<|endoftext|>"} {"prompt":"override var v : Module = m\n}\n\nabstract class SettingComponent(\n val reference: Reference\n) {\n var value: V\n get() = reference.v\n set(value) {\n reference.v = value\n }\n}\n\nclass Component(\n reference: Reference,\n context: Context\n) : SettingComponent(reference) {","completion":"private val model = Model(::value, context)\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.symbols.impl.FirValueParameterSymbol\nimport org.jetbrains.kotlin.fir.types.varargElementType\nimport org.jetbrains.kotlin.name.Name\n\ninternal class KtFirValueParameterSymbol(\n override val firSymbol: FirValueParameterSymbol,","completion":"override val analysisSession: KtFirAnalysisSession,\n) : KtValueParameterSymbol(), KtFirSymbol {\n override val psi: PsiElement? by cached { firSymbol.findPsi() }\n\n override val name: Name get() = withValidityAssertion { firSymbol.name }<|endoftext|>"} {"prompt":"withValidityAssertion { analysisSession.typeProvider.getImplicitReceiverTypesAtPosition(position) }\n\n \/**\n * Gets the direct super types of the given type. For example, given `MutableList`, this returns `List` and\n * `MutableCollection`.\n *","completion":"* Note that for flexible types, both direct super types of the upper and lower bounds are returned. If that's not desirable, please\n * first call [KtFlexibleType.upperBound] or [KtFlexibleType.lowerBound] and then call this method.\n *\n * @param shouldApproximate whether to approximate non-denotable types. For example, super type of `List` is<|endoftext|>"} {"prompt":")\n }\n\n else ->\n +writeParcelWith(\n declaration.classParceler,\n parcelParameter,\n flagsParameter,\n irGet(receiverParameter)\n )\n }\n }\n }\n }\n\n metadata = DescriptorMetadataSource.Function(","completion":"declaration.descriptor.findFunction(ParcelableSyntheticComponent.ComponentKind.WRITE_TO_PARCEL)!!\n )\n }\n\n declaration.functions.find {\n (it.descriptor as? ParcelableSyntheticComponent)?.componentKind == ParcelableSyntheticComponent.ComponentKind.WRITE_TO_PARCEL\n }?.let { stub -><|endoftext|>"} {"prompt":"s.funWithTrailingLambda { \"ss\" }","completion":"s.funWithTrailingLambda (x= 1) { \"ss\" }<|endoftext|>"} {"prompt":"map.put(FUNCTION_DECLARATION_WITH_NO_NAME, \"Function declaration must have a name.\")\n map.put(ANONYMOUS_FUNCTION_WITH_NAME, \"Anonymous functions with names are prohibited.\")\n map.put(SINGLE_ANONYMOUS_FUNCTION_WITH_NAME, \"Anonymous functions with names are prohibited.\")\n\n map.put(","completion":"ANONYMOUS_FUNCTION_PARAMETER_WITH_DEFAULT_VALUE,\n \"Anonymous functions cannot specify default values for their parameters.\"\n )\n map.put(USELESS_VARARG_ON_PARAMETER, \"Vararg on this parameter is useless.\")\n map.put(<|endoftext|>"} {"prompt":"fun less4(a: Double?, b: Double?) = if (a is Double && b is Double) a < b else null!!\n\nfun less5(a: Any?, b: Any?) = if (a is Double && b is Double) a < b else null!!\n\nfun box(): String {\n if (-0.0 < 0.0) return \"fail 0\"","completion":"if (less1(-0.0, 0.0)) return \"fail 1\"\n if (less2(-0.0, 0.0)) return \"fail 2\"\n if (less3(-0.0, 0.0)) return \"fail 3\"\n if (less4(-0.0, 0.0)) return \"fail 4\"<|endoftext|>"} {"prompt":"fun shouldEraseType(type: ConeTypeParameterType): Boolean = containingFirClassStack.asReversed().any { clazz ->\n if (clazz !is FirAnonymousObject && !clazz.isLocal) return@any false\n\n val typeParameterSymbol = type.lookupTag.typeParameterSymbol","completion":"if (typeParameterSymbol.containingDeclarationSymbol.fir.let { it !is FirProperty || it.delegate == null || !it.isExtension }) {\n return@any false\n }\n\n return@any clazz.typeParameters.any { it.symbol === typeParameterSymbol }\n }\n}<|endoftext|>"} {"prompt":"getSymbolsFromImportingScope(importScopeContext, fqName, KtScopeKind.ExplicitSimpleImportingScope::class).ifNotEmpty { return this }\n getSymbolsFromPackageScope(fqName, contextElement).ifNotEmpty { return this }","completion":"getSymbolsFromImportingScope(importScopeContext, fqName, KtScopeKind.DefaultSimpleImportingScope::class).ifNotEmpty { return this }\n getSymbolsFromImportingScope(importScopeContext, fqName, KtScopeKind.ExplicitStarImportingScope::class).ifNotEmpty { return this }<|endoftext|>"} {"prompt":"* It's allowed to pass the same array in the [destination] and even specify the subrange so that it overlaps with the destination range.\n * \n * @param destination the array to copy to.\n * @param destinationOffset the position in the [destination] array to copy to, 0 by default.\n * @param startIndex the beginning (inclusive) of the subrange to copy, 0 by default.","completion":"* @param endIndex the end (exclusive) of the subrange to copy, size of this array by default.\n * \n * @throws IndexOutOfBoundsException or [IllegalArgumentException] when [startIndex] or [endIndex] is out of range of this array indices or when `startIndex > endIndex`.<|endoftext|>"} {"prompt":"it.resolvedStatus.isConst && it.isMarkedWithImplicitIntegerCoercion\n } == true\n ) {\n IrCallImpl(\n startOffset, endOffset,\n firConversionFunction.fir.returnTypeRef.toIrType(),\n irConversionFunction,\n typeArgumentsCount = 0,\n valueArgumentsCount = 0\n ).apply {","completion":"extensionReceiver = this@applyToElement\n }\n } else {\n this@applyToElement\n }\n }\n\n return when {\n parameter.isMarkedWithImplicitIntegerCoercion -> when {\n this is IrVarargImpl && argument is FirVarargArgumentsExpression -> {\n val targetTypeFqName = varargElementType.classFqName ?: return this<|endoftext|>"} {"prompt":"contract { returns(null) implies (value_1 != null && value_2 != null || value_2 == \".\") }\n return if (value_1 != null && value_2 != null || value_2 == \".\") null else true\n}\n\n\/\/ TESTCASE NUMBER: 6","completion":"fun case_6(value_1: Boolean, value_2: Int?): Boolean? {\n contract { returns(null) implies (value_2 == null && value_1 || value_2 == 0) }\n return if (value_2 == null && value_1 || value_2 == 0) null else true\n}<|endoftext|>"} {"prompt":"changesCollector.collectProtoChanges(oldMapValue?.toProtoData(className.packageFqName), newProtoData, packageProtoKey = key)\n }\n\n fun check(\n className: JvmClassName, classProto: ProtoBuf.Class, stringTable: JvmStringTable, changesCollector: ChangesCollector,\n ) {\n val key = className.internalName","completion":"val oldProtoData = storage[key]?.toProtoData(className.packageFqName)\n val newProtoData = ClassProtoData(classProto, stringTable.toNameResolver())\n changesCollector.collectProtoChanges(oldProtoData, newProtoData, packageProtoKey = key)\n }\n\n operator fun contains(className: JvmClassName): Boolean =<|endoftext|>"} {"prompt":"\/\/ FILE: test.kt\nclass Foo {\n inner class Bar {\n }\n}\n\nfun box() {\n val x = Foo()\n x.Bar()\n}\n\n\/\/ EXPECTATIONS JVM_IR\n\/\/ test.kt:8 box:\n\/\/ test.kt:2 :\n\/\/ test.kt:8 box:\n\/\/ test.kt:9 box: x:Foo=Foo","completion":"\/\/ test.kt:3 :\n\/\/ test.kt:9 box: x:Foo=Foo\n\/\/ test.kt:10 box: x:Foo=Foo\n\n\/\/ EXPECTATIONS JS_IR\n\/\/ test.kt:8 box:\n\/\/ test.kt:2 :\n\/\/ test.kt:9 box: x=Foo\n\/\/ test.kt:3 :<|endoftext|>"} {"prompt":"if (a.e !== null) a.e.propAny\n if (a.e !== null) a.e.propNullableT","completion":"if (a.e !== null) a.e.propNullableAny\n if (a.e !== null) a.e.funT()<|endoftext|>"} {"prompt":"internal fun foldChars() {\n val stringLength = this.length\n val newArray = WasmCharArray(stringLength)\n\n var currentStartIndex = stringLength\n var currentLeftString: String? = this\n while (currentLeftString != null) {\n val currentLeftStringChars = currentLeftString._chars\n val currentLeftStringLen = currentLeftStringChars.len()","completion":"currentStartIndex -= currentLeftStringLen\n copyWasmArray(currentLeftStringChars, newArray, 0, currentStartIndex, currentLeftStringLen)\n currentLeftString = currentLeftString.leftIfInSum\n }\n check(currentStartIndex == 0)\n _chars = newArray\n leftIfInSum = null\n }\n\n internal inline val chars: WasmCharArray get() {<|endoftext|>"} {"prompt":"@Optional @OutputFile get() = if (!noPack) artifact else null\n\n val artifactDirectory: File?\n @Optional @OutputDirectory get() = if (noPack) artifact else null\n\n override val artifactSuffix: String\n @Internal get() = if (!noPack) produce.suffix(konanTarget) else \"\"\n\n override fun buildCommonArgs() = super.buildCommonArgs().apply {","completion":"addKey(\"-nopack\", noPack)\n }\n\n override val produce: CompilerOutputKind get() = CompilerOutputKind.LIBRARY\n override val enableTwoStageCompilation: Boolean = false\n}\n\nabstract class KonanCompileBitcodeTask @Inject constructor(layout: ProjectLayout): KonanCompileNativeBinary(layout) {<|endoftext|>"} {"prompt":"override open fun foo() {}\n}\n\/\/ Derived abstract class\nabstract class AbstractDerived2 : Interface {\n \/\/ Final\n override final fun foo() {}\n \/\/ Redundant\n override open val gav = 13\n}","completion":"\/\/ Redundant abstract interface\nabstract interface AbstractInterface\n\/\/ Redundant final object\nfinal object FinalObject\n\/\/ Open interface<|endoftext|>"} {"prompt":"@file:Suppress(\"unused\")\n@file:JvmName(\"JvmExtensionsKt\") \/\/ for stability. Probably we should drop Kt ending for easier calls from Java\n\npackage kotlin.metadata.jvm\n\nimport org.jetbrains.kotlin.metadata.jvm.deserialization.JvmProtoBufUtil\nimport kotlin.metadata.*","completion":"import kotlin.metadata.jvm.internal.jvm\n\n\/**\n * Metadata of local delegated properties used somewhere inside this class (but not in a nested class).\n * Note that for classes produced by the Kotlin compiler, such properties will have default accessors.\n *\n * The order of local delegated properties in this list is important. The Kotlin compiler generates the corresponding property's index<|endoftext|>"} {"prompt":"override fun toString(): String = \"${this::class.java.simpleName} $path\"\n}\n\nclass ModifyContent(path: String, val dataFile: File) : Modification(path) {\n override fun perform(workDir: File, mapping: MutableMap): File? {\n val file = File(workDir, path)","completion":"val oldLastModified = file.lastModified()\n file.delete()\n dataFile.copyTo(file)\n\n val newLastModified = file.lastModified()\n if (newLastModified <= oldLastModified) {\n \/\/Mac OS and some versions of Linux truncate timestamp to nearest second\n file.setLastModified(oldLastModified + 1000)\n }<|endoftext|>"} {"prompt":"\/\/ DONT_TARGET_EXACT_BACKEND: JS\n\/\/ ES_MODULES\n\/\/ SPLIT_PER_MODULE\n\/\/ EXPECTED_REACHABLE_NODES: 1290\n\/\/ MODULE: lib\n\/\/ FILE: lib.kt\n\npackage lib\n\nclass A(val x: Int)\n\nfun A.foo() = 23 + x\n\ninline fun A.baz() = 99 + x","completion":"inline fun A.callFoo() = foo()\n\ninline fun A.buzz(): Int {\n val o = object {\n fun f() = 111 + x\n }\n return o.f()\n}\n\n\/\/ MODULE: main(lib)\n\/\/ FILE: main.kt\n\npackage main\n\nimport lib.*\n\nfun box(): String {\n val a = A(1).foo()<|endoftext|>"} {"prompt":"val field = expression.symbol.owner\n if (field.containsAnnotationToCheckCalls()) {\n handleFunctionWithAnnotation(field)\n }\n }\n\n private fun IrAnnotationContainer.containsAnnotationToCheckCalls() =\n @OptIn(UnsafeDuringIrConstructionAPI::class)\n annotations.any { it.symbol.owner.parentClassId == annotationClassId }","completion":"}\n}<|endoftext|>"} {"prompt":"put(JVMConfigurationKeys.JDK_HOME, jdkHome)\n } else {\n configureJdkHomeFromSystemProperty()\n }\n\n return true\n}\n\nfun CompilerConfiguration.configureJdkHomeFromSystemProperty() {\n val javaHome = File(System.getProperty(\"java.home\"))","completion":"messageCollector.report(LOGGING, \"Using JDK home inferred from java.home: $javaHome\")\n put(JVMConfigurationKeys.JDK_HOME, javaHome)\n}\n\nfun CompilerConfiguration.configureJavaModulesContentRoots(arguments: K2JVMCompilerArguments) {<|endoftext|>"} {"prompt":"actual interface S1 {\n fun o(): S = \"O\"\n val p: Boolean\n get() = true\n}\n\nactual interface S2 {\n fun k() = \"K\"\n}\n\nactual typealias S = String\n\nfun box(): String {\n val b = B()\n return if (b.p) {\n b.o() + b.k()\n } else {","completion":"\"FAIL\"\n }\n}<|endoftext|>"} {"prompt":"interface A {\n fun Any.equals(other: Any?): Boolean = false\n fun Any.hashCode(): Int = 0\n fun Any.toString(): String = \"\"\n}\n\ndata class B(val x: Int) : A\n\nfun box(): String {\n if (B(42) != B(42)) return \"Fail equals\"","completion":"if (B(42).hashCode() != B(42).hashCode()) return \"Fail hashCode\"\n if (B(42).toString() != B(42).toString()) return \"Fail toString\"\n return \"OK\"\n}<|endoftext|>"} {"prompt":"if (x > upper_taylor_n_bound) {\n if (x > upper_taylor_2_bound) {\n \/\/ approximation by laurent series in 1\/x at 0+ order from -1 to 0\n nativeMath.log(x) + LN2\n } else {\n \/\/ approximation by laurent series in 1\/x at 0+ order from -1 to 1","completion":"nativeMath.log(x * 2 + (1 \/ (x * 2)))\n }\n } else {\n nativeMath.log(x + nativeMath.sqrt(x * x + 1))\n }\n x <= -taylor_n_bound -> -asinh(-x)\n else -> {\n \/\/ approximation by taylor series in x at 0 up to order 2\n var result = x;<|endoftext|>"} {"prompt":"* @sample samples.collections.Arrays.ContentOperations.contentDeepToString\n *\/\n@SinceKotlin(\"1.4\")\npublic actual fun Array?.contentDeepToString(): String {\n return contentDeepToStringImpl()\n}\n\n\/**\n * Checks if the two specified arrays are *structurally* equal to one another.\n *","completion":"* Two arrays are considered structurally equal if they have the same size, and elements at corresponding indices are equal.\n * Elements are compared for equality using the [equals][Any.equals] function.\n * For floating point numbers, this means `NaN` is equal to itself and `-0.0` is not equal to `0.0`.\n *<|endoftext|>"} {"prompt":"a[0] = 0\n a[1] = 1\n a[2] = 2\n return a\n }\n public fun toArray(array: Array): Array {\n val asIntArray = array as Array\n asIntArray[0] = 0\n asIntArray[1] = 1\n asIntArray[2] = 2\n return array","completion":"}\n}\n\nfun box(): String {\n val collection = MyCollection(Arrays.asList(2, 3, 9)) as java.util.Collection<*>\n\n val array1 = collection.toArray()\n val array2 = collection.toArray(arrayOfNulls(3) as Array)<|endoftext|>"} {"prompt":"enum class StabilityBits(val bits: Int) {\n UNSTABLE(0b100),\n STABLE(0b000);\n fun bitsForSlot(slot: Int): Int = bits shl (1 + slot * 3)\n}\n\n\/**\n * This transform determines the stability of every class, and synthesizes a StabilityInferred","completion":"* annotation on it, as well as putting a static final int of the stability to be used at runtime.\n *\/\nclass ClassStabilityTransformer(\n private val useK2: Boolean,\n context: IrPluginContext,\n symbolRemapper: DeepCopySymbolRemapper,\n metrics: ModuleMetrics,\n stabilityInferencer: StabilityInferencer,<|endoftext|>"} {"prompt":"private val diagnosticForTypeAliases: DiagnosticFactory3 = UPPER_BOUND_VIOLATED_IN_TYPEALIAS_EXPANSION\n) {\n fun report(typeArgumentReference: KtTypeReference, substitutedBound: KotlinType) {","completion":"trace.reportDiagnosticOnce(baseDiagnostic.on(typeArgumentReference, substitutedBound, argumentType))\n }\n\n fun reportForTypeAliasExpansion(callElement: KtElement, substitutedBound: KotlinType) {\n trace.reportDiagnosticOnce(diagnosticForTypeAliases.on(callElement, substitutedBound, argumentType, typeParameterDescriptor))\n }\n}<|endoftext|>"} {"prompt":"\/\/ Check that for a child class loader, a class reference would be the same as for his parent\n\n loadFile(\"$prefix\/parentFirst.kt\")\n\n class ChildClassLoader(parent: ClassLoader) : ClassLoader(parent)\n\n val parent = createClassLoader()\n\n doTest(\n parent,\n ChildClassLoader(parent)\n )\n }\n\n fun testKTypeEquality() {","completion":"\/*\n * Check that typeOf>() when clz is loaded by different classloaders\n * differs in both its `equals` and its `classifier`.\n * It is important in the face of KType caching\n *\/\n loadFile(\"$prefix\/kTypeEquality.kt\")\n doTest(\n createClassLoader(),\n createClassLoader()\n )\n }\n}<|endoftext|>"} {"prompt":"override val namedNodeImpl: NameableMfvcNodeImpl = NameableMfvcNodeImpl(methodFullNameMode, nameParts, unboxMethod)\n\n override val leavesCount: Int\n get() = 1\n\n init {\n requireSameClasses(\n field?.parentAsClass?.takeUnless { unboxMethod.parentAsClass.isCompanion },\n unboxMethod.parentAsClass,","completion":"(unboxMethod.dispatchReceiverParameter?.type as? IrSimpleType)?.erasedUpperBound,\n )\n validateGettingAccessorParameters(unboxMethod)\n }\n\n override fun createInstanceFromBox(\n scope: IrBlockBuilder,\n typeArguments: TypeArguments,\n receiver: IrExpression?,\n accessType: AccessType,<|endoftext|>"} {"prompt":"extractNativeTasksCommandLineArgumentsFromOutput(\":linkDebugExecutableHost\") {\n assertCommandLineArgumentsContain(*(compilerCacheOrchestrationArgs + incrementalCacheArgs))\n }\n }\n }\n }\n\n @DisplayName(\"Smoke test\")\n @GradleTest\n fun checkIncrementalCacheIsCreated(gradleVersion: GradleVersion) {","completion":"nativeProject(\"native-incremental-simple\", gradleVersion) {\n build(\"linkDebugExecutableHost\") {\n assertDirectoryExists(\n getFileCache(\"native-incremental-simple\", \"src\/hostMain\/kotlin\/main.kt\")\n )\n }\n }\n }\n\n @DisplayName(\"IC works after compilation error (test 1)\")\n @GradleTest<|endoftext|>"} {"prompt":"prerequisite = [JvmIrInliner::class]\n)\nclass CreateSeparateCallForInlinedLambdasLowering(val context: JvmBackendContext) : IrElementTransformerVoid(), FileLoweringPass {\n override fun lower(irFile: IrFile) {\n if (context.config.enableIrInliner) {\n irFile.transformChildrenVoid()\n }\n }","completion":"override fun visitContainerExpression(expression: IrContainerExpression): IrExpression {\n if (expression is IrInlinedFunctionBlock && expression.isFunctionInlining()) {\n val newCalls = expression.getOnlyInlinableArguments().map { arg -><|endoftext|>"} {"prompt":"data class ModuleStatus(val data: ModuleData, val targetInfo: String) {\n var compilationError: String? = null\n var jvmInternalError: String? = null\n var exceptionMessage: String = \"NO MESSAGE\"\n }\n\n private val totalModules = mutableListOf()\n private val okModules = mutableListOf()","completion":"private val errorModules = mutableListOf()\n private val crashedModules = mutableListOf()\n\n protected data class CumulativeTime(\n val gcInfo: Map,\n val components: Map,\n val files: Int,\n val lines: Int\n ) {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.fir.types\n\nimport org.jetbrains.kotlin.fir.renderer.*\nimport org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl\nimport org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.types.Variance","completion":"import org.jetbrains.kotlin.utils.SmartSet\nimport org.jetbrains.kotlin.utils.addToStdlib.popLast\n\nval ConeKotlinType.isNullable: Boolean get() = nullability != ConeNullability.NOT_NULL\nval ConeKotlinType.isMarkedNullable: Boolean get() = nullability == ConeNullability.NULLABLE<|endoftext|>"} {"prompt":"\/\/ the type of property defined in the first mentioned protocol (id), which is incompatible with property type.\n@end\n\n@interface DerivedWithPropertyOverride : Base\n\/\/ This interface does not have re-declaration of property `delegate`.\n\/\/ Return type of getter `delegate()` and param type of setter `setDelegate()` are `DerivedWithPropertyOverride*`","completion":"@property (readwrite) DerivedWithPropertyOverride* delegate;\n@end\n\n\/\/ FILE: kt57640.m\n#import \"kt57640.h\"\n\n@implementation Base\n@end\n\n@implementation Derived\n@end\n\n@implementation DerivedWithPropertyOverride\n@end\n\n\/\/ MODULE: main(cinterop)\n\/\/ FILE: main.kt<|endoftext|>"} {"prompt":"\/\/ MODULE: lib\n\/\/ FILE: 1.kt\n\ninterface Test {\n fun test(): String {\n return \"OK\"\n }\n}\n\n\/\/ MODULE: main(lib)\n\/\/ JVM_TARGET: 1.8\n\/\/ FILE: 2.kt\nclass TestClass : Test {\n override fun test(): String {\n return super.test()\n }\n}\n\nfun box(): String {","completion":"return TestClass().test()\n}<|endoftext|>"} {"prompt":"assertFalse(eqShortQInt(null, 0.toInt()))\n assertFalse(eqShortQInt(null, 1.toInt()))\n assertFalse(eqShortQInt(undefined, 0.toInt()))\n assertFalse(eqShortQInt(undefined, 1.toInt()))\n assertTrue(eqShortQIntQ(0.toShort(), 0.toInt()))","completion":"assertFalse(eqShortQIntQ(0.toShort(), 1.toInt()))\n assertFalse(eqShortQIntQ(0.toShort(), null))\n assertFalse(eqShortQIntQ(0.toShort(), undefined))\n assertFalse(eqShortQIntQ(1.toShort(), 0.toInt()))<|endoftext|>"} {"prompt":"sealed class Case4 {\n protected constructor(x: Int)\n protected constructor(s: String) : this(s.length)\n\n class Inheritor1 : Case4(10)","completion":"class Inheritor2 : Case4(\"Hello\")\n}\n\nsealed class Case5() {\n private constructor(x: Int) : this()\n protected constructor(x: Byte) : this()<|endoftext|>"} {"prompt":"0x0019, 0x001c, 0x679c, 0x001c, 0x0019, 0x001c, 0x673c, 0x033c, 0x001c, 0x0019, 0x001c, 0x02d5, 0x001c, 0x0019, 0x001c, 0x02d5, 0x001c, 0x0019,","completion":"0x001c, 0x0019,<|endoftext|>"} {"prompt":"public infix fun Array.zip(other: Array): List> {\n return zip(other) { t1, t2 -> t1 to t2 }\n}\n\n\/**\n * Returns a list of pairs built from the elements of `this` array and the [other] array with the same index.\n * The returned list has length of the shortest collection.","completion":"* \n * @sample samples.collections.Iterables.Operations.zipIterable\n *\/\npublic infix fun ByteArray.zip(other: Array): List> {\n return zip(other) { t1, t2 -> t1 to t2 }\n}\n\n\/**<|endoftext|>"} {"prompt":"M()\n }\n \"\"\"\n )\n\n @Test\n fun testUiTextAndInvalid() = check(\n \"\"\"\n import androidx.compose.runtime.Composable\n import androidx.compose.runtime.ComposableTarget\n import androidx.compose.foundation.text.BasicText","completion":"@Composable @ComposableTarget(\"N\")\n fun Invalid() { }\n\n @Composable\n fun UseText() {\n BasicText(\"Some text\")\n Invalid()\n }\n \"\"\"\n )\n\n @Test\n fun testOpenOverrideAttributesInheritTarget() = check(\n \"\"\"<|endoftext|>"} {"prompt":"cLines += \"${bridgeBuilder.buildCSignature(cBridgeName)} {\"\n cLines += cBridgeBodyLines\n cLines += \"}\"\n\n stubs.addC(cLines)\n}\n\nprivate fun KotlinToCCallBuilder.buildCall(\n targetFunctionName: String,\n returnValuePassing: ValueReturning","completion":"): IrExpression = with(returnValuePassing) {\n returnValue(cCallBuilder.build(targetFunctionName))\n}\n\ninternal sealed class ObjCCallReceiver {\n class Regular(val rawPtr: IrExpression) : ObjCCallReceiver()\n class Retained(val rawPtr: IrExpression) : ObjCCallReceiver()\n}\n\ninternal fun KotlinStubs.generateObjCCall(<|endoftext|>"} {"prompt":"\/\/ We build it on the basis of \"__init__\" member, so drop the \"placement\" argugment.\n parameters.removeFirst()\n\n if (skipOverloads && context.isOverloading(func.fullName, parameters.map { it.type }))\n return emptyList()\n\n val annotations =\n if (platform == KotlinPlatform.JVM) {\n emptyList()","completion":"} else {\n if (func.isVararg) {\n val type = KotlinTypes.any.makeNullable().toStubIrType()\n parameters += FunctionParameterStub(\"variadicArguments\", type, isVararg = true)\n }\n buildFunctionAnnotations(func, name) + AnnotationStub.CCall.CppClassConstructor\n }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.ir.util\n\nimport org.jetbrains.kotlin.ir.IrElement\nimport org.jetbrains.kotlin.ir.IrFileEntry\nimport org.jetbrains.kotlin.ir.declarations.*\nimport org.jetbrains.kotlin.ir.expressions.*","completion":"import org.jetbrains.kotlin.ir.symbols.IrSymbol\nimport org.jetbrains.kotlin.ir.types.IrType\nimport org.jetbrains.kotlin.ir.visitors.IrElementVisitor\nimport org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.objcexport\n\nimport org.jetbrains.kotlin.analysis.api.KtAnalysisSession\nimport org.jetbrains.kotlin.analysis.api.types.KtErrorType\nimport org.jetbrains.kotlin.analysis.api.types.KtType","completion":"import org.jetbrains.kotlin.backend.konan.objcexport.ObjCNonNullReferenceType\nimport org.jetbrains.kotlin.backend.konan.objcexport.ObjCNullableReferenceType\nimport org.jetbrains.kotlin.backend.konan.objcexport.ObjCReferenceType<|endoftext|>"} {"prompt":"kotlin.jvm()\n kotlin.linuxX64()\n\n kotlin.sourceSets.getByName(\"commonMain\").dependencies {\n api(\"junit:junit:4.13.2\") { setTransitive(false) }\n api(kotlin(\"reflect\")) { setTransitive(false) }\n api(kotlin(\"reflect\", \"1.3.0\"))","completion":"implementation(kotlin(\"reflect\", \"1.2.71\"))\n compileOnly(kotlin(\"reflect\", \"1.2.70\"))\n runtimeOnly(kotlin(\"reflect\", \"1.2.60\"))\n api(project(path = \":lib\", configuration = \"outputConfiguration\"))\n }\n\n project.evaluate()<|endoftext|>"} {"prompt":"assertTrue(regex.matches(\"mop--q-x----\"))\n\n \/\/ Test error cases with &&\n \/\/ TODO: What is this check?\n regex = Regex(\"[&&[xyz]]\")\n regex.matches(\"&\")\n regex.matches(\"x\")\n regex.matches(\"y\")\n regex = Regex(\"[[xyz]&[axy]]\")","completion":"regex.matches(\"x\")\n regex.matches(\"z\")\n regex.matches(\"&\")\n regex = Regex(\"[abc[123]&&[345]def]\")\n regex.matches(\"a\")\n\n regex = Regex(\"[[xyz]&&]\")\n regex = Regex(\"[[abc]&]\")\n\n try {<|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-63840\n\/\/ CHECK_TYPE_WITH_EXACT\n\nfun test() {\n val buildee = build {\n if (true)\n replaceTypeVariable(TargetType())\n else\n DifferentType()\n }","completion":"\/\/ exact type equality check \u2014 turns unexpected compile-time behavior into red code\n \/\/ considered to be non-user-reproducible code for the purposes of these tests\n checkExactType>(buildee)\n}\n\n\n\n\nclass TargetType\nclass DifferentType\n\nclass Buildee {<|endoftext|>"} {"prompt":"override fun transformFlat(declaration: IrDeclaration): List? {\n if (declaration is IrClass && declaration.kind != ClassKind.INTERFACE) {\n val constructors = declaration.constructors\n\n if (constructors.any { it.isPrimary }) return null\n\n declaration.syntheticPrimaryConstructor = createPrimaryConstructor(declaration)\n }","completion":"return null\n }\n\n companion object {\n val SYNTHETIC_PRIMARY_CONSTRUCTOR by IrDeclarationOriginImpl\n }\n\n private val unitType = context.irBuiltIns.unitType\n\n private fun createPrimaryConstructor(irClass: IrClass): IrConstructor {\n val declaration = irClass.addConstructor {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.api.impl.base.util\n\nimport com.intellij.openapi.project.Project\nimport com.intellij.openapi.vfs.StandardFileSystems\nimport com.intellij.openapi.vfs.VfsUtilCore\nimport com.intellij.openapi.vfs.VirtualFile","completion":"import com.intellij.openapi.vfs.impl.jar.CoreJarFileSystem\nimport com.intellij.psi.PsiFile\nimport com.intellij.psi.PsiManager\nimport com.intellij.util.io.URLUtil\nimport com.intellij.util.io.URLUtil.JAR_SEPARATOR\nimport java.nio.file.Path<|endoftext|>"} {"prompt":"descriptor.findActualForExpect() as? FunctionDescriptor ?: return null\n )\n }\n\n private fun MemberDescriptor.findActualForExpect(): MemberDescriptor? {\n if (!isExpect) error(this)\n return findCompatibleActualsForExpected(module).singleOrNull()\n }","completion":"private fun shouldRemoveTopLevelDeclaration(declaration: IrDeclaration): Boolean {\n return doRemove && when (declaration) {\n is IrClass -> declaration.isExpect\n is IrProperty -> declaration.isExpect\n is IrFunction -> declaration.isExpect\n else -> false\n }\n }\n\n private fun isOptionalAnnotationClass(klass: IrClass): Boolean {<|endoftext|>"} {"prompt":"$i$a$-suspendCoroutineUninterceptedOrReturn-TestKt$foo$2$iv$iv:int=0:int, $i$f$bar:int=0:int, c$iv$iv$iv:int=1:int, $i$a$-bar-TestKt$foo$2$1$iv$iv:int=0:int,","completion":"b$iv$iv:int=2:int<|endoftext|>"} {"prompt":"inline fun testCompilationInline(arg: String = getStringInline()): String {\n return arg\n}\n\nfun box(): String {\n var result = testCompilation()\n if (result != \"OK\") return \"fail1: ${result}\"\n\n result = testCompilation(\"OKOK\")\n if (result != \"OKOK\") return \"fail2: ${result}\"","completion":"result = testCompilationInline()\n if (result != \"OK\") return \"fail3: ${result}\"\n\n result = testCompilationInline(\"OKOK\")\n if (result != \"OKOK\") return \"fail4: ${result}\"\n\n return \"OK\"\n}\n\n\n\/\/ FILE: test.kt\npackage test\n\ninline fun getStringInline(): String {\n return \"OK\"\n}<|endoftext|>"} {"prompt":"if (p > 0) {\n v = 1\n print(v)\n }\n}\n\nvar global = 1\n\nclass C {\n var field = 2\n\n fun foo() {\n print(field)\n print(global)\n }\n}\n\nfun withDelegate() {","completion":"var s: String by Delegates.notNull()\n s = \"\"\n}<|endoftext|>"} {"prompt":"withEntry(\"ClassId.packageName\", containerClassId.packageFqName) { it.asString() }\n }\n }\n\n val classIdPathSegment = containerClassId?.relativeClassName?.pathSegments().orEmpty()\n val path = ArrayList(classIdPathSegment.size + 2)\n var result: FirDeclaration? = null","completion":"fun find(declarations: Iterable, classIdPathIndex: Int): Boolean {\n val currentClassSegment = classIdPathSegment.getOrNull(classIdPathIndex)\n for (subDeclaration in declarations) {\n when {\n currentClassSegment == null && expectedDeclarationAcceptor(subDeclaration) -> {\n result = subDeclaration\n return true\n }<|endoftext|>"} {"prompt":"\/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with","completion":"* the License. You may obtain a copy of the License at\n *\n * http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ WITH_STDLIB\n\nclass A : Set {\n override val size: Int get() = 0\n override fun isEmpty(): Boolean = true\n override fun contains(o: W): Boolean = false\n override fun iterator(): Iterator = emptySet().iterator()","completion":"override fun containsAll(c: Collection): Boolean = c.isEmpty()\n}\n\nfun expectUoe(block: () -> Any) {\n try {\n block()\n throw AssertionError()\n } catch (e: UnsupportedOperationException) {\n }\n}\n\nfun box(): String {<|endoftext|>"} {"prompt":"\"\u0430\u0431\u043e\u0440\u0442\u0430\u0440\u0438\u0439\",\n\"\u0430\u0431\u043e\u0440\u0442\u0438\u0432\u043d\u044b\u0439\",\n\"\u0430\u0431\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\",\n\"\u0430\u0431\u0440\u0430\u0437\u0438\u0432\",\n\"\u0430\u0431\u0440\u0430\u0437\u0438\u0432\u043d\u044b\u0439\",\n\"\u0430\u0431\u0440\u0430\u0437\u0438\u043e\u043d\u043d\u044b\u0439\",","completion":"\"\u0430\u0431\u0440\u0430\u0437\u0438\u044f\",\n\"\u0430\u0431\u0440\u0430\u043a\u0430\u0434\u0430\u0431\u0440\u0430\",\n\"\u0430\u0431\u0440\u0435\u0436\u0435\",\n\"\u0430\u0431\u0440\u0435\u043a\",\n\"\u0430\u0431\u0440\u0438\u043a\u043e\u0441\",\n\"\u0430\u0431\u0440\u0438\u043a\u043e\u0441\u043d\u044b\u0439\",\n\"\u0430\u0431\u0440\u0438\u043a\u043e\u0441\u043e\u0432\u043a\u0430\",<|endoftext|>"} {"prompt":"val declarationIsFinal = declaration.isEffectivelyFinal(session)\n val conflictingIsFinal = conflicting.isEffectivelyFinal(session)\n\n if (declarationIsFinal && conflictingIsFinal) {\n val declarationIsHidden = declaration.isDeprecationLevelHidden(session)\n if (declarationIsHidden) return true\n\n val conflictingIsHidden = conflicting.isDeprecationLevelHidden(session)","completion":"if (conflictingIsHidden) return true\n }\n\n return session.declarationOverloadabilityHelper.isOverloadable(declaration, conflicting)\n}\n\ninternal fun FirVariable.getDestructuredParameter(): FirValueParameterSymbol? {\n val initializer = initializer\n if (initializer !is FirComponentCall) return null<|endoftext|>"} {"prompt":"public final fun UTC(year: kotlin.Int, month: kotlin.Int, day: kotlin.Int, hour: kotlin.Int, minute: kotlin.Int, second: kotlin.Int, millisecond: kotlin.Number): kotlin.Double\n\n public final fun now(): kotlin.Double","completion":"public final fun parse(dateString: kotlin.String): kotlin.Double\n }\n\n public interface LocaleOptions {\n public abstract var day: kotlin.String? { get; set; }\n\n public abstract var era: kotlin.String? { get; set; }\n\n public abstract var formatMatcher: kotlin.String? { get; set; }<|endoftext|>"} {"prompt":"protected fun createConstBoundedForLoopGeneratorOrNull(\n codegen: ExpressionCodegen,\n forExpression: KtForExpression,\n startValue: StackValue,\n endExpression: KtExpression,\n step: Int,\n isStartInclusive: Boolean = true\n ): ForLoopGenerator? {","completion":"val endConstValue = codegen.getCompileTimeConstant(endExpression) as? IntegerValueConstant<*> ?: return null\n\n return when (endConstValue) {\n is ByteValue -> {\n val endIntValue = endConstValue.value.toInt()\n if (isProhibitedIntConstEndValue(step, endIntValue))\n null\n else<|endoftext|>"} {"prompt":"override fun visitVarargArgumentsExpression(varargArgumentsExpression: FirVarargArgumentsExpression, data: IrElement): IrElement = data\n\n \/\/ TODO: element-wise cast?\n override fun visitSpreadArgumentExpression(spreadArgumentExpression: FirSpreadArgumentExpression, data: IrElement): IrElement = data\n\n \/\/ ==================================================================================","completion":"override fun visitExpression(expression: FirExpression, data: IrElement): IrElement {\n return when (expression) {\n is FirBlock -> (data as IrContainerExpression).insertImplicitCasts()\n is FirUnitExpression -> coerceToUnitIfNeeded(data as IrExpression, irBuiltIns)\n else -> data\n }\n }<|endoftext|>"} {"prompt":"\" Supported versions: ${AbiSignatureVersion.allSupportedByAbiReader.joinToString { it.versionNumber.toString() }}\"\n )\n return\n }\n\n abiSignatureVersion\n } ?: run {\n val versionsSupportedByAbiReader: Map = AbiSignatureVersion.allSupportedByAbiReader","completion":".associateBy { it.versionNumber }\n\n val abiSignatureVersion = library.versions.irSignatureVersions\n .map { it.number }\n .sortedDescending()\n .firstNotNullOfOrNull { versionsSupportedByAbiReader[it] }\n\n if (abiSignatureVersion == null) {\n output.logError(<|endoftext|>"} {"prompt":"@JvmGradlePluginTests\n @GradleTest\n fun languageVersionOverride(gradleVersion: GradleVersion) {\n project(\n \"simpleProject\",\n gradleVersion,\n buildOptions = defaultBuildOptions.copy(logLevel = LogLevel.DEBUG)\n ) {\n enableTryNext()\n\n buildGradle.appendText(\n \"\"\"\n |","completion":"|kotlin.compilerOptions.languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9)\n \"\"\".trimMargin()\n )\n\n build(\"compileKotlin\") {\n assertTasksExecuted(\":compileKotlin\")<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.asJava.elements.KtLightField\nimport org.jetbrains.kotlin.asJava.elements.KtLightMethod\nimport org.jetbrains.kotlin.light.classes.symbol.cachedValue\nimport org.jetbrains.kotlin.light.classes.symbol.fields.SymbolLightField","completion":"import org.jetbrains.kotlin.light.classes.symbol.methods.SymbolLightMethodForScriptDefaultConstructor\nimport org.jetbrains.kotlin.light.classes.symbol.methods.SymbolLightMethodForScriptMain\nimport org.jetbrains.kotlin.light.classes.symbol.modifierLists.InitializedModifiersBox<|endoftext|>"} {"prompt":"\/\/ error goes on the non-composable function with composable calls\n @JvmField\n val COMPOSABLE_EXPECTED =\n DiagnosticFactory0.create(\n Severity.ERROR\n )\n\n @JvmField\n val COMPOSABLE_FUNCTION_REFERENCE =\n DiagnosticFactory0.create(","completion":"Severity.ERROR\n )\n\n @JvmField\n val COMPOSABLE_PROPERTY_BACKING_FIELD =\n DiagnosticFactory0.create(\n Severity.ERROR\n )\n\n @JvmField\n val COMPOSABLE_VAR =\n DiagnosticFactory0.create(\n Severity.ERROR\n )<|endoftext|>"} {"prompt":"override fun getVisibility(): DescriptorVisibility = owner.visibility\n\n override fun isExpect(): Boolean = false\n\n override fun isActual(): Boolean = owner.isActual\n\n override fun isExternal(): Boolean = false\n\n override fun accept(visitor: DeclarationDescriptorVisitor, data: D): R =","completion":"visitor.visitTypeAliasDescriptor(this, data)\n\n override fun acceptVoid(visitor: DeclarationDescriptorVisitor) {\n visitor.visitTypeAliasDescriptor(this, null)\n }\n}\n\nfun IrTypeAlias.toIrBasedDescriptor() = IrBasedTypeAliasDescriptor(this)<|endoftext|>"} {"prompt":"fun testUnusedDefaultComposableLambda(): Unit = defaultParams(\n \"\"\"\n \"\"\",\n \"\"\"\n inline fun Bar(unused: @Composable () -> Unit = { }) {}\n fun Foo() { Bar() }\n \"\"\"\n )\n\n @Test\n fun testNonStaticDefaultExpressions(): Unit = defaultParams(\n \"\"\"\n fun makeInt(): Int = 123","completion":"\"\"\",\n \"\"\"\n @Composable\n fun Test(x: Int = makeInt()) {\n used(x)\n }\n \"\"\"\n )\n\n @Test\n fun testEarlierParameterReferences(): Unit = defaultParams(\n \"\"\"\n \"\"\",\n \"\"\"\n @Composable\n fun A(a: Int = 0, b: Int = a + 1) {<|endoftext|>"} {"prompt":"to(Inv(take({ a, b, c, d -> }, { a, b, c, d -> })), Inv { a, b, c, d -> }),\n to(Inv(take({ a, b, c, d -> }, { a, b, c, d -> })), Inv { a, b, c, d -> }),","completion":"to(Inv(take({ a, b, c, d -> }, { a, b, c, d -> })), Inv { a, b, c, d -> }),\n )\n}<|endoftext|>"} {"prompt":"inline fun isClassLocal(classNode: LighterASTNode, getParent: LighterASTNode.() -> LighterASTNode?): Boolean {\n var currentNode: LighterASTNode? = classNode\n while (currentNode != null) {\n val tokenType = currentNode.tokenType\n val parent = currentNode.getParent()\n val parentTokenType = parent?.tokenType","completion":"if (tokenType == PROPERTY || tokenType == FUN) {\n val grandParent = parent?.getParent()\n when {\n parentTokenType == KT_FILE -> return true\n parentTokenType == CLASS_BODY && !(grandParent?.tokenType == OBJECT_DECLARATION && grandParent?.getParent()?.tokenType == OBJECT_LITERAL) -> return true<|endoftext|>"} {"prompt":"? & In<*>\")!>a.propT\n ? & In<*>\")!>a.propAny","completion":"? & In<*>\")!>a.propNullableT\n ? & In<*>\")!>a.propNullableAny<|endoftext|>"} {"prompt":"if (plusZeroAny != minusZeroAny) return \"IEEE 754 quals fail 2\"\n }\n\n return \"OK\"\n}\n\nfun box(): String {\n val plusZero: Double = +0.0\n val minusZero: Double = -0.0\n\n if (plusZero.equals(minusZero)) return \"Total order fail\"","completion":"if (plusZero != minusZero) return \"IEEE 754 equals fail\"\n\n val plusZeroFloat: Float = +0.0f\n val minusZeroFloat: Float = -0.0f\n\n if (plusZeroFloat.equals(minusZeroFloat)) return \"Total order fail 2\"\n if (plusZeroFloat != minusZeroFloat) return \"IEEE 754 equals fail 2\"<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.renderer.FirErrorExpressionExtendedRenderer\nimport org.jetbrains.kotlin.fir.renderer.FirRenderer\nimport org.jetbrains.kotlin.fir.renderer.FirResolvePhaseRenderer","completion":"import org.jetbrains.kotlin.fir.resolve.calls.FirSyntheticPropertiesScope\nimport org.jetbrains.kotlin.fir.resolve.defaultType\nimport org.jetbrains.kotlin.fir.scopes.FirContainingNamesAwareScope\nimport org.jetbrains.kotlin.fir.scopes.unsubstitutedScope<|endoftext|>"} {"prompt":"\"kotlin\/ranges\/LongProgression\"\n )\n }\n\n override fun merge(v: BasicValue, w: BasicValue) =\n mergeStackValues(v, w)\n\n fun mergeLocalVariableValues(v: BasicValue, w: BasicValue) =\n merge(v, w, isLocalVariable = true)","completion":"fun mergeStackValues(v: BasicValue, w: BasicValue) =\n merge(v, w, isLocalVariable = false)\n\n private fun merge(v: BasicValue, w: BasicValue, isLocalVariable: Boolean) =\n when {\n v === StrictBasicValue.UNINITIALIZED_VALUE || w === StrictBasicValue.UNINITIALIZED_VALUE -><|endoftext|>"} {"prompt":"private fun incCounter() {\n cancelledTracker.andIncrement\n }\n\n override fun getModificationCount(): Long {\n return cancelledTracker.get()\n }\n\n override fun toString(): String {\n return this::class.java.name + \": \" + modificationCount\n }\n}\n\nobject CacheResetOnProcessCanceled {","completion":"private const val PROPERTY = \"kotlin.internal.cacheResetOnProcessCanceled\"\n private const val DEFAULT_VALUE = false\n\n var enabled: Boolean\n get() = PropertiesComponent.getInstance()?.getBoolean(PROPERTY, DEFAULT_VALUE) ?: DEFAULT_VALUE\n set(value) {<|endoftext|>"} {"prompt":"valueType: ConeKotlinType,\n expectedType: ConeKotlinType,\n ) =\n with(implicitCastInserter) {\n this@insertImplicitCast.insertSpecialCast(baseExpression, valueType, expectedType)\n }\n\n override fun visitProperty(property: FirProperty, data: Any?): IrElement = whileAnalysing(session, property) {","completion":"if (property.isLocal) return visitLocalVariable(property)\n @OptIn(UnsafeDuringIrConstructionAPI::class)\n val irProperty = declarationStorage.getCachedIrPropertySymbol(property, fakeOverrideOwnerLookupTag = null)?.owner\n ?: return IrErrorExpressionImpl(\n UNDEFINED_OFFSET, UNDEFINED_OFFSET,<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\/\/ WORKS_WHEN_VALUE_CLASS\n\/\/ LANGUAGE: +ValueClasses, +GenericInlineClassParameter\n\n@Target(AnnotationTarget.PROPERTY)\nannotation class Anno\n\nOPTIONAL_JVM_INLINE_ANNOTATION\nvalue class Z(val s: T)\n\nclass A {\n @Anno","completion":"val Z.r: String get() = s\n}\n\nfun box(): String {\n with(A()) {\n return Z(\"OK\").r\n }\n}<|endoftext|>"} {"prompt":"if (rhs in suspendCalls && lhs.isStateMachineResult()) {\n suspendCalls -= rhs\n }\n }\n }\n }\n })\n\n return suspendCalls.isEmpty()\n }\n\n private fun transformSimple() {\n val continuationParam = function.parameters.last()\n val resultVar = JsScope.declareTemporaryName(\"\\$result\")","completion":"body.replaceSpecialReferencesInSimpleFunction(continuationParam, resultVar)\n body.statements.add(0, newVar(resultVar, null).apply { synthetic = true })\n\n object : JsVisitorWithContextImpl() {\n override fun endVisit(x: JsExpressionStatement, ctx: JsContext) {\n if (x.expression.isSuspend) {<|endoftext|>"} {"prompt":"@kotlin.internal.InlineOnly\npublic inline fun kotlin.ShortArray.sumOf(selector: (kotlin.Short) -> kotlin.Long): kotlin.Long\n\n@kotlin.SinceKotlin(version = \"1.5\")\n@kotlin.OverloadResolutionByLambdaReturnType","completion":"@kotlin.jvm.JvmName(name = \"sumOfUInt\")\n@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class})\n@kotlin.internal.InlineOnly\npublic inline fun kotlin.ShortArray.sumOf(selector: (kotlin.Short) -> kotlin.UInt): kotlin.UInt<|endoftext|>"} {"prompt":"fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType: CompileTimeType, right: Any): Any? {\n when (leftType) {\n BOOLEAN -> when (rightType) {\n BOOLEAN -> when (name) {\n \"and\" -> return (left as Boolean).and(right as Boolean)","completion":"\"compareTo\" -> return (left as Boolean).compareTo(right as Boolean)\n \"or\" -> return (left as Boolean).or(right as Boolean)\n \"xor\" -> return (left as Boolean).xor(right as Boolean)\n }\n ANY -> when (name) {\n \"equals\" -> return (left as Boolean).equals(right)\n }\n else -> {}<|endoftext|>"} {"prompt":"val ATTRIBUTE_NODE: Short\n val TEXT_NODE: Short\n val CDATA_SECTION_NODE: Short\n val ENTITY_REFERENCE_NODE: Short\n val ENTITY_NODE: Short\n val PROCESSING_INSTRUCTION_NODE: Short\n val COMMENT_NODE: Short\n val DOCUMENT_NODE: Short","completion":"val DOCUMENT_TYPE_NODE: Short\n val DOCUMENT_FRAGMENT_NODE: Short\n val NOTATION_NODE: Short\n val DOCUMENT_POSITION_DISCONNECTED: Short\n val DOCUMENT_POSITION_PRECEDING: Short\n val DOCUMENT_POSITION_FOLLOWING: Short\n val DOCUMENT_POSITION_CONTAINS: Short<|endoftext|>"} {"prompt":"moduleData: FirModuleData,\n index: Int,\n): FirValueParameter = buildJavaValueParameter {\n source = (this@toFirValueParameter as? JavaElementImpl<*>)?.psi?.toKtPsiSourceElement()\n isFromSource = this@toFirValueParameter.isFromSource\n this.moduleData = moduleData\n containingFunctionSymbol = functionSymbol","completion":"name = this@toFirValueParameter.name ?: Name.identifier(\"p$index\")\n returnTypeRef = type.toFirJavaTypeRef(session, source)\n isVararg = this@toFirValueParameter.isVararg\n annotationBuilder = { convertAnnotationsToFir(session, source) }\n}\n\ninternal fun JavaAnnotationArgument.toFirExpression(<|endoftext|>"} {"prompt":"Pair(1, 2) -> 3\n in 1..10 -> 34\n 4 -> 38","completion":"is Int -> 33\n else -> 34\n }\n\nfun cond1() = false\n\nfun cond2() = true<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.builtins.PrimitiveType\nimport org.jetbrains.kotlin.builtins.UnsignedType\nimport org.jetbrains.kotlin.ir.IrStatement\nimport org.jetbrains.kotlin.ir.builders.andand\nimport org.jetbrains.kotlin.ir.builders.irBlock","completion":"import org.jetbrains.kotlin.ir.builders.irCall\nimport org.jetbrains.kotlin.ir.builders.irInt\nimport org.jetbrains.kotlin.ir.declarations.IrClass\nimport org.jetbrains.kotlin.ir.declarations.IrDeclaration\nimport org.jetbrains.kotlin.ir.declarations.IrSymbolOwner<|endoftext|>"} {"prompt":"header actual class Third","completion":"impl expect class Fourth<|endoftext|>"} {"prompt":"else -> null\n }\n }\n }\n}\n\nfun Any?.toIrConst(irType: IrType, startOffset: Int = SYNTHETIC_OFFSET, endOffset: Int = SYNTHETIC_OFFSET): IrConst<*> =\n toIrConstOrNull(irType, startOffset, endOffset)","completion":"?: throw UnsupportedOperationException(\"Unsupported const element type ${irType.makeNotNull().render()}\")\n\nval IrDeclaration.parentsWithSelf: Sequence\n get() = generateSequence(this as? IrDeclarationParent) { (it as? IrDeclaration)?.parent }\n\nval IrDeclaration.parents: Sequence<|endoftext|>"} {"prompt":"target.append(\"[CIRCULAR REFERENCE, SEE ABOVE: \").append(shortInfo).append(\"]\\n\")\n return false\n }\n visited.asDynamic().push(this)\n\n var stack = this.asDynamic().stack as String?\n if (stack != null) {","completion":"val stackStart = stack.indexOf(shortInfo).let { if (it < 0) 0 else it + shortInfo.length }\n if (stackStart == 0) target.append(shortInfo).append(\"\\n\")\n if (topStack.isEmpty()) {\n topStack = stack\n topStackStart = stackStart\n } else {\n stack = dropCommonFrames(stack, stackStart)\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.js.backend.ast.*\nimport org.jetbrains.kotlin.js.parser.parseExpressionOrStatement\n\n\/**\n * Returns null if constant expression could not be parsed.\n *\/\nfun translateJsCodeIntoStatementList(code: IrExpression, context: JsIrBackendContext?, container: IrDeclaration) =\n translateJsCodeIntoStatementList(","completion":"code,\n context,\n code.getStartSourceLocation(container) ?: container.fileOrNull?.fileEntry?.let { JsLocation(it.name, 0, 0) }\n )\n\n\/**\n * Returns null if constant expression could not be parsed.\n *\/\nfun translateJsCodeIntoStatementList(code: IrExpression, context: JsIrBackendContext?, fileEntry: IrFileEntry) =<|endoftext|>"} {"prompt":"compileKotlin.getDefaultCompilerClasspath${'$'}$pluginSuffix().setFrom(files($originalPaths).toList())\n afterEvaluate {\n kaptGenerateStubsKotlin.getDefaultCompilerClasspath${'$'}$pluginSuffix().setFrom(files($originalPaths).toList())\n }\n \"\"\".trimIndent()\n )","completion":"}\n\n override fun mutateProject(project: TestProject) = with(project) {\n buildGradle.modify {\n val modifiedClasspath = originalCompilerCp.map {\n val file = File(it)\n val newFile = projectPath.resolve(file.nameWithoutExtension + \"-1.jar\").toFile()\n file.copyTo(newFile)<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.incremental\n\nimport org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments\nimport org.jetbrains.kotlin.incremental.testingUtils.BuildLogFinder\nimport java.io.File","completion":"abstract class AbstractIncrementalK2PsiJvmCompilerRunnerTest : AbstractIncrementalJvmCompilerRunnerTest() {\n override fun createCompilerArguments(destinationDir: File, testDir: File): K2JVMCompilerArguments =\n super.createCompilerArguments(destinationDir, testDir).apply {\n languageVersion = \"2.0\"\n useFirIC = false<|endoftext|>"} {"prompt":"doTest((3u.toUShort() downTo 5u.toUShort()).reversed(), 5u, 3u, 1, listOf())\n doTest((3uL downTo 5uL).reversed(), 5uL, 3uL, 1L, listOf())\n }\n\n @Test fun reversedRange() {","completion":"doTest((3..5).reversed(), 5, 3, -1, listOf(5, 4, 3))\n doTest((3.toByte()..5.toByte()).reversed(),5, 3, -1, listOf(5, 4, 3))<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.js.inline.clean\n\nimport org.jetbrains.kotlin.js.backend.ast.*\nimport org.jetbrains.kotlin.js.backend.ast.JsExpression.JsExpressionHasArguments\nimport org.jetbrains.kotlin.js.backend.ast.metadata.HasMetadata","completion":"import org.jetbrains.kotlin.js.backend.ast.metadata.isInlineClassBoxing\nimport org.jetbrains.kotlin.js.backend.ast.metadata.isInlineClassUnboxing\nimport org.jetbrains.kotlin.js.backend.ast.metadata.isJsCall\nimport org.jetbrains.kotlin.js.inline.util.isCallInvocation<|endoftext|>"} {"prompt":".declarationKind(functionSymbol, capitalized = false).append(\" requires\")\n\n else ->\n append(\"The call site provides \").append(if (expressionValueArgumentCount > functionValueParameterCount) \"more\" else \"less\")\n .append(\" value arguments (\").append(expressionValueArgumentCount.toString()).append(\") than the \")","completion":".declarationKind(functionSymbol, capitalized = false).append(\" requires (\")\n .append(functionValueParameterCount.toString()).append(\")\")\n}\n\nprivate fun Appendable.invalidSamConversion(\n expression: IrTypeOperatorCall,\n abstractFunctionSymbols: Set,\n abstractPropertySymbol: IrPropertySymbol?,<|endoftext|>"} {"prompt":"typealias C = B\n typealias X = C\n \"\"\".trimIndent()\n )\n\n simpleSingleSourceTarget(\n \"b\", \"\"\"\n typealias A = Long\n typealias B = A\n typealias X = B\n \"\"\".trimIndent()\n )\n }\n\n result.assertCommonized(\n \"(a, b)\", \"\"\"","completion":"@UnsafeNumber([\"a: kotlin.Int\", \"b: kotlin.Long\"])\n typealias A = Int\n @UnsafeNumber([\"a: kotlin.Int\", \"b: kotlin.Long\"])\n typealias B = A\n @UnsafeNumber([\"a: kotlin.Int\", \"b: kotlin.Long\"])\n typealias X = B<|endoftext|>"} {"prompt":"}\n\n@Deprecated(\"Use Kotlin compiler 1.4 to avoid deprecation warning.\")\n@DeprecatedSinceKotlin(hiddenSince = \"1.4\")\npublic inline infix fun Array.contentEqualsMy(other: Array): Boolean {\n return this.contentEqualsMy(other)\n}\n\n\n\/\/ MODULE: main(lib)\n\/\/ FILE: B.kt","completion":"import kotlin.test.*\n\nfun box(): String {\n val arr = arrayOf(1, 2, 3)\n return if (arr contentEqualsMy arr) \"OK\" else \"fail\"\n}<|endoftext|>"} {"prompt":".map { (target, copy) -> target.takeUnless { it is FirLazyDelegatedConstructorCall } ?: copy }\n\n targetCall.replaceDelegatedConstructorCalls(newCalls)\n }\n }\n}\n\nprivate fun replaceLazyInitializer(target: FirVariable, copy: FirVariable) {\n if (target.initializer is FirLazyExpression) {","completion":"target.replaceInitializer(copy.initializer)\n }\n}\n\nprivate fun replaceLazyDelegate(target: FirVariable, copy: FirVariable) {\n if (target.delegate is FirLazyExpression) {\n target.replaceDelegate(copy.delegate)\n }\n}\n\nprivate fun calculateLazyBodiesForFunction(designation: FirDesignation) {<|endoftext|>"} {"prompt":"private fun doStaticMembersLowering(modules: Iterable) {\n modules.forEach { module ->\n module.files.forEach {\n it.accept(backendContext.keeper, Keeper.KeepData(classInKeep = false, classShouldBeKept = false))\n }\n }\n\n modules.forEach { module ->\n module.files.forEach {","completion":"StaticMembersLowering(backendContext).lower(it)\n }\n }\n }\n\n fun generateModule(modules: Iterable, modes: Set, relativeRequirePath: Boolean): CompilerResult {\n val exportData = associateIrAndExport(modules)\n doStaticMembersLowering(modules)<|endoftext|>"} {"prompt":"x.size\n x.isEmpty()","completion":"x[null]\n }\n }\n }\n }\n}\n\n\/\/ TESTCASE NUMBER: 2<|endoftext|>"} {"prompt":"public object BODY_WITH_MEMBERS_OR_EMPTY_BRACES : KtClassifierBodyWithMembersRenderer() {\n override fun renderEmptyBodyForEmptyMemberScope(symbol: KtSymbolWithMembers): Boolean {\n return true\n }\n }\n}\n\npublic abstract class KtClassifierBodyWithMembersRenderer : KtClassifierBodyRenderer {","completion":"public abstract fun renderEmptyBodyForEmptyMemberScope(symbol: KtSymbolWithMembers): Boolean\n\n public override fun renderBody(\n analysisSession: KtAnalysisSession,\n symbol: KtSymbolWithMembers,\n declarationRenderer: KtDeclarationRenderer,\n printer: PrettyPrinter,\n ) {<|endoftext|>"} {"prompt":"doTest((MaxUB - 5u).toUByte()..MaxUB step 3, (MaxUB - 5u).toUInt(), (MaxUB - 2u).toUInt(), 3, listOf((MaxUB - 5u).toUInt(), (MaxUB - 2u).toUInt()))","completion":"doTest((MaxUS - 5u).toUShort()..MaxUS step 3, (MaxUS - 5u).toUInt(), (MaxUS - 2u).toUInt(), 3, listOf((MaxUS - 5u).toUInt(), (MaxUS - 2u).toUInt()))<|endoftext|>"} {"prompt":"\"\u0430\u0432\u0430\u043d\u0433\u0430\u0440\u0434\",\n\"\u0430\u0432\u0430\u043d\u0433\u0430\u0440\u0434\u0438\u0437\u043c\",\n\"\u0430\u0432\u0430\u043d\u0433\u0430\u0440\u0434\u0438\u0441\u0442\",\n\"\u0430\u0432\u0430\u043d\u0433\u0430\u0440\u0434\u0438\u0441\u0442\u0441\u043a\u0438\u0439\",\n\"\u0430\u0432\u0430\u043d\u0433\u0430\u0440\u0434\u043d\u044b\u0439\",\n\"\u0430\u0432\u0430\u043d\u0437\u0430\u043b\",","completion":"\"\u0430\u0432\u0430\u043d\u0437\u0430\u043b\u044c\u043d\u044b\u0439\",\n\"\u0430\u0432\u0430\u043d\u043a\u0430\u043c\u0435\u0440\u0430\",\n\"\u0430\u0432\u0430\u043d\u043b\u043e\u0436\u0430\",\n\"\u0430\u0432\u0430\u043d\u043f\u043e\u0440\u0442\",\n\"\u0430\u0432\u0430\u043d\u043f\u043e\u0441\u0442\",\n\"\u0430\u0432\u0430\u043d\u043f\u043e\u0441\u0442\u043d\u044b\u0439\",\n\"\u0430\u0432\u0430\u043d\u0441\",<|endoftext|>"} {"prompt":"@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION, AnnotationTarget.FILE})\n@kotlin.SinceKotlin(version = \"1.3\")\npublic final annotation class JsExport : kotlin.Annotation {\n public constructor JsExport()","completion":"@kotlin.js.ExperimentalJsExport\n @kotlin.annotation.Retention(value = AnnotationRetention.BINARY)\n @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR})<|endoftext|>"} {"prompt":"val transitiveDependsOnDependencies: List by lazy { computeTransitiveDependsOnDependencies(directDependsOnDependencies) }\n\n val directFriendDependencies: List by lazy(LazyThreadSafetyMode.PUBLICATION) {\n buildList {","completion":"testModule.friendDependencies.mapTo(this) { testServices.ktTestModuleStructure.getKtTestModule(it.moduleName).ktModule }\n addAll(\n librariesByRoots(configuration[JVMConfigurationKeys.FRIEND_PATHS].orEmpty().map(Paths::get))\n )\n }\n }\n\n protected abstract val ktModule: KtModule<|endoftext|>"} {"prompt":"aInt[0]--\n bInt[0]--\n if (aInt[0] != bInt[0]) return \"Failed post-decrement Int: ${aInt[0]} != ${bInt[0]}\"\n\n aInt[0]++\n bInt[0]++","completion":"if (aInt[0] != bInt[0]) return \"Failed post-increment Int: ${aInt[0]} != ${bInt[0]}\"\n\n aLong[0]--\n bLong[0]--\n if (aLong[0] != bLong[0]) return \"Failed post-decrement Long: ${aLong[0]} != ${bLong[0]}\"<|endoftext|>"} {"prompt":"private fun readLatestConfig(element: Element): KotlinFacetSettings {\n return readV2AndLaterConfig(element) { el, bean -> CompilerArgumentsDeserializerV5(bean).deserializeFrom(el) }\n}\n\nfun deserializeFacetSettings(element: Element): KotlinFacetSettings {\n val version = try {\n element.getAttribute(\"version\")?.intValue","completion":"} catch (e: DataConversionException) {\n null\n } ?: KotlinFacetSettings.DEFAULT_VERSION\n return when (version) {\n 1 -> readV1Config(element)\n 2, 3, 4 -> readV2Config(element)\n KotlinFacetSettings.CURRENT_VERSION -> readLatestConfig(element)<|endoftext|>"} {"prompt":"package kotlin.text\n\n\/**\n * Returns `true` if this character is an ISO control character.\n *\n * A character is considered to be an ISO control character if its [category] is [CharCategory.CONTROL].\n *\n * @sample samples.text.Chars.isISOControl\n *\/\n@SinceKotlin(\"1.5\")\npublic actual fun Char.isISOControl(): Boolean {","completion":"return this <= '\\u001F' || this in '\\u007F'..'\\u009F'\n}\n\n\/**\n * Returns `true` if this character is a Unicode high-surrogate code unit (also known as leading-surrogate code unit).\n *\/<|endoftext|>"} {"prompt":"if (a2.arg != 2) return \"fail5': ${a2.arg}\"\n if (sideEffects != \"zero#first#second#fourth\") return \"fail6: ${sideEffects}\"\n\n sideEffects = \"\"\n val a3 = A(false)\n if (a3.prop != \"\") return \"fail7: ${a3.prop}\"","completion":"if (a3.parentProp != \"2\") return \"fail8: ${a3.parentProp}\"\n if (a3.arg != 2) return \"fail9': ${a3.arg}\"\n if (sideEffects != \"zero#first#second\") return \"fail10: ${sideEffects}\"\n return \"OK\"\n}<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ JVM_TARGET: 1.8\n\/\/ SAM_CONVERSIONS: INDY\n\n\/\/ CHECK_BYTECODE_TEXT\n\/\/ JVM_IR_TEMPLATES\n\/\/ 2 java\/lang\/invoke\/LambdaMetafactory\n\nfun interface IFoo {\n fun foo(): String\n}","completion":"fun foo(iFoo: IFoo) = iFoo.foo()\n\nopen class C1 {\n open fun test() = foo { \"O\" }\n}\n\nclass C2 : C1() {\n override fun test() = foo { \"K\" }\n}\n\nfun box() =\n C1().test() + C2().test()<|endoftext|>"} {"prompt":"if (old.hasEffectType()) {\n if (old.effectType != new.effectType) return false\n }\n\n if (!checkEqualsEffectEffectConstructorArgument(old, new)) return false\n\n if (old.hasConclusionOfConditionalEffect() != new.hasConclusionOfConditionalEffect()) return false\n if (old.hasConclusionOfConditionalEffect()) {","completion":"if (!checkEquals(old.conclusionOfConditionalEffect, new.conclusionOfConditionalEffect)) return false\n }\n\n if (old.hasKind() != new.hasKind()) return false\n if (old.hasKind()) {\n if (old.kind != new.kind) return false\n }\n\n return true\n }<|endoftext|>"} {"prompt":"0x4007debe547f90a3UL, 0x4008d089920f1c3aUL, 0x4006aad9fbb38575UL, 0x4008f93e53990449UL,","completion":"0x400921fb54442d18UL, 0x0UL, 0x3ff921fb54442d18UL, 0x10000000000001UL, \n 0x7ff8000000000000UL, 0x157a015c0bc0eef1UL, 0x3ff921fb54442d18UL, 0x3ff921fb5444011dUL,<|endoftext|>"} {"prompt":"val defaultParam = scope.defaultParameter\n\n \/\/ restartable functions get extra logic and different types of groups from\n \/\/ non-restartable functions, and lambdas get no groups at all.\n return when {\n isLambda && isTracked -> visitComposableLambda(\n declaration,\n scope,\n changedParam\n )","completion":"restartable && isTracked -> visitRestartableComposableFunction(\n declaration,\n scope,\n changedParam,\n defaultParam\n )\n else -> visitNonRestartableComposableFunction(\n declaration,\n scope,\n changedParam,\n defaultParam\n )\n }\n }\n\n \/\/ Currently, we make all composable functions restartable by default, unless:<|endoftext|>"} {"prompt":"assertSuccessful()\n assertTasksExecuted(*processResourcesTasks.toTypedArray())\n\n targetsWithResources.forEach {\n assertFileExists(\"build\/processedResources\/$it\/main\/commonMainResource.txt\")\n assertFileExists(\"build\/processedResources\/$it\/main\/${it}MainResource.txt\")\n }\n }\n }","completion":"override val defaultGradleVersion: GradleVersionRequired\n get() = gradleVersion\n\n @Test\n fun testSourceSetCyclicDependencyDetection() = with(Project(\"sample-lib\", gradleVersion, \"new-mpp-lib-and-app\")) {\n setupWorkingDir()\n gradleBuildScript().appendText(\n \"\\n\" + \"\"\"<|endoftext|>"} {"prompt":"class TestAdhocComponent1(val service: TestAdhocComponentService) {\n\n}\n\nclass TestAdhocComponent2(val service: TestAdhocComponentService) {\n\n}\n\nclass TestIterableComponent(val components: Iterable)\n\ninterface TestGenericComponent","completion":"class TestGenericClient(val component1 : TestGenericComponent, val component2: TestGenericComponent)\nclass TestStringComponent : TestGenericComponent\nclass TestIntComponent : TestGenericComponent\n\nclass TestImplicitGeneric()\nclass TestImplicitGenericClient(val component: TestImplicitGeneric)<|endoftext|>"} {"prompt":"const val CFLAGS_PROPERTY = \"kotlin.native.cocoapods.cflags\"\n const val HEADER_PATHS_PROPERTY = \"kotlin.native.cocoapods.paths.headers\"\n const val FRAMEWORK_PATHS_PROPERTY = \"kotlin.native.cocoapods.paths.frameworks\"","completion":"const val GENERATE_WRAPPER_PROPERTY = \"kotlin.native.cocoapods.generate.wrapper\"\n }\n}\n\n\/**\n * Extends a KotlinArtifact with a corresponding Podspec\n *\n * Only needed in *.kts build files. In Groovy you can use the same syntax but without explicit extension import\n *\/<|endoftext|>"} {"prompt":"val root = createCirTreeRootFromSourceCode(\n \"\"\"\n class X\n class Y\n typealias A = X\n typealias B = Y\n typealias C = B\n \"\"\".trimIndent()\n )\n\n val classifiers = CirKnownClassifiers(\n classifierIndices = TargetDependent(target to CirClassifierIndex(root)),","completion":"targetDependencies = TargetDependent(target to CirProvidedClassifiers.EMPTY),\n commonizedNodes = CirCommonizedClassifierNodes.default(),\n commonDependencies = CirProvidedClassifiers.EMPTY\n )\n\n val idOfX = CirEntityId.create(\"X\")\n val idOfY = CirEntityId.create(\"Y\")<|endoftext|>"} {"prompt":"override val annotations: List = emptyList(),\n val constant: ConstantStub? = null\n ) : Getter()\n\n class GetConstructorParameter(\n val constructorParameter: FunctionParameterStub,\n override val annotations: List = emptyList()\n ) : Getter()\n\n class ExternalGetter(","completion":"override val annotations: List = emptyList()\n ) : Getter()\n\n class ArrayMemberAt(\n val offset: Long\n ) : Getter() {\n override val parameters: List = emptyList()\n override val annotations: List = emptyList()\n }\n\n class MemberAt(\n val offset: Long,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.sam.getAbstractMembers\nimport org.jetbrains.kotlin.resolve.source.getPsi\n\nclass FunInterfaceDeclarationChecker : DeclarationChecker {\n override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {\n if (declaration !is KtClass) return","completion":"if (descriptor !is ClassDescriptor || !descriptor.isFun) return\n\n val funKeyword = declaration.getFunKeyword() ?: return\n\n val abstractMembers = getAbstractMembers(descriptor)\n for (abstractMember in abstractMembers) {\n if (abstractMember !is PropertyDescriptor) continue\n\n val reportOnProperty = abstractMember.containingDeclaration == descriptor<|endoftext|>"} {"prompt":"val z = MyJavaClass.NestedClass()\n\n\/\/FILE: c.kt\npackage a.c\n\nimport a.MyJavaClass","completion":"val mc1 = MyJavaClass()\n\nval x = MyJavaClass.staticMethod()<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.resolve.DescriptorUtils\nimport org.jetbrains.kotlin.resolve.descriptorUtil.classId\nimport org.jetbrains.kotlin.types.*","completion":"import org.jetbrains.kotlin.types.error.ErrorTypeKind\nimport org.jetbrains.kotlin.types.error.ErrorUtils\nimport org.jetbrains.kotlin.types.typeUtil.replaceArgumentsWithStarProjections\n\nabstract class ConstantValue(open val value: T) {\n abstract fun getType(module: ModuleDescriptor): KotlinType<|endoftext|>"} {"prompt":"externalModule.writeAsJsModule(jsCode, file.nameWithoutExtension)\n externalModule.canonicalPath\n }\n }\n }\n\n private fun verifyJsCode(stepId: Int, mainModuleName: String, jsFiles: List) {\n try {\n V8IrJsTestChecker.checkWithTestFunctionArgs(\n files = jsFiles,","completion":"testModuleName = \".\/$mainModuleName${projectInfo.moduleKind.extension}\",\n testPackageName = null,\n testFunctionName = BOX_FUNCTION_NAME,\n testFunctionArgs = \"$stepId\",\n expectedResult = \"OK\",\n withModuleSystem = projectInfo.moduleKind in setOf(ModuleKind.COMMON_JS, ModuleKind.UMD, ModuleKind.AMD),<|endoftext|>"} {"prompt":"reifiedAsSucceeds>(\n x, \"x as Function5<*, *, *, *, *, *>\")\n override fun testBad(x: Any) =\n reifiedAsFailsWithCCE>(","completion":"x, \"x as Function5<*, *, *, *, *, *>\")\n}\n\nobject TestFn6 : TestFnBase {\n override fun testGood(x: Any) =\n reifiedAsSucceeds>(<|endoftext|>"} {"prompt":"y.propNullableT\n y.propNullableAny","completion":"y.funT()\n y.funAny()<|endoftext|>"} {"prompt":"}\n\n fun register(process: Process) = processes.add(process)\n\n fun deregister(process: Process) = processes.remove(process)\n}\n\nprivate fun ProcessBuilder.scoped(block: suspend CoroutineScope.(Process) -> T): T {\n val process = start()\n \/\/ Make sure the process is killed even if the jvm process is being destroyed.","completion":"\/\/ e.g. gradle --no-daemon task execution was cancelled by the user pressing ^C\n ProcessKiller.register(process)\n return try {\n val result = runBlocking(Dispatchers.IO) {\n block(process)\n }\n result\n } finally {\n \/\/ Make sure the process is killed even if the current thread was interrupted.<|endoftext|>"} {"prompt":"scopeTower: ImplicitScopeTower,\n resolutionCallbacks: KotlinResolutionCallbacks,\n kotlinCall: KotlinCall,\n expectedType: UnwrappedType?,\n collectAllCandidates: Boolean,\n ): CallResolutionResult {\n val candidateFactory = createFactory(scopeTower, kotlinCall, resolutionCallbacks, expectedType)","completion":"val candidates = resolveCall(scopeTower, resolutionCallbacks, kotlinCall, collectAllCandidates, candidateFactory)\n\n if (collectAllCandidates) {\n return kotlinCallCompleter.createAllCandidatesResult(candidates, expectedType, resolutionCallbacks)\n }\n\n return kotlinCallCompleter.runCompletion(candidateFactory, candidates, expectedType, resolutionCallbacks)<|endoftext|>"} {"prompt":"* Computes the inverse hyperbolic tangent of the value [x].\n *\n * The returned value is `y` such that `tanh(y) == x`.\n *\n * Special cases:\n * - `tanh(NaN)` is `NaN`\n * - `tanh(x)` is `NaN` when `x > 1` or `x < -1`","completion":"* - `tanh(1.0)` is `+Inf`\n * - `tanh(-1.0)` is `-Inf`\n *\/\n@SinceKotlin(\"1.2\")\n@InlineOnly\npublic actual inline fun atanh(x: Double): Double = nativeAtanh(x)\n\n\/**<|endoftext|>"} {"prompt":"val performanceManager = moduleConfiguration[CLIConfigurationKeys.PERF_MANAGER]\n performanceManager?.notifyAnalysisStarted()\n\n var librariesScope = projectEnvironment.getSearchScopeForProjectLibraries()\n val rootModuleName = input.targetId.name\n\n val incrementalCompilationScope = createIncrementalCompilationScope(\n moduleConfiguration,\n projectEnvironment,\n incrementalExcludesScope","completion":")?.also { librariesScope -= it }\n\n val extensionRegistrars = FirExtensionRegistrar.getInstances(projectEnvironment.project)\n\n val allSources = mutableListOf().apply {\n addAll(input.groupedSources.commonSources)\n addAll(input.groupedSources.platformSources)\n }\n \/\/ TODO: handle friends paths<|endoftext|>"} {"prompt":"val thenLabel = Label()\n expressionToLabels.add(ExpressionToLabel(branch.result, thenLabel))\n callToLabels += conditions.map { CallToLabel(it, thenLabel) }\n }\n }\n\n \/\/ switch isn't applicable if there's no case at all, e.g., when() { else -> ... }\n if (callToLabels.size == 0)","completion":"return null\n\n val calls = callToLabels.map { it.call }\n\n \/\/ To generate a switch from a when it must be a comparison of a single\n \/\/ variable, the \"subject\", against a series of constants. We assume the\n \/\/ subject is the left hand side of the first condition, provided the\n \/\/ first condition is a comparison. If the first condition is of the form:\n \/\/<|endoftext|>"} {"prompt":"* Returns the size of a regular file as a [Long] value of bytes or throws an exception if the file doesn't exist.\n *\n * @throws IOException if an I\/O error occurred.\n * @see Files.size\n *\/\n@SinceKotlin(\"1.5\")\n@WasExperimental(ExperimentalPathApi::class)\n@Throws(IOException::class)\n@kotlin.internal.InlineOnly","completion":"public inline fun Path.fileSize(): Long =\n Files.size(this)\n\n\/**\n * Deletes the existing file or empty directory specified by this path.\n *\n * @throws NoSuchFileException if the file or directory does not exist.\n * @throws DirectoryNotEmptyException if the directory exists but is not empty.\n *\n * @see Files.delete\n *\/\n@SinceKotlin(\"1.5\")<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor()\n constructor()\n}\n\nclass TestTypeParameterWithIdenticalUpperBoundsB {\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg: T)\n constructor(arg: T)\n}","completion":"class TestTypeParameterWithIdenticalUpperBoundsC {\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant)\n constructor(arg: Invariant)\n}\n\n\nclass TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB {<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ WITH_REFLECT\n\/\/ FILE: box.kt\n\nimport kotlin.test.assertTrue\nimport kotlin.test.assertFalse\n\nsealed class S {\n data class DataClass(val x: Int) : S()\n data object DataObject\n inner class InnerClass\n companion object\n object RegularObject\n fun interface FunInterface { fun invoke() }\n}","completion":"@JvmInline\nvalue class V(val value: String)\n\nfun box(): String {\n assertTrue(S::class.isSealed)\n assertFalse(S::class.isFinal)\n assertFalse(S::class.isOpen)\n assertFalse(S::class.isAbstract)\n assertFalse(S::class.isData)\n assertFalse(S::class.isInner)<|endoftext|>"} {"prompt":"\/\/ CHECK_CASES_COUNT: function=crash count=2 TARGET_BACKENDS=JS\n\/\/ CHECK_IF_COUNT: function=crash count=1 TARGET_BACKENDS=JS\n\nclass EncapsulatedEnum>(val value: T)\n\nenum class MyEnum(val value: String) {\n VALUE_A(\"OK\"),","completion":"VALUE_B(\"fail\"),\n}\n\nprivate fun crash(encapsulated: EncapsulatedEnum<*>) {\n val myEnum = encapsulated.value\n if (myEnum !is MyEnum) {\n return\n }\n\n when (myEnum) {\n MyEnum.VALUE_A -> res = myEnum.value<|endoftext|>"} {"prompt":"\"@\" + RenderIrElementVisitorForDiagnosticText.renderAsAnnotation(it)\n }\n\n @JvmField\n val MODULE_WITH_PLATFORM = Renderer { module ->\n val platform = module.platform\n val moduleName = module.getCapability(ModuleInfo.Capability)?.displayedName ?: module.name.asString()","completion":"val platformNameIfAny = if (platform == null || platform.isCommon()) \"\" else \" for \" + platform.single().platformName\n moduleName + platformNameIfAny\n }\n}<|endoftext|>"} {"prompt":"if (f != null || this.f != null) f.funT()","completion":"if (f != null || this.f != null) f.funAny()<|endoftext|>"} {"prompt":"fun finally() {}\n\n fun case3() {\n finally()\n }\n}\n\n\/\/ TESTCASE NUMBER: 4\nclass Case4 {\n class finally() {}\n\n fun case4() {\n val c = finally()\n }\n}\n\n\/\/ TESTCASE NUMBER: 5\n\nclass Case5() {\n interface finally\n\n fun case5(){","completion":"val c = object :finally{}\n }\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.diagnosticProvider.AbstractDanglingFileCollectDiagnosticsTest\nimport org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.expressionInfoProvider.AbstractIsUsedAsExpressionTest","completion":"import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.expressionInfoProvider.AbstractReturnTargetSymbolTest\nimport org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.expressionInfoProvider.AbstractWhenMissingCasesTest<|endoftext|>"} {"prompt":"+receivers\n +field(\"source\", sourceElementType, nullable = true, withReplace = true)\n +fieldList(\"nonFatalDiagnostics\", coneDiagnosticType, useMutableOrEmpty = true, withReplace = true)\n }\n\n qualifiedErrorAccessExpression.configure {\n +field(\"selector\", errorExpression)\n +field(\"receiver\", expression)","completion":"}\n\n literalExpression.configure {\n val t = withArg(\"T\")\n +field(\"kind\", constKindType.withArgs(t), withReplace = true)\n +field(\"value\", t)\n }\n\n functionCall.configure {\n +field(\"calleeReference\", namedReference)\n +field(\"origin\", functionCallOrigin)\n }<|endoftext|>"} {"prompt":"inline fun staticCFunction(noinline function: (P1, P2, P3, P4, P5, P6, P7,","completion":"P8, P9, P10, P11, P12) -> R): CPointer R>> =<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.contracts.model.structure\n\nimport org.jetbrains.kotlin.builtins.KotlinBuiltIns\nimport org.jetbrains.kotlin.types.KotlinType\n\nsealed class ESType {\n abstract fun toKotlinType(builtIns: KotlinBuiltIns): KotlinType\n}","completion":"abstract class ESBuiltInType : ESType()\n\nobject ESAnyType : ESBuiltInType() {\n override fun toKotlinType(builtIns: KotlinBuiltIns): KotlinType = builtIns.anyType\n}\n\nobject ESNullableAnyType : ESBuiltInType() {\n override fun toKotlinType(builtIns: KotlinBuiltIns): KotlinType = builtIns.nullableAnyType<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.frontend.java.di\n\nimport com.intellij.psi.search.GlobalSearchScope\nimport org.jetbrains.kotlin.builtins.jvm.JvmBuiltIns\nimport org.jetbrains.kotlin.builtins.jvm.JvmBuiltInsPackageFragmentProvider","completion":"import org.jetbrains.kotlin.config.JvmAnalysisFlags\nimport org.jetbrains.kotlin.config.LanguageFeature\nimport org.jetbrains.kotlin.config.LanguageVersionSettings\nimport org.jetbrains.kotlin.container.*\nimport org.jetbrains.kotlin.context.ModuleContext<|endoftext|>"} {"prompt":"createEnumEntruStub(descriptor, it).insertDeclaration(data)\n }\n } else {\n symbolTable.descriptorExtension.declareClassIfNotExists(descriptor) {\n createClassStub(descriptor, it).insertDeclaration(data)\n }\n }\n }","completion":"private fun declareTypeAliasStub(descriptor: TypeAliasDescriptor, symbol: IrTypeAliasSymbol): IrTypeAlias {\n return generator.generateTypeAlias(offset, offset, IrDeclarationOrigin.DEFINED, descriptor, symbol)\n }\n\n override fun visitTypeAliasDescriptor(descriptor: TypeAliasDescriptor, data: IrDeclarationContainer?) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.utils.exceptions.withPsiEntry\n\ninternal class StubBasedFirDeserializationContext(\n val moduleData: FirModuleData,\n val packageFqName: FqName,\n val relativeClassName: FqName?,\n val typeDeserializer: StubBasedFirTypeDeserializer,\n val annotationDeserializer: StubBasedAnnotationDeserializer,","completion":"val containerSource: DeserializedContainerSource?,\n val outerClassSymbol: FirRegularClassSymbol?,\n val outerTypeParameters: List,\n val initialOrigin: FirDeclarationOrigin,\n val classLikeDeclaration: KtClassLikeDeclaration? = null\n) {\n val session: FirSession get() = moduleData.session<|endoftext|>"} {"prompt":"* Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).\n *\n * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor.\n *\/\n @SinceKotlin(\"1.1\")\n @kotlin.internal.IntrinsicConstEvaluation","completion":"public inline operator fun rem(other: Short): Int =\n this.toInt() % other.toInt()\n\n \/**\n * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).\n *\n * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor.<|endoftext|>"} {"prompt":"val UNNECESSARY_LATEINIT: KtDiagnosticFactory0 by warning0(SourceElementPositioningStrategies.LATEINIT_MODIFIER)\n val BACKING_FIELD_IN_INTERFACE: KtDiagnosticFactory0 by error0(SourceElementPositioningStrategies.DECLARATION_SIGNATURE)","completion":"val EXTENSION_PROPERTY_WITH_BACKING_FIELD: KtDiagnosticFactory0 by error0()\n val PROPERTY_INITIALIZER_NO_BACKING_FIELD: KtDiagnosticFactory0 by error0()<|endoftext|>"} {"prompt":"@nativeSetter\n fun set(a: String, v: Any, v2: Any) {}","completion":"@nativeSetter\n fun set(a: A, v: Any?) {}<|endoftext|>"} {"prompt":"val explicitApiVersion by AnalysisFlag.Delegates.Boolean\n\n @JvmStatic\n val ignoreDataFlowInAssert by AnalysisFlag.Delegates.Boolean\n\n @JvmStatic\n val explicitApiMode by AnalysisFlag.Delegates.ApiModeDisabledByDefault\n\n @JvmStatic\n val ideMode by AnalysisFlag.Delegates.Boolean\n\n @JvmStatic","completion":"val allowUnstableDependencies by AnalysisFlag.Delegates.Boolean\n\n @JvmStatic\n val libraryToSourceAnalysis by AnalysisFlag.Delegates.Boolean\n\n @JvmStatic\n val extendedCompilerChecks by AnalysisFlag.Delegates.Boolean\n\n @JvmStatic\n val allowKotlinPackage by AnalysisFlag.Delegates.Boolean\n\n @JvmStatic<|endoftext|>"} {"prompt":"fun case_14(x: Boolean?) {\n do {\n x ?: return\n } while(false)\n\n x\n x.equals(10)","completion":"}\n\n\/\/ TESTCASE NUMBER: 15\nfun case_15(x: Boolean?) {\n do {\n x ?: return\n println(1)\n } while(false)\n\n x<|endoftext|>"} {"prompt":"if (!source.treeStructure.userType(lightTreeTypeArgument).toString().isUnderscore) continue\n\n val annotations = source.treeStructure.annotations(lightTreeTypeArgument) ?: continue\n\n for (annotation in annotations) {\n reporter.reportOn(\n source.buildChildSourceElement(annotation), FirErrors.UNSUPPORTED,","completion":"\"annotations on an underscored type argument\", context\n )\n }\n }\n }\n}<|endoftext|>"} {"prompt":"for ((firParameter, irParameter) in typeParameters.zip(irFunction.typeParameters)) {\n val newBounds = irParameter.superTypes.map { it.toConeType().toFirResolvedTypeRef() }\n firParameter.replaceBounds(newBounds)\n firParameter.replaceAnnotations(irParameter.convertAnnotations())\n }","completion":"replaceAnnotations(irFunction.convertAnnotations())\n }\n }\n\n session.providedDeclarationsForMetadataService.registerDeclaration(firFunction)\n\n irFunction.metadata = FirMetadataSource.Function(firFunction)\n }\n\n override fun registerConstructorAsMetadataVisible(irConstructor: IrConstructor) {<|endoftext|>"} {"prompt":"val rawReturnType = lambda.returnType\n\n val expectedTypeForReturnArguments = when {\n c.canBeProper(rawReturnType) -> substitute(rawReturnType)\n\n \/\/ For Unit-coercion\n !rawReturnType.isMarkedNullable && c.hasUpperOrEqualUnitConstraint(rawReturnType) -> builtIns.unitType\n\n else -> null\n }","completion":"val convertedAnnotations = lambda.expectedType?.annotations?.let { annotations ->\n if (receiver != null || expectedReceiver == null) annotations\n else FilteredAnnotations(annotations, true) { it != StandardNames.FqNames.extensionFunctionType }\n }\n\n @Suppress(\"UNCHECKED_CAST\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.parcelize.test.runners\n\nimport com.intellij.testFramework.TestDataPath\nimport org.jetbrains.kotlin.parcelize.test.services.SerializableLikeExtensionProvider\nimport org.jetbrains.kotlin.test.TestMetadata\nimport org.jetbrains.kotlin.test.builders.TestConfigurationBuilder","completion":"import org.junit.jupiter.api.Test\n\n@TestMetadata(\"plugins\/parcelize\/parcelize-compiler\/testData\/box\")\n@TestDataPath(\"\\$PROJECT_ROOT\")\nclass ParcelizeIrBoxTestWithSerializableLikeExtension : AbstractParcelizeIrBoxTest() {\n @Test\n @TestMetadata(\"simple.kt\")\n fun testSimple() {<|endoftext|>"} {"prompt":"* @param [operation] function that takes the index of an element, current accumulator value and the element itself,\n * and calculates the next accumulator value.\n * \n * @sample samples.collections.Collections.Aggregates.reduceOrNull\n *\/\n@SinceKotlin(\"1.4\")","completion":"public inline fun FloatArray.reduceIndexedOrNull(operation: (index: Int, acc: Float, Float) -> Float): Float? {\n if (isEmpty())\n return null\n var accumulator = this[0]\n for (index in 1..lastIndex) {\n accumulator = operation(index, accumulator, this[index])\n }\n return accumulator\n}\n\n\/**<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: +StrictJavaNullabilityAssertions\n\/\/ TARGET_BACKEND: JVM\n\n\/\/ FILE: box.kt\nfun box(): String {\n try {\n J().test()\n return \"Fail: should throw\"\n }\n catch (e: Throwable) {\n return \"OK\"\n }\n}\n\n\/\/ FILE: test.kt\nclass C {","completion":"val withAssertion = J().nullString()\n}\n\n\/\/ FILE: J.java\nimport org.jetbrains.annotations.NotNull;\n\npublic class J {\n public @NotNull String nullString() {\n return null;\n }\n\n public Object test() {\n return new C();\n }\n}<|endoftext|>"} {"prompt":"$i$a$-foo-LibraryKt$flaf$1\\2\\25\\0$iv:int=0:int, x\\2$iv:int=1:int, fooParam\\5$iv:int=2:int, $i$f$foo\\5\\17:int=0:int, fooVar\\5$iv:int=0:int, it\\6$iv:int=42:int,","completion":"$i$a$-foo-LibraryKt$flaf$1$2\\6\\30\\2$iv:int=0:int, z\\6$iv:int=3:int<|endoftext|>"} {"prompt":"package test.time\n\nimport java.util.concurrent.TimeUnit\nimport kotlin.test.*\nimport kotlin.time.*\n\nclass DurationUnitJVMTest {\n @Test\n fun conversionFromTimeUnit() {\n for (unit in DurationUnit.entries) {\n val timeUnit = unit.toTimeUnit()\n assertEquals(unit.name, timeUnit.name)","completion":"assertEquals(unit, timeUnit.toDurationUnit())\n }\n\n for (timeUnit in TimeUnit.entries) {\n val unit = timeUnit.toDurationUnit()\n assertEquals(timeUnit.name, unit.name)\n assertEquals(timeUnit, unit.toTimeUnit())\n }\n }\n}<|endoftext|>"} {"prompt":"class Test3, K : Any>\nclass Test4>\n\nclass Test5, K : Any>\nclass Test6>","completion":"class Test7, K : CharSequence>\nclass Test8in Any>>\n\nclass Class\ntypealias Alias = (Class) -> Boolean\n\nabstract class Base> {}<|endoftext|>"} {"prompt":"public fun ULongArray.sliceArray(indices: Collection): ULongArray {\n return ULongArray(storage.sliceArray(indices))\n}\n\n\/**\n * Returns an array containing elements of this array at specified [indices].\n *\/\n@SinceKotlin(\"1.3\")\n@ExperimentalUnsignedTypes\npublic fun UByteArray.sliceArray(indices: Collection): UByteArray {","completion":"return UByteArray(storage.sliceArray(indices))\n}\n\n\/**\n * Returns an array containing elements of this array at specified [indices].\n *\/\n@SinceKotlin(\"1.3\")\n@ExperimentalUnsignedTypes\npublic fun UShortArray.sliceArray(indices: Collection): UShortArray {\n return UShortArray(storage.sliceArray(indices))\n}<|endoftext|>"} {"prompt":"assertEquals(null, nullToNotNullC(aif), \"AIF? as? IC\")\n assertEquals(null, nullToNotNullC(aij), \"AIJ? as? IC\")\n assertEquals(baia, nullToNotNullC(baia), \"BAIA? as? IC\")","completion":"assertEquals(baiaif, nullToNotNullC(baiaif), \"BAIAIF? as? IC\")\n assertEquals(baiaij, nullToNotNullC(baiaij), \"BAIAIJ? as? IC\")\n assertEquals(null, nullToNotNullC(c), \"C? as? IC\")<|endoftext|>"} {"prompt":"}\n}\n\nfun setDesiredAssertionStatus(v: Boolean): Checker {\n val loader = Checker::class.java.classLoader\n loader.setDefaultAssertionStatus(v)\n val c = loader.loadClass(if (v) \"ShouldBeEnabled\" else \"ShouldBeDisabled\")\n return c.newInstance() as Checker\n}\n\nfun box(): String {","completion":"var c = setDesiredAssertionStatus(false)\n if (c.checkTrue()) return \"FAIL 0\"\n if (c.checkFalse()) return \"FAIL 2\"\n c = setDesiredAssertionStatus(true)\n if (!c.checkTrue()) return \"FAIL 4\"\n try {\n c.checkFalse()\n return \"FAIL 6\"<|endoftext|>"} {"prompt":"val elementSerializer = get(elementType, elementAsmType, context, forceBoxed = true, strict = strict())\n wrapToNullAwareIfNeeded(type, ListSetParcelSerializer(asmType, elementSerializer, context.frameMap))\n }\n\n className == Map::class.java.canonicalName\n || className == SortedMap::class.java.canonicalName","completion":"|| className == NavigableMap::class.java.canonicalName\n || className == HashMap::class.java.canonicalName\n || className == LinkedHashMap::class.java.canonicalName\n || className == TreeMap::class.java.canonicalName\n || className == ConcurrentHashMap::class.java.canonicalName\n -> {<|endoftext|>"} {"prompt":"blockScopeVariableInfo: BlockScopeVariableInfo\n ) : VariableContext(instruction, map) {\n internal val enterInitState = initialize(variableDescriptor, blockScopeVariableInfo, `in`)\n internal val exitInitState = initialize(variableDescriptor, blockScopeVariableInfo, out)\n\n private fun initialize(\n variableDescriptor: VariableDescriptor?,","completion":"blockScopeVariableInfo: BlockScopeVariableInfo,\n map: VariableInitReadOnlyControlFlowInfo\n ): VariableControlFlowState? {\n val state = map.getOrNull(variableDescriptor ?: return null)\n if (state != null) return state\n return PseudocodeVariablesData.getDefaultValueForInitializers(variableDescriptor, instruction, blockScopeVariableInfo)\n }\n }<|endoftext|>"} {"prompt":"override var dispatchReceiverParameter: IrValueParameter? by lazyVar(stubGenerator.lock) {\n createReceiverParameter(descriptor.dispatchReceiverParameter)\n }\n\n override var extensionReceiverParameter: IrValueParameter? by lazyVar(stubGenerator.lock) {\n createReceiverParameter(descriptor.extensionReceiverParameter)\n }","completion":"override var valueParameters: List by lazyVar(stubGenerator.lock) { createValueParameters() }\n\n override var contextReceiverParametersCount: Int = descriptor.contextReceiverParameters.size\n\n override var metadata: MetadataSource?\n get() = null\n set(_) = error(\"We should never need to store metadata of external declarations.\")<|endoftext|>"} {"prompt":"@kotlin.ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly\npublic inline fun > kotlin.UIntArray.mapIndexedTo(destination: C, transform: (index: kotlin.Int, kotlin.UInt) -> R): C","completion":"@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"8072, 8073, 8074, 8075, 8076, 8077, 8078, 8079, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 8090,","completion":"8091, 8092, 8093, 8094, 8095, 8096, 8097, 8098, 8099, 8100, 8101, 8102, 8103, 8104, 8105, 8106, 8107, 8108, 8109,<|endoftext|>"} {"prompt":"operator fun A.remAssign(y: Int) { x %= y }\n\nfun box(): String {\n val original = A()\n val a = original\n\n a += 1\n if (a !== original) return \"Fail 1: $a !== $original\"\n if (a.x != 1) return \"Fail 2: ${a.x} != 1\"\n\n a -= 2","completion":"if (a !== original) return \"Fail 3: $a !== $original\"\n if (a.x != -1) return \"Fail 4: ${a.x} != -1\"\n\n a *= -10\n if (a !== original) return \"Fail 5: $a !== $original\"\n if (a.x != 10) return \"Fail 6: ${a.x} != 10\"<|endoftext|>"} {"prompt":"resumeIterator(value.exceptionOrNull())\n }\n\n \/\/ Generator implementation\n override suspend fun yield(value: T): Unit = suspendCoroutineUninterceptedOrReturn { c ->\n computedNext = true\n nextValue = value\n nextStep = c\n resumeIterator(null)\n COROUTINE_SUSPENDED\n }\n}","completion":"suspend fun AsyncSequence.toList(): List {\n val out = arrayListOf()\n for (e in this@toList) out += e \/\/ fails at this line\n return out\n}\n\nfun builder(c: suspend () -> Unit) {\n c.startCoroutine(EmptyContinuation)\n}\n\nfun box(): String {<|endoftext|>"} {"prompt":"override fun toString(): String = x.contentToString()\n}\n\nOPTIONAL_JVM_INLINE_ANNOTATION\nvalue class TestInlineCharArrayW(val x: InlineCharArray)\n\nfun box(): String {\n val t1 = TestUIntArrayW(UIntArray(1)).toString()","completion":"if (!t1.startsWith(\"TestUIntArrayW\")) throw AssertionError(t1)\n\n val t2 = TestInlineCharArrayW(InlineCharArray(charArrayOf('a'))).toString()\n if (!t2.startsWith(\"TestInlineCharArrayW\")) throw AssertionError(t2)\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"}\n reporter.reportOn(source, factory, actualTypeForComparison, expectedTypeForComparison, suffix, context)\n }\n}\n\nprivate fun getEnhancedTypesForComparison(\n actualType: ConeKotlinType?,\n expectedType: ConeKotlinType?,\n context: CheckerContext,\n): Pair? {","completion":"if (actualType == null || expectedType == null) return null\n if (actualType is ConeErrorType || expectedType is ConeErrorType) return null\n\n val substitutor = EnhancedForWarningConeSubstitutor(context.session.typeContext)\n\n val enhancedActualType = substitutor.substituteOrNull(actualType)<|endoftext|>"} {"prompt":"package foo.bar\n\n\/*p:foo.bar*\/class A {\n operator fun plus(a: \/*p:foo.bar p:foo.bar.A*\/Int) = \/*p:foo.bar(A)*\/this\n operator fun timesAssign(a: \/*p:foo.bar p:foo.bar.A*\/Any?) {}","completion":"operator fun inc(): \/*p:foo.bar p:foo.bar.A*\/A = \/*p:foo.bar(A)*\/this\n\n operator fun get(i: \/*p:foo.bar p:foo.bar.A*\/Int) = 1<|endoftext|>"} {"prompt":"proto: ProtoBuf.Property.Builder,\n versionRequirementTable: MutableVersionRequirementTable?,\n childSerializer: DescriptorSerializer\n ) {\n descriptorFileId(descriptor)?.let { proto.setExtension(KlibMetadataProtoBuf.propertyFile, it) }","completion":"if (exportKDoc) descriptor.findKDocString()?.let { proto.setExtension(KlibMetadataProtoBuf.propertyKdoc, it) }\n super.serializeProperty(descriptor, proto, versionRequirementTable, childSerializer)\n }\n\n override fun serializeFunction(\n descriptor: FunctionDescriptor,<|endoftext|>"} {"prompt":") : KotlinLibraryLayout, MetadataKotlinLibraryLayout, IrKotlinLibraryLayout {\n override val componentDir: File\n get() = File(unzippedDir, component)\n override val pre_1_4_manifest: File\n get() = File(unzippedDir, KLIB_MANIFEST_FILE_NAME)\n}\n\nclass BaseWriterImpl(","completion":"val libraryLayout: KotlinLibraryLayoutForWriter,\n moduleName: String,\n _versions: KotlinLibraryVersioning,\n builtInsPlatform: BuiltInsPlatform,\n nativeTargets: List = emptyList(),\n val nopack: Boolean = false,\n val shortName: String? = null\n) : BaseWriter {\n\n val klibFile = libraryLayout.libFile.canonicalFile<|endoftext|>"} {"prompt":"* ----------------------------------------------------------\n *\t 0\t S\t C\t\t T\n *\t 1\t C\t -S\t\t-1\/T\n *\t 2\t -S\t -C\t\t T\n *\t 3\t -C\t S\t\t-1\/T\n * ----------------------------------------------------------\n *\n * Special cases:\n * Let trig be any of sin, cos, or tan.","completion":"* trig(+-INF) is NaN, with signals;\n * trig(NaN) is that NaN;\n *\n * Accuracy:\n *\tTRIG(x) returns trig(x) nearly rounded \n *\/\n\npackage kotlin.math.fdlibm\n\ninternal fun cos(x: Double): Double {\n val y: DoubleArray = DoubleArray(2)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.references.FirReference\nimport org.jetbrains.kotlin.incremental.components.LookupTracker\nimport org.jetbrains.kotlin.ir.declarations.IrClass\nimport org.jetbrains.kotlin.ir.declarations.IrDeclaration","completion":"import org.jetbrains.kotlin.ir.declarations.IrExternalPackageFragment\nimport org.jetbrains.kotlin.ir.declarations.IrMemberWithContainerSource\nimport org.jetbrains.kotlin.ir.objcinterop.IrObjCOverridabilityCondition\nimport org.jetbrains.kotlin.ir.symbols.IrSymbol<|endoftext|>"} {"prompt":"val previousJvmCompilation = kotlin.jvm().compilations.maybeCreate(previousSuffix.decapitalizeAsciiOnly())\n val jvmCompilation = kotlin.jvm().compilations.maybeCreate(suffix.decapitalizeAsciiOnly())\n assertEquals(jvm, jvmCompilation.defaultSourceSet)","completion":"jvmCompilation.associateWith(previousJvmCompilation)\n\n val previousJsCompilation = kotlin.js().compilations.maybeCreate(previousSuffix.decapitalizeAsciiOnly())\n val jsCompilation = kotlin.js().compilations.maybeCreate(suffix.decapitalizeAsciiOnly())<|endoftext|>"} {"prompt":"if (value_2.case_7_3() == null) println(value_2)\n}\n\n\/\/ TESTCASE NUMBER: 8\nfun case_8(value_1: String?, value_2: String?) {\n when { value_1.case_8_1() -> println(value_1.length) }","completion":"when { value_2.case_8_2() -> println(value_2) }\n when { !(value_2.case_8_3() == null) -> println(value_2) }\n when { value_2.case_8_3() == null -> println(value_2) }\n}\n\n\/\/ TESTCASE NUMBER: 9\nfun case_9(value_1: Number?) {<|endoftext|>"} {"prompt":"if (funWithReturnsNotNull(value_1 !is String || value_2 !is Number) == null) {\n println(value_1.length)","completion":"println(value_2.toByte())\n }\n if (funWithReturnsNull(value_1 !is String || value_2 !is Number) != null) {<|endoftext|>"} {"prompt":"UiContent {\n updatedContent()\n }\n }\n }\n \"\"\",\n extra = \"\"\"\n import androidx.compose.runtime.*\n\n fun Defer(content: @Composable () -> Unit) { }\n\n fun UiContent(content: @Composable @ComposableTarget(\"UI\") () -> Unit) { }\n \"\"\"\n )\n\n @Test","completion":"fun testAddingComposablesToAList() = verifyGoldenComposeIrTransform(\n \"\"\"\n import androidx.compose.runtime.*\n\n class Scope {\n private val list = IntervalList (@Composable () -> Unit)>()\n fun item(content: @Composable Scope.() -> Unit) {<|endoftext|>"} {"prompt":"* But roots of the native source set hierarchies are only linux and ios. I.e. they don't depend on any other\n * native source set. The code below calculates exactly that:\n *\/\n val nativeSourceSets = sourceSets.filter { sourceSet -> sourceSet.internal.commonizerTarget.await() != null }\n val nativeSourceSetsRoots = nativeSourceSets.filter { sourceSet ->","completion":"val allVisibleSourceSets = sourceSet.dependsOn + getVisibleSourceSetsFromAssociateCompilations(sourceSet)\n allVisibleSourceSets.none { dependency ->\n dependency in nativeSourceSets\n }\n }\n\n nativeSourceSetsRoots.forEach { sourceSet ->\n dependencies.add(\n sourceSet.implementationConfigurationName,<|endoftext|>"} {"prompt":"assertEquals(false, jvmTarget.extras.jvm?.withJavaEnabled)\n assertEquals(\"1.8\", jvmTarget.extras.jvm?.jvmTarget)\n assertNull(jvmTarget.extras.android)\n assertNull(jvmTarget.extras.js)\n assertNull(jvmTarget.extras.native)","completion":"val nativeTarget = metadata.projectTargets.single { it.platformType == \"native\" }\n assertEquals(\"org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithHostTests\", nativeTarget.target)\n val nativeExtras = assertNotNull(nativeTarget.extras.native)<|endoftext|>"} {"prompt":"additionalImports(checkedSafeCallSubject)\n }\n\n impl(checkedSafeCallSubject) {\n additionalImports(expression)\n }\n\n impl(resolvedQualifier) {\n \/\/ Initialize the value to true if only the companion object is present. This makes a standalone class reference expression\n \/\/ correctly resolve to the companion object. For example\n \/\/ ```\n \/\/ class A {","completion":"\/\/ companion object\n \/\/ }\n \/\/\n \/\/ val companionOfA = A \/\/ This standalone class reference `A` here should resolve to the companion object.\n \/\/ ```\n \/\/\n \/\/ If this `FirResolvedQualifier` is a receiver expression of some other qualified access, the value is updated in\n \/\/ `FirCallResolver` according to the resolution result.<|endoftext|>"} {"prompt":"protected open fun doInitialize() { }\n\n protected abstract fun buildIr(): D\n\n val symbol by lazy { buildSymbol() }\n\n private val builtIr by lazy { buildIr() }\n private var initialized: Boolean = false\n\n fun initialize() {\n doInitialize()\n initialized = true\n }\n\n val ir: D\n get() {\n if (!initialized)","completion":"throw Error(\"Access to IR before initialization\")\n return builtIr\n }\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.ir.backend.js.transformers.irToJs\n\nimport org.jetbrains.kotlin.ir.util.inlineFunction\nimport org.jetbrains.kotlin.ir.util.innerInlinedBlockOrThis\nimport org.jetbrains.kotlin.ir.backend.js.ir.JsIrBuilder","completion":"import org.jetbrains.kotlin.ir.backend.js.lower.ES6_DELEGATING_CONSTRUCTOR_CALL_REPLACEMENT\nimport org.jetbrains.kotlin.ir.backend.js.utils.JsGenerationContext\nimport org.jetbrains.kotlin.ir.backend.js.utils.emptyScope<|endoftext|>"} {"prompt":"l4@ { false }\n } while (true)\n}\n\nfun foo5() {\n l2@ l1@ do {\n l4@ { false }\n } while (true)\n}\n\nfun foo6() {\n l2@ l1@ do {\n l4@ l3@{ true }\n } while (true)\n}\n\nfun foo7() {","completion":"l3@ l2@ l1@ fun bar() {}\n}\n\nfun func(y: (Unit) -> Unit) {}\n\nfun foo8() {\n func(l@ {})\n func(l2@ l1@ {})\n func(_@ {})\n}<|endoftext|>"} {"prompt":"arguments = deprecated.arguments.mapValues { (argName, argValue) ->\n if (argName == REPLACE_WITH_ARG) spoilReplaceWithAnnotationInMetadata(argValue.unwrap()).wrap() else argValue\n }\n )\n\n private fun spoilReplaceWithAnnotationInMetadata(replaceWith: KmAnnotation): KmAnnotation =\n replaceWith.copy(","completion":"arguments = replaceWith.arguments.filterKeys { argName -> argName != EXPRESSION_ARG }\n )\n\n private fun KmAnnotationArgument<*>.unwrap(): KmAnnotation = (this as KmAnnotationArgument.AnnotationValue).value<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB)\n}","completion":"fun TestMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {}\n\nclass TestMultipleDifferentlyNamedValueParametersAReverse {\n constructor(arg1: UserKlassA, arg2A: UserKlassB)\n}<|endoftext|>"} {"prompt":"if (!fieldIsStatic) {\n receiver = qualifiedAccess.findIrDispatchReceiver(explicitReceiverExpression)\n }\n }\n }\n return this\n }\n\n private fun FirCallableSymbol<*>.isFunctionFromAny(): Boolean {\n if (this !is FirNamedFunctionSymbol) return false\n return isMethodOfAny\n }","completion":"private fun generateErrorCallExpression(\n startOffset: Int,\n endOffset: Int,\n calleeReference: FirReference,\n type: IrType? = null,\n ): IrErrorCallExpression {\n return IrErrorCallExpressionImpl(\n startOffset, endOffset, type ?: createErrorType(),\n \"Unresolved reference: ${calleeReference.render()}\"\n )<|endoftext|>"} {"prompt":"abstract class KtLightModifierListDescriptorBased>(owner: T) :\n KtLightModifierList(owner) {\n override fun computeAnnotations(): List {\n val annotationsForEntries = owner.givenAnnotations ?: lightAnnotationsForEntries(this)","completion":"\/\/TODO: Hacky way to update wrong parents for annotations\n annotationsForEntries.forEach {\n @Suppress(\"DEPRECATION_ERROR\")\n it.parent = this\n }\n val modifierListOwner = parent\n if (modifierListOwner is KtLightClassForSourceDeclaration && modifierListOwner.isAnnotationType) {<|endoftext|>"} {"prompt":"expectedStderr = \"error: unrecognized script type: noInline.myscript; Specify path to the script file as the first argument\\n\"\n )\n runProcess(\n \"kotlin\", \"-Xallow-any-scripts-in-source-roots\", \"-howtorun\", \".kts\", \"$testDataDirectory\/noInline.myscript\",","completion":"expectedExitCode = 1, expectedStderr = \"\"\"compiler\/testData\/launcher\/noInline.myscript:1:7: error: unresolved reference 'CompilerOptions'.\n@file:CompilerOptions(\"-Xno-inline\")\n ^\n\"\"\"\n )\n runProcess(\n \"kotlin\", \"-howtorun\", \".main.kts\", \"$testDataDirectory\/noInline.myscript\",<|endoftext|>"} {"prompt":"package testPackCase3\nimport libPackage.plusAssign\nimport libPackage.invoke\nimport libPackage.*\nclass Case() {\n\n class E(val plusAssign: Inv? = null) {\n \/*operator*\/ fun plusAssign(value: Int) {}\n }\n\n class Inv() {\n \/*operator*\/ fun invoke(value: Int) {}\n }\n\n fun foo(e: E) {","completion":"operator fun E.plusAssign(value: Int) {}\n\n run {\n e += 1\n }<|endoftext|>"} {"prompt":"GC.collect()\n \/\/ This cleans up all the references from the worker thread and destroys C2, but C1 is still alive.\n worker.execute(TransferMode.SAFE, {}) { GC.collect() }.result\n \/\/ And this finally destroys C1\n GC.collect()\n\n assertNull(ref1Weak.value)\n assertNull(ref2Weak.value)","completion":"worker.requestTermination().result\n}<|endoftext|>"} {"prompt":"x.x.funNullableAny()\n }\n if (x.y != null) {\n x.y\n x.y.equals(null)\n x.y.propT\n x.y.propAny\n x.y.propNullableT\n x.y.propNullableAny\n x.y.funT()\n x.y.funAny()","completion":"x.y.funNullableT()\n x.y.funNullableAny()\n }\n if (x.z != null) {\n x.z\n x.z.equals(null)\n x.z.propT\n x.z.propAny\n x.z.propNullableT\n x.z.propNullableAny\n x.z.funT()<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !LANGUAGE: +ContextReceivers\n\nclass Param\nclass C {\n val c = 42\n}\nclass R {\n val r = 42\n}\n\ncontext(C)\nfun R.f1(g: context(C) R.(Param) -> Unit) {\n g(this@C, this@R, Param())\n}\n\ncontext(C)","completion":"fun f2(g: context(C) (Param) -> Unit) {\n g(this@C, Param())\n}\n\ncontext(C)\nfun R.f3(g: context(C) R.() -> Unit) {\n g(this@C, this@R)\n}\n\ncontext(C)\nfun f4(g: context(C) () -> Unit) {\n g(this@C)<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1293\npackage foo\n\ninterface Base {\n abstract fun foo(x: String): String\n}\n\nclass BaseImpl(val s: String) : Base {\n override fun foo(x: String): String = \"Base: ${s}:${x}\"\n}\n\nfun newBase(s: String): Base = BaseImpl(s)","completion":"class Derived() : Base by newBase(\"test\")\n\n\nfun box(): String {\n assertEquals(\"Base: test:!!\", Derived().foo(\"!!\"), \"delegation by function expression\")\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"descriptor?.extensionReceiverParameter?.toKtReceiverParameterSymbol(analysisContext)\n }\n\n override val contextReceivers: List\n get() = withValidityAssertion { descriptor?.createContextReceivers(analysisContext) ?: emptyList() }\n\n\n override val isExtension: Boolean","completion":"get() = withValidityAssertion { psi.isExtensionDeclaration() }\n\n override fun createPointer(): KtSymbolPointer = withValidityAssertion {\n KtPsiBasedSymbolPointer.createForSymbolFromSource(this) ?: KtFe10NeverRestoringSymbolPointer()\n }<|endoftext|>"} {"prompt":"\/\/ IGNORE_BACKEND: JS\n\n\/\/ Test for KT-36188 bug compatibility between non-IR and IR backends\n\ninterface A {\n fun foo(a: String = \"OK\"): String\n}\n\ninterface A2 : A\n\ninterface B {\n fun foo(a: String = \"Fail\"): String\n}\n\ninterface C : A2, B\n\nclass Impl : C {","completion":"override fun foo(a: String) = a\n}\n\nfun box(): String = Impl().foo()<|endoftext|>"} {"prompt":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.LateinitNullableBackingField\n\ninternal class BackingFieldForDelegatedPropertyImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.BackingFieldForDelegatedProperty\n\ninternal class PropertyMustHaveGetterImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"\"k2-serialization-plugin-in-common-sourceset\",\n gradleVersion,\n ) {\n val taskToExecute = \":compileKotlinJs\"\n build(taskToExecute) {\n assertTasksExecuted(taskToExecute)\n }\n }\n }\n\n @GradleTest","completion":"@DisplayName(\"HMPP compilation without JS target. KT-57376, KT-57377, KT-57635, KT-57654\")\n fun testHmppCompilationWithoutJsTarget(gradleVersion: GradleVersion) {\n with(project(\"k2-mpp-without-js\", gradleVersion)) {\n val taskToExecute = \":compileIntermediateMainKotlinMetadata\"<|endoftext|>"} {"prompt":"\/\/ Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit!\n\/\/ WITH_STDLIB\nimport kotlin.test.*\n\nfun box(): String {\n val intList = mutableListOf()\n val intProgression = 1..4\n for (i in intProgression step 1 step 1) {\n intList += i\n }","completion":"assertEquals(listOf(1, 2, 3, 4), intList)\n\n val longList = mutableListOf()\n val longProgression = 1L..4L\n for (i in longProgression step 1L step 1L) {\n longList += i\n }\n assertEquals(listOf(1L, 2L, 3L, 4L), longList)<|endoftext|>"} {"prompt":"testServices.assertions.assertEqualsToTestDataFileSibling(\n actualText,\n extension = \".${modificationEventKind.name.lowercase()}.txt\",\n\n \/\/ Support differing result data. Using `testPrefix` takes away the ability for different kinds of tests (such as IDE vs.","completion":"\/\/ Standalone modes) to have different test results (since `testPrefix` normally supports this functionality), but (1) we are\n \/\/ currently only testing the IDE mode and (2) the test results between different modes should not differ for session\n \/\/ invalidation in the first place.\n testPrefix = resultFileSuffix,\n )\n }\n\n private fun checkSessionValidityBeforeModification(<|endoftext|>"} {"prompt":"* Shifts this value right by the [bitCount] number of bits, filling the leftmost bits with copies of the sign bit.\n *\n * Note that only the five lowest-order bits of the [bitCount] are used as the shift distance.\n * The shift distance actually used is therefore always in the range `0..31`.\n *\/\n @kotlin.internal.IntrinsicConstEvaluation","completion":"@TypedIntrinsic(IntrinsicType.SHR)\n public external infix fun shr(bitCount: Int): Int\n\n \/**\n * Shifts this value right by the [bitCount] number of bits, filling the leftmost bits with zeros.\n *\n * Note that only the five lowest-order bits of the [bitCount] are used as the shift distance.<|endoftext|>"} {"prompt":"package org.jetbrains.kotlinx.serialization\n\nimport org.jetbrains.kotlin.cli.jvm.config.addJvmClasspathRoots\nimport org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar\nimport org.jetbrains.kotlin.config.CompilerConfiguration\nimport org.jetbrains.kotlin.config.JvmTarget","completion":"import org.jetbrains.kotlin.test.TargetBackend\nimport org.jetbrains.kotlin.test.TestJdkKind\nimport org.jetbrains.kotlin.test.builders.TestConfigurationBuilder\nimport org.jetbrains.kotlin.test.model.TestModule\nimport org.jetbrains.kotlin.test.runners.codegen.configureModernJavaTest<|endoftext|>"} {"prompt":"* @property className FQ name of the referenced array element type.\n * @property arrayDimensionCount Referenced array dimension.\n *\/\n public data class ArrayKClassValue(val className: ClassName, val arrayDimensionCount: Int) : KmAnnotationArgument() {\n init {","completion":"require(arrayDimensionCount > 0) { \"ArrayKClassValue must have at least one dimension. For regular X::class argument, use KClassValue.\" }\n }\n\n private val stringRepresentation = buildString {\n append(\"ArrayKClassValue(\")\n repeat(arrayDimensionCount) { append(\"kotlin\/Array<\") }\n append(className)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.declarations.utils.modality\nimport org.jetbrains.kotlin.fir.extensions.FirDeclarationGenerationExtension\nimport org.jetbrains.kotlin.fir.extensions.FirDeclarationPredicateRegistrar\nimport org.jetbrains.kotlin.fir.extensions.MemberGenerationContext","completion":"import org.jetbrains.kotlin.fir.extensions.predicate.LookupPredicate\nimport org.jetbrains.kotlin.fir.extensions.predicateBasedProvider\nimport org.jetbrains.kotlin.fir.plugin.SimpleFunctionBuildingContext\nimport org.jetbrains.kotlin.fir.plugin.createConeType<|endoftext|>"} {"prompt":"public inline fun kotlin.Array.flatMapIndexed(transform: (index: kotlin.Int, T) -> kotlin.collections.Iterable): kotlin.collections.List\n\n@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.OverloadResolutionByLambdaReturnType","completion":"@kotlin.jvm.JvmName(name = \"flatMapIndexedSequence\")\n@kotlin.internal.InlineOnly\npublic inline fun kotlin.Array.flatMapIndexed(transform: (index: kotlin.Int, T) -> kotlin.sequences.Sequence): kotlin.collections.List<|endoftext|>"} {"prompt":"gradleVersion = gradleVersion,\n addHeapDumpOptions = addHeapDumpOptions,\n enableKotlinDaemonMemoryLimitInMb = if (shouldConfigureStrategyViaGradleProperty) null else 1024,\n enableGradleDaemonMemoryLimitInMb = null, \/\/ We need to make an assertion based on default Gradle Daemon JDK configuration\n buildOptions = defaultBuildOptions.copy(","completion":"useDaemonFallbackStrategy = testFallbackStrategy,\n compilerExecutionStrategy = if (shouldConfigureStrategyViaGradleProperty) {\n executionStrategy\n } else {\n null\n },\n logLevel = if (!testFallbackStrategy && executionStrategy == KotlinCompilerExecutionStrategy.DAEMON) {<|endoftext|>"} {"prompt":"internal val LN2: Double = ln(2.0)\n\n @JvmField\n internal val epsilon: Double = nativeMath.ulp(1.0)\n @JvmField\n internal val taylor_2_bound = nativeMath.sqrt(epsilon)\n @JvmField\n internal val taylor_n_bound = nativeMath.sqrt(taylor_2_bound)","completion":"@JvmField\n internal val upper_taylor_2_bound = 1 \/ taylor_2_bound\n @JvmField\n internal val upper_taylor_n_bound = 1 \/ taylor_n_bound\n\n}\n\n\/\/ region ================ Double Math ========================================\n\n\/** Computes the sine of the angle [x] given in radians.\n *\n * Special cases:<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.js.inline.ImportIntoFragmentInliningScope\nimport org.jetbrains.kotlin.js.translate.declaration.transformCoroutineMetadataToSpecialFunctions\nimport org.jetbrains.kotlin.js.translate.expression.InlineMetadata\nimport org.jetbrains.kotlin.js.translate.utils.JsAstUtils","completion":"class CoroutineTransformer : JsVisitorWithContextImpl() {\n\n val functionName = mutableMapOf()\n\n override fun visit(x: JsExpressionStatement, ctx: JsContext<*>): Boolean {\n val expression = x.expression\n val assignment = JsAstUtils.decomposeAssignment(expression)\n if (assignment != null) {<|endoftext|>"} {"prompt":"it, session, scopeSession\n )\n\n superClassesStaticsAndCompanionReceivers += superCompanionReceiver.asTowerDataElement()\n allImplicitCompanionValues += superCompanionReceiver\n }\n }\n\n val thisReceiver = ImplicitDispatchReceiverValue(owner.symbol, defaultType, session, scopeSession)","completion":"val contextReceivers = (owner as? FirRegularClass)?.contextReceivers?.mapIndexed { index, receiver ->\n ContextReceiverValueForClass(\n owner.symbol, receiver.typeRef.coneType, receiver.labelName, session, scopeSession,\n contextReceiverNumber = index,\n )\n }.orEmpty()\n\n return TowerElementsForClass(\n thisReceiver,<|endoftext|>"} {"prompt":"val type = arg.getType()\n TypeAndDefaultQualifiers(type, type.extractAndMergeDefaultQualifiers(it.defaultQualifiers), parameter)\n }\n }\n }\n }\n\n private class TypeAndDefaultQualifiers(\n val type: KotlinTypeMarker?,\n val defaultQualifiers: JavaTypeQualifiersByElementType?,","completion":"val typeParameterForArgument: TypeParameterMarker?\n )\n}\n\ntypealias IndexedJavaTypeQualifiers = (Int) -> JavaTypeQualifiers<|endoftext|>"} {"prompt":"assertEquals(200, atomicIntArr.getAndSet(2, 2000), \"getAndSet: FAIL 2\")\n assertEquals(2000, atomicIntArr[2], \"getAndSet: FAIL 3\")\n assertFailsWith {\n val res = atomicIntArr.getAndSet(22, 33535)\n }.let { ex ->","completion":"assertEquals(\"The index 22 is out of the bounds of the AtomicIntArray with size 10.\", ex.message)\n }\n assertFailsWith {\n val res = atomicIntArr.getAndSet(-1, 33535)\n }.let { ex ->\n assertEquals(\"The index -1 is out of the bounds of the AtomicIntArray with size 10.\", ex.message)<|endoftext|>"} {"prompt":"P10, P11) -> R): CPointer R>> =","completion":"staticCFunctionImpl(\n function,\n t(), t(), t(), t(), t(), t(), t(), t(), t(), t(), t(), t()\n )<|endoftext|>"} {"prompt":"\/\/ !OPT_IN: kotlin.contracts.ExperimentalContracts\n\n\/*\n * KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (NEGATIVE)\n *\n * SECTIONS: contracts, declarations, contractBuilder, effects, returns\n * NUMBER: 5\n * DESCRIPTION: Contract on the extension function with Boolean upper bound (Boolean or Nothing) or smartcast to Boolean.\n * DISCUSSION\n *\/","completion":"import kotlin.contracts.*\n\n\/\/ TESTCASE NUMBER: 1\nfun Boolean>T.case_1(): Boolean? {\n contract { returns(null) implies (!this@case_1) }\n return if (!this) null else true\n}<|endoftext|>"} {"prompt":"fun case_30(a: Int?, b: Nothing?, c: Int = if (a === b || a == null) 0 else a) {\n a\n b","completion":"}<|endoftext|>"} {"prompt":"expectMinMax(\"a\", \"a\", listOf(\"a\"))\n expectMinMax(\"a\", \"bcd\", listOf(\"a\", \"bcd\"))\n expectMinMax(\"a\", \"e\", listOf(\"a\", \"bcd\", \"e\"))\n expectMinMax(1, Int.MAX_VALUE, listOf(1, 2, Int.MAX_VALUE))","completion":"expectMinMax(1, Long.MAX_VALUE, listOf(1, 2, Long.MAX_VALUE))\n expectMinMax(1U, UInt.MAX_VALUE, listOf(1U, 2U, UInt.MAX_VALUE))\n expectMinMax('a', Char.MAX_VALUE, listOf('a', 'b', Char.MAX_VALUE))\n \n }\n\n @Test<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.internal\n\nimport org.jetbrains.kotlin.gradle.dsl.*\nimport org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptionsDefault\nimport org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptionsHelper","completion":"import org.jetbrains.kotlin.gradle.plugin.*\nimport org.jetbrains.kotlin.gradle.plugin.KotlinPluginLifecycle\nimport org.jetbrains.kotlin.gradle.plugin.await\nimport org.jetbrains.kotlin.gradle.plugin.launch<|endoftext|>"} {"prompt":"override val classId: ClassId?\n get() = getAnnotationConeType()?.lookupTag?.classId\n\n override val isRetentionSource: Boolean\n get() = getAnnotationClass()?.getRetention(actualSession) == AnnotationRetention.SOURCE\n\n override val isOptIn: Boolean","completion":"get() = getAnnotationClass()?.hasAnnotation(OptInNames.REQUIRES_OPT_IN_CLASS_ID, actualSession) ?: false\n\n private fun getAnnotationClass(): FirRegularClassSymbol? =\n getAnnotationConeType()?.toRegularClassSymbol(actualSession)\n\n private fun getAnnotationConeType(): ConeClassLikeType? {<|endoftext|>"} {"prompt":"val x = 1\n}\n\nfun test_8() {\n do {\n\n } while (1 == 1)\n val x = 1\n}\n\nfun test_9() {\n do {","completion":"val x = 1\n } while (false)\n val y = 2\n}\n\nfun test_10() {\n do {\n val x = 1\n } while (false && true)\n val y = 2\n}<|endoftext|>"} {"prompt":"sourceElement.startOffsetSkippingComments, sourceElement.endOffset, IrDeclarationOrigin.DEFINED,\n variableDescriptor,\n variableDescriptor.type.toIrType(),\n property.initializer?.let { generateExpression(it) }\n )\n }\n\n private fun generateLocalDelegatedProperty(\n ktProperty: KtProperty,","completion":"ktDelegate: KtPropertyDelegate,\n variableDescriptor: VariableDescriptorWithAccessors,\n scopeOwnerSymbol: IrSymbol\n ): IrStatement =\n DelegatedPropertyGenerator(context)\n .generateLocalDelegatedProperty(ktProperty, ktDelegate, variableDescriptor, scopeOwnerSymbol)<|endoftext|>"} {"prompt":"): SMAPAndMethodNode {\n getMethodNode(owner, bytes, method, isSuspend)?.let { return it }\n if (isMangled) {\n \/\/ Compatibility with old inline class ABI versions.\n val dashIndex = method.name.indexOf('-')","completion":"val nameWithoutManglingSuffix = if (dashIndex > 0) method.name.substring(0, dashIndex) else method.name\n if (nameWithoutManglingSuffix != method.name) {\n getMethodNode(owner, bytes, Method(nameWithoutManglingSuffix, method.descriptor), isSuspend)?.let { return it }\n }<|endoftext|>"} {"prompt":"addRangesGenerators(jsGeneratedDir, KotlinTarget.JS)\n oneToOneMappingsGenerators.add(MappingsGenerator.forTitlecase(jsGeneratedDir.resolve(\"_TitlecaseMappings.kt\")))\n\n val nativeGeneratedDir = baseDir.resolve(\"kotlin-native\/runtime\/src\/main\/kotlin\/generated\/\")","completion":"addRangesGenerators(nativeGeneratedDir, KotlinTarget.Native)\n addOneToOneMappingsGenerators(nativeGeneratedDir, KotlinTarget.Native)\n addOneToManyMappingsGenerators(nativeGeneratedDir, KotlinTarget.Native)\n stringUppercaseGenerators.add(<|endoftext|>"} {"prompt":"fun foo()\n}\n\n\/\/ MODULE: jvm()()(common)\n\/\/ FILE: main.kt\nactual interface I1 {\n fun bar()\n}\n\nactual fun interface F1 : I1 {\n fun baz()\n}\n\nactual interface I2 : I1 {}","completion":"actual fun interface F2 : I2 {\n actual fun foo()\n}<|endoftext|>"} {"prompt":"BindingContextUtils.addOwnDataTo(trace, null, commitDiagnostics, map, mutableDiagnostics)\n }\n\n @TestOnly\n override fun getSliceContents(slice: ReadOnlySlice): ImmutableMap {","completion":"return ImmutableMap.copyOf(parentContext.getSliceContents(slice) + map.getSliceContents(slice))\n }\n\n override fun getProject(): Project? {\n return this@DelegatingBindingTrace.getProject()\n }\n }\n\n private val bindingContext = MyBindingContext()<|endoftext|>"} {"prompt":"if (containingClass != null) {\n val containingLightClass = containingClass.toLightClass()\n if (containingLightClass != null) {\n psiClass = containingLightClass\n }\n }\n } else {\n \/\/ Decompiled version of [KtLightClass] may not have [kotlinOrigin]\n val containingDeclaration = declaration.containingClassOrObject","completion":"if (containingDeclaration is KtObjectDeclaration &&\n containingDeclaration.isCompanion()\n ) {\n psiClass.containingClass?.let { containingClass ->\n psiClass = containingClass\n fieldFinder = { psiField ->\n psiField.name == declaration.name\n }\n }\n }\n }\n }<|endoftext|>"} {"prompt":"JsUnaryOperator.DELETE -> listOf(expression)\n }\n }\n\n is JsBinaryOperation -> {\n when (expression.operator) {\n JsBinaryOperator.BIT_AND,\n JsBinaryOperator.BIT_OR,\n JsBinaryOperator.BIT_XOR,\n JsBinaryOperator.COMMA,","completion":"JsBinaryOperator.ADD,\n JsBinaryOperator.SUB,\n JsBinaryOperator.MUL,\n JsBinaryOperator.DIV,\n JsBinaryOperator.MOD,\n JsBinaryOperator.EQ,\n JsBinaryOperator.NEQ,\n JsBinaryOperator.REF_EQ,\n JsBinaryOperator.REF_NEQ,<|endoftext|>"} {"prompt":"class QuxBar>>(var f: T2)\n\nclass Quux {\n fun test(): Unit {","completion":"val x: QuxBazBarin T>>> = null!!\n x.f = null!!<|endoftext|>"} {"prompt":"if (components.root != otherComponents.root)\n return false\n return if (components.size < otherComponents.size) false\n else components.segments.subList(0, otherComponents.size).equals(otherComponents.segments)\n}\n\n\/**\n * Determines whether this file belongs to the same root as [other]","completion":"* and starts with all components of [other] in the same order.\n * So if [other] has N components, first N components of `this` must be the same as in [other].\n *\n * @return `true` if this path starts with [other] path, `false` otherwise.\n *\/\npublic fun File.startsWith(other: String): Boolean = startsWith(File(other))\n\n\/**<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.diagnostics.DiagnosticReporter\nimport org.jetbrains.kotlin.diagnostics.KtDiagnostic\nimport org.jetbrains.kotlin.diagnostics.KtDiagnosticReporterWithContext\nimport org.jetbrains.kotlin.ir.declarations.IrAnnotationContainer","completion":"import org.jetbrains.kotlin.ir.declarations.IrDeclaration\nimport org.jetbrains.kotlin.ir.declarations.IrFile\nimport org.jetbrains.kotlin.ir.declarations.path\nimport org.jetbrains.kotlin.ir.expressions.*\nimport org.jetbrains.kotlin.ir.types.classOrNull<|endoftext|>"} {"prompt":"var isInvokeCalled = false\n infix operator fun invoke(i: Int) { isInvokeCalled = true } \/\/(1)\n}\n\nclass B() {\n val memberValC\n get() = c\n}\nval c = C()\n\nval B.extensionValC: C\n get() = c\n\n\nfun box(): String{\n val b = B()","completion":"b memberValC 3 \/\/resolved to (1)\n if (b.memberValC.isInvokeCalled) {\n c.isInvokeCalled = false\n b extensionValC 4 \/\/resolved to (1)\n if (b.extensionValC.isInvokeCalled)\n return \"OK\"\n }\n return \"NOK\"\n}<|endoftext|>"} {"prompt":"if (this.w != null) w","completion":"if (w != null || this.w != null) w.equals(null)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol\nimport org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol\nimport org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol","completion":"import org.jetbrains.kotlin.fir.symbols.lazyDeclarationResolver\nimport org.jetbrains.kotlin.fir.types.*\nimport org.jetbrains.kotlin.fir.util.ListMultimap\nimport org.jetbrains.kotlin.fir.util.Multimap<|endoftext|>"} {"prompt":"if (!ownersEquivalent(a, b, equivalentCallables, allowCopiesFromTheSameDeclaration)) return false\n\n return a.index == b.index \/\/ We ignore type parameter names\n }\n\n @Suppress(\"NO_TAIL_CALLS_FOUND\", \"NON_TAIL_RECURSIVE_CALL\") \/\/ K2 warning suppression, TODO: KT-62472","completion":"private tailrec fun CallableDescriptor.singleSource(): SourceElement? {\n if (this !is CallableMemberDescriptor || kind != CallableMemberDescriptor.Kind.FAKE_OVERRIDE) return source\n\n return overriddenDescriptors.singleOrNull()?.singleSource()\n }\n\n fun areCallableDescriptorsEquivalent(\n a: CallableDescriptor,<|endoftext|>"} {"prompt":"var bundleId: String? = null\n\n @Argument(\n value = \"-Xcache-directory\",\n valueDescription = \"\",\n description = \"Path to the directory containing caches.\",\n delimiter = Argument.Delimiters.none\n )\n var cacheDirectories: Array? = null\n\n @Argument(\n value = CACHED_LIBRARY,","completion":"valueDescription = \",\",\n description = \"Paths to a library and its cache, separated by a comma.\",\n delimiter = Argument.Delimiters.none\n )\n var cachedLibraries: Array? = null\n\n @Argument(\n value = \"-Xauto-cache-from\",\n valueDescription = \"\",<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid\n\nabstract class AbstractValueRemapper : IrElementTransformerVoid() {\n\n protected abstract fun remapValue(oldValue: IrValueSymbol): IrValueSymbol?\n\n override fun visitGetValue(expression: IrGetValue): IrExpression {","completion":"val newValue = remapValue(expression.symbol) ?: return expression\n return expression.run { IrGetValueImpl(startOffset, endOffset, newValue, origin) }\n }\n\n override fun visitSetValue(expression: IrSetValue): IrExpression {\n expression.transformChildrenVoid()\n val newValue = remapValue(expression.symbol) ?: return expression<|endoftext|>"} {"prompt":"is ExportedType.TypeParameter -> if (constraint == null) {\n name\n } else {\n \"$name extends ${constraint.toTypeScript(indent, isInCommentContext)}\"\n }\n }\n\n private fun ExportedClass.couldBeProperty(): Boolean {\n return this is ExportedObject && nestedClasses.all {","completion":"it.couldBeProperty() && it.ir.visibility != DescriptorVisibilities.PROTECTED\n }\n }\n\n private fun tsIgnore(reason: String): String {\n return \"\/* @ts-ignore: $reason *\/\"\n }\n\n private fun tsDeprecated(message: String): String {\n return \"\/** @deprecated $message *\/\"\n }\n}<|endoftext|>"} {"prompt":"fun <@Anno(\"type param $prop\") F : @Anno(\"bound $prop\") List<@Anno(\"nested bound $prop\") List<@Anno(\"nested nested bound $prop\") String>>> @receiver:Anno(\"receiver annotation: $prop\") @Anno(\"receiver type $prop\") Collection<@Anno(\"nested receiver type $prop\") List<@Anno(\"nested nested receiver type","completion":"$prop\")String>>.implicitType(@Anno(\"parameter annotation $prop\") param: @Anno(\"parameter type $prop\") ListIterator<@Anno(\"nested parameter type $prop\") List<@Anno(\"nested nested parameter type $prop\")String>>) = explicitType()<|endoftext|>"} {"prompt":"expect annotation class CommonAnnotationForAnnotationClassesOnly(text: String) {\n val text: String\n}\n\nexpect annotation class CommonAnnotation(text: String) {\n val text: String\n}\n\nexpect var propertyWithoutBackingField: Double\nexpect val propertyWithBackingField: Double\nexpect val propertyWithDelegateField: Int","completion":"expect val T.propertyWithExtensionReceiver: Int\n\nexpect fun function1(text: String): String\nexpect fun Q.function2(): Q\n\nexpect class AnnotatedClass(value: String) {\n val value: String\n}\ntypealias AnnotatedLiftedUpTypeAlias = AnnotatedClass<|endoftext|>"} {"prompt":"open class Base() {\n \/\/ error-scope\n val foo: Int = 42\n }\n\n \/\/ error-scope","completion":"val data: Data = Data()\n\n companion object : DerivedAbstract()\n }\n}\n\nobject WithPropertyInBaseDifferentOrder {<|endoftext|>"} {"prompt":"val booleanArray get() = irBuiltIns.booleanArray\n\n val byteArrayType get() = byteArray.owner.defaultType\n val charArrayType get() = charArray.owner.defaultType\n val shortArrayType get() = shortArray.owner.defaultType\n val intArrayType get() = intArray.owner.defaultType\n val longArrayType get() = longArray.owner.defaultType","completion":"val floatArrayType get() = floatArray.owner.defaultType\n val doubleArrayType get() = doubleArray.owner.defaultType\n val booleanArrayType get() = booleanArray.owner.defaultType\n\n val primitiveTypesToPrimitiveArrays get() = irBuiltIns.primitiveTypesToPrimitiveArrays\n val primitiveArraysToPrimitiveTypes get() = irBuiltIns.primitiveArraysToPrimitiveTypes<|endoftext|>"} {"prompt":"fun ASTNode.leaves(forward: Boolean = true): Sequence {\n if (forward) {\n return generateSequence(TreeUtil.nextLeaf(this)) { TreeUtil.nextLeaf(it) }\n } else {\n return generateSequence(TreeUtil.prevLeaf(this)) { TreeUtil.prevLeaf(it) }\n }\n}","completion":"fun ASTNode.closestPsiElement(): PsiElement? {\n var node = this\n while (node.psi == null) {\n node = node.treeParent\n }\n return node.psi\n}\n\nfun LazyParseablePsiElement.getContainingKtFile(): KtFile {\n\n val file = this.containingFile<|endoftext|>"} {"prompt":"createCirTreeRootFromSourceCode(\n \"\"\"\n class E\n typealias D = E\n typealias C = D\n \"\"\".trimIndent()\n )\n )\n\n assertEquals(setOf(\"C\"), resolver.resolveAssociatedIds(\"A\"))\n assertEquals(setOf(\"C\"), resolver.resolveAssociatedIds(\"B\"))","completion":"assertEquals(setOf(\"C\"), resolver.resolveAssociatedIds(\"C\"))\n assertEquals(setOf(\"C\"), resolver.resolveAssociatedIds(\"D\"))\n assertEquals(setOf(\"C\"), resolver.resolveAssociatedIds(\"E\"))\n }\n\n \/*\n Platform A: A -> B -> C\n Platform B: A -> X -> B -> C<|endoftext|>"} {"prompt":"functionContext.defineLoopLevel(loop, LoopLabelType.BREAK, wasmBreakBlock)\n functionContext.defineLoopLevel(loop, LoopLabelType.CONTINUE, wasmContinueBlock)\n loop.body?.let { generateAsStatement(it) }\n }\n generateExpression(loop.condition)\n body.buildBrIf(wasmLoop, loop.condition.getSourceLocation())\n }","completion":"}\n\n body.buildGetUnit()\n }\n\n override fun visitWhileLoop(loop: IrWhileLoop) {\n \/\/ (loop $CONTINUE_LABEL\n \/\/ (block $BREAK_LABEL\n \/\/ (br_if $BREAK_LABEL (i32.eqz ))\n \/\/ <|endoftext|>"} {"prompt":"while (j < length) {\n codePoint = codePointAt(j)\n if (codePoint.isCaseIgnorable()) {\n j += codePoint.charCount()\n } else {\n break\n }\n }\n if (j >= length || !codePoint.isCased()) {\n return true\n }\n }\n }\n return false\n}","completion":"internal fun String.lowercaseImpl(): String {\n var unchangedIndex = 0\n while (unchangedIndex < this.length) {\n val codePoint = codePointAt(unchangedIndex)\n if (codePoint.lowercaseCodePoint() != codePoint) { \/\/ '\\u0130' and '\\u03A3' have lowercase corresponding mapping in UnicodeData.txt, no need to check them separately\n break\n }<|endoftext|>"} {"prompt":"fun Test5(x: Int) = x\n\n fun local() {\n fun test1() {}\n fun test1() {}\n\n fun Any.test2() {}\n fun test2(x: Any) = x","completion":"fun Any.test3() {}\n fun Any.test3() {}\n\n fun test4(): Int = 0\n fun test4(): String = \"\"<|endoftext|>"} {"prompt":"\/\/ TESTED_OBJECTS: Test, prop\n\/\/ ABSENT: TRUE\n\n\/\/ TESTED_OBJECT_KIND: property\n\/\/ TESTED_OBJECTS: Test$Companion, prop\n\/\/ ABSENT: TRUE\n\n\/\/ TESTED_OBJECT_KIND: property\n\/\/ TESTED_OBJECTS: Test$Companion, prop$delegate\n\/\/ ABSENT: TRUE","completion":"\/\/ TESTED_OBJECT_KIND: property\n\/\/ TESTED_OBJECTS: Test, prop$delegate\n\/\/ FLAGS: ACC_STATIC, ACC_FINAL, ACC_PRIVATE<|endoftext|>"} {"prompt":"assertEquals(value.toUByte(), value.convert())\n assertEquals(value.toShort(), value.convert())\n assertEquals(value.toUShort(), value.convert())\n assertEquals(value.toInt(), value.convert())","completion":"assertEquals(value.toUInt(), value.convert())\n assertEquals(value.toLong(), value.convert())\n assertEquals(value.toULong(), value.convert())\n\n assertEquals(value.toByte(), value.narrow())\n assertEquals(value.toShort(), value.narrow())<|endoftext|>"} {"prompt":"override fun onUnboxing(insn: AbstractInsnNode, value: BoxedBasicValue, resultType: Type) {\n value.descriptor.run {\n val unboxedType = getUnboxTypeOrOtherwiseMethodReturnType(insn as? MethodInsnNode)\n if (unboxedType == resultType)\n addAssociatedInsn(value, insn)\n else","completion":"addUnboxingWithCastTo(insn, resultType)\n }\n }\n\n override fun onAreEqual(insn: AbstractInsnNode, value1: BoxedBasicValue, value2: BoxedBasicValue) {\n val descriptor1 = value1.descriptor\n val descriptor2 = value2.descriptor\n candidatesBoxedValues.merge(descriptor1, descriptor2)<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\n\/*\n * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)\n *\n * SPEC VERSION: 0.1-268\n * MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 2 -> sentence 3","completion":"* PRIMARY LINKS: overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 3\n * overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 4 -> sentence 1<|endoftext|>"} {"prompt":"}\n\n if (\n outputPath == null\n )\n return\n\n \/\/language=JavaScript 1.8\n appendLine(\n \"\"\"\n config.output.path = require('path').resolve(__dirname, ${outputPathInput!!.jsQuoted()})\n \"\"\".trimIndent()\n )\n }\n\n private fun Appendable.appendErrorPlugin() {","completion":"\/\/language=ES6\n appendLine(\n \"\"\"\n \/\/ noinspection JSUnnecessarySemicolon\n ;(function(config) {\n const tcErrorPlugin = require('kotlin-test-js-runner\/tc-log-error-webpack');\n config.plugins.push(new tcErrorPlugin())\n config.stats = config.stats || {}<|endoftext|>"} {"prompt":"if (f != null) f.propT\n\n if (f != null) f.propAny","completion":"if (f != null) f.propNullableT\n\n if (f != null) f.propNullableAny<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.extensions\n\nimport org.jetbrains.kotlin.descriptors.ClassDescriptor\nimport org.jetbrains.kotlin.descriptors.DeclarationDescriptor\nimport org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor","completion":"import org.jetbrains.kotlin.psi.KtModifierListOwner\nimport org.jetbrains.kotlin.resolve.descriptorUtil.annotationClass\nimport org.jetbrains.kotlin.types.TypeUtils\n\ninterface AnnotationBasedExtension {\n\n fun getAnnotationFqNames(modifierListOwner: KtModifierListOwner?): List<|endoftext|>"} {"prompt":"return computeJvmDescriptor(withReturnType = false) ==\n builtinWithErasedParameters.original.computeJvmDescriptor(withReturnType = false)\n && !doesOverride(builtinWithErasedParameters)\n }\n\n private fun resolveConstructor(constructor: JavaConstructor): JavaClassConstructorDescriptor {\n val classDescriptor = ownerDescriptor","completion":"val constructorDescriptor = JavaClassConstructorDescriptor.createJavaConstructor(\n classDescriptor,\n c.resolveAnnotations(constructor), \/* isPrimary = *\/\n false,\n c.components.sourceElementFactory.source(constructor)\n )\n\n\n val c =<|endoftext|>"} {"prompt":"assertEquals(\"aObjC\", createObjCExportNamer().getParameterName(parameterA))\n }\n\n @Test\n fun `test - class mangling`() {\n val module = createModuleDescriptor {\n source(\n \"\"\"\n package a \n class Foo\n \"\"\".trimIndent()\n )\n source(\n \"\"\"\n package b\n class Foo","completion":"\"\"\".trimIndent()\n )\n }\n\n val aFoo = module.findClassAcrossModuleDependencies(ClassId.fromString(\"a\/Foo\"))!!\n val bFoo = module.findClassAcrossModuleDependencies(ClassId.fromString(\"b\/Foo\"))!!\n\n val namer = createObjCExportNamer()<|endoftext|>"} {"prompt":"reversedEdgesCount.reserve(toId + 1)\n reversedEdgesCount[toId]++\n }\n\n private fun concreteType(type: DataFlowIR.Type.Declared): Int {\n assert(!(type.isAbstract && type.isFinal)) { \"Incorrect type: $type\" }\n return if (type.isAbstract)\n VIRTUAL_TYPE_ID","completion":"else {\n if (!instantiatingClasses[type.index])\n error(\"Type $type is not instantiated\")\n type.index\n }\n }\n\n private fun ordinaryNode(nameBuilder: () -> String) =\n constraintGraph.addNode { Node.Ordinary(it, nameBuilder) }\n\n private fun sourceNode(typeId: Int, nameBuilder: () -> String) =<|endoftext|>"} {"prompt":"fun IrClass.isUsedAsBoxClass(): Boolean = IrTypeInlineClassesSupport.isUsedAsBoxClass(this)\n\nfun IrType.binaryTypeIsReference(): Boolean = this.computePrimitiveBinaryTypeOrNull() == null\n\ninternal inline fun IrType.unwrapToPrimitiveOrReference(\n eachInlinedClass: (inlinedClass: IrClass, nullable: Boolean) -> Unit,","completion":"ifPrimitive: (primitiveType: KonanPrimitiveType, nullable: Boolean) -> R,\n ifReference: (type: IrType) -> R\n): R = IrTypeInlineClassesSupport.unwrapToPrimitiveOrReference(this, eachInlinedClass, ifPrimitive, ifReference)\n\ninternal object IrTypeInlineClassesSupport : InlineClassesSupport() {<|endoftext|>"} {"prompt":"put(factory.warningFactory, KtDiagnosticWithParameters1Renderer(factory.warningMessage(message), rendererA))\n }\n\n fun put(\n factory: KtDiagnosticFactoryForDeprecation2,\n message: String,\n rendererA: DiagnosticParameterRenderer?,","completion":"rendererB: DiagnosticParameterRenderer?\n ) {\n put(factory.errorFactory, KtDiagnosticWithParameters2Renderer(message, rendererA, rendererB))\n put(factory.warningFactory, KtDiagnosticWithParameters2Renderer(factory.warningMessage(message), rendererA, rendererB))\n }<|endoftext|>"} {"prompt":"override fun invokeWithArguments(arguments: List, typeSubstitution: ESTypeSubstitution, reducer: Reducer): List =\n reducer.reduceEffects(doInvocation(arguments, typeSubstitution, reducer))\n\n protected abstract fun doInvocation(\n arguments: List,\n typeSubstitution: ESTypeSubstitution,","completion":"reducer: Reducer\n ): List\n}\n\nclass ESTypeSubstitution(\n val substitutor: NewTypeSubstitutor,\n val builtIns: KotlinBuiltIns\n) {\n companion object {\n fun empty(builtIns: KotlinBuiltIns): ESTypeSubstitution {\n return ESTypeSubstitution(EmptySubstitutor, builtIns)\n }<|endoftext|>"} {"prompt":"result = effectiveModality\n }\n }\n return result\n }\n\n private fun IrSimpleFunction.updateAccessorModalityAndVisibility(\n newModality: Modality,\n newVisibility: DescriptorVisibility\n ): IrSimpleFunction? {\n require(this is IrFunctionWithLateBinding) {\n \"Unexpected fake override accessor kind: $this\"\n }","completion":"\/\/ For descriptors it gets INVISIBLE_FAKE.\n if (DescriptorVisibilities.isPrivate(this.visibility)) return null\n\n this.visibility = newVisibility\n this.modality = newModality\n return this\n }\n\n private fun createAndBindFakeOverride(\n overridables: List,\n currentClass: IrClass,<|endoftext|>"} {"prompt":"if (x != null) x.funT()\n\n if (x != null) x.funAny()","completion":"if (x != null) x.funNullableT()\n\n if (x != null) x.funNullableAny()<|endoftext|>"} {"prompt":"languageVersionSettings.getFeatureSupport(LanguageFeature.NonParenthesizedAnnotationsOnFunctionalTypes) == LanguageFeature.State.ENABLED\n\n open class TypeTransformerForTests {\n open fun transformType(kotlinType: KotlinType): KotlinType? = null\n }\n\n \/\/ Entry point for KotlinTypeCheckerTest","completion":"fun resolveTypeWithPossibleIntersections(scope: LexicalScope, typeReference: KtTypeReference, trace: BindingTrace): KotlinType {\n return resolveType(\n TypeResolutionContext(scope, trace, false, false, typeReference.suppressDiagnosticsInDebugMode(), false, true),\n typeReference\n )\n }<|endoftext|>"} {"prompt":"* - a+? == a{1, }?;\n *\/\ninternal class ReluctantLeafQuantifierSet(\n quant: Quantifier,\n innerSet: LeafSet,\n next: AbstractSet,\n type: Int\n) : LeafQuantifierSet(quant, innerSet, next, type) {","completion":"override fun matches(startIndex: Int, testString: CharSequence, matchResult: MatchResultImpl): Int {\n var index = startIndex\n var occurrences = 0\n\n while (occurrences < min) {\n if (index + leaf.charCount > testString.length) {\n return -1\n }\n\n val shift = leaf.accepts(index, testString)<|endoftext|>"} {"prompt":"removeGarbageForTests()\n flush()\n }\n\n @TestOnly\n fun dump(lookupSymbols: Set): String {\n flush()\n\n val sb = StringBuilder()\n val p = Printer(sb)\n\n p.println(\"====== File to id map\")\n p.println(fileToId.dump())","completion":"p.println(\"====== Id to file map\")\n p.println(idToFile.dump())\n\n val lookupsStrings = lookupSymbols.groupBy { LookupSymbolKey(it.name, it.scope) }\n\n for (lookup in lookupMap.keys.sorted()) {\n val fileIds = lookupMap[lookup]!!<|endoftext|>"} {"prompt":"\"native-klib-commonize\",\n \"Commonize any platform-specific libraries\",\n listOf(\n NativeDistributionOptionType,\n OutputOptionType,\n InputLibrariesOptionType,\n DependencyLibrariesOptionType,\n OutputCommonizerTargetsOptionType,\n LogLevelOptionType\n ) + ADDITIONAL_COMMONIZER_SETTINGS,","completion":"::NativeKlibCommonize\n )\n ;\n\n companion object {\n fun getByAlias(alias: String) = values().firstOrNull { it.alias == alias }\n }\n}<|endoftext|>"} {"prompt":"else -> return null\n }\n }\n return null\n}\n\nfun PsiElement.astReplace(newElement: PsiElement) = parent.node.replaceChild(node, newElement.node)\n\nvar KtElement.parentSubstitute: PsiElement? by UserDataProperty(Key.create(\"PARENT_SUBSTITUTE\"))","completion":"fun String?.isIdentifier(): Boolean {\n if (this == null || isEmpty()) return false\n\n val lexer = KotlinLexer()\n lexer.start(this, 0, length)\n if (lexer.tokenType !== KtTokens.IDENTIFIER) return false\n lexer.advance()\n return lexer.tokenType == null\n}<|endoftext|>"} {"prompt":"if (predicate(it)) {\n changed = true\n transform(it)\n } else {\n it\n }\n }\n\n if (!changed) return null\n\n val updatedAlternative = getAlternativeType()?.let { alternative ->\n if (predicate(alternative)) transform(alternative) else alternative\n }","completion":"return IntersectionTypeConstructor(newSupertypes).setAlternative(updatedAlternative)\n}<|endoftext|>"} {"prompt":"if (foo(L()) != \"Int\") return \"fail3\"\n\n val b = TestClass()\n val data = mutableListOf>()\n data.add(listOf(\"a\", \"b\", \"c\"))\n data.add(listOf(\"d\", \"e\", \"f\"))\n b.withData(data)","completion":"if (b.getCols() != 3) return \"fail4\"\n\n if (B.baz(B) != \"[A]\") return \"fail5\"\n if (B.baz(\"a\") != \"[S]\") return \"fail6\"\n if (B.baz(arrayOf(\"b\")) != \"Array\") return \"fail7\"<|endoftext|>"} {"prompt":"\/\/ library.kt:23 box: mainVar:int=1:int, fooParam\\13:int=1:int, $i$f$foo\\13\\54:int=0:int, fooVar\\13:int=1:int, bazParam\\14:int=1:int, $i$f$baz\\14\\196:int=0:int, bazVar\\14:int=3:int,","completion":"baz1Param\\15:int=1:int, $i$f$baz1\\15\\207:int=0:int, baz1Var\\15:int=3:int, baz1BlockParam\\17:int=1:int, $i$a$-baz1-LibraryKt$baz$1\\17\\210\\14:int=0:int,<|endoftext|>"} {"prompt":"\/\/ Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!\n\/\/ WITH_STDLIB\n\n\n\nfun box(): String {\n val list1 = ArrayList()\n for (i in 10u..5u) {\n list1.add(i)\n if (list1.size > 23) break\n }","completion":"if (list1 != listOf()) {\n return \"Wrong elements for 10u..5u: $list1\"\n }\n\n val list2 = ArrayList()\n for (i in 10u.toUByte()..5u.toUByte()) {\n list2.add(i)\n if (list2.size > 23) break\n }<|endoftext|>"} {"prompt":"marker?.foo(x=1)>\n}\n\n\n\/*\n * TESTCASE NUMBER: 5\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-37391","completion":"*\/\nfun case5(marker : Marker?) {\n fun bar(){\n fun Marker.foo(y:Int) = TODO()\n marker?.foo(y=1)<|endoftext|>"} {"prompt":"fun IrFunction.getObjCFactoryInitMethodInfo(): ObjCMethodInfo? {\n val factoryAnnotation = this.annotations.findAnnotation(objCFactoryFqName) ?: return null\n return objCMethodInfo(factoryAnnotation)\n}\n\nfun inferObjCSelector(descriptor: FunctionDescriptor): String = if (descriptor.valueParameters.isEmpty()) {","completion":"descriptor.name.asString()\n} else {\n buildString {\n append(descriptor.name)\n append(':')\n descriptor.valueParameters.drop(1).forEach {\n append(it.name)\n append(':')\n }\n }\n}\n\nfun IrClass.getExternalObjCClassBinaryName(): String =<|endoftext|>"} {"prompt":"?: return ParameterizedTypeImpl(jClass, null, arguments.map(KTypeProjection::javaType))\n if (Modifier.isStatic(jClass.modifiers))\n return ParameterizedTypeImpl(jClass, ownerClass, arguments.map(KTypeProjection::javaType))\n\n val n = jClass.typeParameters.size\n return ParameterizedTypeImpl(\n jClass,","completion":"createPossiblyInnerType(ownerClass, arguments.subList(n, arguments.size)),\n arguments.subList(0, n).map(KTypeProjection::javaType)\n )\n}\n\n@ExperimentalStdlibApi\nprivate val KTypeProjection.javaType: Type\n get() {\n val variance = variance ?: return WildcardTypeImpl.STAR\n val type = type!!<|endoftext|>"} {"prompt":"c.trace.record(JvmBindingContextSlices.RECEIVER_RUNTIME_ASSERTION_INFO, expressionReceiverValue, assertionInfo)\n }\n }\n}\n\nobject RuntimeAssertionsOnDeclarationBodyChecker {\n @JvmStatic\n fun check(\n declaration: KtDeclaration,\n descriptor: DeclarationDescriptor,","completion":"bindingTrace: BindingTrace,\n languageVersionSettings: LanguageVersionSettings\n ) {\n if (!languageVersionSettings.supportsFeature(LanguageFeature.StrictJavaNullabilityAssertions)) return\n\n when {\n declaration is KtProperty && descriptor is VariableDescriptor ->\n checkLocalVariable(declaration, descriptor, bindingTrace)\n declaration is KtFunction && descriptor is FunctionDescriptor -><|endoftext|>"} {"prompt":"if (arg != null) {\n stabilityOf(arg, substitutions, currentlyAnalyzing)\n } else {\n Stability.Parameter(\n type.classifierOrFail.owner as IrTypeParameter\n )\n }\n }\n\n type.isNullable() -> stabilityOf(\n type.makeNotNull(),\n substitutions,\n currentlyAnalyzing\n )","completion":"type.isInlineClassType() -> {\n val inlineClassDeclaration = type.getClass()\n ?: error(\"Failed to resolve the class definition of inline type $type\")\n\n if (inlineClassDeclaration.hasStableMarker()) {\n Stability.Stable\n } else {\n stabilityOf(\n type = getInlineClassUnderlyingType(inlineClassDeclaration),<|endoftext|>"} {"prompt":"}\n\ninternal fun throwNoBranchMatchedException(): Nothing {\n throw NoWhenBranchMatchedException()\n}\n\ninternal fun rangeCheck(index: Int, size: Int) {\n if (index < 0 || index >= size) throw IndexOutOfBoundsException()\n}\n\n@PublishedApi\ninternal fun throwUninitializedPropertyAccessException(name: String): Nothing {","completion":"throw UninitializedPropertyAccessException(\"lateinit property $name has not been initialized\")\n}<|endoftext|>"} {"prompt":"importConverter(\"Kotlin_Interop_CreateRetainedKotlinMutableSetFromKSet\")\n )\n\n setObjCExportTypeInfo(\n symbols.map.owner,\n importConverter(\"Kotlin_Interop_CreateRetainedNSDictionaryFromKMap\")\n )\n\n setObjCExportTypeInfo(\n symbols.mutableMap.owner,","completion":"importConverter(\"Kotlin_Interop_CreateRetainedKotlinMutableDictionaryFromKMap\")\n )\n}\n\nprivate fun ObjCExportFunctionGenerationContextBuilder.setupBridgeDebugInfo() {\n val location = setupBridgeDebugInfo(this.objCExportCodegen.generationState, function)\n startLocation = location\n endLocation = location\n}<|endoftext|>"} {"prompt":"assertConstraint(linuxSourceSet, IdeMultiplatformImport.SourceSetConstraint.isLeaf, isMatchExpected = true)\n assertConstraint(linuxSourceSet, IdeMultiplatformImport.SourceSetConstraint.isNative, isMatchExpected = true)\n assertConstraint(linuxSourceSet, IdeMultiplatformImport.SourceSetConstraint.isSinglePlatformType, isMatchExpected = true)","completion":"assertConstraint(linuxSourceSet, IdeMultiplatformImport.SourceSetConstraint.unconstrained, isMatchExpected = true)\n }\n }\n\n @Test\n fun `test JVM + Android project`() {\n val project = buildMppProjectWithAndroidPlugin()\n val kotlin = project.multiplatformExtension\n kotlin.jvm()<|endoftext|>"} {"prompt":"@Getter @Setter private final int bar = 234;\n\n \/\/not required\n @Getter(AccessLevel.PROTECTED) private String name;\n\n \/\/required by annotation\n @NonNull\n private boolean otherField;\n\n \/\/not required by annotation, because has initializer\n @NonNull\n private Long zzzz = 23L;\n\n @NonNull Integer somethingElse;","completion":"\/\/ Not required by annotation because static.\n private static String constant;\n\n static void javaUsage() {\n ConstructorExample generated = ConstructorExample.build(\"foo\", true, 12);\n }\n}\n\n\n\/\/ FILE: test.kt\n\nfun box(): String {\n val generated = ConstructorExample.build(\"foo\", true, 12)\n assertEquals(generated.foo, \"foo\")<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity\nimport java.io.File\n\n\/**\n * Implementation of this interface in phase context, input or output\n * enables LLVM IR validation and dumping\n *\/\ninterface LlvmIrHolder {\n val llvmModule: LLVMModuleRef\n}\n\n\/**","completion":"* Create action that searches context and data for LLVM IR and dumps it.\n *\/\nprivate fun createLlvmDumperAction(): Action =\n fun(state: ActionState, data: Data, context: Context) {\n if (state.phase.name in context.config.configuration.getList(KonanConfigKeys.SAVE_LLVM_IR)) {<|endoftext|>"} {"prompt":"generateTestsForFunction(fileName, rangeToBuilder.copy(last = last + 1), Function.UNTIL, extraCode, subdir)\n generateTestsForFunction(fileName, rangeToBuilder.copy(last = last + 1), Function.RANGE_UNTIL, extraCode, subdir)\n }\n\n private fun generateTestsForFunction(\n fileName: String,","completion":"builder: TestBuilder,\n function: Function,\n extraCode: String? = null,\n subdir: String? = null\n ) = generateTestsForFunction(fileName, Type.entries.associate { it to builder }, function, extraCode, subdir)\n\n private fun generateTestsForFunction(\n fileName: String,\n typeToBuilderMap: Map,<|endoftext|>"} {"prompt":"assertFailsWith(\"base and differentAbi header klib are equal\") {\n assertContentEquals(headerKlibBase.readBytes(), headerKlibDifferentAbi.readBytes())\n }\n }\n }\n\n}\n\n@Tag(\"klib\")\n@UsePartialLinkage(UsePartialLinkage.Mode.ENABLED_WITH_ERROR)","completion":"abstract class AbstractNativeHeaderKlibCompilationTest : AbstractNativeSimpleTest() {\n\n protected fun runTest(@TestDataFile testPath: String) {\n val testPathFull = getAbsoluteFile(testPath)\n assert(testPathFull.exists())\n val testCaseLib: TestCase = generateTestcaseFromDirectory(testPathFull, \"lib\", listOf())<|endoftext|>"} {"prompt":"z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +\n z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +","completion":"z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +\n z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +<|endoftext|>"} {"prompt":"ENTRY1,\n ENTRY2;\n\n constructor(arg1: UserKlass = UserKlass(), arg2: UserKlass = UserKlass())","completion":"constructor(arg: UserKlass = UserKlass())\n constructor()\n }\n\n enum class EnumerationCEC {\n ENTRY1,\n ENTRY2();\n\n constructor(arg1: UserKlass = UserKlass(), arg2: UserKlass = UserKlass())<|endoftext|>"} {"prompt":"fun A.foo() {\n if (this@foo.i != null) {\n useInt(this.i)\n useInt(i)\n }\n}\n\nfun test3() {\n useFunction {\n if(i != null) {\n useInt(this.i)\n }\n }\n}\n\nfun useInt(i: Int) = i","completion":"fun useFunction(f: A.() -> Unit) = f<|endoftext|>"} {"prompt":"nested return type $prop\") Int>> = emptyList()","completion":"val <@Anno(\"type param $prop\") F : @Anno(\"bound $prop\") Number> @receiver:Anno(\"receiver annotation: $prop\") @Anno(\"receiver type $prop\") F.explicitType: @Anno(\"bound $prop\") Int get() = 1\n\n companion object {\n private const val prop = 0\n }\n}<|endoftext|>"} {"prompt":"var x: Any? = materialize()\n require(x is String)\n do {\n x.length\n do {\n x.length\n } while (i < 10)\n x = 10\n }while (j < 10)\n}","completion":"fun test31(i: Int, j: Int) {\n var x: Any? = materialize()\n require(x is String)\n do {\n x.length\n do {\n x.length\n } while (i < 10)\n x = \"\"<|endoftext|>"} {"prompt":"\"build\/classes\/kotlin\/js\/integrationTest\/default\/manifest\"\n )\n\n \/\/ Native:\n assertFileExists(\"build\/classes\/kotlin\/linux64\/integrationTest\/klib\/new-mpp-associate-compilations_integrationTest.klib\")\n }\n }\n }\n\n @Test","completion":"fun testTestRunsApi() = with(Project(\"new-mpp-associate-compilations\")) {\n setupWorkingDir()\n gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl)\n\n \/\/ TOOD: add Kotlin\/JS tests once they can be tested without much performance overhead<|endoftext|>"} {"prompt":"class KlibMetadataClassDataFinder(\n private val fragment: PackageFragment,\n private val nameResolver: NameResolver,\n private val containerSource: DeserializedContainerSource? = null\n) : ClassDataFinder {\n val nameList = fragment.getExtension(KlibMetadataProtoBuf.className).orEmpty()","completion":"override fun findClassData(classId: ClassId): ClassData? {\n\n val index = nameList.indexOfFirst { nameResolver.getClassId(it) == classId }\n if (index == -1) {\n return null\n }\n\n val foundClass = fragment.getClass_(index) ?: error(\"Could not find data for serialized class $classId\")<|endoftext|>"} {"prompt":"{ it.length },\n { it }\n ))\n\n assertPrints(sorted, \"[a, b, aa, bb]\")\n }\n\n @Sample\n fun compareByWithComparator() {\n val list = listOf('B', 'a', 'A', 'b')\n\n val sorted = list.sortedWith(","completion":"compareBy(String.CASE_INSENSITIVE_ORDER) { v -> v.toString() }\n )\n\n assertPrints(sorted, \"[a, A, B, b]\")\n }\n\n @Sample\n fun compareByDescendingWithSingleSelector() {\n val list = listOf(\"aa\", \"b\", \"bb\", \"a\")<|endoftext|>"} {"prompt":"private val computeFirSymbol: () -> FirTypeParameterSymbol,\n) : KtFirTypeParameterSymbolBase(), KtFirPsiSymbol {\n override val name: Name = withValidityAssertion {\n psi.name?.let { Name.identifier(it) } ?: SpecialNames.NO_NAME_PROVIDED","completion":"}\n\n override val origin: KtSymbolOrigin\n get() = withValidityAssertion { KtSymbolOrigin.JAVA }\n\n override val variance: Variance\n get() = withValidityAssertion { Variance.INVARIANT }\n\n override val isReified: Boolean\n get() = withValidityAssertion { false }<|endoftext|>"} {"prompt":"@SinceKotlin(\"1.1\")\n override val isFinal: Boolean\n get() = error()\n\n @SinceKotlin(\"1.1\")\n override val isOpen: Boolean\n get() = error()\n\n @SinceKotlin(\"1.1\")\n override val isAbstract: Boolean\n get() = error()\n\n @SinceKotlin(\"1.1\")","completion":"override val isSealed: Boolean\n get() = error()\n\n @SinceKotlin(\"1.1\")\n override val isData: Boolean\n get() = error()\n\n @SinceKotlin(\"1.1\")\n override val isInner: Boolean\n get() = error()\n\n @SinceKotlin(\"1.1\")\n override val isCompanion: Boolean<|endoftext|>"} {"prompt":"public actual inline fun todo(@Suppress(\"UNUSED_PARAMETER\") block: () -> Unit) {\n println(\"TODO at \" + currentStackTrace()[0])\n}\n\n\/**\n * Returns an array of stack trace elements, each representing one stack frame.\n * The first element of the array (assuming the array is not empty) represents the top of the","completion":"* stack, which is the place where [currentStackTrace] function was called from.\n *\/\n@Suppress(\"INVISIBLE_REFERENCE\", \"INVISIBLE_MEMBER\")\n@InlineOnly<|endoftext|>"} {"prompt":"return ByteArray(size) { index -> this[index] }\n}\n\n\/**\n * Returns an array of Char containing all of the elements of this generic array.\n *\/\npublic fun Array.toCharArray(): CharArray {\n return CharArray(size) { index -> this[index] }\n}\n\n\/**\n * Returns an array of Double containing all of the elements of this generic array.\n *\/","completion":"public fun Array.toDoubleArray(): DoubleArray {\n return DoubleArray(size) { index -> this[index] }\n}\n\n\/**\n * Returns an array of Float containing all of the elements of this generic array.\n *\/\npublic fun Array.toFloatArray(): FloatArray {\n return FloatArray(size) { index -> this[index] }\n}\n\n\/**<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION\n\nobject Scope {\n fun foo(): Int = 0\n\n object Nested {\n @Deprecated(\"err\", level = DeprecationLevel.HIDDEN)\n fun foo(): String = \"\"\n\n fun take(f: () -> T): T = f()","completion":"fun test() {\n val r1 = take(::foo)\n r1\n\n val r2 = ::foo\n \")!>r2\n\n val r3 = foo()<|endoftext|>"} {"prompt":"private object A72 { val a = Random.nextInt(100) }\nprivate object A73 { val a = Random.nextInt(100) }\nprivate object A74 { val a = Random.nextInt(100) }\nprivate object A75 { val a = Random.nextInt(100) }\nprivate object A76 { val a = Random.nextInt(100) }","completion":"private object A77 { val a = Random.nextInt(100) }\nprivate object A78 { val a = Random.nextInt(100) }\nprivate object A79 { val a = Random.nextInt(100) }\nprivate object A80 { val a = Random.nextInt(100) }\nprivate object A81 { val a = Random.nextInt(100) }<|endoftext|>"} {"prompt":"} else if (element !is KtProperty || PsiTreeUtil.getParentOfType(element, KtDeclaration::class.java) !is KtClass) {\n context.trace.report(ErrorsAndroid.INAPPLICABLE_IGNORED_ON_PARCEL.on(annotationEntry))\n }\n }\n\n private fun checkTypeParcelerUsage(","completion":"resolvedCall: ResolvedCall<*>,\n annotationEntry: KtAnnotationEntry,\n context: CallCheckerContext,\n element: KtModifierListOwner\n ) {\n val descriptor = context.trace[BindingContext.DECLARATION_TO_DESCRIPTOR, element] ?: return<|endoftext|>"} {"prompt":"\"byte\" -> SirSwiftModule.int8\n \"short\" -> SirSwiftModule.int16\n \"int\" -> SirSwiftModule.int32\n \"long\" -> SirSwiftModule.int64\n\n \"ubyte\" -> SirSwiftModule.uint8\n \"ushort\" -> SirSwiftModule.uint16\n \"uint\" -> SirSwiftModule.uint32","completion":"\"ulong\" -> SirSwiftModule.uint64\n\n \"any\" -> buildClass {\n name = \"MyClass\"\n origin = SirOrigin.ExternallyDefined(name=\"MyClass\")\n }\n\n else -> error(\"Unknown type: $typeName\")\n }.let { SirNominalType(it) }\n}\n\nprivate fun readRequestFromFile(file: File): BridgeRequest {<|endoftext|>"} {"prompt":"\"directives are applied in the order of appearance, i.e. !FOO +BAR means include only FOO and BAR\"\n )\n }\n\n var first = true\n do {\n val operation = matcher.group(1)\n val name = matcher.group(2)\n\n val newCondition: Condition =","completion":"if (name in setOf(\"ERROR\", \"WARNING\", \"INFO\")) {\n Condition { diagnostic -> diagnostic.severity == Severity.valueOf(name) }\n } else {\n Condition { diagnostic -> name == diagnostic.factory.name }\n }\n\n when (operation) {\n \"!\" -> {\n if (!first) {\n Assert.fail(<|endoftext|>"} {"prompt":"}\n ProgressionDirection.DECREASING -> {\n if (headerInfo.step.constLongValue != -1L) return null\n\n \/\/ There are 2 cases for an optimizable range with DECREASING direction:\n \/\/ 1. `X in B downTo A`:","completion":"\/\/ Produces HeaderInfo with first = B, last = A, isReversed = false (`last\/A` is lower).\n \/\/ Expression for `upper\/B` should come first.\n \/\/ 2. `X in (A..B).reversed()`:\n \/\/ Produces HeaderInfo with first = B, last = A, isReversed = true (`last\/A` is lower).<|endoftext|>"} {"prompt":"internal fun PhaseContext.firSerializer(input: FirOutput): SerializerOutput? = when (input) {\n !is FirOutput.Full -> null\n else -> firSerializerBase(input.firResult, null)\n}\n\ninternal fun PhaseContext.fir2IrSerializer(input: FirSerializerInput): SerializerOutput {","completion":"return firSerializerBase(input.firToIrOutput.firResult, input.firToIrOutput, produceHeaderKlib = input.produceHeaderKlib)\n}\n\ninternal fun PhaseContext.firSerializerBase(\n firResult: FirResult,\n fir2IrOutput: Fir2IrOutput?,\n produceHeaderKlib: Boolean = false,\n): SerializerOutput {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.assignment.plugin.gradle\n\nopen class AssignmentExtension {\n internal val myAnnotations = mutableListOf()\n\n open fun annotation(fqName: String) {\n myAnnotations.add(fqName)\n }\n\n open fun annotations(fqNames: List) {","completion":"myAnnotations.addAll(fqNames)\n }\n\n open fun annotations(vararg fqNames: String) {\n myAnnotations.addAll(fqNames)\n }\n}<|endoftext|>"} {"prompt":"overloadSymbol = symbols.findContentHashCodeOverload(argumentType)\n returnType = irBuiltins.intType\n } else {\n overloadSymbol = symbols.findContentToStringOverload(argumentType)\n returnType = irBuiltins.stringType\n }\n\n return builder.irCall(\n overloadSymbol,\n returnType,\n ).apply {","completion":"extensionReceiver = argument\n if (argumentType.classOrNull == irBuiltins.arrayClass) {\n putTypeArgument(0, argumentType.getArrayElementType(irBuiltins))\n }\n }\n }\n in symbols.startCoroutineUninterceptedOrReturnIntrinsics -> {<|endoftext|>"} {"prompt":"* @sample samples.collections.Collections.Transformations.associateByToWithValueTransform\n *\/\npublic inline fun > Iterable.associateByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M {\n for (element in this) {","completion":"destination.put(keySelector(element), valueTransform(element))\n }\n return destination\n}\n\n\/**\n * Populates and returns the [destination] mutable map with key-value pairs\n * provided by [transform] function applied to each element of the given collection.\n * \n * If any of two pairs would have the same key the last one gets added to the map.\n *<|endoftext|>"} {"prompt":"if (c >= 5) continue\n c++\n }\n return c\n}\n\nfun for_byte_list(): Int {\n val a = ArrayList()\n a.add(0); a.add(0); a.add(0); a.add(0); a.add(0)","completion":"a.add(0); a.add(0); a.add(0); a.add(0); a.add(0)\n var c = 0\n for (i in a) {\n if (c >= 5) continue\n c++\n }\n return c\n}\n\nfun for_long_list(): Int {\n val a = ArrayList()<|endoftext|>"} {"prompt":"package kotlin.text\n\n\/**\n * Represents a compiled regular expression.\n * Provides functions to match strings in text with a pattern, replace the found occurrences and split text around matches.\n *\n * Note that the [pattern] syntax and the option set has differences on each platform.\n * See the docs of `Regex` for the specific platform for details.\n *\/\npublic expect class Regex {","completion":"\/** Creates a regular expression from the specified [pattern] string and the default options. *\/\n public constructor(pattern: String)\n\n \/** Creates a regular expression from the specified [pattern] string and the specified single [option]. *\/\n public constructor(pattern: String, option: RegexOption)\n\n \/** Creates a regular expression from the specified [pattern] string and the specified set of [options]. *\/<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {}\nfun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceB, T: UserInterfaceA {}","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceB {}\nfun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceA {}<|endoftext|>"} {"prompt":"require(availableFor(configurables)) {\n \"$target cannot be run under Rosetta 2 from host ${HostManager.host}\"\n }\n require(checkIsInstalled(hostExecutor)) {\n \"Rosetta 2 is not installed on host ${HostManager.host}\"\n }\n }\n\n \/\/ When Rosetta 2 is installed, all x64 binaries are automatically run through it.","completion":"override fun execute(request: ExecuteRequest): ExecuteResponse = hostExecutor.execute(request)\n}<|endoftext|>"} {"prompt":"if (!(4F !in 3.0..<1.0) != range1.contains(4F)) throw AssertionError()\n \/\/ no local optimizations\n if (element10 in 3.0..<1.0 != range1.contains(element10)) throw AssertionError()","completion":"if (element10 !in 3.0..<1.0 != !range1.contains(element10)) throw AssertionError()\n if (!(element10 in 3.0..<1.0) != !range1.contains(element10)) throw AssertionError()<|endoftext|>"} {"prompt":"\/\/ considered to be non-user-reproducible code for the purposes of these tests\n checkExactType>(buildee)\n}\n\n\/* REQUIRED DECLARATIONS *\/\n\nclass Buildee {\n fun yield(arg: CT) {}\n}\n\nfun build(\n instructions: UserKlass.(Buildee) -> Unit","completion":"): Buildee {\n return Buildee().apply { UserKlass().instructions(this) }\n}\n\nclass UserKlass<|endoftext|>"} {"prompt":"* Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).\n *\n * The result is always less than the divisor.\n *\n * For unsigned types, the remainders of flooring division and truncating division are the same.\n *\/\n @kotlin.internal.InlineOnly","completion":"public inline fun mod(other: UByte): UByte = this.mod(other.toUInt()).toUByte()\n \/**\n * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).\n *\n * The result is always less than the divisor.\n *<|endoftext|>"} {"prompt":"* DESCRIPTION: call with explicit receiver: different built-in integer types and one of them is kotlin.Int\n *\/\n\n\/\/ TESTCASE NUMBER: 1\nclass Case1\n\nfun case1(case: Case1) {\n \/\/to (1.1)\n case.boo(1)","completion":"\/\/(1.1) return type is String\n case.boo(1)\n \/\/to (1.1)\n case.boo(x = 1)<|endoftext|>"} {"prompt":"override fun indexOf(element: UInt): Int = this@asList.indexOf(element)\n override fun lastIndexOf(element: UInt): Int = this@asList.lastIndexOf(element)\n }\n}\n\n\/**\n * Returns a [List] that wraps the original array.\n *\/\n@SinceKotlin(\"1.3\")\n@ExperimentalUnsignedTypes","completion":"public actual fun ULongArray.asList(): List {\n return object : AbstractList(), RandomAccess {\n override val size: Int get() = this@asList.size\n override fun isEmpty(): Boolean = this@asList.isEmpty()\n override fun contains(element: ULong): Boolean = this@asList.contains(element)<|endoftext|>"} {"prompt":"\/\/ MODULE: m1-jvm()()(m1-common)\n\/\/ FILE: jvm.kt\nactual interface My {\n actual fun openFunPositive() = Unit\n actual fun openFunNegative()\n actual fun abstractFun()\n\n actual val openValPositive: Int get() = 0","completion":"actual val openValNegative: Int\n actual val abstractVal: Int\n}<|endoftext|>"} {"prompt":"* Applies the given [transform] function to each element and its index in the original array\n * and appends the results to the given [destination].\n * @param [transform] function that takes the index of an element and the element itself\n * and returns the result of the transform applied to the element.\n *\/","completion":"public inline fun > Array.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C {\n var index = 0\n for (item in this)\n destination.add(transform(index++, item))\n return destination\n}\n\n\/**<|endoftext|>"} {"prompt":"val copy = getFunction.original.copy(classDescriptor, Modality.OPEN, getFunction.visibility, getFunction.kind, false)\n return copy.substitute(ANY_SUBSTITUTOR)!!\n }\n\n @JvmStatic\n fun findGetFunction(localVariableDescriptorForReference: VariableDescriptor) =","completion":"localVariableDescriptorForReference.type.memberScope.getContributedFunctions(\n OperatorNameConventions.GET,\n NoLookupLocation.FROM_BACKEND\n ).single()\n }\n\n class PropertyReferenceGenerationStrategy(\n private val isGetter: Boolean,\n private val originalFunctionDesc: FunctionDescriptor,\n private val target: VariableDescriptor,<|endoftext|>"} {"prompt":"override fun testBad(x: Any) =\n reifiedAsFailsWithCCE>(\n x, \"x as Function4<*, *, *, *, *>\")\n}\n\nobject TestFn5 : TestFnBase {\n override fun testGood(x: Any) =","completion":"reifiedAsSucceeds>(\n x, \"x as Function5<*, *, *, *, *, *>\")\n override fun testBad(x: Any) =\n reifiedAsFailsWithCCE>(<|endoftext|>"} {"prompt":"assertEquals(listOf(1u, 2u, 3u, 4u, 5u), uintList)\n\n val ulongList = mutableListOf()\n val ulongProgression = 1uL..6uL\n for (i in ulongProgression step 2L step 1L) {\n ulongList += i\n }","completion":"assertEquals(listOf(1uL, 2uL, 3uL, 4uL, 5uL), ulongList)\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"@kotlin.jvm.JvmName(\"maxByOrThrow-U\")\n@ExperimentalUnsignedTypes\n@kotlin.internal.InlineOnly\n@Suppress(\"CONFLICTING_OVERLOADS\")\npublic inline fun > UByteArray.maxBy(selector: (UByte) -> R): UByte {\n if (isEmpty()) throw NoSuchElementException()","completion":"var maxElem = this[0]\n val lastIndex = this.lastIndex\n if (lastIndex == 0) return maxElem\n var maxValue = selector(maxElem)\n for (i in 1..lastIndex) {\n val e = this[i]\n val v = selector(e)\n if (maxValue < v) {\n maxElem = e\n maxValue = v<|endoftext|>"} {"prompt":"I.invoke(\")!>::y)\n I.invoke(::y)\n I.invoke(::y)","completion":"I(\")!>::x)\n I(::x)<|endoftext|>"} {"prompt":"@SinceKotlin(\"1.4\")\n@ExperimentalUnsignedTypes\npublic fun UIntArray.minWithOrNull(comparator: Comparator): UInt? {\n if (isEmpty()) return null\n var min = this[0]\n for (i in 1..lastIndex) {\n val e = this[i]","completion":"if (comparator.compare(min, e) > 0) min = e\n }\n return min\n}\n\n\/**\n * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements.\n *\/\n@SinceKotlin(\"1.4\")\n@ExperimentalUnsignedTypes<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ JSPECIFY_STATE: strict\n\n\/\/ FILE: SelfType.java\nimport org.jspecify.annotations.*;\n\n@NullMarked\npublic class SelfType> {\n public void foo(T t) {}\n}\n\n\/\/ FILE: B.java\npublic class B extends SelfType {}\n\n\/\/ FILE: C.java","completion":"import org.jspecify.annotations.*;\n\n@NullMarked\npublic class C> extends SelfType {}\n\n\/\/ FILE: AK.java\npublic class AK extends SelfType {}\n\n\/\/ FILE: AKN.java\nimport org.jspecify.annotations.*;\n\npublic class AKN extends SelfType<@Nullable AK> {}<|endoftext|>"} {"prompt":"for (i in 7 downTo 1 step zero()) {\n }\n }\n\n assertFailsWith {\n for (i in 7L downTo 1L step zero().toLong()) {\n }\n }\n\n assertFailsWith {\n for (i in 'g' downTo 'a' step zero()) {\n }\n }","completion":"return \"OK\"\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.contracts.model\n\nimport org.jetbrains.kotlin.contracts.model.structure.ESType\n\n\/**\n * Generic abstraction of static information about some part of program.\n *\/\ninterface Computation {\n \/**\n * Return-type of corresponding part of program.\n * If type is unknown or computation doesn't have a type (e.g. if","completion":"* it is some construction, like \"for\"-loop), then type is 'null'\n *\/\n val type: ESType?\n\n \/**\n * List of all possible effects of this computation.\n * Note that it's not guaranteed to be complete, i.e. if list\n * doesn't mention some effect, then it should be interpreted\n * as the absence of information about that effect.\n *\/<|endoftext|>"} {"prompt":"* UNEXPECTED BEHAVIOUR\n * ISSUES: KT-28369\n *\/\nfun case_10() {\n var x: Boolean? = true\n if (x is Boolean) {","completion":"select(if (true) {x = null;Class()} else Class()).prop_9 = x.not()\n }\n}\n\n\/\/ TESTCASE NUMBER: 11<|endoftext|>"} {"prompt":"if (!getBoolean(JVMConfigurationKeys.NO_JDK) &&\n get(JVMConfigurationKeys.JDK_HOME) == null) {\n \/\/ We need to set `JDK_HOME` explicitly to use JDK 17\n put(JVMConfigurationKeys.JDK_HOME, File(System.getProperty(\"java.home\")!!))\n }\n configureJdkClasspathRoots()\n },","completion":"registerExtensions = registerExtensions ?: { configuration ->\n ComposePluginRegistrar.registerCommonExtensions(this)\n IrGenerationExtension.registerExtension(\n this,\n ComposePluginRegistrar.createComposeIrExtension(configuration)\n )\n }\n )\n\n protected fun analyze(\n platformSources: List,<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.IdentifierChecker\nimport org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm\n\nobject JvmSimpleNameBacktickChecker : IdentifierChecker {","completion":"\/\/ See The Java Virtual Machine Specification, section 4.7.9.1 https:\/\/docs.oracle.com\/javase\/specs\/jvms\/se8\/html\/jvms-4.html#jvms-4.7.9.1\n val INVALID_CHARS = setOf('.', ';', '[', ']', '\/', '<', '>', ':', '\\\\')<|endoftext|>"} {"prompt":"eraseType(typeParameterUpperBoundEraser.getErasedUpperBound(declaration, attr.markIsRaw(true)), attr)\n is ClassDescriptor -> {\n val declarationForUpper =\n type.upperIfFlexible().constructor.declarationDescriptor\n\n check(declarationForUpper is ClassDescriptor) {","completion":"\"For some reason declaration for upper bound is not a class \" +\n \"but \\\"$declarationForUpper\\\" while for lower it's \\\"$declaration\\\"\"\n }\n\n val (lower, isRawL) = eraseInflexibleBasedOnClassDescriptor(type.lowerIfFlexible(), declaration, lowerTypeAttr)<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/KT-776 Wrong detection of unreachable code\n\npackage kt776\n\nfun test5() : Int {\n var x = 0\n while(true) {\n try {\n if(x < 10) {\n x++\n continue\n }\n else {\n break\n }\n }\n finally {\n x++\n }\n }\n return x","completion":"}\n\nfun test1() : Int {\n try {\n if (true) {\n return 1\n }\n else {\n return 2\n }\n }\n finally {\n doSmth() \/\/unreachable\n }\n}\n\nfun doSmth() {}<|endoftext|>"} {"prompt":"val platformName = when (target.family) {\n Family.OSX -> \"macos\"\n Family.IOS -> \"ios\"\n Family.TVOS -> \"tvos\"\n Family.WATCHOS -> \"watchos\"\n else -> error(\"Unexpected Apple target family: ${target.family}\")\n } + if (targetTriple.isSimulator) \"-simulator\" else \"\"","completion":"add(platformName)\n\n add(\"$osVersionMin.0\")\n add(sdkVersion)\n }.toList()\n\n override fun finalLinkCommands(objectFiles: List, executable: ExecutableFile,\n libraries: List, linkerArgs: List,\n optimize: Boolean, debug: Boolean, kind: LinkerOutputKind,<|endoftext|>"} {"prompt":"* and its index in the original collection.\n * \n * @sample samples.collections.Collections.Transformations.flatMapIndexed\n *\/\n@SinceKotlin(\"1.4\")\n@OptIn(kotlin.experimental.ExperimentalTypeInference::class)\n@OverloadResolutionByLambdaReturnType\n@kotlin.jvm.JvmName(\"flatMapIndexedIterable\")","completion":"@kotlin.internal.InlineOnly\npublic inline fun Iterable.flatMapIndexed(transform: (index: Int, T) -> Iterable): List {\n return flatMapIndexedTo(ArrayList(), transform)\n}\n\n\/**\n * Returns a single list of all elements yielded from results of [transform] function being invoked on each element<|endoftext|>"} {"prompt":"inline val FirCallableSymbol<*>.isAbstract: Boolean get() = resolvedStatus.modality == Modality.ABSTRACT\ninline val FirCallableSymbol<*>.isOpen: Boolean get() = resolvedStatus.modality == Modality.OPEN\ninline val FirCallableSymbol<*>.isFinal: Boolean get() = resolvedStatus.modality == Modality.FINAL","completion":"inline val FirCallableSymbol<*>.visibility: Visibility get() = resolvedStatus.visibility\ninline val FirCallableSymbol<*>.effectiveVisibility: EffectiveVisibility get() = resolvedStatus.effectiveVisibility\n\ninline val FirCallableSymbol<*>.isActual: Boolean get() = rawStatus.isActual<|endoftext|>"} {"prompt":"}\n\n\/\/ must be in sync with `fromGTestPattern(String)` in kotlin-native\/runtime\/src\/main\/kotlin\/kotlin\/native\/internal\/test\/TestRunner.kt\ninternal fun fromGTestPattern(pattern: String): Regex {\n val result = StringBuilder()\n var prevIndex = 0\n pattern.forEachIndexed { index, c ->","completion":"if (c == '*' || c == '?') {\n result.append(pattern.substringEscaped(prevIndex until index))\n prevIndex = index + 1\n result.append(if (c == '*') \".*\" else \".\")\n }\n }\n result.append(pattern.substringEscaped(prevIndex until pattern.length))\n return result.toString().toRegex()<|endoftext|>"} {"prompt":"File(moduleSourceDir, \"runner.kt\")\n .writeText(\"@kotlin.wasm.WasmExport fun runBoxTest() = println($BOX_FUN_FQN())\")\n }\n }\n\n override fun buildKlib(\n moduleName: String,\n buildDirs: ModuleBuildDirs,\n dependencies: Dependencies,\n klibFile: File,","completion":") = this@AbstractWasmPartialLinkageTestCase.buildKlib(moduleName, buildDirs, dependencies, klibFile)\n\n override fun buildBinaryAndRun(mainModule: Dependency, otherDependencies: Dependencies) =\n this@AbstractWasmPartialLinkageTestCase.buildBinaryAndRun(mainModule, otherDependencies)<|endoftext|>"} {"prompt":"fun doTest(\n build: Iterable.() -> TArray,\n reverse: TArray.(fromIndex: Int, toIndex: Int) -> Unit,\n snapshot: TArray.() -> List\n ) {\n val arrays = (0..7).map { n -> n to (0 until n).build() }\n for ((size, array) in arrays) {","completion":"for (fromIndex in 0 until size) {\n for (toIndex in fromIndex..size) {\n val original = array.snapshot().toMutableList()\n array.reverse(fromIndex, toIndex)\n val reversed = array.snapshot()\n assertEquals(original.apply { subList(fromIndex, toIndex).reverse() }, reversed)\n }\n }<|endoftext|>"} {"prompt":"type = originalTypeNotNullable\n }\n typesFromSmartCast = listOf(originalTypeNotNullable)\n smartcastStability = expressionWithSmartcastIfStable.smartcastStability\n coneTypeOrNull = originalTypeNotNullable\n }\n else -> originalExpression\n }\n }\n\n return expressionForReceiver\n\n}","completion":"private fun FirMemberDeclaration.getBackingFieldIfApplicable(): FirBackingField? {\n val field = (this as? FirProperty)?.getExplicitBackingField() ?: return null\n\n \/\/ This check prevents resolving protected and\n \/\/ public fields.\n return when (field.visibility) {\n Visibilities.PrivateToThis,\n Visibilities.Private,\n Visibilities.Internal -> field<|endoftext|>"} {"prompt":"0x0UL, 0x0UL, 0x0UL, 0x0UL, \n 0x3ff0000000000000UL, 0x3ff000000000afecUL, 0x3feffffffffea028UL, 0x3fe0000000000000UL,","completion":"0x4000000000000000UL, 0x3fd0000000000000UL, 0x4010000000000000UL, 0x3ff0000000000000UL, \n 0x3feffffffffea028UL, 0x3ff000000000afecUL, 0x3fe0000000000000UL, 0x4000000000000000UL,<|endoftext|>"} {"prompt":"x: Int,\n content2: @Composable () -> Unit,\n value2: Int\n ) {\n Foo(123) {\n \/\/ named argument\n Foo(x=value)\n\n \/\/ indexed argument\n Foo(x)\n\n \/\/ tag\n content()\n }\n Foo(x=123, composeItem={\n val abc = 123","completion":"\/\/ attribute value\n Foo(x=abc)\n\n \/\/ attribute value\n Foo(x=value2)\n\n \/\/ tag\n content2()\n })\n }\n \"\"\"\n )\n\n @Test\n fun testDispatchInvoke() = check(\n \"\"\"\n import androidx.compose.runtime.*\n\n class Bam {\n @Composable fun Foo() {}<|endoftext|>"} {"prompt":"printer == UsualEnum.C\n printer == CleverEnum.E\n\n printer === 20\n printer === BufferedEnum.A","completion":"printer === UsualEnum.C\n printer === CleverEnum.E\n}\n\nfun

processInfo2(info: String, printer: P) where P: AIPowered, P: Buffered {\n printer == 20<|endoftext|>"} {"prompt":"val JVM_DEFAULT_CLASS_ID = ClassId.topLevel(JVM_DEFAULT_FQ_NAME)\n val JVM_DEFAULT_NO_COMPATIBILITY_FQ_NAME = FqName(\"kotlin.jvm.JvmDefaultWithoutCompatibility\")","completion":"val JVM_DEFAULT_WITH_COMPATIBILITY_FQ_NAME = FqName(\"kotlin.jvm.JvmDefaultWithCompatibility\")\n val JVM_DEFAULT_NO_COMPATIBILITY_CLASS_ID = ClassId.topLevel(JVM_DEFAULT_NO_COMPATIBILITY_FQ_NAME)<|endoftext|>"} {"prompt":").lower(moduleFragment)\n }\n\n \/\/ transform all composable functions to have an extra synthetic composer\n \/\/ parameter. this will also transform all types and calls to include the extra\n \/\/ parameter.\n ComposerParamTransformer(\n pluginContext,\n symbolRemapper,\n stabilityInferencer,\n decoysEnabled,\n metrics,\n ).lower(moduleFragment)","completion":"ComposableTargetAnnotationsTransformer(\n pluginContext,\n symbolRemapper,\n metrics,\n stabilityInferencer\n ).lower(moduleFragment)\n\n \/\/ transform calls to the currentComposer to just use the local parameter from the\n \/\/ previous transform\n ComposerIntrinsicTransformer(pluginContext, decoysEnabled).lower(moduleFragment)<|endoftext|>"} {"prompt":"val (intersectedOverridingRenamedBuiltin, intersectedOverridingNonBuiltin) =\n resultOfIntersectionWithNaturalName.overriddenMembers.partition {\n it.member.getJvmMethodNameIfSpecial(it.baseScope, session) == jvmName\n }","completion":"val explicitlyDeclaredFunctionWithBuiltinJvmName = declaredMemberScope.getFunctions(jvmName).firstOrNull {\n overrideChecker.isOverriddenFunction(it, someSymbolWithNaturalNameFromSuperType)\n }\n val functionsFromSupertypesWithBuiltinJvmName = supertypeScopeContext.collectFunctions(jvmName).firstOrNull {<|endoftext|>"} {"prompt":"override fun visitLiteralExpression(literalExpression: FirLiteralExpression, data: IrElement): IrElement = data\n\n override fun visitThisReceiverExpression(thisReceiverExpression: FirThisReceiverExpression, data: IrElement): IrElement = data","completion":"override fun visitQualifiedAccessExpression(qualifiedAccessExpression: FirQualifiedAccessExpression, data: IrElement): IrElement = data\n\n override fun visitPropertyAccessExpression(propertyAccessExpression: FirPropertyAccessExpression, data: IrElement): IrElement = data\n\n override fun visitResolvedQualifier(resolvedQualifier: FirResolvedQualifier, data: IrElement): IrElement = data<|endoftext|>"} {"prompt":"private val signatureParsingComponent = BinaryClassSignatureParser()\n\n fun findClass(classId: ClassId, searchScope: GlobalSearchScope) = findClass(JavaClassFinder.Request(classId), searchScope)\n\n override fun findClass(request: JavaClassFinder.Request, searchScope: GlobalSearchScope): JavaClass? {","completion":"val (classId, classFileContentFromRequest, outerClassFromRequest) = request\n val virtualFile = findVirtualFileForTopLevelClass(classId, searchScope) ?: return null\n\n if (!usePsiClassFilesReading && (virtualFile.extension == \"class\" || virtualFile.extension == \"sig\")) {<|endoftext|>"} {"prompt":"return resolvedNicknames.getOrPut(annotation.key) {\n \/\/ This won't store nulls (ConcurrentHashMap does not permit that), but presumably unless the code\n \/\/ is broken a nickname should be resolvable.\n annotation.metaAnnotations.firstNotNullOfOrNull(::resolveTypeQualifierAnnotation) ?: return null\n }\n }","completion":"private fun resolveQualifierBuiltInDefaultAnnotation(annotation: TAnnotation): JavaDefaultQualifiers? {\n if (javaTypeEnhancementState.disabledDefaultAnnotations) {\n return null\n }\n\n return BUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATIONS[annotation.fqName]?.let { qualifierForDefaultingAnnotation -><|endoftext|>"} {"prompt":"* Convert list of [expectedSourceFiles] to relate to [TestProject] paths.\n *\/\nfun TestProject.sourceFilesRelativeToProject(\n expectedSourceFiles: List,\n sourcesDir: GradleProject.() -> Path = { javaSourcesDir() },\n subProjectName: String? = null\n): Iterable {\n return expectedSourceFiles\n .map {","completion":"if (subProjectName != null) {\n subProject(subProjectName).sourcesDir().resolve(it)\n } else {\n sourcesDir().resolve(it)\n }\n }\n .map {\n it.relativeTo(projectPath)\n }\n}\n\n\/**<|endoftext|>"} {"prompt":"if (!(2 !in 3L..1L) != range1.contains(2)) throw AssertionError()\n \/\/ no local optimizations\n if (element14 in 3L..1L != range1.contains(element14)) throw AssertionError()\n if (element14 !in 3L..1L != !range1.contains(element14)) throw AssertionError()","completion":"if (!(element14 in 3L..1L) != !range1.contains(element14)) throw AssertionError()\n if (!(element14 !in 3L..1L) != range1.contains(element14)) throw AssertionError()\n}\n\nfun testR1xE15() {\n \/\/ with possible local optimizations<|endoftext|>"} {"prompt":"fun foo() {\n val l1: Long = longMaxValue + 1\n val l2: Long = longMaxValue - 1 + 2\n val l3: Long = longMaxValue - longMinValue\n val l4: Long = -longMinValue\n val l5: Long = longMinValue - 1\n val l6: Long = longMinValue - longMaxValue","completion":"val l7: Long = longMinValue + longMaxValue\n val l8: Long = -longMaxValue\n val l10: Long = -intMinValue.toLong()\n val l11: Long = -1 + intMinValue.toLong()\n val l12: Long = longMinValue * intMinValue\n val l13: Long = longMinValue * -1<|endoftext|>"} {"prompt":"val expressionHandler: IndexedGetIterationHandler\n) : NumericHeaderInfo(\n IntProgressionType(symbols), first, last, step,\n isLastInclusive = false,\n canCacheLast = canCacheLast,\n isReversed = false,\n direction = ProgressionDirection.INCREASING\n) {","completion":"\/\/ Technically one can easily iterate over an array in reverse by swapping first\/last and\n \/\/ negating the step. However, Array.reversed() and Array.reversedArray() return a collection\n \/\/ with a copy of the array elements, which means that the original array can be modified with\n \/\/ no effect on the iteration over the reversed array. That is:\n \/\/<|endoftext|>"} {"prompt":"|| | +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX): 0.15.1 -> 0.16.1 (*)","completion":"|| | \\--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX): 1.4.3-native-mt -> 1.5.0-RC-native-mt (*)<|endoftext|>"} {"prompt":"@OptIn(ExperimentalContracts::class)\ninline fun buildErrorTypeRef(init: FirErrorTypeRefBuilder.() -> Unit): FirErrorTypeRef {\n contract {\n callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE)\n }\n return FirErrorTypeRefBuilder().apply(init).build()\n}","completion":"@OptIn(ExperimentalContracts::class)\ninline fun buildErrorTypeRefCopy(original: FirErrorTypeRef, init: FirErrorTypeRefBuilder.() -> Unit): FirErrorTypeRef {\n contract {\n callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE)\n }\n val copyBuilder = FirErrorTypeRefBuilder()<|endoftext|>"} {"prompt":"package kotlin.test\n\nimport kotlin.test.adapters.*\n\n\/**\n * Overrides current framework adapter with a provided instance of [FrameworkAdapter]. Use in order to support custom test frameworks.\n *\n * Also some string arguments are supported. Use \"qunit\" to set the adapter to [QUnit](https:\/\/qunitjs.com\/), \"mocha\" for","completion":"* [Mocha](https:\/\/mochajs.org\/), \"jest\" for [Jest](https:\/\/facebook.github.io\/jest\/),\n * \"jasmine\" for [Jasmine](https:\/\/github.com\/jasmine\/jasmine), and \"auto\" to detect one of those frameworks automatically.\n *<|endoftext|>"} {"prompt":"@OptIn(PrivateForInline::class)\n fun withPropertyAccessor(\n property: FirProperty,\n accessor: FirPropertyAccessor,\n holder: SessionHolder,\n forContracts: Boolean = false,\n f: () -> T\n ): T {\n if (accessor is FirDefaultPropertyAccessor || accessor.body == null) {","completion":"return if (accessor.isGetter) withContainer(accessor, f)\n else withTowerDataCleanup {\n addLocalScope(FirLocalScope(holder.session))\n withContainer(accessor, f)\n }\n }\n return withTowerDataCleanup {\n val receiverTypeRef = property.receiverParameter?.typeRef<|endoftext|>"} {"prompt":"x.funNullableAny()\n }\n}\n\n\/\/ TESTCASE NUMBER: 33\nfun case_33(y: Inv) {\n val x = y.getNullable()\n\n if (x != null) {","completion":"x\n x.equals(null)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.checkers.PrimitiveNumericComparisonCallChecker\nimport org.jetbrains.kotlin.resolve.scopes.LexicalScope\nimport org.jetbrains.kotlin.resolve.scopes.LexicalScopeKind\nimport org.jetbrains.kotlin.types.*","completion":"import org.jetbrains.kotlin.types.error.ErrorUtils\nimport org.jetbrains.kotlin.types.TypeUtils.NO_EXPECTED_TYPE\nimport org.jetbrains.kotlin.types.checker.KotlinTypeChecker\nimport org.jetbrains.kotlin.types.error.ErrorTypeKind<|endoftext|>"} {"prompt":"javaSourceSet.addExtension(kotlinSourceSetDslName, kotlinSourceSet.kotlin)\n } else {\n project.compatibilityConventionRegistrar.addConvention(javaSourceSet, kotlinSourceSetDslName, kotlinCompilation.defaultSourceSet)","completion":"javaSourceSet.addExtension(kotlinSourceSetDslName, kotlinCompilation.defaultSourceSet.kotlin)\n }\n }\n\n kotlinTarget.compilations.all { kotlinCompilation ->\n @Suppress(\"DEPRECATION\")\n kotlinCompilation.addSourceSet(kotlinCompilation.defaultSourceSet)\n }<|endoftext|>"} {"prompt":"name = fqn.shortName()\n }.apply {\n createImplicitParameterDeclarationWithWrappedDescriptor()\n this.parent = parent\n addConstructor {\n isPrimary = true\n }\n }\n\n@Suppress(\"UNCHECKED_CAST\")","completion":"fun isElseBranch(branch: IrBranch) = branch is IrElseBranch || ((branch.condition as? IrConst)?.value == true)\n\nfun IrFunction.isMethodOfAny(): Boolean =\n extensionReceiverParameter == null && dispatchReceiverParameter != null &&\n when (name) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilder\nimport org.jetbrains.kotlin.resolve.calls.inference.addSubtypeConstraintIfCompatible\nimport org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage","completion":"import org.jetbrains.kotlin.types.model.KotlinTypeMarker\nimport org.jetbrains.kotlin.types.model.TypeConstructorMarker\nimport org.jetbrains.kotlin.types.model.freshTypeConstructor\nimport org.jetbrains.kotlin.types.model.safeSubstitute\n\ndata class ReturnArgumentsAnalysisResult(<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.lexer.KtTokens\nimport org.jetbrains.kotlin.psi.KtFile\nimport org.jetbrains.kotlin.psi.KtWhenEntry\nimport org.jetbrains.kotlin.psi.psiUtil.getNonStrictParentOfType","completion":"import org.jetbrains.kotlin.psi.stubs.elements.KtFileElementType\nimport org.jetbrains.kotlin.psi.stubs.elements.KtStubElementType\n\n\/**\n * Creates [org.jetbrains.kotlin.psi.KtCommonFile] when java psi is not available e.g. on JB Client.<|endoftext|>"} {"prompt":"assertEquals(null, notNullToNullE(cib), \"CIB as? IE?\")\n assertEquals(d, notNullToNullE(d), \"D as? IE?\")\n assertEquals(e, notNullToNullE(e), \"E as? IE?\")\n assertEquals(null, notNullToNullE(f), \"F as? IE?\")","completion":"assertEquals(g, notNullToNullE(g), \"G as? IE?\")\n assertEquals(null, notNullToNullE(an), \"Any as? IE?\")\n\n assertEquals(null, notNullToNullI(a), \"A as? II?\")\n assertEquals(null, notNullToNullI(aia), \"AIA as? II?\")<|endoftext|>"} {"prompt":"fun byValue(value: Int): CXDiagnosticSeverity = values().find { it.value == value }!!\n }\n \n override open val value: Int = value\n class Var(rawPtr: NativePtr) : CEnumVar(rawPtr) {\n @Deprecated(\"Use sizeOf() or alignOf() instead.\")","completion":"companion object : Type(sizeOf().toInt())\n var value: CXDiagnosticSeverity\n get() = byValue(this.reinterpret().value)\n set(value) { this.reinterpret().value = value.value }\n }\n}\n\nenum class CXLoadDiag_Error(value: Int) : CEnum {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.js.backend.ast.JsExpressionStatement\nimport org.jetbrains.kotlin.js.backend.ast.JsFunction\nimport org.jetbrains.kotlin.js.config.ErrorTolerancePolicy\nimport org.jetbrains.kotlin.js.config.JSConfigurationKeys","completion":"import org.jetbrains.kotlin.js.config.RuntimeDiagnostic\nimport org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.resolve.scopes.MemberScope\nimport org.jetbrains.kotlin.types.Variance<|endoftext|>"} {"prompt":"processor: (FirNamedFunctionSymbol) -> ProcessorAction\n): ProcessorAction =\n doProcessAllOverriddenCallables(\n functionSymbol,\n processor,\n FirTypeScope::processDirectOverriddenFunctionsWithBaseScope,\n mutableSetOf()\n )\n\ninline fun > FirTypeScope.anyOverriddenOf(","completion":"symbol: S,\n processOverridden: FirTypeScope.(S, (S) -> ProcessorAction) -> ProcessorAction,\n noinline predicate: (S) -> Boolean,\n): Boolean {\n var result = false\n processOverridden(symbol) {\n if (predicate(it)) {\n result = true\n return@processOverridden ProcessorAction.STOP\n }<|endoftext|>"} {"prompt":"override fun visitReceiver(esReceiver: ESReceiver): MutableContextInfo = MutableContextInfo.EMPTY\n\n override fun visitLambda(lambda: ESValue): MutableContextInfo = MutableContextInfo.EMPTY\n\n private fun inverted(block: () -> R): R {\n isInverted = isInverted.not()\n val result = block()","completion":"isInverted = isInverted.not()\n return result\n }\n}<|endoftext|>"} {"prompt":"fun Circle() { Vector() }\n\n @Composable\n fun Square() { Vector() }\n\n @Composable\n @ComposableTarget(\"Vector\")\n fun Vector(content: @Composable @ComposableTarget(\"Vector\") () -> Unit) { }\n\n @Composable\n fun Layer(content: @Composable () -> Unit) { Vector(content) }","completion":"@Composable\n @ComposableTarget(\"UI\")\n fun Drawing(content: @Composable @ComposableTarget(\"Vector\") () -> Unit) { }\n\n @Composable\n fun Wrapper(content: @Composable () -> Unit) { content() }\n \"\"\"\n}<|endoftext|>"} {"prompt":"value class Foo(val x: T) {\n constructor(y: Int) : this(\"OK\" as T) {\n if (y == 0) throw IllegalArgumentException()\n if (y == 1) return\n return Unit\n }\n\n constructor(z: Double) : this(z.toInt())\n}\n\nfun box(): String {","completion":"return Foo(42.0).x\n}<|endoftext|>"} {"prompt":"public inline operator fun BigInteger.dec(): BigInteger = this.subtract(BigInteger.ONE)\n\n\/** Inverts the bits including the sign bit in this value. *\/\n@SinceKotlin(\"1.2\")\n@kotlin.internal.InlineOnly\npublic inline fun BigInteger.inv(): BigInteger = this.not()\n\n\/** Performs a bitwise AND operation between the two values. *\/","completion":"@SinceKotlin(\"1.2\")\n@kotlin.internal.InlineOnly\npublic inline infix fun BigInteger.and(other: BigInteger): BigInteger = this.and(other)\n\n\/** Performs a bitwise OR operation between the two values. *\/\n@SinceKotlin(\"1.2\")\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"val UNINITIALIZED_VARIABLE: KtDiagnosticFactory1 by error1()\n val UNINITIALIZED_PARAMETER: KtDiagnosticFactory1 by error1()","completion":"val UNINITIALIZED_ENUM_ENTRY: KtDiagnosticFactory1 by error1(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED)<|endoftext|>"} {"prompt":"public static TargetType LOWER_BOUNDED_WILDCARD() { return new TargetType(); }\n\n }\n\n}\n\n\/\/ FILE: kotlin.kt\n\nfun accept(arg: T) {}\n\nfun test() {\n \/\/ jspecify_nullness_mismatch","completion":"accept(NullMarkedType.TargetType.UNBOUNDED_WILDCARD().produce())\n \/\/ jspecify_nullness_mismatch\n accept(NullMarkedType.TargetType.UPPER_BOUNDED_WILDCARD().produce())<|endoftext|>"} {"prompt":"AGP_84(AGP.AGP_84, GradleVersion.version(Gradle.G_8_4), GradleVersion.version(Gradle.G_8_7), JavaVersion.VERSION_17),","completion":"AGP_85(AGP.AGP_85, GradleVersion.version(Gradle.G_8_5), GradleVersion.version(Gradle.G_8_7), JavaVersion.VERSION_17),\n ;\n }\n\n object COCOAPODS {\n const val VERSION = \"1.11.0\"\n }\n\n object AppleGradlePlugin {<|endoftext|>"} {"prompt":"\"kotlin.collections.builders\",\n \"kotlin.js\",\n \"kotlin.jvm.internal.unsafe\",\n \"kotlin.internal.jdk7\",\n \"kotlin.internal.jdk8\",\n \"kotlin.random.jdk8\",\n ))\n }\n\n @Test\n fun stdlibJdk7() {","completion":"checkNonExportedPackages(\"kotlin-stdlib-jdk7\", setOf())\n }\n\n @Test\n fun stdlibJdk8() {\n checkNonExportedPackages(\"kotlin-stdlib-jdk8\", setOf())\n }\n\n private fun checkNonExportedPackages(jarShortName: String, expectedPackages: Set) {<|endoftext|>"} {"prompt":"nonNullableStrs.contains(\"x\")\n nonNullableStrs.contains(ns)\n \"x\" in nonNullableStrs\n ns in nonNullableStrs\n}\n\nfun test3(ns: String?, nullableStrs: Array, nonNullableStrs: Array) {\n nullableStrs.contains(\"x\")","completion":"nonNullableStrs.contains(\"x\")\n\n nullableStrs.contains(ns)\n nonNullableStrs.contains(ns)\n\n \"x\" in nullableStrs\n \"x\" in nonNullableStrs\n ns in nullableStrs\n ns in nonNullableStrs\n}<|endoftext|>"} {"prompt":"if (b) object {\n val a = 10\n } else z\n }\n\n val y = if (b) x else z","completion":"if (y !== z || y != implicitNullableNothingProperty) {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.test.services.sourceProviders\n\nimport org.jetbrains.kotlin.test.directives.AdditionalFilesDirectives\nimport org.jetbrains.kotlin.test.directives.model.DirectivesContainer\nimport org.jetbrains.kotlin.test.directives.model.RegisteredDirectives","completion":"import org.jetbrains.kotlin.test.model.TestFile\nimport org.jetbrains.kotlin.test.model.TestModule\nimport org.jetbrains.kotlin.test.services.AdditionalSourceProvider\nimport org.jetbrains.kotlin.test.services.TestServices\nimport java.io.File<|endoftext|>"} {"prompt":"\/\/ library.kt:12 baz: param:int=6:int, b:int=2:int, $i$f$inlineCall\\1\\10:int=0:int, $i$a$-inlineCall-LibraryKt$bar$1$baz$1\\2\\30\\0:int=0:int, g\\2:int=7:int","completion":"\/\/ library.kt:26 baz: param:int=6:int, b:int=2:int, $i$f$inlineCall\\1\\10:int=0:int\n\/\/ library.kt:27 baz: param:int=6:int, b:int=2:int, $i$f$inlineCall\\1\\10:int=0:int<|endoftext|>"} {"prompt":"1\n} catch (e: Exception) {\n 2\n}\nconst val c2 = try {\n throwExample(10, 0)\n 0\n} catch (e: Exception) {\n 1\n} catch (e: ArithmeticException) {\n 2\n}","completion":"const val c3 = try {\n throwExample(10, 0)\n 0\n} catch (e: NullPointerException) {\n 1\n} catch (e: ArithmeticException) {\n 2\n}\n\nconst val d1 = try {\n throwExample(10, 0)<|endoftext|>"} {"prompt":"ktDelegate: KtPropertyDelegate,\n propertyDescriptor: PropertyDescriptor\n ): IrProperty {\n\n val kPropertyType = getKPropertyTypeForDelegatedProperty(propertyDescriptor)\n\n val irProperty = context.symbolTable.descriptorExtension.declareProperty(","completion":"ktProperty.startOffsetSkippingComments, ktProperty.endOffset, IrDeclarationOrigin.DEFINED,\n propertyDescriptor,\n isDelegated = true\n ).apply {\n backingField = generateDelegateFieldForProperty(propertyDescriptor, kPropertyType, ktDelegate)\n }\n\n val irDelegate = irProperty.backingField!!<|endoftext|>"} {"prompt":"$i$a$-g-TestKt$box$2\\12\\132\\0:int=0:int, $i$f$h\\13\\48:int=0:int, xh\\13:int=1:int","completion":"\/\/ library.kt:13 box: m:int=2:int, m1:int=2:int, xg\\9:int=0:int, $i$f$g\\9\\47:int=0:int, yLambdaG\\12:int=2:int, xLambdaG\\12:int=1:int,<|endoftext|>"} {"prompt":"}\n }\n with(lazyT) {\n with(lazy1) {\n test1()\n test2()\n test3()\n }\n }\n with(lazyLazyT) {","completion":"with(lazy1) {\n test1()\n test2()\n test3()\n }\n }\n with(lazy1) {\n with(lazyLazyT) {\n test1()\n test2()\n test3()\n }<|endoftext|>"} {"prompt":"private inner class ModuleDeserializationState {\n private val filesWithPendingTopLevels = mutableSetOf()\n\n fun enqueueFile(fileDeserializationState: FileDeserializationState) {\n filesWithPendingTopLevels.add(fileDeserializationState)\n linker.modulesWithReachableTopLevels.add(this@BasicIrModuleDeserializer)","completion":"}\n\n fun addIdSignature(key: IdSignature) {\n val fileLocalDeserializationState = moduleReversedFileIndex[key] ?: error(\"No file found for key $key\")\n fileLocalDeserializationState.addIdSignature(key)\n\n enqueueFile(fileLocalDeserializationState)\n }\n\n fun deserializeReachableDeclarations() {<|endoftext|>"} {"prompt":"url = URI(\"https:\/\/github.com\/yarnpkg\/yarn\/releases\/download\")\n patternLayout {\n artifact(\"v[revision]\/[artifact](-v[revision]).[ext]\")\n }\n metadataSources {\n artifact()\n }\n content {\n includeModule(\"com.yarnpkg\", \"yarn\")\n }\n }","completion":"}\n }\n \"\"\".trimIndent()\n }\n\n build(\"kotlinNodeJsSetup\", \"kotlinYarnSetup\") {\n assertTasksExecuted(\":kotlinNodeJsSetup\")\n assertTasksExecuted(\":kotlinYarnSetup\")\n }\n }\n }<|endoftext|>"} {"prompt":"irStatements,\n )\n }\n } else {\n Fir2IrImplicitCastInserter.coerceToUnitIfNeeded(\n firLoopBody.convertToIrExpressionOrBlock(origin),\n irBuiltIns\n )\n }\n }\n loopMap.remove(whileLoop)\n }\n }.also {","completion":"whileLoop.accept(implicitCastInserter, it)\n }\n }\n\n private fun FirJump.convertJumpWithOffsets(\n f: (startOffset: Int, endOffset: Int, irLoop: IrLoop, label: String?) -> IrBreakContinue\n ): IrExpression {\n return convertWithOffsets { startOffset, endOffset -><|endoftext|>"} {"prompt":"@Deprecated(\"Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.\\nIf you override toChar() function in your Number inheritor, it's recommended to gradually deprecate the overriding function and then remove it.\\nSee https:\/\/youtrack.jetbrains.com\/issue\/KT-46465 for details about the migration\", ReplaceWith(\"this.toInt().toChar()\"))","completion":"@DeprecatedSinceKotlin(warningSince = \"1.9\", errorSince = \"2.3\")\n public open fun toChar(): Char {\n return toInt().toChar()\n }\n\n \/**\n * Returns the value of this number as a [Short], which may involve rounding or truncation.\n *\/\n public abstract fun toShort(): Short\n\n \/**<|endoftext|>"} {"prompt":"@kotlin.internal.InlineOnly\npublic inline operator fun kotlin.collections.List.component2(): T\n\n@kotlin.internal.InlineOnly\npublic inline operator fun kotlin.collections.Map.Entry.component2(): V\n\n@kotlin.internal.InlineOnly","completion":"public inline operator fun kotlin.Array.component3(): T\n\n@kotlin.internal.InlineOnly\npublic inline operator fun kotlin.BooleanArray.component3(): kotlin.Boolean\n\n@kotlin.internal.InlineOnly\npublic inline operator fun kotlin.ByteArray.component3(): kotlin.Byte\n\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.konan.test.blackbox.support.settings\n\nimport org.jetbrains.kotlin.konan.target.Configurables\nimport org.jetbrains.kotlin.konan.target.Distribution\nimport org.jetbrains.kotlin.konan.target.HostManager","completion":"import org.jetbrains.kotlin.konan.target.PlatformManager\nimport org.jetbrains.kotlin.test.services.JUnit5Assertions.assertTrue\nimport org.jetbrains.kotlin.test.services.JUnit5Assertions.fail\nimport kotlin.reflect.KClass\n\nabstract class Settings(private val parent: Settings?, settings: Iterable) {<|endoftext|>"} {"prompt":"expression.value.transform(),\n expression.type.remapType(),\n mapStatementOrigin(expression.origin),\n symbolRemapper.getReferencedClassOrNull(expression.superQualifierSymbol)\n ).processAttributes(expression)\n\n override fun visitCall(expression: IrCall): IrCall =\n shallowCopyCall(expression).apply {\n copyRemappedTypeArgumentsFrom(expression)","completion":"transformValueArguments(expression)\n }\n\n override fun visitConstructorCall(expression: IrConstructorCall): IrConstructorCall {\n val constructorSymbol = symbolRemapper.getReferencedConstructor(expression.symbol)\n return IrConstructorCallImpl(\n expression.startOffset, expression.endOffset,\n expression.type.remapType(),\n constructorSymbol,<|endoftext|>"} {"prompt":"assertNotEquals(nullProtoObj1.hashCode(), obj2.hashCode())\n assertNotEquals(nullProtoObj1.hashCode(), nullProtoObj2.hashCode())\n assertNotEquals(nullProtoObj1.hashCode(), arr1.hashCode())\n assertNotEquals(nullProtoObj1.hashCode(), arr2.hashCode())","completion":"assertNotEquals(nullProtoObj2.hashCode(), obj1.hashCode())\n assertNotEquals(nullProtoObj2.hashCode(), obj2.hashCode())\n assertNotEquals(nullProtoObj2.hashCode(), nullProtoObj1.hashCode())\n assertNotEquals(nullProtoObj2.hashCode(), arr1.hashCode())<|endoftext|>"} {"prompt":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.NotASupertype\n\ninternal class TypeArgumentsRedundantInSuperQualifierImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.TypeArgumentsRedundantInSuperQualifier\n\ninternal class SuperclassNotAccessibleFromInterfaceImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"fun throwNotInitialized(propertyName: String, className: String): Nothing {\n throw AssertionError(\"Property '$propertyName' for '$className' wasn't initialized to access\")\n }\n}\n\ninternal abstract class AnnotatedAndDocumented {\n private var doc: String? = null\n val annotations: MutableList = mutableListOf()\n var additionalComments: String? = null","completion":"fun appendDoc(doc: String) {\n if (this.doc == null) {\n this.doc = doc\n } else {\n this.doc += \"$END_LINE$doc\"\n }\n }\n\n protected fun StringBuilder.printDocumentationAndAnnotations(forceMultiLineDoc: Boolean = false) {\n if (doc != null) {<|endoftext|>"} {"prompt":"override val pluginVariant: String = PLUGIN_VARIANT_NAME\n\n override fun apply(project: Project) {\n project.registerVariantImplementations()\n super.apply(project)\n }\n}\n\nopen class KotlinAndroidPluginWrapper @Inject constructor(\n registry: ToolingModelBuilderRegistry\n) : AbstractKotlinAndroidPluginWrapper(registry) {","completion":"override val pluginVariant: String = PLUGIN_VARIANT_NAME\n\n override fun apply(project: Project) {\n project.registerVariantImplementations()\n super.apply(project)\n }\n}\n\n@Suppress(\"DEPRECATION_ERROR\")\nopen class Kotlin2JsPluginWrapper @Inject constructor(\n registry: ToolingModelBuilderRegistry<|endoftext|>"} {"prompt":"listOf(text.substring(start, end))\n } else {\n FP_LITERAL_PARTS.findAll(text).flatMap { it.groupValues }.toList()\n }\n\n return parts.any { it != null && (it.startsWith(\"_\") || it.endsWith(\"_\")) }\n}","completion":"fun hasLongSuffix(text: String) = text.endsWith('l') || text.endsWith('L')\nfun hasUnsignedSuffix(text: String) = text.endsWith('u') || text.endsWith('U')\nfun hasUnsignedLongSuffix(text: String) =\n text.endsWith(\"ul\") || text.endsWith(\"uL\") ||<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {}","completion":"fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {}\n\n fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {}<|endoftext|>"} {"prompt":"@SinceKotlin(\"1.3\")\n@ExperimentalTypeInference\npublic annotation class BuilderInference\n\n\n\/**\n * Enables overload selection based on the type of the value returned from lambda argument.\n *\n * When two or more function overloads have otherwise the same parameter lists that differ only in the return type\n * of a functional parameter, this annotation enables overload selection by the type of the value returned from","completion":"* the lambda function passed to this functional parameter.\n *\n * Example:\n * ```\n * @OverloadResolutionByLambdaReturnType\n * fun create(intProducer: () -> Int): Int\n *\n * fun create(doubleProducer: () -> Double): Double\n *\n * val newValue = create { 3.14 }\n * ```\n *<|endoftext|>"} {"prompt":"}","completion":"-100000000000000000000000000000000 checkType {<|endoftext|>"} {"prompt":"@Suppress(\"AnalysisApiMissingLifetimeCheck\")\n override val useSiteModule: KtModule get() = firResolveSession.useSiteKtModule\n\n override val smartCastProviderImpl = KtFirSmartcastProvider(this, token)\n\n override val expressionTypeProviderImpl = KtFirExpressionTypeProvider(this, token)","completion":"override val diagnosticProviderImpl = KtFirDiagnosticProvider(this, token)\n\n override val containingDeclarationProviderImpl = KtFirSymbolContainingDeclarationProvider(this, token)\n\n override val callResolverImpl = KtFirCallResolver(this, token)\n\n override val samResolverImpl = KtFirSamResolver(this, token)<|endoftext|>"} {"prompt":"A.foo = l@ {\n if (\"0\".hashCode() == 42) return@l\n return@l null\n }\n}\n\nval expectedNullableUnitExplicitReturnUnitAndString: () -> Unit? = l@ {\n if (\"0\".hashCode() == 42) return@l Unit","completion":"\"\"\n}\n\nfun expectedFlexibleUnitImplicitReturnString() {\n A.foo = l@ {\n \"\"\n }\n}\n\nfun expectedFlexibleUnitExplicitReturnUnitAndString() {\n A.foo = l@ {\n if (\"0\".hashCode() == 42) return@l Unit\n \"\"\n }\n}<|endoftext|>"} {"prompt":"private const val MH_CIGAM_64 = 0xcffaedfeL\n\n private const val MH_BILYD = 0x06000000L \/\/ MH_DYLIB = 0x6 converted for JVM\n\n private const val FILE_TYPE_OFFSET = 12L\n private const val FAT_FIRST_MACHO_OFFSET_OFFSET = 16L\n\n \/**","completion":"* Checks if the [file] is a Mach-O dynamic shared library\n * or a Mach-O fat binary containing a number of dynamic libraries\n *\/\n fun isDylib(file: File, logger: Logger): Boolean {\n try {\n RandomAccessFile(file, \"r\").use { raf ->\n val magic = raf.readInt().fromUIntToLong()<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.api.descriptors.signatures\n\nimport org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeToken\nimport org.jetbrains.kotlin.analysis.api.lifetime.withValidityAssertion\nimport org.jetbrains.kotlin.analysis.api.signatures.KtFunctionLikeSignature","completion":"import org.jetbrains.kotlin.analysis.api.signatures.KtVariableLikeSignature\nimport org.jetbrains.kotlin.analysis.api.symbols.KtFunctionLikeSymbol\nimport org.jetbrains.kotlin.analysis.api.symbols.KtValueParameterSymbol<|endoftext|>"} {"prompt":"}\n\n \/\/ The less the higher an object escapes.\n object Depths {\n val INFINITY = 1_000_000\n val ROOT_SCOPE = 0\n val RETURN_VALUE = -1\n val PARAMETER = -2\n val GLOBAL = -3\n }\n\n object DivergenceResolutionParams {\n const val MaxAttempts = 3","completion":"const val NegligibleSize = 100\n const val SwellingFactor = 25\n }\n\n private class RoleInfoEntry(val node: DataFlowIR.Node? = null, val field: DataFlowIR.Field?)\n\n private open class RoleInfo {\n val entries = mutableListOf()\n\n open fun add(entry: RoleInfoEntry) = entries.add(entry)\n }<|endoftext|>"} {"prompt":"\/\/ KT-49200\n\/\/ !RENDER_DIAGNOSTICS_FULL_TEXT\n\/\/ FILE: first\/KtNodeTypes.java\n\npackage first;\n\npublic interface KtNodeTypes {\n String SOME = \"Some\";\n}\n\n\/\/ FILE: SomeEnum.kt\n\npackage second\n\nenum class SomeEnum {\n SOME;\n}\n\n\/\/ FILE: test.kt","completion":"import first.KtNodeTypes.SOME\nimport second.SomeEnum.SOME\n\nfun test(arg: String): Boolean {\n return when (arg) {\n SOME -> true\n else -> false\n }\n}<|endoftext|>"} {"prompt":"dirtyFilesForRestoring.mapIndexedTo(ArrayList(dirtyFilesForRestoring.size)) { i, libFileAndSrcFile ->\n Triple(libFileAndSrcFile.first, libFileAndSrcFile.second, fragmentGenerators[i])\n }\n }\n\n private data class IrForDirtyFilesAndCompiler(","completion":"val incrementalCacheArtifacts: Map,\n val loadedIr: LoadedJsIr,\n val dirtyFiles: Map>,\n val irCompiler: JsIrCompilerICInterface\n )\n\n private fun loadIrForDirtyFilesAndInitCompiler(): IrForDirtyFilesAndCompiler {<|endoftext|>"} {"prompt":"override fun updateContextReceiverTypes(newTypes: List) = functionCall.updateContextReceiverTypes(newTypes)\n override fun argumentToParameterMap(\n resultingDescriptor: CallableDescriptor,\n valueArguments: Map\n ) = functionCall.argumentToParameterMap(resultingDescriptor, valueArguments)","completion":"override fun setResultingSubstitutor(substitutor: NewTypeSubstitutor?) {\n functionCall.setResultingSubstitutor(substitutor)\n variableCall.setResultingSubstitutor(substitutor)\n }\n}<|endoftext|>"} {"prompt":"if (finallyExpression != null) {\n proto.finally = serializeExpression(finallyExpression)\n }\n return proto.build()\n }\n\n private fun serializeTypeOperator(operator: IrTypeOperator): ProtoTypeOperator = when (operator) {\n IrTypeOperator.CAST ->\n ProtoTypeOperator.CAST","completion":"IrTypeOperator.IMPLICIT_CAST ->\n ProtoTypeOperator.IMPLICIT_CAST\n IrTypeOperator.IMPLICIT_NOTNULL ->\n ProtoTypeOperator.IMPLICIT_NOTNULL\n IrTypeOperator.IMPLICIT_COERCION_TO_UNIT ->\n ProtoTypeOperator.IMPLICIT_COERCION_TO_UNIT<|endoftext|>"} {"prompt":"$i$f$x2\\10\\133:int=0:int, y2\\10:int=2:int","completion":"\/\/ library.kt:13 box: m:int=1:int, $i$f$foo\\8\\45:int=0:int, fooVar\\8:int=100:int, x1Var\\9:int=1:int, $i$f$x1\\9\\127:int=0:int, y1\\9:int=1:int<|endoftext|>"} {"prompt":"source = expression.toKtPsiSourceElement()\n this.anonymousFunction = anonymousFunction\n }\n }\n\n protected fun KtSecondaryConstructor.toFirConstructor(\n delegatedTypeRef: FirTypeRef,\n selfTypeRef: FirTypeRef,\n owner: KtClassOrObject,\n ownerTypeParameters: List,","completion":"): FirConstructor {\n val target = FirFunctionTarget(labelName = null, isLambda = false)\n return buildConstructor {\n symbol = FirConstructorSymbol(callableIdForClassConstructor())\n withContainerSymbol(symbol) {\n source = this@toFirConstructor.toFirSourceElement()\n moduleData = baseModuleData<|endoftext|>"} {"prompt":"DASH_PUNCTUATION(20, \"Pd\"),\n\n \/**\n * General category \"Ps\" in the Unicode specification.\n *\/\n START_PUNCTUATION(21, \"Ps\"),\n\n \/**\n * General category \"Pe\" in the Unicode specification.\n *\/\n END_PUNCTUATION(22, \"Pe\"),\n\n \/**","completion":"* General category \"Pc\" in the Unicode specification.\n *\/\n CONNECTOR_PUNCTUATION(23, \"Pc\"),\n\n \/**\n * General category \"Po\" in the Unicode specification.\n *\/\n OTHER_PUNCTUATION(24, \"Po\"),\n\n \/**\n * General category \"Sm\" in the Unicode specification.\n *\/<|endoftext|>"} {"prompt":"private fun FlowContent.generate(intersectionType: ConeIntersectionType) {\n +\"(\"\n generateList(intersectionType.intersectedTypes.toList(), \" & \") { generate(it) }\n +\")\"\n }\n\n private fun FlowContent.generate(type: ConeClassLikeType) {\n resolved {","completion":"when (val symbol = type.lookupTag.toSymbol(session)) {\n is FirTypeAliasSymbol -> {\n symbolRef(symbol) {\n simpleName(type.lookupTag.name)\n }\n generateTypeArguments(type)\n if (type.isMarkedNullable) {\n +\"?\"\n }\n +\" = \"<|endoftext|>"} {"prompt":"fun greater2(a: Double?, b: Double?) = a!! > b!!\n\nfun greater3(a: Double?, b: Double?) = a != null && b != null && a > b\n\nfun greater4(a: Double?, b: Double?) = if (a is Double && b is Double) a > b else null!!","completion":"fun greater5(a: Any?, b: Any?) = if (a is Double && b is Double) a > b else null!!\n\nfun box(): String {\n if (0.0 > -0.0) return \"fail 0\"\n if (greater1(0.0, -0.0)) return \"fail 1\"\n if (greater2(0.0, -0.0)) return \"fail 2\"<|endoftext|>"} {"prompt":"dependencyNodes.forEach { dependencyNode ->\n val moduleDependency = dependencyByNode[dependencyNode]\n\n if (moduleDependency != null) {\n if (includeOnlySpecifiedDependenciesSet != null && moduleDependency !in includeOnlySpecifiedDependenciesSet) {\n dependenciesNode.remove(dependencyNode)\n return@forEach\n }\n }","completion":"val mapDependencyTo = resultDependenciesForEachUsageContext.get(moduleDependency)\n\n if (mapDependencyTo != null) {\n fun Node.setChildNodeByName(name: String, value: String?) {\n val childNode: Node? = (get(name) as NodeList?)?.firstOrNull() as Node?\n if (value != null) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.checkers.isRecursiveValueClassType\nimport org.jetbrains.kotlin.fir.analysis.checkers.isSingleFieldValueClass\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors\nimport org.jetbrains.kotlin.fir.declarations.FirProperty","completion":"import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyGetter\nimport org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertySetter\nimport org.jetbrains.kotlin.fir.declarations.utils.hasExplicitBackingField\nimport org.jetbrains.kotlin.fir.declarations.utils.isAbstract<|endoftext|>"} {"prompt":"* Atomically sets the value to the given [new value][newValue] if the current value equals the [expected value][expected]\n * and returns the old value in any case.\n *\n * Provides sequential consistent ordering guarantees and cannot fail spuriously.\n *\/\n public fun compareAndSwap(expected: Int, newValue: Int): Int = this::value.compareAndExchangeField(expected, newValue)","completion":"\/**\n * Atomically adds the [given value][delta] to the current value and returns the old value.\n *\/\n public fun getAndAdd(delta: Int): Int = this::value.getAndAddField(delta)\n\n \/**\n * Atomically adds the [given value][delta] to the current value and returns the new value.\n *\/<|endoftext|>"} {"prompt":"}\n\n inline fun Double.calcDouble(s: (Int, Double) -> Double) : Double {\n return s(res, this)\n }\n\n fun doWork(l : InlineX) : Int {\n return l.calcInt({ a: Int, b: Int -> a + b})\n }\n\n fun doWorkWithDouble(s : Double) : Double {","completion":"return s.calcDouble({ a: Int, b: Double -> a + b})\n }\n\n}\n\nfun test1(): Int {\n val inlineX = Inline(9)\n return inlineX.calcExt({ z: Int -> z}, 25)\n}\n\nfun test2(): Int {\n val inlineX = Inline(9)<|endoftext|>"} {"prompt":"internal class JvmIrValidationAfterLoweringPhase(context: JvmBackendContext) : JvmIrValidationPhase(context) {\n override fun validate(irModule: IrModuleFragment) {\n validationCallback(context, irModule, checkProperties = true)\n\n checkAllFileLevelDeclarationsAreClasses(irModule)\n val validator = object : IrElementVisitorVoid {","completion":"override fun visitElement(element: IrElement) {\n element.acceptChildrenVoid(this)\n }\n\n override fun visitProperty(declaration: IrProperty) {\n error(\"No properties should remain at this stage\")\n }\n\n override fun visitAnonymousInitializer(declaration: IrAnonymousInitializer) {\n error(\"No anonymous initializers should remain at this stage\")\n }\n }<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.resolve.calls.components.candidate\n\nimport org.jetbrains.kotlin.resolve.calls.components.KotlinResolutionCallbacks\nimport org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage","completion":"import org.jetbrains.kotlin.resolve.calls.model.KotlinCallComponents\nimport org.jetbrains.kotlin.resolve.calls.model.MutableResolvedCallAtom\nimport org.jetbrains.kotlin.resolve.calls.model.ResolvedAtom<|endoftext|>"} {"prompt":"* Returns null if the type cannot be unboxed.\n *\/\n fun unboxType(type: IrType): IrType? {\n val klass = type.classOrNull?.owner ?: return null\n val representation = klass.inlineClassRepresentation ?: return null\n\n \/\/ TODO: Apply type substitutions\n var underlyingType = representation.underlyingType.unboxInlineClass()","completion":"if (!underlyingType.isNullable() && underlyingType.isTypeParameter()) {\n underlyingType = underlyingType.erasedUpperBound.defaultType\n }\n if (!type.isNullable())\n return underlyingType\n if (underlyingType.isNullable() || underlyingType.isPrimitiveType())\n return null\n return underlyingType.makeNullable()\n }\n\n \/**<|endoftext|>"} {"prompt":"fun testKotlinJvmContextClassLoader() {\n val kotlinTestJar = File(PathUtil.kotlinPathsForDistDirectory.homePath, \"lib\/kotlin-test.jar\")\n assertTrue(\"kotlin-main-kts.jar not found, run dist task: ${kotlinTestJar.absolutePath}\", kotlinTestJar.exists())","completion":"kotlincInProcess(\n \"-cp\", kotlinTestJar.path,\n \"$testDataDirectory\/contextClassLoaderTester.kt\",\n \"-d\", tmpdir.path\n )\n\n runProcess(\n \"kotlin\",\n \"-cp\", listOf(tmpdir.path, kotlinTestJar.path).joinToString(File.pathSeparator),<|endoftext|>"} {"prompt":"if (v != null || this.v != null) this.v.propNullableT","completion":"if (v != null || this.v != null) this.v.propNullableAny<|endoftext|>"} {"prompt":"public interface KProperty2 : kotlin.reflect.KProperty, (D, E) -> V {\n public abstract fun get(receiver1: D, receiver2: E): V\n}\n\npublic interface KType {\n @kotlin.SinceKotlin(version = \"1.1\")","completion":"public abstract val arguments: kotlin.collections.List { get; }\n\n @kotlin.SinceKotlin(version = \"1.1\")\n public abstract val classifier: kotlin.reflect.KClassifier? { get; }\n\n public abstract val isMarkedNullable: kotlin.Boolean { get; }\n}<|endoftext|>"} {"prompt":"* Returns a character at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this char sequence.\n *\/\n@kotlin.internal.InlineOnly\npublic inline fun CharSequence.getOrElse(index: Int, defaultValue: (Int) -> Char): Char {\n contract {","completion":"callsInPlace(defaultValue, InvocationKind.AT_MOST_ONCE)\n }\n return if (index in indices) get(index) else defaultValue(index)\n}\n\n\/**\n * Returns a character at the given [index] or `null` if the [index] is out of bounds of this char sequence.\n * \n * @sample samples.collections.Collections.Elements.getOrNull<|endoftext|>"} {"prompt":"ExpectedEnumEntryWithBodyImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n add(FirErrors.EXPECTED_PROPERTY_INITIALIZER) { firDiagnostic ->\n ExpectedPropertyInitializerImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )","completion":"}\n add(FirErrors.EXPECTED_DELEGATED_PROPERTY) { firDiagnostic ->\n ExpectedDelegatedPropertyImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n add(FirErrors.EXPECTED_LATEINIT_PROPERTY) { firDiagnostic -><|endoftext|>"} {"prompt":"x.funAny()\n x.funNullableT()","completion":"x.funNullableAny()\n }\n}\n\n\/\/ TESTCASE NUMBER: 3\nfun case_3(x: Nothing?, f: Boolean) {\n do {\n if (x != null) else break<|endoftext|>"} {"prompt":"visitWrappedExpression(wrappedArgumentExpression, data)\n\n override fun visitSpreadArgumentExpression(spreadArgumentExpression: FirSpreadArgumentExpression, data: D): R =\n visitWrappedArgumentExpression(spreadArgumentExpression, data)","completion":"override fun visitNamedArgumentExpression(namedArgumentExpression: FirNamedArgumentExpression, data: D): R =\n visitWrappedArgumentExpression(namedArgumentExpression, data)\n\n override fun visitVarargArgumentsExpression(varargArgumentsExpression: FirVarargArgumentsExpression, data: D): R =<|endoftext|>"} {"prompt":"filesToCache.forEach { configuration.report(CompilerMessageSeverity.LOGGING, \" $it\") }\n\n \/\/ Produce monolithic caches for external libraries for now.\n val makePerFileCache = !isExternal && !library.isInteropLibrary()\n\n val libraryCacheDirectory = when {\n library.isDefault -> konanConfig.systemCacheDirectory","completion":"isExternal -> CachedLibraries.computeVersionedCacheDirectory(\n konanConfig.autoCacheDirectory, library, uniqueNameToLibrary, uniqueNameToHash)\n else -> konanConfig.incrementalCacheDirectory!!\n }\n val libraryCache = libraryCacheDirectory.child(\n if (makePerFileCache)\n CachedLibraries.getPerFileCachedLibraryName(library)\n else<|endoftext|>"} {"prompt":"val b3 = B(b = \"b\")\n if (b3.a != 0) return \"b3.a != 0, it: ${b3.a}\"\n if (b3.b != \"b\") return \"b3.b != 'b', it: ${b3.b}\"\n\n val b4 = B(2, \"c\")","completion":"if (b4.a != 2) return \"b4.a != 2, it: ${b4.a}\"\n if (b4.b != \"c\") return \"b4.b != 'c', it: ${b4.b}\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"for (index in 1 until paths.size) {\n val path: File = paths[index]\n\n val isGlob = '*' in path.name\n if (isGlob) {\n val basePath: File = paths[index - 1]\n val basePathAsPath: Path = basePath.toPath()","completion":"val pattern: String = unexpandedPath.relativeTo(basePath).path.let { pattern ->\n if (File.separatorChar == '\\\\') pattern.replace(\"\\\\\", \"\\\\\\\\\") else pattern\n }\n val matcher: PathMatcher = FileSystems.getDefault().getPathMatcher(\"glob:$pattern\")<|endoftext|>"} {"prompt":"classes.ifNotEmpty { wasRendered = true }\n if (wasRendered) {\n appendLine()\n }\n }\n\n private fun PrettyPrinter.appendSorted(list: List, addPrefix: Boolean, render: (T) -> String) {\n if (list.isEmpty()) return\n val prefix = if (addPrefix) \"\\n\\n\" else \"\"","completion":"list.map(render).sorted().joinTo(this, separator = \"\\n\\n\", prefix = prefix)\n }\n\n private fun PsiAnnotation.renderAnnotation(): String {\n\n if (qualifiedName == \"kotlin.Metadata\") return \"\"\n\n val renderedAttributes = parameterList.attributes.map {<|endoftext|>"} {"prompt":"super.visitPropertyReference(expression)\n }\n\n override fun visitFunctionReference(expression: IrFunctionReference) {\n patchIfNeeded(expression.symbol) { expression.symbol = it }\n patchIfNeeded(expression.reflectionTarget) { expression.reflectionTarget = it }\n super.visitFunctionReference(expression)\n }","completion":"override fun visitClassReference(expression: IrClassReference) {\n patchIfNeeded(expression.symbol) { expression.symbol = it }\n super.visitClassReference(expression)\n }\n\n @OptIn(UnsafeDuringIrConstructionAPI::class)<|endoftext|>"} {"prompt":"val deserializedIrModule = deserializeModule(stdlib2, klib)\n\n val actual = deserializedIrModule.dump(DumpIrTreeOptions(stableOrder = true, verboseErrorTypes = false))\n\n try {\n TestCase.assertEquals(wholeFile.name, expected, actual)\n } catch (e: Throwable) {\n throw rethrow(e)\n }","completion":"}\n\n private fun serializeModule(\n irModuleFragment: IrModuleFragment,\n bindingContext: BindingContext,\n stdlib: KotlinLibrary,\n containsErrorCode: Boolean,\n ): String {\n val klibDir = org.jetbrains.kotlin.konan.file.createTempDir(\"testKlib\")\n serializeModuleIntoKlib(<|endoftext|>"} {"prompt":"val prefix = if (field.type.isPrimitiveBoolean() && !accessors.noIsPrefix) AccessorNames.IS else AccessorNames.GET\n prefix + propertyName.capitalize()\n }\n classDescriptor.createFunction(\n Name.identifier(functionName),\n emptyList(),\n field.returnType,","completion":"visibility = getter.visibility.toDescriptorVisibility()\n )\n }\n }\n\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.model.FrontendKinds\nimport org.jetbrains.kotlin.test.model.TestModule\nimport org.jetbrains.kotlin.test.services.TestServices\nimport org.jetbrains.kotlin.test.services.defaultsProvider\nimport org.jetbrains.kotlin.test.services.moduleStructure","completion":"import org.jetbrains.kotlin.test.utils.MultiModuleInfoDumper\nimport org.jetbrains.kotlin.test.utils.withExtension\n\nclass BytecodeListingHandler(testServices: TestServices) : JvmBinaryArtifactHandler(testServices) {\n override val directiveContainers: List\n get() = listOf(CodegenTestDirectives)<|endoftext|>"} {"prompt":"sw.writeParameterType(JvmMethodParameterKind.VALUE, isSkippedInGenericSignature)\n writeParameterType(sw, type, function, materialized)\n sw.writeParameterTypeEnd()\n }\n\n private fun writeParameterType(sw: JvmSignatureWriter, type: IrType, declaration: IrDeclaration, materialized: Boolean = true) {\n if (sw.skipGenericSignature()) {","completion":"if (type.isInlineClassType() && declaration.isFromJava()) {\n typeMapper.mapType(type, TypeMappingMode.GENERIC_ARGUMENT, sw, materialized)\n } else {\n typeMapper.mapType(type, TypeMappingMode.DEFAULT, sw, materialized)\n }\n return\n }\n\n val mode = with(typeSystem) {<|endoftext|>"} {"prompt":"add(FirErrors.EXPRESSION_EXPECTED) { firDiagnostic ->\n ExpressionExpectedImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n add(FirErrors.ASSIGNMENT_IN_EXPRESSION_CONTEXT) { firDiagnostic ->\n AssignmentInExpressionContextImpl(","completion":"firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n add(FirErrors.BREAK_OR_CONTINUE_OUTSIDE_A_LOOP) { firDiagnostic ->\n BreakOrContinueOutsideALoopImpl(\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }<|endoftext|>"} {"prompt":"\/\/ FILE: KotlinFile.kt\npackage k\n\nimport JavaClass\n\nfun foo(javaClass: JavaClass) {\n val v = javaClass.something\n javaClass.something = 1\n javaClass.something++\n}","completion":"\/\/ FILE: JavaClass.java\npublic class JavaClass {\n protected int getSomething() { return 1; }\n public void setSomething(int value) {}\n}<|endoftext|>"} {"prompt":"raw.maps = arrayOf>()\n\n raw.arraysOfLists = arrayOf>>()\n raw.arraysOfLists = arrayOf>()","completion":"raw.arraysOfLists = arrayOf>>()\n\n raw.arraysOfAny = arrayOf>>()\n\n raw.erasedLists = arrayOf>()\n}<|endoftext|>"} {"prompt":"delegatedSelfTypeRef ?: delegatedSuperTypeRef!!,\n owner = this,\n containerTypeParameters,\n allSuperTypeCallEntries,\n containingClassIsExpectClass,\n copyConstructedTypeRefWithImplicitSource = true,\n isErrorConstructor = !hasPrimaryConstructor,","completion":"isImplicitlyActual = container.status.isActual && (container.status.isInline || classKind == ClassKind.ANNOTATION_CLASS),\n isKotlinAny = isKotlinAny,\n )\n container.declarations += firPrimaryConstructor\n }\n\n delegateFieldsMap.values.mapTo(container.declarations) { it.fir }<|endoftext|>"} {"prompt":"fun foo84(x: Int): Int\n}\ninterface I85 {\n fun foo85(x: Int): Int\n}\ninterface I86 {\n fun foo86(x: Int): Int\n}\ninterface I87 {\n fun foo87(x: Int): Int\n}\ninterface I88 {\n fun foo88(x: Int): Int\n}\ninterface I89 {","completion":"fun foo89(x: Int): Int\n}\ninterface I90 {\n fun foo90(x: Int): Int\n}\ninterface I91 {\n fun foo91(x: Int): Int\n}\ninterface I92 {\n fun foo92(x: Int): Int\n}\ninterface I93 {\n fun foo93(x: Int): Int\n}\ninterface I94 {<|endoftext|>"} {"prompt":"class Derived(a1: String, a2: String, b1: String, b2: String, cond: Boolean) : Base(\n if (eSet(\"E_OK;\", cond)) {\n cSet(\"C_THEN;\")\n a1\n } else {\n cSet(\"C_ELSE;\")\n a2\n },","completion":"if (fSet(\"F_OK;\", !cond)) {\n dSet(\"D_THEN;\")\n b1\n } else {\n dSet(\"D_ELSE;\")\n b2\n }\n) {\n}\n\nfun box():String {<|endoftext|>"} {"prompt":"\/\/ function. Generic or abstract functions (interface members, lambdas, open methods, etc.)\n \/\/ do not contain a body to infer anything from so we just use the declared scheme if\n \/\/ there is one. Returning null from this function cause the scheme to be determined from\n \/\/ the target expression (using, for example, the substituted type parameters) instead of\n \/\/ the definition.","completion":"function.takeIf { it.body != null && it.typeParameters.isEmpty() }?.let {\n inferenceNodeOf(function, transformer)\n }\n }\n}\n\n\/**\n * A node representing a variable declaration.\n *\/\nclass InferenceVariable(\n private val transformer: ComposableTargetAnnotationsTransformer,\n override val element: IrVariable,\n) : InferenceNode() {<|endoftext|>"} {"prompt":"}\n\n libraries.forEach { if (it !in visited) dfs(it) }\n return visited\n }\n\n private data class LibraryFile(val library: KotlinLibrary, val file: String) {\n override fun toString() = \"${library.uniqueName}|$file\"\n }\n\n private val KotlinLibrary.isExternal","completion":"get() = autoCacheableFrom.any { libraryFile.absolutePath.startsWith(it.absolutePath) }\n\n fun build() {\n val externalLibrariesToCache = mutableListOf()\n val icedLibraries = mutableListOf()\n\n val stdlib = konanConfig.distribution.stdlib<|endoftext|>"} {"prompt":"@Suppress(\"NESTED_CLASS_IN_EXTERNAL_INTERFACE\")\npublic external interface CanvasLineJoin : JsAny {\n companion object\n}\n\npublic inline val CanvasLineJoin.Companion.ROUND: CanvasLineJoin get() = \"round\".toJsString().unsafeCast()","completion":"public inline val CanvasLineJoin.Companion.BEVEL: CanvasLineJoin get() = \"bevel\".toJsString().unsafeCast()\n\npublic inline val CanvasLineJoin.Companion.MITER: CanvasLineJoin get() = \"miter\".toJsString().unsafeCast()\n\n\/* please, don't implement this interface! *\/\n@JsName(\"null\")<|endoftext|>"} {"prompt":"destination += providerHelper.getTopLevelCallableSymbols(callableId, callables.mapTo(mutableSetOf()) { it.containingKtFile })\n }\n\n override fun getTopLevelFunctionSymbols(packageFqName: FqName, name: Name): List {","completion":"if (!providerHelper.symbolNameCache.mayHaveTopLevelCallable(packageFqName, name)) return emptyList()\n return providerHelper.getTopLevelFunctionSymbols(packageFqName, name)\n }\n\n @FirSymbolProviderInternals<|endoftext|>"} {"prompt":"\/\/ Here, even though we have an explicit 'override fun foo(x: Int)' in IFooMix, we don't generate a bridge for 'foo' in IFooMix.\n \/\/ Thus, class for a lambda created by LambdaMetafactory should provide a bridge for 'foo'.\n \/\/ Thus, 'x' should be of a reference type.","completion":"\/\/ On the other hand, it should also override IFooInt#foo, where 'x' should be a primitive type.\n \/\/ LambdaMetafactory can't handle such case.\n \/\/\n \/\/ TODO accept Example 3 if IFooMix is compiled with default interface methods\n \/\/ Note that this is a conservative check; if we reject LambdaMetafactory-based closure generation scheme, compiler would still<|endoftext|>"} {"prompt":"if (location !is JsLocation?) error(\"JsLocation expected. Found instead: $location\")\n if (location == null)\n null\n else sourceMap.segmentForGeneratedLocation(location.startLine, location.startChar)?.name?.let {\n it to variable.name.toString()\n }\n }\n\n if (nameMapping.isEmpty()) return emptyList()","completion":"val expression = nameMapping.joinToString(separator = \",\", prefix = \"[\", postfix = \"]\") { (_, generatedName) ->\n \"__makeValueDescriptionForSteppingTests($generatedName)\"\n }\n val evaluationResult = debugger.evaluateOnCallFrame(callFrame.callFrameId, expression, returnByValue = true)\n if (evaluationResult.exceptionDetails != null) {<|endoftext|>"} {"prompt":"object FirSerializationErrors {\n val INLINE_CLASSES_NOT_SUPPORTED by error2()\n\n val PLUGIN_IS_NOT_ENABLED by warning0()\n val ANONYMOUS_OBJECTS_NOT_SUPPORTED by error0()","completion":"val INNER_CLASSES_NOT_SUPPORTED by error0()\n\n val EXPLICIT_SERIALIZABLE_IS_REQUIRED by warning0()\n\n val COMPANION_OBJECT_AS_CUSTOM_SERIALIZER_DEPRECATED by error1()<|endoftext|>"} {"prompt":"build(\"commonize\", \"-Pkotlin.mpp.enableNativeDistributionCommonizationCache=true\") {\n assertTasksUpToDate(\":commonizeNativeDistribution\")\n assertNativeDistributionCommonizationCacheHit()\n assertOutputContains(\"Native Distribution Commonization: All available targets are commonized already\")\n assertOutputContains(\"Native Distribution Commonization: Lock acquired\")","completion":"assertOutputContains(\"Native Distribution Commonization: Lock released\")\n assertOutputDoesNotContain(commonizerOutput)\n }\n\n build(\"commonize\", \"-Pkotlin.mpp.enableNativeDistributionCommonizationCache=false\") {\n assertTasksExecuted(\":commonizeNativeDistribution\")\n assertOutputContains(\"Native Distribution Commonization: Cache disabled\")\n assertOutputContains(commonizerOutput)<|endoftext|>"} {"prompt":"\/\/ doesn't support non-sequential access of the entries, so we would have to load and index all entries in memory to provide\n \/\/ non-sequential access, thereby increasing memory usage (KT-57757).\n \/\/ Another option is to use `java.nio.file.FileSystem` API, but it seems to be slower than the other two.\n private val zipFile = ZipFile(jar)","completion":"override fun getUnixStyleRelativePaths(filter: (unixStyleRelativePath: String, isDirectory: Boolean) -> Boolean): List {\n return zipFile.entries()\n .asSequence()\n .filter { filter.invoke(it.name, it.isDirectory) }<|endoftext|>"} {"prompt":"fun wasmPlatformByTargetNames(targets: Collection): TargetPlatform =\n wasmPlatformByTargets(targets.mapNotNull { WasmTarget.fromName(it) })\n\n object Default : TargetPlatform(setOf(WasmPlatformUnspecifiedTarget))\n}\n\nfun TargetPlatform?.isWasm(): Boolean = this?.singleOrNull() is WasmPlatform","completion":"fun TargetPlatform?.isWasmJs(): Boolean {\n val platform = this?.singleOrNull()\n return platform is WasmPlatformWithTarget && platform.target == WasmTarget.JS\n}\nfun TargetPlatform?.isWasmWasi(): Boolean {\n val platform = this?.singleOrNull()\n return platform is WasmPlatformWithTarget && platform.target == WasmTarget.WASI\n}<|endoftext|>"} {"prompt":"override var returnTypeRef: FirTypeRef = FirErrorTypeRefImpl(null, MutableOrEmptyList.empty(), null, null, diagnostic)\n override val receiverParameter: FirReceiverParameter?\n get() = null\n override var controlFlowGraphReference: FirControlFlowGraphReference? = null\n override val body: FirBlock?\n get() = null\n\n init {","completion":"symbol.bind(this)\n resolveState = resolvePhase.asResolveState()\n }\n\n override fun acceptChildren(visitor: FirVisitor, data: D) {\n annotations.forEach { it.accept(visitor, data) }\n status.accept(visitor, data)\n returnTypeRef.accept(visitor, data)<|endoftext|>"} {"prompt":"fun takeValue(): Token.Value? = take(valueRegex)?.let { Token.Value(it.groups[1]!!.value.unescape()) }\n fun takeEquals(): Token.Equals? = take(equalsRegex)?.let { Token.Equals }\n\n fun hasFinished(): Boolean = remaining.isBlank()\n }\n\n operator fun invoke(\n vararg options: String,","completion":"locationWithId: SourceCode.LocationWithId? = null\n ): ResultWithDiagnostics {\n\n val map = mutableMapOf()\n\n for (option in options) {\n val scanner = Scanner(option)\n\n while (!scanner.hasFinished()) {<|endoftext|>"} {"prompt":"val foo: Int = 1\n}\n\nfun case1() {\n Case1().foo()\n val a = Case1()","completion":"a.foo()\n var b = Case1()\n b.foo()\n}\n\n\/\/ TESTCASE NUMBER: 2\nclass Case2 {<|endoftext|>"} {"prompt":"rootProjectVersion,\n npmProjects,\n resolutions,\n rootPackageJsonFile\n )\n }\n\n override fun resolveRootProject(\n services: ServiceRegistry,\n logger: Logger,\n nodeJs: NodeJsEnvironment,\n packageManagerEnvironment: YarnEnvironment,\n npmProjects: Collection,","completion":"cliArgs: List\n ) {\n val nodeJsWorldDir = nodeJs.rootPackageDir\n\n yarnExec(\n services,\n logger,\n nodeJs,\n packageManagerEnvironment,\n nodeJsWorldDir,\n NpmApiExecution.resolveOperationDescription(\"yarn\"),\n cliArgs\n )\n }<|endoftext|>"} {"prompt":"private val merger = Merger(moduleDescriptor, config.moduleId, config.moduleKind)\n\n private val sourceRoots = config.sourceMapRoots.map { File(it) }\n private val deserializer = JsAstDeserializer(merger.program, sourceRoots)\n\n fun getTranslationResult(unit: TranslationUnit): FileTranslationResult =\n when (unit) {","completion":"is TranslationUnit.SourceFile -> translatedSourceFiles[unit.file]!!\n is TranslationUnit.BinaryAst -> cache.getOrPut(unit) {\n \/\/ TODO Don't deserialize header twice\n val inlineData = JsAstProtoBuf.InlineData.parseFrom(CodedInputStream.newInstance(unit.inlineData))\n\n DeserializedFileTranslationResult(<|endoftext|>"} {"prompt":"Changes(\n lookupSymbols = setOf(\n LookupSymbol(name = \"CoarseGrainedFirstBuild_CoarseGrainedSecondBuild_Class\", scope = \"com.example\"),\n LookupSymbol(name = \"CoarseGrainedFirstBuild_FineGrainedSecondBuild_Class\", scope = \"com.example\"),","completion":"LookupSymbol(name = \"FineGrainedFirstBuild_CoarseGrainedSecondBuild_Class\", scope = \"com.example\"),\n LookupSymbol(name = \"modifiedField\", scope = \"com.example.FineGrainedFirstBuild_FineGrainedSecondBuild_Class\"),\n LookupSymbol(name = \"modifiedMethod\", scope = \"com.example.FineGrainedFirstBuild_FineGrainedSecondBuild_Class\"),<|endoftext|>"} {"prompt":"* ${expectedRepository}\/org\/jetbrains\/kotlin\/artifact\/artifact.pom\n *\/\n private fun Path.toExpectedPath(): Path {\n val artifactDirPath = localRepoPath.relativize(this).parent.parent\n val expectedFileName = \"${artifactDirPath.fileName}.pom\"","completion":"return expectedRepoPath.resolve(artifactDirPath.resolve(expectedFileName))\n }\n}<|endoftext|>"} {"prompt":"val manifestData = parameters.manifestProvider[outputTarget].buildManifest(libraryName)\n parameters.resultsConsumer.consume(\n parameters, outputTarget,\n ResultsConsumer.ModuleResult(libraryName, serializedMetadata, manifestData)\n )\n }\n parameters.resultsConsumer.targetConsumed(parameters, outputTarget)\n}","completion":"\/\/ iOS, tvOS, watchOS SDKs from Xcode 14 moved some declarations from CoreGraphics to CoreFoundation (CFCGTypes.h).\n\/\/ Unfortunately (1), for Kotlin\/Native cinterop this is a breaking change, so CFCGTypes platform library with `platform.CoreGraphics`\n\/\/ package was introduced to mitigate this problem.<|endoftext|>"} {"prompt":"public override operator fun compareTo(other: Float): Int {\n \/\/ if any of values in NaN both comparisons return false\n if (this > other) return 1\n if (this < other) return -1\n\n val thisBits = this.toBits()\n val otherBits = other.toBits()\n\n \/\/ Canonical NaN bit representation is higher than any other value's bit representation","completion":"return thisBits.compareTo(otherBits)\n }\n\n \/**\n * Compares this value with the specified value for order.\n * Returns zero if this value is equal to the specified other value, a negative number if it's less than other,\n * or a positive number if it's greater than other.\n *\/\n @kotlin.internal.IntrinsicConstEvaluation<|endoftext|>"} {"prompt":"val parcelCreateDoubleArray: IrSimpleFunctionSymbol =\n androidOsParcel.owner.addFunction(\n \"createDoubleArray\",\n irBuiltIns.primitiveArrayForType.getValue(irBuiltIns.doubleType).defaultType\n ).symbol\n\n val parcelCreateFloatArray: IrSimpleFunctionSymbol =\n androidOsParcel.owner.addFunction(\n \"createFloatArray\",","completion":"irBuiltIns.primitiveArrayForType.getValue(irBuiltIns.floatType).defaultType\n ).symbol\n\n val parcelCreateIntArray: IrSimpleFunctionSymbol =\n androidOsParcel.owner.addFunction(\n \"createIntArray\",\n irBuiltIns.primitiveArrayForType.getValue(irBuiltIns.intType).defaultType\n ).symbol<|endoftext|>"} {"prompt":"abstract class IrConstantObject : IrConstantValue() {\n abstract var constructor: IrConstructorSymbol\n\n abstract val valueArguments: MutableList\n\n abstract val typeArguments: MutableList\n\n override fun accept(visitor: IrElementVisitor, data: D): R =","completion":"visitor.visitConstantObject(this, data)\n\n override fun acceptChildren(visitor: IrElementVisitor, data: D) {\n valueArguments.forEach { it.accept(visitor, data) }\n }\n\n override fun transformChildren(transformer: IrElementTransformer, data: D) {<|endoftext|>"} {"prompt":"x as? C\n }\n\n class Outer {\n inner class Inner\n }\n\n \/\/ bare type\n if (y is Outer) {\n return y\n }","completion":"if (y is Outer<*>) {\n return y\n }\n\n if (y is Outer.Inner) {\n return y\n }<|endoftext|>"} {"prompt":"@Deprecated(Logger.FATAL_DEPRECATION_MESSAGE, ReplaceWith(Logger.FATAL_REPLACEMENT))\n override fun fatal(message: String): Nothing {\n error(message)\n (messageCollector as? GroupingMessageCollector)?.flush()\n throw CompilationErrorException()\n }\n}","completion":"fun MessageCollector.toLogger(treatWarningsAsErrors: Boolean = false): Logger =\n CompilerLoggerAdapter(this, treatWarningsAsErrors)\n\nfun CompilerConfiguration.getLogger(treatWarningsAsErrors: Boolean = false): Logger =<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM_IR\n\n\/\/ FILE: Java1.java\npublic interface Java1 extends KotlinInterface { }\n\n\/\/FILE: Java2.java\npublic interface Java2 {\n public void bar(int o);\n}\n\n\/\/FILE: 1.kt\nclass A: Java1 {\n override fun bar(o: Int) { }\n}\n\nabstract class B : Java1","completion":"interface KotlinInterface : Java2\n\nfun test(b: B) {\n val k = b.bar(1)\n}\n\nfun box() = \"OK\"<|endoftext|>"} {"prompt":"@JvmInline\nvalue class Some(val value: String)\n\nclass RegularClass {\n var classProp: Some = Some(\"1\")\n var classPropImplicit = Some(\"1\")\n var Some.classPropInExtension: Int\n get() = 1\n set(value) {}\n\n fun classFunInReturn(): Some = Some(\"1\")\n fun classFunInImplicitReturn() = Some(\"1\")","completion":"fun classFunInParameter(s: Some) {}\n fun Some.classFunInExtension() {}\n}\n\ninterface RegularInterface {\n var interfaceProp: Some\n var Some.interfacePropInExtension: Int\n\n fun interfaceFunInReturn(): Some\n fun interfaceFunInParameter(s: Some)\n fun Some.interfaceFunInExtension()\n}<|endoftext|>"} {"prompt":"override fun containsPackageFragment(packageFragment: IrPackageFragment): Boolean =\n packageFragment.konanLibrary.let { it == null || containsLibrary(it) }\n\n private val containsCache = mutableMapOf()\n\n \/\/ This is essentially memoizing the IrDeclaration.konanLibrary property -- so much of the implementation","completion":"\/\/ is inlined here to take greater advantage of the cache.\n override fun containsDeclaration(declaration: IrDeclaration): Boolean = containsCache.getOrPut(declaration) {\n val metadata = ((declaration as? IrMetadataSourceOwner)?.metadata as? KonanMetadata)\n if (metadata != null) {<|endoftext|>"} {"prompt":"builderAction: kotlin.collections.MutableSet.() -> kotlin.Unit): kotlin.collections.Set\n\n@kotlin.SinceKotlin(version = \"1.6\")\n@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})\n@kotlin.internal.InlineOnly","completion":"public inline fun buildSet(@kotlin.BuilderInference\nbuilderAction: kotlin.collections.MutableSet.() -> kotlin.Unit): kotlin.collections.Set\n\npublic fun emptyList(): kotlin.collections.List\n\npublic fun emptyMap(): kotlin.collections.Map<|endoftext|>"} {"prompt":"assertOutputDoesNotContain(s)\n }\n\n }\n\n KonanTarget.MACOS_X64 -> {\n for (s in x64TestOutputs) {\n assertOutputContains(s)\n }\n for (s in armTestOutputs) {\n assertOutputDoesNotContain(s)\n }\n }\n\n else -> fail(\"Unexpected host $host\")","completion":"}\n\n val armTests = listOf(\n \":iosSimulatorArm64Test\",\n \":macosArm64Test\",\n \":tvosSimulatorArm64Test\",\n \":watchosSimulatorArm64Test\",\n )\n\n val x64Tests = listOf(\n \":iosX64Test\",\n \":macosX64Test\",\n \":tvosX64Test\",<|endoftext|>"} {"prompt":"0x3ff07e0f66afed07UL, 0x3ff07e0f66b097b2UL, 0x3ff07e0f66af425cUL, 0x3fe1e3779b97f4a8UL,","completion":"0x40001fe03f61bad0UL, 0x3fd6a09e667f3bcdUL, 0x401007fe00ff6070UL, 0x3ff07e0f66afed07UL,<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: -RangeUntilOperator\n\nclass A {\n operator fun rangeUntil(other: A): Iterable = TODO()\n}\n\nfun main(n: A, f: A) {","completion":"for (i in f..<n) {\n\n }\n}<|endoftext|>"} {"prompt":"fun collect(fragments: List) {\n for (fragment in fragments) {\n for (file in fragment.files) {\n for (declaration in file.declarations) {\n if (declaration is IrClass && declaration.isExpect && declaration.isTopLevel) {\n expectTopLevelClasses[declaration.classIdOrFail] = declaration.symbol\n }","completion":"}\n }\n }\n }\n}\n\nprivate class ActualDeclarationsCollector(\n private val expectTopLevelClasses: Map,\n) {\n companion object {\n fun collectActualsFromFragments(fragments: List, expectTopLevelClasses: Map): ClassActualizationInfo {<|endoftext|>"} {"prompt":"takeNotNullStringAndKNullable(x1)\n takeNullableStringAndKNullable(x1)","completion":"takeNotNullStringAndNotNullK(x1)\n takeNullableStringAndNotNullK(x1)<|endoftext|>"} {"prompt":"\"Expected at least one Task of $taskPaths had outcome 'SUCCESS', but none did. Actual outcomes: $taskOutcomes\"\n }\n}\n\n\/**\n * Asserts given [taskPaths] have [TaskOutcome.SUCCESS] execution state.\n *\/\nfun BuildResult.assertTasksExecuted(taskPaths: Collection) {","completion":"assertTasksExecuted(*taskPaths.toTypedArray())\n}\n\n\/**\n * Asserts given [taskPaths] have [TaskOutcome.FAILED] execution state.\n *\/\nfun BuildResult.assertTasksFailed(vararg taskPaths: String) {\n assertTasksHaveOutcome(TaskOutcome.FAILED, taskPaths.asList())\n}\n\n\/**<|endoftext|>"} {"prompt":"@Suppress(\"DEPRECATION\")\n libProject.build(\n \"publish\",\n options = buildOptions\n ) {\n assertSuccessful()\n }\n val localRepo = libProject.projectDir.resolve(\"repo\")\n val localRepoUri = localRepo.toURI()\n\n with(appProject) {\n setupWorkingDir()","completion":"gradleProperties().appendText(\n \"\"\"\n \n kotlin.compiler.execution.strategy=in-process\n \"\"\".trimIndent()\n )\n\n val pathPrefix = \"metadataDependency: \"\n\n gradleBuildScript().appendText(\n \"\\n\" + \"\"\"\n repositories { maven { url '$localRepoUri' } }<|endoftext|>"} {"prompt":"outputTarget(\"(a, b)\")\n\n registerDependency(\"(a, b)\") {\n source(\n \"\"\"\n class Box\n typealias TA = Box\n \"\"\".trimIndent()\n )\n }\n\n simpleSingleSourceTarget(\n \"a\", \"\"\"\n class MyClass\n typealias X = TA","completion":"fun x(x: X) {}\n fun x2(x: TA) {}\n fun x3(x: TA) {}\n \"\"\".trimIndent()\n )\n\n simpleSingleSourceTarget(\n \"b\", \"\"\"\n class MyClass\n typealias X = TA\n \n fun x(x: X) {}<|endoftext|>"} {"prompt":"v.goTo(jumpLabel)\n\n v.mark(cmpHighLabel)\n v.load(arg1Var, operandType)\n \/\/ On stack: high arg\n \/\/ if ([high bound is NOT satisfied]) goto jumpLabel\n if (boundedValue.isHighInclusive) {\n \/\/ high < arg\n comparisonGenerator.jumpIfLess(v, jumpLabel)\n } else {","completion":"\/\/ high <= arg\n comparisonGenerator.jumpIfLessOrEqual(v, jumpLabel)\n }\n }\n\n }\n\n private fun putCoercedArgumentOnStack(v: InstructionAdapter) {\n val argumentKotlinType = rangeContainsTypeInfo.valueParameterType\n val rangeElementKotlinType = rangeContainsTypeInfo.rangeElementType<|endoftext|>"} {"prompt":"if (y != null || this.y != null) this.y.funAny()","completion":"if (y != null || this.y != null) this.y.funNullableT()<|endoftext|>"} {"prompt":"writeInt(internalizeString(name.ident))\n writeBoolean(name.isTemporary)\n ifNotNull(name.localAlias) { writeLocalAlias(it) }\n writeBoolean(name.imported && name !in importedNames)\n writeBoolean(name.constant)\n ifNotNull(name.specialFunction) { writeByte(it.ordinal) }\n }","completion":"nameMap.size\n }\n\n private fun DataWriter.writeLocalAlias(alias: LocalAlias) {\n writeInt(internalizeName(alias.name))\n ifNotNull(alias.tag) { writeInt(internalizeString(it)) }\n }\n\n private fun internalizeString(string: String) = stringMap.getOrPut(string) {\n stringSerializer.writeString(string)<|endoftext|>"} {"prompt":"lateinit var e: IC6\n lateinit var f: IC6<*>\n lateinit var g: IC5","completion":"lateinit var h: IC7\n lateinit var i: IC7<*>\n lateinit var j: IC8\n lateinit var k : IC10\n lateinit var o : IC3?<|endoftext|>"} {"prompt":"if (w != null || this.w != null) w.funT()","completion":"if (w != null || this.w != null) w.funAny()<|endoftext|>"} {"prompt":"val newCompletion = createSimpleCoroutineForSuspendFunction(probeCoroutineCreated(completion))\n return (this as Function2, Any?>).invoke(receiver, newCompletion)\n}\n\n@InlineOnly\ninternal actual inline fun (suspend R.(P) -> T).startCoroutineUninterceptedOrReturn(","completion":"receiver: R,\n param: P,\n completion: Continuation\n): Any? =\n \/\/ Wrap with ContinuationImpl, otherwise the coroutine will not be interceptable. See KT-55869\n if (this !is BaseContinuationImpl) wrapWithContinuationImpl(receiver, param, completion)<|endoftext|>"} {"prompt":"serializableDesc.isSingleFieldValueClass -> SerializerForInlineClassGenerator(irClass, context)\n else -> SerializerIrGenerator(irClass, context, metadataPlugin)\n }\n generator.generate()\n if (irClass.isFromPlugin(context.afterK2)) {\n \/\/ replace origin only for plugin generated serializers","completion":"irClass.origin = SERIALIZATION_PLUGIN_ORIGIN\n }\n irClass.addDefaultConstructorBodyIfAbsent(context)\n irClass.patchDeclarationParents(irClass.parent)\n }\n }\n}<|endoftext|>"} {"prompt":"if (b) x.value.length\n if (c) x.value.length\n}\n\nfun testRequireNotNullViaVariable(x: String?) {\n val a = x != null\n var b = a\n val c = b\n val f: () -> Unit = {\n require(b)","completion":"x.length\n require(c)\n x.length\n }\n b = true\n f()\n}\n\nfun testRequireNotNullViaVariable(x: StringHolder) {\n val a = x.value != null\n var b = a\n val c = b<|endoftext|>"} {"prompt":"\/\/ FILE: test.kt\n\nfun box(): String {\n try {\n val x = \"x\"\n throw RuntimeException(x)\n } finally {\n return \"OK\"\n }\n return \"FAIL\"\n}\n\n\/\/ EXPECTATIONS JVM_IR\n\/\/ test.kt:8 box:\n\/\/ test.kt:9 box:","completion":"\/\/ test.kt:10 box: x:java.lang.String=\"x\":java.lang.String\n\/\/ test.kt:12 box:\n\n\/\/ EXPECTATIONS JS_IR\n\/\/ test.kt:9 box:\n\/\/ test.kt:10 box: x=\"x\":kotlin.String\n\/\/ test.kt:12 box: x=\"x\":kotlin.String<|endoftext|>"} {"prompt":"\/\/ KT-22376\n global = \"\"\n for (s in \"AB\")\n global += s\n assertEquals(\"AB\", global)\n\n for (s in ((\"CD\")))\n global += s\n assertEquals(\"ABCD\", global)\n\n for (s in ((\"EF\")))\n global += s\n assertEquals(\"ABCDEF\", global)\n\n return \"OK\"","completion":"}<|endoftext|>"} {"prompt":"override fun findOwnName(name: String): JsName? =\n if (name == ident) labelName else null\n\n \/**\n * Safe call is necessary, because hasOwnName can be called\n * in constructor before labelName is initialized (see KT-4394)\n *\/","completion":"@Suppress(\"UNNECESSARY_SAFE_CALL\", \"SAFE_CALL_WILL_CHANGE_NULLABILITY\")\n override fun hasOwnName(name: String): Boolean =\n name in RESERVED_WORDS\n || name == ident\n || name == labelName?.ident\n || parent?.hasOwnName(name) ?: false\n }<|endoftext|>"} {"prompt":"anew(descriptorForEnumsType)\n dup()\n aconst(serialName)\n aconst(serializableDescriptor.enumEntries().size)\n invokespecial(descriptorForEnumsType.internalName, \"\", \"(Ljava\/lang\/String;I)V\", false)\n checkcast(descImplType)\n }","completion":"override fun ExpressionCodegen.addElementsContentToDescriptor(descriptorVar: Int) = with(v) {\n val enumEntries = serializableDescriptor.enumEntries()\n for (entry in enumEntries) {\n load(descriptorVar, descImplType)\n \/\/ regular .serialName() produces fqName here, which is kinda inconvenient for enum entry<|endoftext|>"} {"prompt":"if (layout.isZipped)\n action(layout.extractingToTemp as L)\n else\n action(layout as L)\n\n fun inPlace(action: (L) -> T): T =\n if (layout.isZipped)\n klibZipAccessor.withZipFileSystem(layout.klib) { zipFileSystem ->","completion":"action(layout.directlyFromZip(zipFileSystem) as L)\n }\n else\n action(layout as L)\n}\n\n\nclass MetadataLibraryAccess(klib: File, component: String, zipAccessor: ZipFileSystemAccessor? = null) :\n BaseLibraryAccess(klib, component, zipAccessor) {<|endoftext|>"} {"prompt":"is IllegalArgumentException -> e \/\/ rethrow IAE as it is already correct exception type\n is VirtualMachineError, is ThreadDeath -> e \/\/ rethrow VM errors\n \/\/ other exceptions, like IOOBE or InvalidProtocolBufferException from proto parser\n else -> InconsistentKotlinMetadataException(\"Exception occurred when reading Kotlin metadata\", e)\n }\n }\n}","completion":"internal inline fun wrapWriteIntoIAE(block: () -> T): T {\n return try {\n block()\n } catch (e: Throwable) {\n throw when (e) {\n is IllegalArgumentException -> e \/\/ rethrow IAE as it is already correct exception type\n is VirtualMachineError, is ThreadDeath -> e \/\/ rethrow VM errors<|endoftext|>"} {"prompt":"if (!(element3 in 1..3) != !range0.contains(element3)) throw AssertionError()\n if (!(element3 !in 1..3) != range0.contains(element3)) throw AssertionError()\n}\n\nfun testR0xE4() {\n \/\/ with possible local optimizations","completion":"if (0.toByte() in 1..3 != range0.contains(0.toByte())) throw AssertionError()\n if (0.toByte() !in 1..3 != !range0.contains(0.toByte())) throw AssertionError()<|endoftext|>"} {"prompt":"package kotlin.experimental\n\nimport kotlin.annotation.AnnotationTarget.*\n\n\/**\n * This annotation marks the Kotlin\/Native-only standard library API that is considered experimental and is not subject to the\n * [general compatibility guarantees](https:\/\/kotlinlang.org\/docs\/reference\/evolution\/components-stability.html) given for the standard library:","completion":"* the behavior of such API may be changed or the API may be removed completely in any further release.\n *\n * > Beware using the annotated API especially if you're developing a library, since your library might become binary incompatible\n * with the future versions of the standard library.\n *\n * Any usage of a declaration annotated with `@ExperimentalNativeApi` must be accepted either by<|endoftext|>"} {"prompt":"\/\/ This file was generated automatically. See compiler\/fir\/tree\/tree-generator\/Readme.md.\n\/\/ DO NOT MODIFY IT MANUALLY.\n\npackage org.jetbrains.kotlin.fir.references\n\nimport org.jetbrains.kotlin.KtSourceElement\nimport org.jetbrains.kotlin.fir.FirElement","completion":"import org.jetbrains.kotlin.fir.visitors.FirTransformer\nimport org.jetbrains.kotlin.fir.visitors.FirVisitor\nimport org.jetbrains.kotlin.name.Name\n\n\/**\n * Generated from: [org.jetbrains.kotlin.fir.tree.generator.FirTreeBuilder.namedReference]\n *\/<|endoftext|>"} {"prompt":"prerequisite = setOf(jsClassUsageInReflectionPhase)\n)\n\nprivate val primitiveCompanionLoweringPhase = makeIrModulePhase(\n ::PrimitiveCompanionLowering,\n name = \"PrimitiveCompanionLowering\",\n description = \"Replace common companion object access with platform one\"\n)\n\nprivate val callsLoweringPhase = makeIrModulePhase(\n ::CallsLowering,","completion":"name = \"CallsLowering\",\n description = \"Handle intrinsics\"\n)\n\nprivate val staticMembersLoweringPhase = makeIrModulePhase(\n ::StaticMembersLowering,\n name = \"StaticMembersLowering\",\n description = \"Move static member declarations to top-level\"\n)\n\nprivate val objectDeclarationLoweringPhase = makeIrModulePhase(\n ::ObjectDeclarationLowering,<|endoftext|>"} {"prompt":"* Add the specified packet to the end of the work list used by the task\n * associated with the packet and make the task runnable if it is currently\n * suspended.\n * @param {Packet} packet the packet to add\n *\/\n fun queue(packet: Packet): TaskControlBlock? {\n val t = this.blocks[packet.id]\n if (t == null) return t","completion":"this.queueCount++\n packet.link = null\n packet.id = this.currentId\n return t.checkPriorityAdd(this.currentTcb!!, packet)\n }\n}\n\nvar ID_IDLE = 0\nvar ID_WORKER = 1\nvar ID_HANDLER_A = 2\nvar ID_HANDLER_B = 3<|endoftext|>"} {"prompt":"@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.ExperimentalUnsignedTypes\npublic fun kotlin.ULongArray?.contentToString(): kotlin.String\n\n@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.ExperimentalUnsignedTypes","completion":"public fun kotlin.UShortArray?.contentToString(): kotlin.String\n\n@kotlin.SinceKotlin(version = \"1.3\")\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.resolve.calls.checkers.isRestrictedSuspendFunction\nimport org.jetbrains.kotlin.resolve.calls.checkers.isRestrictsSuspensionReceiver\nimport org.jetbrains.kotlin.resolve.descriptorUtil.builtIns\nimport org.jetbrains.kotlin.storage.LockBasedStorageManager","completion":"import org.jetbrains.kotlin.types.KotlinType\nimport org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments\n\n\nclass JvmRuntimeTypes(\n module: ModuleDescriptor,\n private val languageVersionSettings: LanguageVersionSettings,\n private val generateOptimizedCallableReferenceSuperClasses: Boolean\n) {<|endoftext|>"} {"prompt":"public class IntArrayList extends AbstractIntList {\n private final ArrayList data = new ArrayList<>();\n\n public IntArrayList() {\n super();\n }\n\n @Override\n public int size() {\n return data.size();\n }\n\n @Override\n public boolean isEmpty() {\n return data.isEmpty();\n }\n\n @Override","completion":"public boolean contains(Object o) {\n return data.contains(o);\n }\n\n @NotNull\n @Override\n public Iterator iterator() {\n return data.iterator();\n }\n\n @NotNull\n @Override\n public Object[] toArray() {\n return data.toArray();\n }\n\n @NotNull\n @Override<|endoftext|>"} {"prompt":"2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622,\n 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638,","completion":"2639, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653, 2654,\n 2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670,<|endoftext|>"} {"prompt":"val kotlinOptions: T\n\n @OptIn(InternalKotlinGradlePluginApi::class)\n @Deprecated(\n message = KOTLIN_OPTIONS_DEPRECATION_MESSAGE\n )\n fun kotlinOptions(configure: T.() -> Unit) {\n @Suppress(\"DEPRECATION\")\n configure(kotlinOptions)\n }","completion":"@OptIn(InternalKotlinGradlePluginApi::class)\n @Deprecated(\n message = KOTLIN_OPTIONS_DEPRECATION_MESSAGE\n )\n fun kotlinOptions(configure: Action<@UnsafeVariance T>) {\n @Suppress(\"DEPRECATION\")\n configure.execute(kotlinOptions)\n }<|endoftext|>"} {"prompt":"assertFalse(eqCharQIntQ(1.toChar(), 1.toInt()))\n assertFalse(eqCharQIntQ(1.toChar(), null))\n assertFalse(eqCharQIntQ(1.toChar(), undefined))\n assertFalse(eqCharQIntQ(null, 0.toInt()))\n assertFalse(eqCharQIntQ(null, 1.toInt()))","completion":"assertTrue(eqCharQIntQ(null, null))\n assertTrue(eqCharQIntQ(null, undefined))\n assertFalse(eqCharQIntQ(undefined, 0.toInt()))\n assertFalse(eqCharQIntQ(undefined, 1.toInt()))\n assertTrue(eqCharQIntQ(undefined, null))<|endoftext|>"} {"prompt":"if (ignoredTests.isNotEmpty()) {\n add(TestRunParameter.WithGTestPatterns(negativePatterns = ignoredTests))\n }\n }\n }\n TestKind.REGULAR -> {\n \/\/ WithTCLogger relies on TCTestOutputFilter to be present in the checkers.\n assertIs(testCase.checks.testFiltering.testOutputFilter)","completion":"add(TestRunParameter.WithTCTestLogger)\n addIfNotNull(\n testName?.let(TestRunParameter::WithTestFilter) ?: TestRunParameter.WithPackageFilter(testCase.nominalPackageName)\n )\n }\n }\n }\n}<|endoftext|>"} {"prompt":"fun testTypeAliasedReturnTypesReverse(): UserKlass = UserKlass()\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypesReverse(): SameUserKlass = UserKlass()\n\n\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun UserKlass.testIdenticalExtensionReceivers() {}","completion":"fun UserKlass.testIdenticalExtensionReceivers() {}\n\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun UserKlass.testTypeAliasedExtensionReceivers() {}\nfun SameUserKlass.testTypeAliasedExtensionReceivers() {}\n\nfun UserKlass.testTypeAliasedExtensionReceiversReverse() {}<|endoftext|>"} {"prompt":"\/**\n * Returns `true` if this nullable char sequence is either `null` or empty or consists solely of whitespace characters.\n *\n * @sample samples.text.Strings.stringIsNullOrBlank\n *\/\n@kotlin.internal.InlineOnly\npublic inline fun CharSequence?.isNullOrBlank(): Boolean {\n contract {","completion":"returns(false) implies (this@isNullOrBlank != null)\n }\n\n return this == null || this.isBlank()\n}\n\n\/**\n * Iterator for characters of the given char sequence.\n *\/\npublic operator fun CharSequence.iterator(): CharIterator = object : CharIterator() {\n private var index = 0\n\n public override fun nextChar(): Char = get(index++)<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.commonizer.transformer\n\nimport org.jetbrains.kotlin.commonizer.CommonizerSettings\nimport org.jetbrains.kotlin.commonizer.cir.*\nimport org.jetbrains.kotlin.commonizer.mergedtree.*","completion":"import org.jetbrains.kotlin.commonizer.mergedtree.CirNodeRelationship.Composite.Companion.plus\nimport org.jetbrains.kotlin.commonizer.mergedtree.CirNodeRelationship.ParentNode\nimport org.jetbrains.kotlin.commonizer.mergedtree.CirNodeRelationship.PreferredNode<|endoftext|>"} {"prompt":"? & Out\")!>x.funNullableAny()\n val y = x.get()\n if (y != null) {\n y","completion":"y.equals(null)\n y.propT<|endoftext|>"} {"prompt":"private fun directDependencyOnResourcesProducer(\n producerTarget: TargetProvider,\n consumerTarget: TargetProvider,\n strategy: KotlinTargetResourcesResolutionStrategy,\n dependencyScope: DependencyScopeProvider = { ::implementation },\n assert: (consumer: Project, producer: Project) -> Unit,\n ) {\n val rootProject = buildProject()","completion":"val producer = rootProject.createSubproject(\n \"producer\",\n resolutionStrategy = strategy,\n ) {\n kotlin { producerTarget() }\n }\n val consumer = rootProject.createSubproject(\n \"consumer\",\n resolutionStrategy = strategy,\n ) {\n kotlin {\n consumerTarget()\n sourceSets.commonMain {\n dependencies {<|endoftext|>"} {"prompt":"@Composable\n fun test() {\n A(123) { it ->\n println(it)\n }\n B(123) { it ->\n it(456)\n }\n }\n \"\"\"\n )\n\n \/\/ TODO(chuckj): Replace with another nested function call.\n fun xtestMethodInvocations() = assertInterceptions(","completion":"\"\"\"\n import androidx.compose.runtime.*\n\n val x = CompositionLocal.of { 123 }\n\n @Composable\n fun test() {\n x.Provider(456) {\n\n }\n }\n \"\"\"\n )\n\n @Test\n fun testReceiverLambdaInvocation() = assertInterceptions(\n \"\"\"<|endoftext|>"} {"prompt":"val firstExportedRealOverride = runIf(isFakeOverride) {\n resolveFakeOverrideMaybeAbstract { it === this || it.parentClassOrNull?.isExported(context) != true }\n }\n\n if (firstExportedRealOverride?.parentClassOrNull.isExportedInterface(context) && firstExportedRealOverride?.isJsExportIgnore() != true) {\n return true\n }","completion":"return overriddenSymbols\n .asSequence()\n .map { it.owner }\n .filterIsInstance>()\n .filter { it.overriddenSymbols.isEmpty() }\n .mapNotNull { it.parentClassOrNull }\n .map { it.symbol }\n .any { it == context.irBuiltIns.enumClass }\n}<|endoftext|>"} {"prompt":"\/\/ library.kt:36 baz: param:int=6:int, b:int=2:int, inlineCallParam1\\17:int=1:int, inlineCallParam2\\17:int=2:int, $i$f$inlineCall\\17\\18:int=0:int, e\\17:int=5:int","completion":"\/\/ library.kt:21 baz: param:int=6:int, b:int=2:int\n\/\/ library.kt:23 box: $i$f$bar:int=0:int\n\/\/ test.kt:55 box:<|endoftext|>"} {"prompt":"* Resets a range of array elements at a specified [fromIndex] (inclusive) to [toIndex] (exclusive) range of indices\n * to some implementation-specific _uninitialized_ value.\n * In particular, references stored in these elements are released and become available for garbage collection.\n * Attempts to read _uninitialized_ values work in implementation-dependent manner,\n * either throwing exception or returning some kind of implementation-specific default value.\n *\/","completion":"internal fun Array.resetRange(fromIndex: Int, toIndex: Int) {\n arrayFill(@Suppress(\"UNCHECKED_CAST\") (this as Array), fromIndex, toIndex, null)\n}\n\n@GCUnsafeCall(\"Kotlin_Array_copyImpl\")<|endoftext|>"} {"prompt":"@DisplayName(\"Kotlin daemon should allow to define own jvm options via gradle daemon jvm args system property\")\n @GradleTest\n internal fun shouldAllowToRedefineViaDGradleOption(gradleVersion: GradleVersion) {\n project(\n projectName = \"simpleProject\",\n gradleVersion = gradleVersion,\n enableKotlinDaemonMemoryLimitInMb = null,","completion":"enableGradleDaemonMemoryLimitInMb = null,\n ) {\n gradleProperties.append(\n \"\"\"\n org.gradle.jvmargs =-Xmx758m -Dkotlin.daemon.jvm.options=Xmx1g,Xms128m\n \"\"\".trimIndent()\n )\n\n build(\"assemble\") {<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM_IR\n\/\/ IGNORE_BACKEND_K1: JVM_IR\n\/\/ Field VS property: case \"reference\", protected field, invisible property\n\n\/\/ FILE: BaseJava.java\n\npackage base;\n\npublic class BaseJava {\n protected String a = \"\";\n}\n\n\/\/ FILE: Derived.kt\n\npackage derived\n\nimport base.BaseJava","completion":"open class Intermediate : BaseJava() {\n private val a = \"FAIL\"\n}\n\nclass Derived : Intermediate() {\n fun foo() = a\n\n fun bar() {\n a = \"OK\"\n }\n}\n\nfun box(): String {\n val d = Derived()\n d.bar()\n return d.foo()\n}<|endoftext|>"} {"prompt":"return \"Wrong elements for (MaxUS - 2u).toUShort()..MaxUS step 2: $list3\"\n }\n\n val list4 = ArrayList()\n val range4 = MaxUL - 2u..MaxUL step 2\n for (i in range4) {\n list4.add(i)\n if (list4.size > 23) break\n }","completion":"if (list4 != listOf(MaxUL - 2u, MaxUL)) {\n return \"Wrong elements for MaxUL - 2u..MaxUL step 2: $list4\"\n }\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\ninterface Context\nclass Point\n\nclass Example {\n constructor(context: Context?)\n constructor(context: Context?, arg1: Int)\n constructor(context: Context?, arg1: Int, arg2: Int)\n constructor(context: Context?, arg1: Int, arg2: Int, arg3: Int)","completion":"var condition: Boolean = false\n private var index = newIndex(condition)\n private fun newIndex(zero: Boolean) = if (zero) 0 else 1\n\n private lateinit var latePoint1: Point\n private lateinit var latePoint2: Point\n\n private val point1 = Point()\n private val point2 = Point()<|endoftext|>"} {"prompt":"declaration.initializer?.resolvedType?.let { it to declaration.source } ?: run {\n val getter = declaration.getter\n \/\/ Getter can have delegate call as the source, but diagnostic must be reported on KtDeclaration\n val getterDeclarationSource = if (declaration.delegate != null) declaration.source else getter?.source","completion":"(getter?.body?.singleExpressionType to getterDeclarationSource)\n }\n }\n is FirFunction -> declaration.body?.singleExpressionType to declaration.source\n else -> error(\"Should not be there\")\n }\n\n type?.let { checkTypeAndArguments(it, context, reporter, source) }\n }\n\n private fun checkTypeAndArguments(<|endoftext|>"} {"prompt":"* The reference is without a receiver, i.e. it either references a top-level property or\n * has the receiver bound to it.\n *\n * Example:\n *\n * ```\n * class Login(val username: String)\n * val defaultLogin = Login(\"Admin\")\n * val defaultUsername by defaultLogin::username\n * \/\/ equivalent to\n * val defaultUserName get() = defaultLogin.username\n * ```\n *\/","completion":"@SinceKotlin(\"1.4\")\n@kotlin.internal.InlineOnly\npublic inline operator fun KProperty0.getValue(thisRef: Any?, property: KProperty<*>): V {\n return get()\n}\n\n\/**\n * An extension operator that allows delegating a mutable property of type [V]\n * to a property reference to a mutable property of the same type [V].<|endoftext|>"} {"prompt":"if (c != null) c.funT()","completion":"if (c != null) c.funAny()\n\n if (c != null) c.funNullableT()<|endoftext|>"} {"prompt":"* Returns a sequence of all occurrences of a regular expression within the [input] string, beginning at the specified [startIndex].\n *\n * @throws IndexOutOfBoundsException if [startIndex] is less than zero or greater than the length of the [input] char sequence.\n *\n * @sample samples.text.Regexps.findAll\n *\/","completion":"@Suppress(\"ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS\")\n public actual fun findAll(input: CharSequence, startIndex: Int = 0): Sequence {\n if (startIndex < 0 || startIndex > input.length) {\n throw IndexOutOfBoundsException(\"Start index out of bounds: $startIndex, input length: ${input.length}\")\n }<|endoftext|>"} {"prompt":"return \"FAIL in exception: \" + e.message\n } else {\n return \"CATCHED_EXCEPTION\"\n }\n }\n\n return \"FAIL\";\n}\n\nfun test2(h: Holder): String {\n\n val localResult = doCall (\n {\n h.value += \"OK_LOCAL\"\n throw RuntimeException()\n \"OK_LOCAL\"","completion":"},\n {\n h.value += \", OK_EXCEPTION\"\n \"OK_EXCEPTION\"\n },\n {\n h.value += \", OK_FINALLY\"\n \"OK_FINALLY\"\n })\n\n return localResult;\n}\n\nfun test3(h: Holder): String {\n try {\n val localResult = doCall (\n {<|endoftext|>"} {"prompt":"var max = this[0]\n for (i in 1..lastIndex) {\n val e = this[i]\n if (max < e) max = e\n }\n return max\n}\n\n\/**\n * Returns the largest element.\n * \n * @throws NoSuchElementException if the array is empty.\n *\/\n@SinceKotlin(\"1.7\")","completion":"@kotlin.jvm.JvmName(\"maxOrThrow-U\")\n@ExperimentalUnsignedTypes\n@Suppress(\"CONFLICTING_OVERLOADS\")\npublic fun UShortArray.max(): UShort {\n if (isEmpty()) throw NoSuchElementException()\n var max = this[0]\n for (i in 1..lastIndex) {\n val e = this[i]<|endoftext|>"} {"prompt":"\/\/ This file was generated automatically. See compiler\/fir\/tree\/tree-generator\/Readme.md.\n\/\/ DO NOT MODIFY IT MANUALLY.\n\n@file:Suppress(\"DuplicatedCode\")\n\npackage org.jetbrains.kotlin.fir.contracts.impl\n\nimport org.jetbrains.kotlin.KtSourceElement","completion":"import org.jetbrains.kotlin.fir.contracts.FirRawContractDescription\nimport org.jetbrains.kotlin.fir.expressions.FirExpression\nimport org.jetbrains.kotlin.fir.visitors.FirTransformer\nimport org.jetbrains.kotlin.fir.visitors.FirVisitor<|endoftext|>"} {"prompt":"package kotlin.collections\n\npublic actual class ArrayList\n\/**\n * Creates a new empty [ArrayList] with the specified initial capacity.\n *\n * Capacity is the maximum number of elements the list is able to store in current backing storage.\n * When the list gets full and a new element can't be added, its capacity is expanded,\n * which usually leads to creation of a bigger backing storage.\n *","completion":"* @param initialCapacity the initial capacity of the created list.\n * Note that the argument is just a hint for the implementation and can be ignored.\n *\n * @throws IllegalArgumentException if [initialCapacity] is negative.\n *\/\npublic actual constructor(initialCapacity: Int) : MutableList, RandomAccess, AbstractMutableList() {<|endoftext|>"} {"prompt":"var Z.nonNull_nonNullMemExt: Z\n get() = this + offset\n set(value) { offset = this + value }\n\n var Z.nonNull_nullableMemExt: Z?\n get() = this + offset\n set(value) { offset = this + value!! }\n\n var Z?.nullable_nonNullMemExt: Z\n get() = this!! + offset","completion":"set(value) { offset = this!! + value }\n\n var Z?.nullable_nullableMemExt: Z?\n get() = this!! + offset\n set(value) { offset = this!! + value!! }\n}\n\nvar nonNullTopLevel: Z = Z(0U, 0)\nvar nullableTopLevel: Z? = Z(0U, 0)<|endoftext|>"} {"prompt":"if (y != null) this.y.funNullableAny()\n if (y != null) this.y","completion":"if (y != null || this.y != null) y.equals(null)<|endoftext|>"} {"prompt":"KtNodeTypes.NULLABLE_TYPE -> findChildByType(node, KtTokenSets.TYPE_ELEMENT_TYPES)\n ?.let { referencedTypeExpression(it) }\n else -> null\n }\n }\n\n val FUN_INTERFACE: LightTreePositioningStrategy = object : LightTreePositioningStrategy() {\n override fun mark(","completion":"node: LighterASTNode,\n startOffset: Int,\n endOffset: Int,\n tree: FlyweightCapableTreeStructure\n ): List {\n return when (node.tokenType) {\n KtNodeTypes.CLASS -> FUN_MODIFIER.mark(node, startOffset, endOffset, tree)<|endoftext|>"} {"prompt":"@RequireKotlin(\"1.0-beta\")\nfun f04() {}\n\n@RequireKotlin(\"1.1.0-dev-1111\")\nfun f05() {}","completion":"@RequireKotlin(\"1.5.3.7\")\nfun f06() {}\n\n@RequireKotlin(\"1..0\")\nfun f07() {}<|endoftext|>"} {"prompt":"fun List.testClassLiteral3() = b::class","completion":"fun List.testUnresolved1() = unresolved::foo<|endoftext|>"} {"prompt":"val current by lazy { SchemaVersion.parseStringOrThrow(KotlinToolingMetadata.currentSchemaVersion) }\n }\n}\n\ninternal fun SchemaVersion.Companion.parseStringOrThrow(schemaVersion: String): SchemaVersion {\n fun throwIllegalSchemaVersion(): Nothing = throw IllegalArgumentException(","completion":"\"Illegal schemaVersion $schemaVersion. Expected {major}.{minor}.{patch}\"\n )\n\n val parts = schemaVersion.split(\".\")\n if (parts.size != 3) throwIllegalSchemaVersion()\n\n return SchemaVersion(\n major = parts[0].toIntOrNull() ?: throwIllegalSchemaVersion(),<|endoftext|>"} {"prompt":"binaryOperation(FLOAT, LONG, \"rem\", { a, b -> a.rem(b) }, emptyBinaryFun),\n binaryOperation(FLOAT, SHORT, \"rem\", { a, b -> a.rem(b) }, emptyBinaryFun),\n binaryOperation(FLOAT, BYTE, \"times\", { a, b -> a.times(b) }, emptyBinaryFun),","completion":"binaryOperation(FLOAT, DOUBLE, \"times\", { a, b -> a.times(b) }, emptyBinaryFun),\n binaryOperation(FLOAT, FLOAT, \"times\", { a, b -> a.times(b) }, emptyBinaryFun),\n binaryOperation(FLOAT, INT, \"times\", { a, b -> a.times(b) }, emptyBinaryFun),<|endoftext|>"} {"prompt":"+\" }\"\n }\n\n private fun FlowContent.generate(resolvedReifiedParameterReference: FirResolvedReifiedParameterReference) {\n val typeParameter = resolvedReifiedParameterReference.symbol.fir\n +typeParameter.name.identifier\n }\n\n private fun FlowContent.generate(varargArgumentExpression: FirVarargArgumentsExpression) {","completion":"generateList(varargArgumentExpression.arguments, separator = \",\") { generate(it) }\n }\n\n private fun FlowContent.generate(binaryLogicExpression: FirBinaryLogicExpression) {\n generate(binaryLogicExpression.leftOperand)\n +\" ${binaryLogicExpression.kind.token} \"<|endoftext|>"} {"prompt":"contract { returns(false) implies (this@case_7_2 !is Number || this@case_7_2 !is Int || this@case_7_2 == null || value_2 == null) }","completion":"return !(this@case_7_2 !is Number || this@case_7_2 !is Int || this@case_7_2 == null || value_2 == null)\n}\nfun T?.case_7_3(value_2: Any?): Boolean? {<|endoftext|>"} {"prompt":"reporter.reportOn(source, FirJsErrors.CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM, callee, context)\n }\n }\n else -> {\n if (!callToModule && callToNonModule) {","completion":"reporter.reportOn(source, FirJsErrors.CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM, callee, context)\n }\n }\n }\n}<|endoftext|>"} {"prompt":"val containingClassSymbol = declaration.symbol.containingClassLookupTag()?.toFirRegularClassSymbol(context.session)\n if (containingClassSymbol != null) {\n if (containingClassSymbol.isInterface) {\n reporter.reportOn(declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_IN_INTERFACE, context)","completion":"} else if ((modality ?: declaration.modality) == Modality.ABSTRACT) {\n reporter.reportOn(reportSource ?: declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT, context)\n }\n }\n\n if (declaration !is FirConstructor && declaration.body != null) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDECLARATION\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_ANNOTATION\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_ANNOTATION_TARGET","completion":"import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_CALL_OF_CONVERSION_METHOD\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_EXPLICIT_BACKING_FIELD<|endoftext|>"} {"prompt":"hash = hash * 31 + target.hashCode()\n hash = hash * 31 + propagatesToOverrides.hashCode()\n return hash\n }\n }\n\n class DeprecatedSince(\n annotation: AnnotationDescriptor,\n target: DeclarationDescriptor,\n propagatesToOverrides: Boolean,\n override val deprecationLevel: DeprecationLevelValue","completion":") : DeprecatedByAnnotation(annotation, target, propagatesToOverrides) {\n override fun equals(other: Any?): Boolean {\n if (this === other) return true\n if (other !is DeprecatedSince) return false\n\n if (annotation != other.annotation) return false\n if (target != other.target) return false<|endoftext|>"} {"prompt":"override fun call(it: IC): T = it.extensionInline()\n})\n\nfun dispatch(a: IC): T = bar(a, object : IFace {\n override fun call(it: IC): T = it.dispatchInline()\n})\n\nfun normal(a: IC): T = bar(a, object : IFace {","completion":"override fun call(it: IC): T = normalInline(it)\n})\n\ninterface IFace {\n fun call(ic: T): R\n}\n\nfun bar(value: T, f: IFace): R {\n return f.call(value)\n}\n\nfun box(): String {<|endoftext|>"} {"prompt":"interface IrTypeTransformer : IrElementTransformer {\n fun transformType(container: IrElement, type: Type, data: D): Type\n\n override fun visitValueParameter(declaration: IrValueParameter, data: D): IrStatement {\n declaration.varargElementType = transformType(declaration, declaration.varargElementType, data)","completion":"declaration.type = transformType(declaration, declaration.type, data)\n return super.visitValueParameter(declaration, data)\n }\n\n override fun visitClass(declaration: IrClass, data: D): IrStatement {\n declaration.valueClassRepresentation?.mapUnderlyingType {\n transformType(declaration, it, data)\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetPreset\nimport org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithHostTests\nimport org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithHostTestsPreset","completion":"import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithSimulatorTests\nimport org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithSimulatorTestsPreset\nimport org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget<|endoftext|>"} {"prompt":"var exportedDerived3 = new d.ExportedDerived3 ();\n if (!d.isLegacyBackend()) {\n assertEquals(\n false,\n d.ExportedDerived3.prototype.hasOwnProperty('foo'),\n 'Property foo should not be defined for ExportedDerived3.prototype'\n );\n assertEquals(\n false,","completion":"d.ExportedDerived3.prototype.hasOwnProperty('bar'),\n 'Property bar should not be defined for ExportedDerived3.prototype'\n );\n assertEquals(\n false,\n d.ExportedDerived3.prototype.hasOwnProperty('baz'),\n 'Property baz should not be defined for ExportedDerived3.prototype'\n );\n }\n\n return 'OK';<|endoftext|>"} {"prompt":"get() = byValue(this.reinterpret().value)\n set(value) { this.reinterpret().value = value.value }\n }\n}\n\nenum class CXCursorKind(value: Int) : CEnum {\n CXCursor_UnexposedDecl(1),\n CXCursor_StructDecl(2),","completion":"CXCursor_UnionDecl(3),\n CXCursor_ClassDecl(4),\n CXCursor_EnumDecl(5),\n CXCursor_FieldDecl(6),\n CXCursor_EnumConstantDecl(7),\n CXCursor_FunctionDecl(8),\n CXCursor_VarDecl(9),<|endoftext|>"} {"prompt":"public inline fun > kotlin.CharArray.minBy(selector: (kotlin.Char) -> R): kotlin.Char\n\n@kotlin.SinceKotlin(version = \"1.7\")\n@kotlin.jvm.JvmName(name = \"minByOrThrow\")","completion":"public inline fun > kotlin.DoubleArray.minBy(selector: (kotlin.Double) -> R): kotlin.Double\n\n@kotlin.SinceKotlin(version = \"1.7\")\n@kotlin.jvm.JvmName(name = \"minByOrThrow\")<|endoftext|>"} {"prompt":"\"java.util.Arrays.fill(this, fromIndex, toIndex, element)\"\n }\n }\n on(Platform.JS) {\n suppress(\"ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS\")\n since(\"1.3\")\n body {\n \"\"\"\n AbstractList.checkRangeIndexes(fromIndex, toIndex, size)","completion":"nativeFill(element, fromIndex, toIndex)\n \"\"\"\n }\n specialFor(ArraysOfPrimitives) {\n if (primitive == PrimitiveType.Char) {\n body {\n \"\"\"\n AbstractList.checkRangeIndexes(fromIndex, toIndex, size)\n \/\/ We need to call [Char.code] here to eliminate Char-boxing with the new JS function inlining logic<|endoftext|>"} {"prompt":"}\n\n else ->\n super.visitTypeOperator(expression)\n }\n\n override fun visitVararg(expression: IrVararg): IrExpression =\n expression.transformPostfix {\n elements.forEachIndexed { i, element ->\n when (element) {\n is IrSpreadElement ->\n element.expression = element.expression.cast(expression.type)","completion":"is IrExpression ->\n putElement(i, element.cast(varargElementType))\n }\n }\n }\n\n private fun IrExpressionBody.coerceInnerExpression(expectedType: KotlinType) {\n expression = expression.cast(expectedType)\n }\n\n private fun IrExpression.cast(irType: IrType): IrExpression =<|endoftext|>"} {"prompt":") {\n reportJvmSignatureClash(\n diagnosticReporter,\n JvmBackendErrors.CONFLICTING_JVM_DECLARATIONS,\n declarations,\n conflictingJvmDeclarationsData\n )\n }\n }\n\n else ->","completion":"if (classCodegen.irClass.origin != JvmLoweredDeclarationOrigin.DEFAULT_IMPLS) {\n reportJvmSignatureClash(\n diagnosticReporter,\n JvmBackendErrors.ACCIDENTAL_OVERRIDE,\n declarations.filter { !it.isFakeOverride && !it.isSpecialOverride() },\n conflictingJvmDeclarationsData\n )\n }<|endoftext|>"} {"prompt":"if (AnalysisApiTestDirectives.MODULE_KIND !in moduleStructure.allDirectives) return moduleStructure\n\n val moduleMapping = moduleStructure.modules.associateBy(TestModule::name)\n return TestModuleStructureImpl(\n moduleStructure.modules.map { module ->\n module.copy(\n allDependencies = module.allDependencies.map { dependency ->","completion":"transformDependency(dependency, moduleMapping)\n }\n )\n },\n moduleStructure.originalTestDataFiles,\n )\n }\n\n private fun transformDependency(\n dependency: DependencyDescription,\n moduleMapping: Map,\n ): DependencyDescription {\n val dependencyModule = moduleMapping.getValue(dependency.moduleName)<|endoftext|>"} {"prompt":"\/\/ generic signature: null\n\n\/\/ method: Test::withReferenceAsNullable-nB_snAY\n\/\/ jvm signature: (Ljava\/lang\/String;)V\n\/\/ generic signature: null\n\n\/\/ method: Test::withNullablePrimitiveAsNullable-v_QJOCg\n\/\/ jvm signature: (LInlineNullablePrimitive;)V\n\/\/ generic signature: null","completion":"\/\/ method: Test::withNullableReferenceAsNullable-jLXMqSo\n\/\/ jvm signature: (LInlineNullableReference;)V\n\/\/ generic signature: null<|endoftext|>"} {"prompt":"return \"OK\"\n}\n\n\/\/ CHECK_BYTECODE_TEXT\n\/\/ JVM_IR_TEMPLATES\n\/\/ 1 INVOKEVIRTUAL java\/lang\/StringBuilder\\.append \\(Z\\)Ljava\/lang\/StringBuilder;\n\/\/ 3 INVOKEVIRTUAL java\/lang\/StringBuilder\\.append \\(I\\)Ljava\/lang\/StringBuilder;","completion":"\/\/ 1 INVOKEVIRTUAL java\/lang\/StringBuilder\\.append \\(J\\)Ljava\/lang\/StringBuilder;\n\/\/ 1 INVOKEVIRTUAL java\/lang\/StringBuilder\\.append \\(F\\)Ljava\/lang\/StringBuilder;\n\/\/ 1 INVOKEVIRTUAL java\/lang\/StringBuilder\\.append \\(D\\)Ljava\/lang\/StringBuilder;<|endoftext|>"} {"prompt":"inline fun ordinaryInlineAcceptsVCString_Null(i: Int, vc: VCString?) {\n result = vc\n}\n\ninline fun ordinaryInlineAcceptsVCStringNullable_Null(i: Int, vc: VCStringNullable?) {\n result = vc\n}\n\ninline fun ordinaryInlineAcceptsVCAny_Null(i: Int, vc: VCAny?) {","completion":"result = vc\n}\n\ninline fun ordinaryInlineAcceptsVCAnyNullable_Null(i: Int, vc: VCAnyNullable?) {\n result = vc\n}\n\ninline fun ordinaryInlineAcceptsVCInt_Null(i: Int, vc: VCInt?) {\n result = vc\n}<|endoftext|>"} {"prompt":"A(1).foo(null)\n\n val k2: Int = B(1).component1()\n B(1).foo(1)\n B(1).foo(null)\n\n val k3: Int = C(1).component1()\n C(1).foo(1)\n C(1).foo(null)\n\n val k4: Int = D(1).component1()","completion":"D(1).foo(1)\n}<|endoftext|>"} {"prompt":"private val SHORT_RANGE = Short.MIN_VALUE.toLong()..Short.MAX_VALUE.toLong()\n\n private val UBYTE_RANGE = UByte.MIN_VALUE.toLong()..UByte.MAX_VALUE.toLong()\n private val USHORT_RANGE = UShort.MIN_VALUE.toLong()..UShort.MAX_VALUE.toLong()","completion":"private val UINT_RANGE = UInt.MIN_VALUE.toLong()..UInt.MAX_VALUE.toLong()\n }\n}\n\nclass ConeIntegerConstantOperatorTypeImpl(\n isUnsigned: Boolean,\n nullability: ConeNullability\n) : ConeIntegerConstantOperatorType(isUnsigned, nullability) {<|endoftext|>"} {"prompt":"for (element in this) if (predicate(element)) return element\n return null\n}\n\n\/**\n * Returns the first element matching the given [predicate], or `null` if element was not found.\n *\/\npublic inline fun ByteArray.firstOrNull(predicate: (Byte) -> Boolean): Byte? {\n for (element in this) if (predicate(element)) return element\n return null\n}\n\n\/**","completion":"* Returns the first element matching the given [predicate], or `null` if element was not found.\n *\/\npublic inline fun ShortArray.firstOrNull(predicate: (Short) -> Boolean): Short? {\n for (element in this) if (predicate(element)) return element\n return null\n}\n\n\/**\n * Returns the first element matching the given [predicate], or `null` if element was not found.\n *\/<|endoftext|>"} {"prompt":"if (x == z == true && x === z || (c != z && !c)) {\n\n } else {\n x","completion":"x.equals(null)\n x.propT<|endoftext|>"} {"prompt":"If updated IDL contains multiple union arguments and this check fails,\n consider updating the algorithm or return listOf(op) as a fallback.\n \"\"\"\n )\n\n val unionTypedArgumentIndex = op.arguments.indexOfFirst { it.type is IDLUnionTypeDeclaration }\n val unionTypedArgument = op.arguments[unionTypedArgumentIndex]","completion":"val unionType = unionTypedArgument.type as IDLUnionTypeDeclaration\n\n var unionMembersFlattened = unionType.unionMembers\n while (unionMembersFlattened.any { it is IDLUnionTypeDeclaration }) {\n unionMembersFlattened = unionMembersFlattened.flatMap {\n if (it is IDLUnionTypeDeclaration) it.unionMembers else listOf(it)\n }<|endoftext|>"} {"prompt":"val prop10: Any = \"a\"\n\n\/\/ val prop11: null\nval prop11: aaa = 1\n\n\/\/ val prop14: null","completion":"val prop14: aaa? = 1\n\nclass A\n\n\/\/ val prop15: null<|endoftext|>"} {"prompt":"val AMBIGUOUS_FUNCTION_TYPE_KIND: KtDiagnosticFactory1> by error1>()\n\n \/\/ Context receivers resolution","completion":"val NO_CONTEXT_RECEIVER: KtDiagnosticFactory1 by error1(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED)<|endoftext|>"} {"prompt":"inv()\n}\n\nfun poll21(flag: Boolean) {\n val inv = when (flag) { true -> ::bar2 else -> ::foo2 }\n inv()\n}\n\nfun poll22(flag: Boolean) {","completion":"val inv = when (flag) { true -> ::bar3 else -> ::foo3 }<|endoftext|>"} {"prompt":"private fun invalidFun1() {}\nprivate fun invalidFun1() {}\n\nprivate fun invalidFun2() {}\npublic fun invalidFun2() {}","completion":"public fun invalidFun3() {}\n\nprivate fun invalidFun4() {}\npublic fun invalidFun4() {}\n\npublic fun validFun2(a: A) = a\npublic fun validFun2(b: B) = b<|endoftext|>"} {"prompt":" & Out?\")!>x.funNullableAny()\n val y = x.get()\n if (y != null) {","completion":"y\n y.equals(null)<|endoftext|>"} {"prompt":"public inline fun DoubleArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Double): Double {\n contract {\n callsInPlace(defaultValue, InvocationKind.AT_MOST_ONCE)\n }\n return if (index in indices) get(index) else defaultValue(index)\n}\n\n\/**","completion":"* Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.\n * \n * @sample samples.collections.Collections.Elements.elementAtOrElse\n *\/\n@kotlin.internal.InlineOnly\npublic inline fun BooleanArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Boolean): Boolean {<|endoftext|>"} {"prompt":"branchName: String? = null,\n commitName: String? = null,\n tagName: String? = null,\n ): String {\n val branch = if (branchName != null) \"branch = \\\"$branchName\\\"\" else \"\"\n val commit = if (commitName != null) \"commit = \\\"$commitName\\\"\" else \"\"","completion":"val tag = if (tagName != null) \"tag = \\\"$tagName\\\"\" else \"\"\n return \"\"\"source = git(\"$repo\") {\n | $branch\n | $commit\n | $tag\n |}\n \"\"\".trimMargin()\n }\n\n\n private fun isRepoAvailable(repos: List) = runBlocking {<|endoftext|>"} {"prompt":"fun test() {\n takeFun(::foo)\n takeFun(::fooInt)\n\n callFun>(::createWrapper)\n callFun>(::createWrapper)\n callFun>(::createWrapper)","completion":"callFun>(::createWrapper)\n\n callFun>(::createWrapper).baz(::foo)\n}<|endoftext|>"} {"prompt":"class DebugInfoDiagnosticFactory1 : DiagnosticFactory1,\n DebugInfoDiagnosticFactory {\n private val privateName: String\n\n override val name: String\n get() = \"DEBUG_INFO_$privateName\"\n\n override val withExplicitDefinitionOnly: Boolean\n\n override fun createDiagnostic(\n element: KtElement,","completion":"bindingContext: BindingContext,\n dataFlowValueFactory: DataFlowValueFactory?,\n languageVersionSettings: LanguageVersionSettings?,\n moduleDescriptor: ModuleDescriptorImpl?\n ) = when (privateName) {\n EXPRESSION_TYPE.privateName -> {\n val (type, dataFlowTypes) = CheckerTestUtil.getTypeInfo(\n element,\n bindingContext,<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.low.level.api.fir.util\n\nimport org.jetbrains.kotlin.fir.FirElementWithResolveState\nimport org.jetbrains.kotlin.fir.declarations.FirResolvePhase\nimport org.jetbrains.kotlin.fir.declarations.ResolveStateAccess","completion":"import org.jetbrains.kotlin.fir.utils.exceptions.withFirEntry\nimport org.jetbrains.kotlin.utils.exceptions.checkWithAttachment\n\ninternal fun FirElementWithResolveState.checkPhase(requiredResolvePhase: FirResolvePhase) {\n @OptIn(ResolveStateAccess::class)\n val declarationResolveState = resolveState\n checkWithAttachment(<|endoftext|>"} {"prompt":"get() = compilation.languageSettings\n\n @Suppress(\"DeprecatedCallableAddReplaceWith\")\n @get:Deprecated(\"Replaced with 'compilerOptions.progressiveMode'\")\n @get:Internal\n val progressiveMode: Boolean\n get() = compilation.compilerOptions.options.progressiveMode.get()\n \/\/ endregion.\n\n @get:Input","completion":"val kotlinNativeVersion: String = project.konanVersion\n\n @get:Input\n val artifactVersion = project.version.toString()\n\n @get:Input\n internal val useEmbeddableCompilerJar: Boolean = project.nativeUseEmbeddableCompilerJar\n\n @get:Internal\n open val outputFile: Provider\n get() = destinationDirectory.flatMap {<|endoftext|>"} {"prompt":"return itemIterator!!.next()\n }\n\n override fun hasNext(): Boolean {\n if (state == State.READY) return true\n if (state == State.DONE) return false\n return ensureItemIterator()\n }\n\n private fun ensureItemIterator(): Boolean {\n val itemIterator = itemIterator\n if (itemIterator != null && itemIterator.hasNext()) {","completion":"state = State.READY\n return true\n }\n\n while (iterator.hasNext()) {\n val element = iterator.next()\n val nextItemIterator = iterator(transformer(element))\n if (nextItemIterator.hasNext()) {\n this.itemIterator = nextItemIterator\n state = State.READY\n return true\n }\n }\n\n state = State.DONE<|endoftext|>"} {"prompt":"irFile.transform(InlineClassTransformer(context), data = null)\n }\n\n}\n\nprivate class AutoboxingTransformer(val context: Context) : AbstractValueUsageTransformer(\n context.ir.symbols,\n context.irBuiltIns\n) {\n\n \/\/ TODO: should we handle the cases when expression type\n \/\/ is not equal to e.g. called function return type?","completion":"override fun IrExpression.useInTypeOperator(operator: IrTypeOperator, typeOperand: IrType): IrExpression {\n return if (operator == IrTypeOperator.IMPLICIT_COERCION_TO_UNIT ||\n operator == IrTypeOperator.IMPLICIT_INTEGER_COERCION) {\n this\n } else {<|endoftext|>"} {"prompt":"} get; var e22: Int; set get; var e23: Int; set(v) {} get;","completion":"var c20: Int = 1; get; var c21: Int = 1; set(v) { field = v } get; var c22: Int = 1; set get; var c23: Int = 1; set(v) {} get;<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.konan.test.blackbox.support.compilation.*\nimport org.jetbrains.kotlin.konan.test.blackbox.support.compilation.LibraryCompilation\nimport org.jetbrains.kotlin.konan.test.blackbox.support.compilation.ObjCFrameworkCompilation","completion":"import org.jetbrains.kotlin.konan.test.blackbox.support.compilation.TestCompilationResult.Companion.assertSuccess\nimport org.jetbrains.kotlin.konan.test.blackbox.support.group.FirPipeline\nimport org.jetbrains.kotlin.konan.test.blackbox.support.settings.CacheMode<|endoftext|>"} {"prompt":"lines().count {\n it.contains(\"final class\") && it.endsWith(\"%KeyMeta {\")\n }\n )\n }\n\n private fun String.assertFunctionKeyMetaClassAnnotationCount(expected: Int) {\n assertEquals(expected,\n lines().count {\n it.contains(\"@Landroidx\/compose\/runtime\/internal\/FunctionKeyMetaClass;\")\n }","completion":")\n }\n\n private fun String.assertFunctionKeyMetaAnnotationCount(expected: Int) {\n assertEquals(expected,\n lines().sumOf {\n when {\n it.contains(\"@Landroidx\/compose\/runtime\/internal\/FunctionKeyMeta%Container;\") -> {\n it.occurrences(\"@Landroidx\/compose\/runtime\/internal\/FunctionKeyMeta;\")<|endoftext|>"} {"prompt":"\/\/ mypack.Usage\npackage mypack\n\ntypealias UnitTypeAlias = Unit\ntypealias NullableUnitTypeAlias = Unit?\n\nclass Usage {\n fun unitTypeAlias(): UnitTypeAlias {\n\n }\n\n fun unitTypeAliasAsNullable(): UnitTypeAlias? = null\n\n fun nullableUnitTypeAlias(): NullableUnitTypeAlias = null","completion":"fun nullableUnitTypeAliasAsNullable(): NullableUnitTypeAlias? = null\n}<|endoftext|>"} {"prompt":"name = \"WrapInlineDeclarationsWithReifiedTypeParameters\",\n description = \"Wrap inline declarations with reified type parameters\"\n)\n\nprivate val postInlinePhase = createFileLoweringPhase(\n { context: Context -> PostInlineLowering(context) },\n name = \"PostInline\",\n description = \"Post-processing after inlining\"\n)","completion":"private val contractsDslRemovePhase = createFileLoweringPhase(\n { context: Context -> ContractsDslRemover(context) },\n name = \"RemoveContractsDsl\",\n description = \"Contracts dsl removing\"\n)\n\n\/\/ TODO make all lambda-related stuff work with IrFunctionExpression and drop this phase (see kotlin: dd3f8ecaacd)<|endoftext|>"} {"prompt":"annotation class A1\n@Target(FILE)\nannotation class C1(val value: Array)\n\n@R(C2::class)\n@Target(CLASS)\nannotation class A2\n@Target(CLASS, FUNCTION)","completion":"annotation class C2(val value: Array)\n\n@R(C3::class)\n@Target(TYPE)\nannotation class A3\nannotation class C3(val value: Array)<|endoftext|>"} {"prompt":"*failuresForEqualAndUnequalRight(\n \"x\",\n \"y\",\n \"nx\"\n ),\n *failuresForUnequalRight(x, \"nn\"),\n *failuresForUnequalRight(\"x\", \"nn\"),\n *failuresForEqualAndUnequalRight(x, y, \"ax\"),\n *failuresForEqualAndUnequalRight(","completion":"\"x\",\n \"y\",\n \"ax\"\n ),\n *failuresForEqualAndUnequalRight(\n \"bx\",\n \"by\",\n \"ax\"\n ),\n *failuresForUnequalRight(x, \"an\"),\n *failuresForUnequalRight(\"x\", \"an\"),\n *failuresForUnequalRight(\"bx\", \"an\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.plugin.internal\n\nimport org.gradle.api.attributes.Attribute\nimport org.gradle.api.internal.artifacts.ArtifactAttributes\n\ninternal class ArtifactTypeAttributeAccessorG6(\n) : ArtifactTypeAttributeAccessor {\n override val artifactTypeAttribute: Attribute\n get() = ArtifactAttributes.ARTIFACT_FORMAT","completion":"internal class ArtifactTypeAttributeAccessorVariantFactoryG6 :\n ArtifactTypeAttributeAccessor.ArtifactTypeAttributeAccessorVariantFactory {\n override fun getInstance(): ArtifactTypeAttributeAccessor = ArtifactTypeAttributeAccessorG6()\n }\n}<|endoftext|>"} {"prompt":"@file:Suppress(\"NON_MEMBER_FUNCTION_NO_BODY\", \"UNUSED_PARAMETER\", \"unused\")\n\npackage kotlin.js\n\n@RequiresOptIn(message = \"Here be dragons! This is a compiler intrinsic, proceed with care!\")\n@Retention(AnnotationRetention.BINARY)\n@Target(AnnotationTarget.FUNCTION)","completion":"internal annotation class JsIntrinsic\n\n@JsIntrinsic\ninternal fun jsEqeq(a: Any?, b: Any?): Boolean\n\n@JsIntrinsic\ninternal fun jsNotEq(a: Any?, b: Any?): Boolean\n\n@JsIntrinsic\ninternal fun jsUndefined(): Nothing?\n\n@JsIntrinsic<|endoftext|>"} {"prompt":"DslMarkerOnFunctionTypeReceiver(KOTLIN_1_4, kind = BUG_FIX),\n RestrictReturnStatementTarget(KOTLIN_1_4, kind = BUG_FIX),\n NoConstantValueAttributeForNonConstVals(KOTLIN_1_4, kind = BUG_FIX),\n WarningOnMainUnusedParameter(KOTLIN_1_4),","completion":"PolymorphicSignature(KOTLIN_1_4),\n ProhibitConcurrentHashMapContains(KOTLIN_1_4, kind = BUG_FIX),\n ProhibitTypeParametersForLocalVariables(KOTLIN_1_4, kind = BUG_FIX),\n ProhibitJvmOverloadsOnConstructorsOfAnnotationClasses(KOTLIN_1_4, kind = BUG_FIX),<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.load.kotlin.KotlinJvmBinarySourceElement\n\nobject FirJvmInlineTargetQualifiedAccessChecker : FirQualifiedAccessExpressionChecker(MppCheckerKind.Common) {\n override fun check(expression: FirQualifiedAccessExpression, context: CheckerContext, reporter: DiagnosticReporter) {","completion":"val callableSymbol = expression.calleeReference.toResolvedCallableSymbol() ?: return\n if (callableSymbol.origin.fromSource) return\n\n val isInline = when (callableSymbol) {\n is FirFunctionSymbol<*> -> callableSymbol.isInline\n is FirPropertySymbol -> {<|endoftext|>"} {"prompt":"compilerArguments.detectVersionAutoAdvance()\n\n if (useProjectSettings != null) {\n this.useProjectSettings = useProjectSettings\n } else {\n \/\/ Migration problem workaround for pre-1.1-beta releases (mainly 1.0.6) -> 1.1-rc+","completion":"\/\/ Problematic cases: 1.1-beta\/1.1-beta2 -> 1.1-rc+ (useProjectSettings gets reset to false)\n \/\/ This heuristic detects old enough configurations:\n if (jvmArgumentsElement == null) {\n this.useProjectSettings = false\n }\n }\n\n this.compilerSettings = compilerSettings\n this.compilerArguments = compilerArguments<|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-39034\n\ninterface A\n\nfun test_0(a: A, f: A.() -> Unit) {\n a.f()\n}\n\nfun test_1(a: A, ys: List Unit>) {\n for (y in ys) {\n a.y()\n }\n}","completion":"fun test_2(a: A, vararg zs: A.() -> Unit) {\n for (z in zs) {\n a.z()\n }\n}<|endoftext|>"} {"prompt":"val candidateTrace = TemporaryBindingTrace.create(basicCallContext.trace, \"Context for resolve candidate\")\n val candidateCall = ResolvedCallImpl(\n basicCallContext.call, towerCandidate.descriptor,\n towerCandidate.dispatchReceiver?.receiverValue, extensionReceiver?.receiverValue,\n explicitReceiverKind, null, candidateTrace, tracing,","completion":"basicCallContext.dataFlowInfoForArguments \/\/ todo may be we should create new mutable info for arguments\n )\n\n \/**\n * See https:\/\/jetbrains.quip.com\/qcTDAFcgFLEM\n *\n * For now we have only 2 functions with dynamic receivers: iterator() and unsafeCast()<|endoftext|>"} {"prompt":"val bar get() = \"Failed\"\n}\n\ninterface IFooBar2 : IFooBar\n\nOPTIONAL_JVM_INLINE_ANNOTATION\nvalue class Test1(val k: T): IFooBar {\n override val bar: String\n get() = k\n}\n\nOPTIONAL_JVM_INLINE_ANNOTATION","completion":"value class Test2(val k: T): IFooBar2 {\n override val bar: String\n get() = k\n}\n\nfun box(): String {\n val k = Test1(\"K\")\n val ik: IFooBar = k\n val k2 = Test2(\"K\")\n val ik2: IFooBar = k2<|endoftext|>"} {"prompt":"\/*p:bar p:foo p:java.lang p:kotlin p:kotlin.annotation p:kotlin.collections p:kotlin.comparisons p:kotlin.io p:kotlin.jvm p:kotlin.ranges p:kotlin.sequences p:kotlin.text*\/E.\/*p:foo.E*\/valueOf(\"\")\n}","completion":"\/*p:foo*\/fun classifiers(\n a: \/*p:foo*\/A,\n ab: \/*p:foo*\/A.\/*p:foo.A*\/B,\n ac: \/*p:foo*\/A.\/*p:foo.A*\/C,\n abCo: \/*p:foo*\/A.\/*p:foo.A*\/B.\/*p:foo.A.B*\/CO,<|endoftext|>"} {"prompt":"val byteBuffer = byteBufferForEncoding(chunkSize, encoder)\n\n var startIndex = 0\n var leftover = 0\n\n while (startIndex < text.length) {\n val copyLength = minOf(chunkSize - leftover, text.length - startIndex)\n val endIndex = startIndex + copyLength","completion":"text.toCharArray(charBuffer.array(), leftover, startIndex, endIndex)\n charBuffer.limit(copyLength + leftover)\n encoder.encode(charBuffer, byteBuffer, \/*endOfInput = *\/endIndex == text.length).also { check(it.isUnderflow) }\n this.write(byteBuffer.array(), 0, byteBuffer.position())<|endoftext|>"} {"prompt":"instructions.insertBefore(insnNode, jumpInsnNode)\n instructions.remove(insnNode)\n insnNode = jumpInsnNode\n }\n\n val label = LabelNode()\n instructions.insert(insnNode, label)\n \/\/ generate finally blocks before the non-local return flag or the stack fixup pseudo instruction","completion":"val finallyInsertionPoint = if (isLocalReturn && jumpTarget == endLabel) insnNode else insnNode.previous\n result.add(PointForExternalFinallyBlocks(finallyInsertionPoint, returnType, label, jumpTarget))\n }\n insnNode = insnNode.next\n }\n return result\n }\n }\n\n private fun isRegeneratingAnonymousObject(): Boolean =<|endoftext|>"} {"prompt":"target.compilations.getByName(\"test\").cinterops.create(\"appleTestHelper\").identifier\n }\n\n iosTargets.map { target ->\n target.compilations.getByName(\"main\").cinterops.create(\"iosHelper\").identifier\n }\n\n iosX64.compilations.getByName(\"main\").cinterops.create(\"iosX64Helper\").identifier","completion":"iosX64.compilations.getByName(\"test\").cinterops.create(\"iosX64TestHelper\").identifier\n\n \/* Define source set hierarchy *\/\n val commonMain = kotlin.sourceSets.getByName(\"commonMain\")\n val commonTest = kotlin.sourceSets.getByName(\"commonTest\")<|endoftext|>"} {"prompt":"println(prepend + \"\"\"\n |stdout:\n |$stdOut\n |stderr:\n |$stdErr\n |exit code: $exitCode\n \"\"\".trimMargin())\n }\n}\n\n\/**\n * Create a test task of the given type. Supports configuration with Closure passed form build.gradle file.\n *\/","completion":"fun Project.createTest(name: String, type: Class, config: Closure<*>): T =\n project.tasks.create(name, type).apply {\n \/\/ Apply closure set in build.gradle to get all parameters.\n this.configure(config)\n if (enabled) {<|endoftext|>"} {"prompt":"override fun lower(irFile: IrFile) {\n irFile.transformChildrenVoid(this)\n }\n\n private val irBuiltIns = context.irBuiltIns\n private val symbols = context.ir.symbols\n\n private val typesWithSpecialAppendFunction = irBuiltIns.primitiveIrTypes + irBuiltIns.stringType\n\n private val nameAppend = Name.identifier(\"append\")","completion":"private val stringBuilder = context.ir.symbols.stringBuilder.owner\n\n \/\/TODO: calculate and pass string length to the constructor.\n private val constructor = stringBuilder.constructors.single {\n it.valueParameters.isEmpty()\n }\n\n private val defaultAppendFunction = stringBuilder.functions.single {\n it.name == nameAppend &&<|endoftext|>"} {"prompt":"buildList {\n files.forEach { ktFile ->\n val firFile = firFileBuilder.buildRawFirFileWithCaching(ktFile)\n firFile.collectCallableDeclarationsTo(this, callableId.callableName)\n }\n }\n }\n\n val symbolNameCache = FirCompositeCachedSymbolNamesProvider.create(\n firSession,","completion":"listOfNotNull(\n LLFirKotlinSymbolNamesProvider(declarationProvider, allowKotlinPackage),\n extensionTool?.symbolNamesProvider,\n )\n )\n\n fun getFirClassifierByFqNameAndDeclaration(\n classId: ClassId,\n classLikeDeclaration: KtClassLikeDeclaration?,\n ): FirClassLikeDeclaration? {<|endoftext|>"} {"prompt":") : AnnotationDescriptor, LazyEntity, ValidateableDescriptor {\n\n override val type by c.storageManager.createLazyValue(\n computable = lazy@{\n val annotationType = c.annotationResolver.resolveAnnotationType(scope, annotationEntry, c.trace)\n if (annotationType is AbbreviatedType) {","completion":"\/\/ This is needed to prevent recursion in cases like this: typealias S = @S Ann\n if (annotationType.annotations.any { it == this }) {\n annotationType.abbreviation.constructor.declarationDescriptor?.let { typeAliasDescriptor -><|endoftext|>"} {"prompt":"\/\/ 1 LOCALVARIABLE \\$i\\$a\\$-inlineFun-DefaultLambdaKt\\$inlineFun\\$1 I\n\/\/ inlineFun, inlineFun$default, inlined inlineFun:\n\/\/ 3 LOCALVARIABLE \\$i\\$f\\$inlineFun\n\n\/\/ JVM_IR_TEMPLATES_WITH_INLINE_SCOPES","completion":"\/\/ 1 LOCALVARIABLE \\$i\\$a\\$-inlineFun-DefaultLambdaKt\\$inlineFun\\$1\\\\2\\\\30\\\\0 I\n\/\/ inlineFun, inlineFun$default, inlined inlineFun:\n\/\/ 1 LOCALVARIABLE \\$i\\$f\\$inlineFun\\\\1\n\/\/ 2 LOCALVARIABLE \\$i\\$f\\$inlineFun I<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.ir.interpreter.transformer\n\nimport com.intellij.openapi.progress.ProcessCanceledException\nimport org.jetbrains.kotlin.constant.ErrorValue\nimport org.jetbrains.kotlin.constant.EvaluatedConstTracker\nimport org.jetbrains.kotlin.incremental.components.InlineConstTracker","completion":"import org.jetbrains.kotlin.ir.IrElement\nimport org.jetbrains.kotlin.ir.declarations.*\nimport org.jetbrains.kotlin.ir.expressions.*\nimport org.jetbrains.kotlin.ir.expressions.impl.IrConstImpl\nimport org.jetbrains.kotlin.ir.interpreter.IrInterpreter<|endoftext|>"} {"prompt":"fun fooInt(p: Int) = p\nfun fooLong(p: Long) = p\nfun fooByte(p: Byte) = p\nfun fooShort(p: Short) = p\n\nfun test() {\n fooInt(1 + 1)\n fooByte(1 + 1)\n fooLong(1 + 1)","completion":"fooShort(1 + 1)\n\n fooInt(1 * 1)\n fooByte(1 * 1)\n fooLong(1 * 1)\n fooShort(1 * 1)<|endoftext|>"} {"prompt":"}\n}\n\nfun generateBuiltIns(generate: (File, (PrintWriter) -> BuiltInsGenerator) -> Unit) {\n assertExists(BUILT_INS_NATIVE_DIR_JVM)\n assertExists(BUILT_INS_NATIVE_DIR_JS)\n assertExists(BUILT_INS_NATIVE_DIR_WASM)","completion":"assertExists(BUILT_INS_NATIVE_DIR_NATIVE)\n assertExists(BUILT_INS_SRC_DIR)\n assertExists(RUNTIME_JVM_DIR)\n assertExists(UNSIGNED_TYPES_DIR)<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1238\n\/\/ FILE: bar.kt\n@file:JsQualifier(\"foo\")\npackage foo\n\nexternal interface Bar {\n fun ping(): String\n}\n\n\/\/ FILE: baz.kt\npackage boo\n\nexternal interface Baz {\n fun pong(): Int\n}\n\n\/\/ FILE: root.kt\nimport foo.Bar\nimport boo.Baz","completion":"external val bar: Bar\nexternal val baz: Baz\n\n\/\/ FILE: test.kt\nfun box(): String {\n if (bar.ping() != \"ping\" || baz.pong() != 194) return \"Fail\"\n\n return \"OK\"\n}\n\n\/\/ FILE: test.js\n\nvar bar = {\n ping() {\n return \"ping\"\n }\n};\n\nvar baz = {<|endoftext|>"} {"prompt":"assertEquals(\"13, 21, 34, 55, 89, 144, 233, 377, 610, 987, ...\", fibonacci().drop(7).joinToString(limit = 10))\n assertEquals(\"13, 21, 34, 55, 89, 144, 233, 377, 610, 987, ...\", fibonacci().drop(3).drop(4).joinToString(limit = 10))","completion":"assertFailsWith { fibonacci().drop(-1) }\n\n val dropMax = fibonacci().drop(Int.MAX_VALUE)\n run @Suppress(\"UNUSED_VARIABLE\") {\n val dropMore = dropMax.drop(Int.MAX_VALUE)\n val takeMore = dropMax.take(Int.MAX_VALUE)\n }\n\n }<|endoftext|>"} {"prompt":"\/\/ If suspend function returns Unit and tail-call, it might appear, that it returns not Unit,\n \/\/ see comment above replaceReturnsUnitMarkersWithPushingUnitOnStack for explanation.\n \/\/ In this case, return Unit manually.\n @Suppress(\"UNCHECKED_CAST\")\n if (returnType.classifier == Unit::class && !returnType.isMarkedNullable) return (Unit as R)\n return result","completion":"}\n\n\/**\n * Calls a callable in the current suspend context. If the callable is not a suspend function, behaves as [KCallable.callBy].\n * Otherwise, calls the suspend function with current continuation.\n *\/\n@SinceKotlin(\"1.3\")\nsuspend fun KCallable.callSuspendBy(args: Map): R {<|endoftext|>"} {"prompt":"private fun getCapturedFieldAccessChain(aload0: VarInsnNode): List {\n val lambdaAccessChain = mutableListOf(aload0).apply {\n addAll(InsnSequence(aload0.next, null).filter { it.isMeaningful }.takeWhile { insnNode ->","completion":"insnNode is FieldInsnNode && AsmUtil.CAPTURED_THIS_FIELD == insnNode.name\n }.toList())\n }\n\n return lambdaAccessChain.apply {\n last().getNextMeaningful().takeIf { insn -> insn is FieldInsnNode }?.also {\n \/\/captured field access\n insn ->\n add(insn)\n }<|endoftext|>"} {"prompt":"val zc1 = ZMutableCollection(mutableListOf(Z(1), Z(2), Z(3)))\n zc1.remove(Z(1))\n if (Z(1) in zc1) throw AssertionError(\"Z(1) in zc1\")","completion":"val zc2 = Z2MutableCollection(mutableListOf(z2(1), z2(2), z2(3)))\n zc2.remove(z2(1))\n if (z2(1) in zc2) throw AssertionError(\"z2(1) in zc2\")\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"package kt35940\n\nimport kotlin.reflect.*\n\n@OptIn(ExperimentalAssociatedObjects::class)\n@AssociatedObjectKey\n@Retention(AnnotationRetention.BINARY)\nannotation class Associated(val kClass: KClass<*>)\n\nprivate interface I1 {\n val s: String\n}\n\nprivate class I1Impl : I1 {","completion":"override val s = \"zzz\"\n}\n\nprivate class C(var i1: I1?)\n\nprivate interface I2 {\n fun bar(c: C)\n}\n\nprivate object I2Impl : I2 {\n override fun bar(c: C) {\n c.i1 = I1Impl()\n }\n}\n\n@Associated(I2Impl::class)<|endoftext|>"} {"prompt":"assert128BitHash(\"a\".repeat(15), 4649666081741216883UL, 11336931969441833971UL)\n assert128BitHash(\"a\".repeat(16), 14694504640136803685UL, 15089679700857083186UL)","completion":"assert128BitHash(\"a\".repeat(17), 12343703380141332181UL, 12834902385258119372UL)\n assert128BitHash(\"a\".repeat(20), 7859379477173421491UL, 12195612906319506123UL)<|endoftext|>"} {"prompt":"}\n\n \/\/ KotlinConstraintSystemCompleter.Context, PostponedArgumentsAnalyzer.Context\n override fun canBeProper(type: KotlinTypeMarker): Boolean {\n checkState(State.BUILDING, State.COMPLETION)\n return !type.contains { storage.notFixedTypeVariables.containsKey(it.typeConstructor()) }\n }","completion":"override fun containsOnlyFixedOrPostponedVariables(type: KotlinTypeMarker): Boolean {\n checkState(State.BUILDING, State.COMPLETION)\n return !type.contains {\n val typeConstructor = it.typeConstructor()\n val variable = storage.notFixedTypeVariables[typeConstructor]?.typeVariable<|endoftext|>"} {"prompt":"is String -> 1\n !is Int -> 1\n is Any? -> 1\n is Any -> 1","completion":"s -> 1\n 1 -> 1\n 1 + a -> 1\n in 1..a -> 1\n !in 1..a -> 1<|endoftext|>"} {"prompt":".constructClassType(ConeTypeProjection.EMPTY_ARRAY, isNullable = false)\n }\n this.argumentMapping = buildAnnotationArgumentMapping {\n mapping[StandardNames.NAME] =\n buildLiteralExpression(null, ConstantValueKind.String, paramName, setType = true)\n }\n }\n }\n }","completion":"return type(typeReference, annotations.computeTypeAttributes(moduleData.session, shouldExpandTypeAliases = false))\n }\n\n fun type(type: KotlinTypeBean): ConeKotlinType? {\n when (type) {\n is KotlinTypeParameterTypeBean -> {\n val lookupTag =<|endoftext|>"} {"prompt":"const val concat5 = \"String concatenation example with A class: ${A()}\"","completion":"const val concat6 = \"String concatenation example with B class, where toString is FAKE_OVERRIDDEN: ${B()}\"<|endoftext|>"} {"prompt":"operator fun rangeTo(o: Int) {}\noperator fun rangeTo(o: Int, o2: Int) {}\noperator fun rangeTo(vararg o: String) {}","completion":"operator fun component1(): Int {}<|endoftext|>"} {"prompt":"override val frontendToBackendConverter: Constructor>\n get() = ::ClassicFrontend2ClassicBackendConverter\n\n override val backendFacade: Constructor>\n get() = ::ClassicJvmBackendFacade\n}","completion":"open class AbstractIrCompileKotlinAgainstInlineKotlinTest(targetBackend: TargetBackend = TargetBackend.JVM_IR) :\n AbstractCompileKotlinAgainstInlineKotlinTestBase(\n FrontendKinds.ClassicFrontend,\n targetBackend\n ) {<|endoftext|>"} {"prompt":"}\n\n\/\/ TESTCASE NUMBER: 8\nfun case_8_1() {}\nfun case_8(x: Any?) {\n if (x is String) {\n x\n val m = try {\n ::case_8_1\n } catch (e: Exception) {","completion":"::case_8_1\n }\n x\n val z: String = x\n }\n}\n\n\/\/ TESTCASE NUMBER: 9\nfun case_9(x: Any?) {\n if (x is String) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.psi.KtFile\nimport org.jetbrains.kotlin.resolve.PlatformDependentAnalyzerServices\nimport java.nio.file.Path\n\n\/**\n * Represents a module inside a project.\n *\n * [KtModule] is a Source Set (or considering a new project model naming a Fragment).","completion":"* Some examples of a module: main source set, test source set, library, JDK.\n *\n *\/\npublic sealed interface KtModule {\n \/**\n * A list of Regular dependencies. Regular dependency allows the current module to see symbols from the dependent module. In the case\n * of a source set, it can be either the source set it depends on, a library, or an SDK.\n *<|endoftext|>"} {"prompt":"fun clang_Type_getAlignOf(T: CValue): Long {\n memScoped {\n return kniBridge178(T.getPointer(memScope).rawValue)\n }\n}\n\nfun clang_Type_getClassType(T: CValue): CValue {\n memScoped {","completion":"val kniRetVal = nativeHeap.alloc()\n try {\n kniBridge179(T.getPointer(memScope).rawValue, kniRetVal.rawPtr)\n return kniRetVal.readValue()\n } finally { nativeHeap.free(kniRetVal) }\n }\n}<|endoftext|>"} {"prompt":"override fun isPropertyAccessor(): Boolean = function is FirPropertyAccessor\n\n override fun hasObjCMethodAnnotation(): Boolean = function.hasObjCMethodAnnotation(session)\n\n override fun hasObjCFactoryAnnotation(): Boolean = function.hasObjCFactoryAnnotation(session)\n\n override fun isObjCClassMethod(): Boolean = function.isObjCClassMethod(session)","completion":"override fun getValueParameterName(valueParameter: FirValueParameter): Name = valueParameter.name\n}\n\nclass FirNativeKotlinMangleComputer(\n builder: StringBuilder,\n mode: MangleMode,\n) : FirMangleComputer(builder, mode) {\n override fun copy(newMode: MangleMode): FirNativeKotlinMangleComputer =<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION\n\/\/ SKIP_TXT\n\n\/*\n * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)\n *\n * SPEC VERSION: 0.1-401","completion":"* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver, call-with-an-explicit-type-receiver -> paragraph 3 -> sentence 2\n * NUMBER: 1\n * DESCRIPTION:\n *\/\n\n\/*\n * TESTCASE NUMBER: 1\n * UNEXPECTED BEHAVIOUR<|endoftext|>"} {"prompt":"if (local.metDefinitelyNotNullType) {\n builder.addVersionRequirement(writeVersionRequirement(LanguageFeature.DefinitelyNonNullableTypes))\n }\n }\n\n return builder\n }\n\n private fun constructorProto(descriptor: ConstructorDescriptor): ProtoBuf.Constructor.Builder {\n val builder = ProtoBuf.Constructor.newBuilder()","completion":"val local = createChildSerializer(descriptor)\n\n val flags = Flags.getConstructorFlags(\n hasAnnotations(descriptor), ProtoEnumFlags.descriptorVisibility(normalizeVisibility(descriptor)), !descriptor.isPrimary,\n shouldSerializeHasStableParameterNames(descriptor)\n )\n if (flags != builder.flags) {<|endoftext|>"} {"prompt":"private const val INDEX = \"index\\$$ATOMICFU\"\n\nclass AtomicfuNativeIrTransformer(\n pluginContext: IrPluginContext,\n override val atomicSymbols: NativeAtomicSymbols\n) : AbstractAtomicfuTransformer(pluginContext) {\n\n override val atomicPropertiesTransformer: AtomicPropertiesTransformer\n get() = NativeAtomicPropertiesTransformer()","completion":"override val atomicFunctionsTransformer: AtomicFunctionCallTransformer\n get() = NativeAtomicFunctionCallTransformer()\n\n private inner class NativeAtomicPropertiesTransformer : AtomicPropertiesTransformer() {\n\n override fun IrClass.addTransformedInClassAtomic(atomicProperty: IrProperty, index: Int): IrProperty =\n addVolatileProperty(atomicProperty, index)<|endoftext|>"} {"prompt":"when (functionVisitingState[definition.function]) {\n VisitedState.IN_PROCESS -> {\n reportInlineCycle(call, definition.function)\n return\n }\n VisitedState.PROCESSED -> return\n null -> {}\n }\n\n functionVisitingState[function] = VisitedState.IN_PROCESS\n\n withFunction(function, doProcess)","completion":"functionVisitingState[function] = VisitedState.PROCESSED\n\n } finally {\n if (!inlineCallInfos.isEmpty()) {\n @Suppress(\"DEPRECATION\") \/\/ KT-65247\n if (inlineCallInfos.last.call == call) {\n inlineCallInfos.removeLast()\n }\n }\n }\n }<|endoftext|>"} {"prompt":"private fun transformCall(methodContext: MethodContext, callContext: CallContext) {\n \/\/ Transform nested calls\n for (arg in callContext.args) {\n for (nestedCall in arg.calls) {\n transformCall(methodContext, nestedCall)\n }\n }\n for (call in callContext.calls) {\n transformCall(methodContext, call)\n }","completion":"if (callContext.args.any { it.isUnsafeToMove(methodContext) }) {\n \/\/ Do not transform such call, just strip call and argument markers.\n val insnList = methodContext.methodNode.instructions\n for (arg in callContext.args) {\n insnList.remove(arg.argStartMarker)\n insnList.remove(arg.argEndMarker)<|endoftext|>"} {"prompt":"\/\/ !JVM_DEFAULT_MODE: all-compatibility\n\/\/ JVM_TARGET: 1.8\n\ninterface KInterface {\n\n var bar: String\n get() = \"OK\"\n set(field) {}\n}\n\ninterface KInterface2 : KInterface {\n\n}\n\n\/\/ 1 INVOKESTATIC KInterface2.access\\$getBar\\$jd","completion":"\/\/ 1 INVOKESTATIC KInterface2.access\\$setBar\\$jd\n\/\/ 1 INVOKESTATIC KInterface.access\\$getBar\\$jd\n\/\/ 1 INVOKESTATIC KInterface.access\\$setBar\\$jd\n\n\/\/ 1 INVOKESPECIAL KInterface2.getBar\n\/\/ 1 INVOKESPECIAL KInterface2.setBar<|endoftext|>"} {"prompt":"\/\/ and does not take over the line number of whatever was generated before.\n tryInfo.onExit.firstChild().markLineNumber(true)\n \/\/ While keeping this value on the stack should be enough, the bytecode validator will\n \/\/ complain if a catch block does not start with ASTORE.\n val savedException = frameMap.enterTemp(AsmTypes.JAVA_THROWABLE_TYPE)","completion":"mv.store(savedException, AsmTypes.JAVA_THROWABLE_TYPE)\n\n val finallyStart = markNewLabel()\n val finallyGaps = tryInfo.gaps.toList()\n data.handleBlock { genFinallyBlock(tryInfo, null, null, data) }\n mv.load(savedException, AsmTypes.JAVA_THROWABLE_TYPE)<|endoftext|>"} {"prompt":"if (descriptor.kind != CallableMemberDescriptor.Kind.FAKE_OVERRIDE) return\n val containingClass = descriptor.containingDeclaration as? ClassDescriptor ?: return\n\n val possiblyClashingMembers = when (descriptor) {\n is PropertyAccessorDescriptor ->\n containingClass.unsubstitutedMemberScope","completion":".getContributedVariables(descriptor.correspondingProperty.name, NoLookupLocation.FROM_BACKEND)\n is PropertyDescriptor ->\n containingClass.unsubstitutedMemberScope\n .getContributedVariables(descriptor.name, NoLookupLocation.FROM_BACKEND)\n is FunctionDescriptor ->\n containingClass.unsubstitutedMemberScope<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef\nimport org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl\nimport org.jetbrains.kotlin.fir.types.impl.ConeTypeParameterTypeImpl","completion":"import org.jetbrains.kotlin.fir.types.impl.FirImplicitTypeRefImplWithoutSource\nimport org.jetbrains.kotlin.fir.types.jvm.FirJavaTypeRef\nimport org.jetbrains.kotlin.fir.utils.exceptions.withFirEntry\nimport org.jetbrains.kotlin.load.java.AnnotationQualifierApplicabilityType<|endoftext|>"} {"prompt":"val series: dynamic = object {}\n series[\"data\"] = it.toTypedArray()\n classNames?.let { series[\"className\"] = classNames[index] }\n series\n }.toTypedArray()\n return chartData\n}\n\n\/\/ Create object with options of chart.","completion":"fun getChartOptions(samples: Array, yTitle: String, classNames: Array? = null): dynamic {\n val chartOptions: dynamic = object {}\n chartOptions[\"fullWidth\"] = true\n chartOptions[\"low\"] = 0\n val paddingObject: dynamic = object {}\n paddingObject[\"right\"] = 40\n chartOptions[\"chartPadding\"] = paddingObject<|endoftext|>"} {"prompt":"lowHighSurrogates.andNot(another.lowHighSurrogates)\n\n \/\/A | !B = !((A ^ B) & B)\n } else {\n lowHighSurrogates.xor(another.lowHighSurrogates)\n lowHighSurrogates.and(another.lowHighSurrogates)\n altSurrogates = true\n }\n\n } else {","completion":"\/\/!A | !B = !(A & B)\n if (altSurrogates) {\n lowHighSurrogates.and(another.lowHighSurrogates)\n\n \/\/A | B\n } else {\n lowHighSurrogates.or(another.lowHighSurrogates)\n }\n }\n\n val anotherBits = another.bits<|endoftext|>"} {"prompt":"open fun renderDescriptor(sb: StringBuilder, descriptor: DeclarationDescriptor, context: RenderingContext, indent: String) {\n sb.append(indent)\n sb.append(INDENTATION_UNIT)\n sb.appendLine(Renderers.COMPACT_WITH_MODIFIERS.render(descriptor, context))\n }\n}","completion":"private fun StringBuilder.renderIncompatibilityInformation(\n map: Map, Collection>,\n indent: String,\n context: RenderingContext,\n mode: MultiplatformDiagnosticRenderingMode\n) {\n for ((incompatibility, descriptors) in map) {\n append(indent)\n append(\"The following declaration\")<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol\nimport org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol\nimport org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol\nimport org.jetbrains.kotlin.name.Name","completion":"class FirCompositeScope(val scopes: Iterable) : FirScope() {\n override fun processClassifiersByNameWithSubstitution(\n name: Name,\n processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit\n ) {\n for (scope in scopes) {\n scope.processClassifiersByNameWithSubstitution(name, processor)<|endoftext|>"} {"prompt":"linuxMain.dependsOn(commonMain)\n linuxArm64Main.dependsOn(linuxMain)\n linuxX64Main.dependsOn(linuxMain)\n }\n val linuxTest = kotlin.sourceSets.create(\"linuxTest\") { linuxTest ->\n linuxTest.dependsOn(commonTest)\n linuxArm64Main.dependsOn(linuxTest)","completion":"linuxX64Main.dependsOn(linuxTest)\n }\n\n val stdlibCoordinates = binaryCoordinates(\"org.jetbrains.kotlin.native:stdlib:${project.konanVersion}\")\n\n IdeNativeStdlibDependencyResolver.resolve(linuxX64Main).assertMatches(stdlibCoordinates)<|endoftext|>"} {"prompt":"psi: val foo = getT, Pair?, List?>>>()\n type: List?\n typeParameter: defined in kotlin.collections.List\n typeProjection: Int","completion":"psi: val foo = getT, Pair?, List?>>>()\n type: Int\n*\/<|endoftext|>"} {"prompt":"private fun ObjCNonNullReferenceType.withNullabilityOf(kotlinType: KotlinType): ObjCReferenceType =\n if (kotlinType.binaryRepresentationIsNullable()) {\n ObjCNullableReferenceType(this)\n } else {\n this\n }","completion":"internal fun mapReferenceTypeIgnoringNullability(kotlinType: KotlinType, objCExportScope: ObjCExportScope): ObjCNonNullReferenceType {\n class TypeMappingMatch(val type: KotlinType, val descriptor: ClassDescriptor, val mapper: CustomTypeMapper)<|endoftext|>"} {"prompt":"interopTask.onlyIf { HostManager.hostIsMac }\n\n pod.interopBindingDependencies.forEach { dependencyName ->\n addPodDependencyToInterop(project, cocoapodsExtension, pod, cinterops, interop, dependencyName)\n }\n\n with(interop) {\n @Suppress(\"DEPRECATION\") \/\/ deprecated property is used intentionally during deprecation period","completion":"defFileProperty.set(defTask.flatMap { it.defFile.asFile })\n _packageNameProp.set(project.provider { pod.packageName })\n _extraOptsProp.addAll(project.provider { pod.extraOpts })\n }\n\n val podBuildTaskProvider = project.getPodBuildTaskProvider(target, pod)<|endoftext|>"} {"prompt":"term = processExpression(char and 0xff00ffff.toInt(), newFlags, last) \/\/ Remove flags from the token.\n if (lexemes.currentChar != Lexer.CHAR_RIGHT_PARENTHESIS) {\n throw PatternSyntaxException(\"unmatched (\", pattern, lexemes.curTokenIndex)\n }\n lexemes.next()\n } else {\n \/\/ Other terminals.","completion":"when (char) {\n Lexer.CHAR_LEFT_SQUARE_BRACKET -> { \/\/ Range: [...]\n lexemes.next()\n var negative = false\n if (lexemes.currentChar == Lexer.CHAR_CARET) {\n negative = true\n lexemes.next()\n }\n\n term = processRange(negative, last)<|endoftext|>"} {"prompt":"}\n\n @Test fun contentToString() {\n arrayOf(\"a\", 1, null).let { arr -> assertEquals(arr.asList().toString(), arr.contentToString()) }\n charArrayOf('a', 'b', 'd').let { arr -> assertEquals(arr.asList().toString(), arr.contentToString()) }","completion":"intArrayOf(1, 10, 42).let { arr -> assertEquals(arr.asList().toString(), arr.contentToString()) }\n longArrayOf(1L, 5L, Long.MAX_VALUE).let { arr -> assertEquals(arr.asList().toString(), arr.contentToString()) }<|endoftext|>"} {"prompt":"val b1 = B(\"1\", \"2\").toString()\n if (b1 != \"1#2\") return \"fail1: $b1\"\n val b2 = B(\"abc\").toString()\n if (b2 != \"abc#abc\") return \"fail2: $b2\"\n\n val a1 = A().toString()","completion":"if (a1 != \"default#default\") return \"fail3: $a1\"\n val a2 = A(\"xyz\").toString()\n if (a2 != \"xyz#default\") return \"fail4: $a2\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.swiftexport.standalone.builders\n\nimport org.jetbrains.kotlin.analysis.api.KtAnalysisApiInternals\nimport org.jetbrains.kotlin.analysis.api.KtAnalysisSession\nimport org.jetbrains.kotlin.analysis.api.analyze","completion":"import org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeTokenProvider\nimport org.jetbrains.kotlin.analysis.api.scopes.KtScope\nimport org.jetbrains.kotlin.analysis.api.standalone.KtAlwaysAccessibleLifetimeTokenProvider<|endoftext|>"} {"prompt":"val positionToPasteJspecifyMark = fileLinePositions[lineIndexToPasteJspecifyMark]\n val offset = fileLines[lineIndexToPasteJspecifyMark + 1].takeWhile { it == ' ' }.length\n JspecifyMarkerCodeMetaInfo(positionToPasteJspecifyMark, positionToPasteJspecifyMark, offset, jspecifyMark)\n }","completion":"globalMetadataInfoHandler.addMetadataInfosForFile(testFile, newMetaInfos)\n }\n}\n\ninternal val diagnosticsToJspecifyMarks = mapOf(\n ReportLevel.WARN to mapOf(\n ErrorsJvm.NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS to \"jspecify_nullness_mismatch\",<|endoftext|>"} {"prompt":"a.add(0); a.add(0); a.add(0); a.add(0); a.add(0)\n a.add(0); a.add(0); a.add(0); a.add(0); a.add(0)\n var c = 0\n loop@ for (i in a) {\n if (c >= 5) continue@loop\n c++\n }","completion":"return c\n}\n\nfun for_double_list(): Int {\n val a = ArrayList()\n a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0)<|endoftext|>"} {"prompt":"if (variable.name == SUSPEND_FUNCTION_COMPLETION_PARAMETER_NAME) {\n \/\/ There can be multiple $completion variables because of inlining, do not duplicate them\n if (method.localVariables.any { it.name == SUSPEND_FUNCTION_COMPLETION_PARAMETER_NAME }) continue","completion":"method.extendCompletionsRange(variable, getLastParameterIndex(method.desc, method.access))\n continue\n }\n \/\/ this acts like $continuation for lambdas. For example, it is used by debugger to create async stack trace. Keep it.\n if (variable.name == \"this\" && !isForNamedFunction) {\n method.extendCompletionsRange(variable, 0)<|endoftext|>"} {"prompt":"private val IrDeclarationWithName.classIdImpl: ClassId?\n get() = when (val parent = this.parent) {\n is IrClass -> parent.classId?.createNestedClassId(this.name)\n is IrPackageFragment -> ClassId.topLevel(parent.packageFqName.child(this.name))\n else -> null\n }","completion":"val IrClass.classIdOrFail: ClassId\n get() = classIdOrFailImpl\n\nval IrTypeAlias.classIdOrFail: ClassId\n get() = classIdOrFailImpl\n\nprivate val IrDeclarationWithName.classIdOrFailImpl: ClassId\n get() = classIdImpl ?: error(\"No classId for $this\")\n\nval IrFunction.callableId: CallableId<|endoftext|>"} {"prompt":"fun eqID(x: Any?, y: Any?) = x is Int? && y is Double? && x == y\nfun eqLD(x: Any?, y: Any?) = x is Long? && y is Double? && x == y\nfun eqFI(x: Any?, y: Any?) = x is Float? && y is Int? && x == y","completion":"fun eqFL(x: Any?, y: Any?) = x is Float? && y is Long? && x == y\nfun eqIF(x: Any?, y: Any?) = x is Int? && y is Float? && x == y\nfun eqLF(x: Any?, y: Any?) = x is Long? && y is Float? && x == y\n\nfun testNullNull() {<|endoftext|>"} {"prompt":"?.let { return it.value }\n\n if (useDefault) {\n val callElement = kotlinOrigin ?: return null\n return analyzeForLightClasses(callElement) {\n val valueParameter = callElement.resolveCall()\n ?.singleConstructorCallOrNull()\n ?.symbol\n ?.valueParameters","completion":"?.find { it.name.identifierOrNullIfSpecial == attributeName }\n\n when (val psi = valueParameter?.psi) {\n is KtParameter -> {\n psi.defaultValue?.let { defaultValue ->\n defaultValue.evaluateAsAnnotationValue()?.toAnnotationMemberValue(parameterList)\n }\n }\n is PsiAnnotationMethod -> psi.defaultValue<|endoftext|>"} {"prompt":"\/\/ MODULE: m1-common\n\/\/ FILE: common.kt\nannotation class Ann\n\nexpect class A {\n class B {\n class C {\n @Ann\n fun foo()\n }\n }\n}\n\n\/\/ MODULE: m1-jvm()()(m1-common)\n\/\/ FILE: jvm.kt\nactual class A {\n actual class B {\n actual class C {","completion":"actual fun foo() {}\n }\n }\n}<|endoftext|>"} {"prompt":"abstract class A\n\nfun foo(i: Int) {}\n\nvalue class B(val i: Int) : @Suppress(\"VALUE_CLASS_CANNOT_EXTEND_CLASSES\") A() {","completion":"@Suppress(\"SECONDARY_CONSTRUCTOR_WITH_BODY_INSIDE_VALUE_CLASS\")\n constructor() : this(42) {\n foo(i)\n }\n\n @Suppress(\"ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS\")<|endoftext|>"} {"prompt":"\/\/ This file was generated automatically. See compiler\/fir\/tree\/tree-generator\/Readme.md.\n\/\/ DO NOT MODIFY IT MANUALLY.\n\n@file:Suppress(\"DuplicatedCode\", \"unused\")\n\npackage org.jetbrains.kotlin.fir.expressions.builder\n\nimport org.jetbrains.kotlin.KtSourceElement","completion":"import org.jetbrains.kotlin.fir.FirTarget\nimport org.jetbrains.kotlin.fir.builder.FirBuilderDsl\nimport org.jetbrains.kotlin.fir.expressions.FirAnnotation\nimport org.jetbrains.kotlin.fir.expressions.FirLoop<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.asJava.elements.KtLightField\nimport org.jetbrains.kotlin.asJava.elements.KtLightMethod\nimport org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget\nimport org.jetbrains.kotlin.fileClasses.isJvmMultifileClassFile","completion":"import org.jetbrains.kotlin.fileClasses.javaFileFacadeFqName\nimport org.jetbrains.kotlin.light.classes.symbol.analyzeForLightClasses\nimport org.jetbrains.kotlin.light.classes.symbol.annotations.*\nimport org.jetbrains.kotlin.light.classes.symbol.cachedValue<|endoftext|>"} {"prompt":"fun box(): String {\n \/\/ On the JVM, this call adds some locals with reference types to the LVT\n \/\/ which end after the call returns.\n spray()\n \/\/ When inlining `f` we'll reuse the same slots that previously contained\n \/\/ locals with reference types for the $i$f$f and $i$a$-f-... variables.","completion":"\/\/ Since these locals have integer types D8 would produce a warning if they\n \/\/ started before being initialized, which would cause the test to fail.\n return f()\n}<|endoftext|>"} {"prompt":"@Throws(MyException::class) fun int(): Int\n @Throws(MyException::class) fun longN(): Long?\n @Throws(MyException::class) fun double(): Double\n\n interface UnitCaller {\n @Throws(MyException::class) fun call(methods: MethodsWithThrows): Unit\n }\n}\n\nopen class Throwing : MethodsWithThrows {","completion":"@Throws(MyException::class) constructor(doThrow: Boolean) {\n if (doThrow) throw MyException()\n }\n\n override fun unit(): Unit = throw MyException()\n override fun nothing(): Nothing = throw MyException()\n override fun nothingN(): Nothing? = throw MyException()\n override fun any(): Any = throw MyException()<|endoftext|>"} {"prompt":"builder {\n inlineMe {\n StateMachineChecker.suspendHere()\n StateMachineChecker.suspendHere()\n }.run1()\n }\n StateMachineChecker.check(4)\n StateMachineChecker.reset()\n builder {\n inlineMe {\n StateMachineChecker.suspendHere()\n StateMachineChecker.suspendHere()\n }.run2()\n }","completion":"StateMachineChecker.check(2)\n StateMachineChecker.reset()\n\n builder {\n inlineMe2 {\n StateMachineChecker.suspendHere()\n StateMachineChecker.suspendHere()\n }.run()\n }\n StateMachineChecker.check(8)\n StateMachineChecker.reset()\n\n builder {\n inlineMe2 {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.symbols.KtSymbol\nimport org.jetbrains.kotlin.analysis.api.types.KtType\nimport org.jetbrains.kotlin.analysis.utils.printer.PrettyPrinter\nimport org.jetbrains.kotlin.analysis.utils.printer.prettyPrint\n\ninternal object TestScopeRenderer {","completion":"fun renderForTests(\n analysisSession: KtAnalysisSession,\n scopeContext: KtScopeContext,\n printer: PrettyPrinter,\n printPretty: Boolean = false,\n fullyPrintScope: (KtScopeKind) -> Boolean,\n ) {\n with(analysisSession) {\n with(printer) {\n appendLine(\"implicit receivers:\")\n\n withIndent {<|endoftext|>"} {"prompt":"JsAstUtils.or(\n namespaceRef,\n jsAssignment(\n namespaceRef,\n JsObjectLiteral()\n )\n )\n )\n )\n JsNameRef(varName)\n }\n currentRef = newNameSpaceRef\n currentNamespace = newNamespace\n }","completion":"statements + declaration.declarations.flatMap { generateDeclarationExport(it, currentRef, esModules) }\n }\n\n is ExportedFunction -> {\n val name = staticContext.getNameForStaticDeclaration(declaration.ir)\n when {\n namespace != null -><|endoftext|>"} {"prompt":"val dispatchReceiverType = descriptor.dispatchReceiverParameter?.type\n val valueParameterTypes = resolvedAtom?.parameters ?: descriptor.valueParameters.map { it.type }\n\n require(returnType != null)\n\n val substitutedReturnType = returnType.substituteAndApproximate(substitutor).also {\n descriptor.setReturnType(it.approximatedType)","completion":"}\n\n fun ReceiverParameterDescriptor.setOutTypeIfNecessary(processedType: FunctionLiteralTypes.ProcessedType) {\n if (this is ReceiverParameterDescriptorImpl && type.shouldBeUpdated()) {\n setOutType(processedType.approximatedType)\n }\n }\n\n val extensionReceiverFromDescriptor = descriptor.extensionReceiverParameter<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ SKIP_TXT\n\/\/ FILE: AbstractMapAssert.java\n\nimport java.util.Map;\n\npublic abstract class AbstractMapAssert, ACTUAL extends Map, K, V> {\n public SELF isNotNull() {\n return (SELF) this;\n }\n}","completion":"\/\/ FILE: MapAssert.java\n\nimport java.util.Map;\n\npublic class MapAssert extends AbstractMapAssert, Map, KEY, VALUE> {\n\n public MapAssert(Map actual) {}\n}\n\n\/\/ FILE: Assertions.java\n\nimport java.util.Map;<|endoftext|>"} {"prompt":"reified\n enum\n private\n const\n a: Int)\n\n\/\/Check multiple illegal modifiers in constructor","completion":"class IllegalModifiers2(private abstract a: Int)\n\n\n\/\/Check annotations with illegal modifiers in constructor<|endoftext|>"} {"prompt":"JsClassModel(rename(cls.name), cls.superName?.let { rename(it) }).apply {\n postDeclarationBlock.statements += rename(cls.postDeclarationBlock).statements\n cls.interfaces.mapTo(interfaces) { rename(it) }\n }\n }\n fragment.classes.clear()","completion":"fragment.classes += classes.map { it.name to it }\n\n fragment.inlineModuleMap.forEach { (_, value) -> rename(value) }\n\n fragment.tests?.let { rename(it) }\n fragment.mainFunction?.let { rename(it) }\n fragment.inlinedLocalDeclarations.values.forEach { rename(it) }<|endoftext|>"} {"prompt":"else -> KotlinTypeFactory.flexibleType(lowerResult.type ?: lowerBound, upperResult.type ?: upperBound)\n }\n Result(type, lowerResult.subtreeSize)\n }\n is SimpleType -> {\n val result = enhanceInflexible(\n qualifiers, index, TypeComponentPosition.INFLEXIBLE, isSuperTypesEnhancement = isSuperTypesEnhancement\n )","completion":"Result(if (result.forWarnings) wrapEnhancement(result.type) else result.type, result.subtreeSize)\n }\n }\n }\n\n private fun SimpleType.enhanceInflexible(\n qualifiers: (Int) -> JavaTypeQualifiers,\n index: Int,\n position: TypeComponentPosition,\n isBoundOfRawType: Boolean = false,<|endoftext|>"} {"prompt":"val failuresNumber = elementToInt(data.getRequiredField(\"failuresNumber\"), \"failuresNumber\")\n return Build(buildNumber, startTime, finishTime, branch, commits, failuresNumber)\n } else {\n error(\"Top level entity is expected to be an object. Please, check origin files.\")\n }\n }\n }","completion":"private fun formatTime(time: String, targetZone: Int = 3): String {\n val matchResult = \"^\\\\d{8}T(\\\\d{2})(\\\\d{2})\\\\d{2}((\\\\+|-)\\\\d{2})\".toRegex().find(time)?.groupValues\n matchResult?.let {\n val timeZone = matchResult[3].toInt()<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.resolve.jvm.KotlinCliJavaFileManager\nimport org.jetbrains.kotlin.util.PerformanceCounter\nimport org.jetbrains.kotlin.utils.addIfNotNull","completion":"\/\/ TODO: do not inherit from CoreJavaFileManager to avoid accidental usage of its methods which do not use caches\/indices\n\/\/ Currently, the only relevant usage of this class as CoreJavaFileManager is at CoreJavaDirectoryService.getPackage,\n\/\/ which is indirectly invoked from PsiPackage.getSubPackages<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.descriptors.impl\n\nimport org.jetbrains.kotlin.descriptors.DeclarationDescriptor\nimport org.jetbrains.kotlin.descriptors.PropertyAccessorDescriptor\nimport org.jetbrains.kotlin.descriptors.PropertyDescriptor\nimport org.jetbrains.kotlin.descriptors.SourceElement","completion":"import org.jetbrains.kotlin.descriptors.annotations.Annotations\nimport org.jetbrains.kotlin.name.Name\n\nclass SyntheticFieldDescriptor private constructor(\n val propertyDescriptor: PropertyDescriptor,\n accessorDescriptor: PropertyAccessorDescriptor,\n sourceElement: SourceElement\n) : LocalVariableDescriptor(<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.idea.tcs.extras\n\nimport org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinBinaryDependency\nimport org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinClasspath","completion":"import org.jetbrains.kotlin.tooling.core.extrasKeyOf\nimport org.jetbrains.kotlin.tooling.core.lazyProperty\n\n\/* Sources (-sources.jar) *\/\n\nval sourcesClasspathKey = extrasKeyOf(\"sourcesClasspath\")\n\n\/**\n * Contains all resolved -sources.jar artifacts associated with this dependency\n *\/<|endoftext|>"} {"prompt":"private fun test() = \"K\"\n\nfun box(): String {\n\n val clazz = Class.forName(\"test.TestKt\")\n assertEquals(2, clazz.declaredMethods.size, \"Facade should have only box method\")\n val methods = clazz.declaredMethods.map { it.name }\n assertTrue(methods.contains(\"box\"), \"Facade should have box method\")","completion":"assertTrue(methods.contains(\"getProp\"), \"Facade should have box method\")\n\n return {\n prop = \"O\"\n prop + test()\n }.let { it() }\n}<|endoftext|>"} {"prompt":"fun bar(ff: Err.() -> Unit) {\n}\n\n\/\/ MODULE: m2(m1)\n\/\/ FILE: foo.kt\n\ndata class User(val surname: String)\n\nfun foo() {\n bar {","completion":"User::surname\n }\n}<|endoftext|>"} {"prompt":"\"invalid file name '${file.absolutePath}'; must end either with '.js', '.zip' or '.jar'\"\n )\n emptyList()\n }\n }\n }\n else -> {\n messageCollector.report(CompilerMessageSeverity.ERROR, \"source file or directory not found: $fileName\")\n emptyList()\n }\n }\n }","completion":"private fun singleInputFile(baseDir: File, path: String): InputFile {\n val moduleName = getModuleNameFromPath(path)\n val pathToSourceMapCandidate = \"$path.map\"\n val pathToSourceMap = if (File(pathToSourceMapCandidate).exists()) pathToSourceMapCandidate else null\n return InputFile(<|endoftext|>"} {"prompt":"if (u != null || this.u != null) u.propAny","completion":"if (u != null || this.u != null) u.propNullableT<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.util.getPackageFragment\n\ninternal abstract class KonanBackendContext(config: KonanConfig) : BasicPhaseContext(config), CommonBackendContext {\n abstract override val builtIns: KonanBuiltIns\n\n abstract override val ir: KonanIr\n\n override val scriptMode: Boolean = false\n\n override val sharedVariablesManager by lazy {","completion":"\/\/ Creating lazily because builtIns module seems to be incomplete during `link` test;\n \/\/ TODO: investigate this.\n KonanSharedVariablesManager(this)\n }\n\n override val internalPackageFqn = KonanFqNames.internalPackageName\n\n override val mapping: NativeMapping = NativeMapping()\n\n override val irFactory: IrFactory = IrFactoryImpl\n}<|endoftext|>"} {"prompt":"fun KtDeclaration.resolveToFirSymbol(\n firResolveSession: LLFirResolveSession,\n phase: FirResolvePhase = FirResolvePhase.RAW_FIR,\n): FirBasedSymbol<*> {\n return firResolveSession.resolveToFirSymbol(this, phase)\n}\n\n\/**","completion":"* Creates [FirBasedSymbol] by [KtDeclaration] .\n * returned [FirDeclaration] will be resolved at least to [phase]\n *\n * If resulted [FirBasedSymbol] is not subtype of [S], throws [InvalidFirElementTypeException]\n *\/\n@Suppress(\"INVISIBLE_REFERENCE\", \"INVISIBLE_MEMBER\")<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.util.trimTrailingWhitespacesAndAddNewlineAtEOF\nimport org.jetbrains.kotlin.test.utils.withExtension\nimport org.jetbrains.kotlin.utils.addToStdlib.firstIsInstance\nimport java.io.File\nimport java.util.*","completion":"internal class Kapt4Handler(testServices: TestServices) : AnalysisHandler(\n testServices,\n failureDisablesNextSteps = true,\n doNotRunIfThereWerePreviousFailures = true\n) {\n override val artifactKind: TestArtifactKind\n get() = Kapt4ContextBinaryArtifact.Kind<|endoftext|>"} {"prompt":"assertTasksExecuted(\":compileProductionExecutableKotlinWasmJs\")\n assertTasksExecuted(\":compileProductionExecutableKotlinWasmJsOptimize\")\n assertTasksExecuted(\":wasmJsBrowserDistribution\")","completion":"assertFileInProjectExists(\"build\/${Distribution.DIST}\/wasmJs\/productionExecutable\/redefined-wasm-module-name.wasm\")\n assertFileInProjectExists(\"build\/${Distribution.DIST}\/wasmJs\/productionExecutable\/new-mpp-wasm-js.js\")<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.utils.flatMapToNullableSet\n\n\/**\n * A [FirSymbolNamesProvider] that caches all name sets.\n *\/\nabstract class FirCachedSymbolNamesProvider(protected val session: FirSession) : FirSymbolNamesProvider() {\n abstract fun computePackageNames(): Set?","completion":"\/**\n * This function is only called if [hasSpecificClassifierPackageNamesComputation] is `true`. Otherwise, the classifier package set will\n * be taken from the cached general package names to avoid building duplicate sets.\n *\/\n abstract fun computePackageNamesWithTopLevelClassifiers(): Set?<|endoftext|>"} {"prompt":"contract { returns(true) implies (value_1 == null) }\n return value_1 == null\n}\nfun case_5_3(value_1: Int?): Boolean {\n contract { returns(false) implies (value_1 != null) }\n return !(value_1 != null)\n}\nfun case_5_4(value_1: Int?): Boolean {","completion":"contract { returns(false) implies (value_1 == null) }\n return !(value_1 == null)\n}\nfun case_5_5(value_1: Int?): Boolean? {\n contract { returnsNotNull() implies (value_1 != null) }\n return if (value_1 != null) true else null\n}\nfun case_5_6(value_1: Int?): Boolean? {<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JVM\n\/\/ WITH_STDLIB\n\/\/ JVM_ABI_K1_K2_DIFF: KT-63843\n\nimport kotlin.test.assertEquals\n\nannotation class Name(val value: String)\n\nannotation class Anno(\n @get:Name(\"O\") val o: String,\n @get:Name(\"K\") val k: String\n)","completion":"fun box(): String {\n val ms = Anno::class.java.declaredMethods\n\n return (ms.single { it.name == \"o\" }.annotations.single() as Name).value +\n (ms.single { it.name == \"k\" }.annotations.single() as Name).value\n}<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\nclass Pair(val first: A, val second: B)\n\nclass Example {\n infix fun to(other: Example) = Pair(this, other)\n fun toNonInfix(other: Example) = Pair(this, other)\n}\n\ninfix fun Example.toExt(other: Example) = Pair(this, other)","completion":"fun Example.toExtNonInfix(other: Example) = Pair(this, other)\n\ninfix fun Example.toExtWithExtraParams(other: Example, blah: Int = 0) = Pair(this, other)<|endoftext|>"} {"prompt":"container.findDefaultMethod(jvmSignature.methodName, jvmSignature.methodDesc, !Modifier.isStatic(caller.member!!.modifiers)) as Member?\n }\n is KotlinConstructor -> {\n if (isAnnotationConstructor)","completion":"return@defaultCaller AnnotationConstructorCaller(container.jClass, parameters.map { it.name!! }, CALL_BY_NAME, KOTLIN)\n container.findDefaultConstructor(jvmSignature.constructorDesc) as Member?\n }\n is FakeJavaAnnotationConstructor -> {\n val methods = jvmSignature.methods<|endoftext|>"} {"prompt":"\/\/ IGNORE_BACKEND: WASM\n\/\/ WASM_MUTE_REASON: IGNORED_IN_JS\n\/\/ !LANGUAGE: -ProperIeee754Comparisons\n\/\/ DONT_TARGET_EXACT_BACKEND: JS_IR\n\/\/ DONT_TARGET_EXACT_BACKEND: JS_IR_ES6\n\nfun equals1(a: Float, b: Float?) = a == b","completion":"fun equals2(a: Float?, b: Float?) = a!! == b!!\n\nfun equals3(a: Float?, b: Float?) = a != null && a == b\n\nfun equals4(a: Float?, b: Float?) = if (a is Float) a == b else null!!\n\nfun equals5(a: Any?, b: Any?) = if (a is Float && b is Float?) a == b else null!!<|endoftext|>"} {"prompt":"override fun transformTypeParameters(transformer: FirTransformer, data: D): FirAnonymousObjectImpl {\n typeParameters.transformInplace(transformer, data)\n return this\n }\n\n override fun transformStatus(transformer: FirTransformer, data: D): FirAnonymousObjectImpl {\n status = status.transform(transformer, data)\n return this","completion":"}\n\n override fun transformSuperTypeRefs(transformer: FirTransformer, data: D): FirAnonymousObjectImpl {\n superTypeRefs.transformInplace(transformer, data)\n return this\n }\n\n override fun transformDeclarations(transformer: FirTransformer, data: D): FirAnonymousObjectImpl {<|endoftext|>"} {"prompt":"if (b) x.length\n if (c) x.length\n callLambdaWithoutContract { b = true }\n if (b) x.length\n if (c) x.length\n}","completion":"fun testNotNullViaVariableLambda(x: StringHolder) {\n val a = x.value != null\n var b = a\n val c = b\n if (b) x.value.length\n if (c) x.value.length\n callLambdaWithoutContract { b = true }<|endoftext|>"} {"prompt":"val jvmMainCompilation = kotlin.jvm().compilations.getByName(\"main\")\n @Suppress(\"DEPRECATION\")\n jvmMainCompilation.compilerOptions.options.languageVersion.set(KotlinVersion.KOTLIN_2_0)\n\n project.evaluate()","completion":"val jvmMainCompileTask = jvmMainCompilation.compileTaskProvider.get() as KotlinCompile\n val arguments = jvmMainCompileTask.createCompilerArguments(lenient)\n\n assertEquals(\n setOf(\"commonMain\", \"jvmMain\"),\n arguments.assertNotNull(CommonCompilerArguments::fragments).toSet()\n )\n }<|endoftext|>"} {"prompt":"fun FirAnnotation.getBooleanArgument(name: Name, session: FirSession): Boolean? = getPrimitiveArgumentValue(name, session)\nfun FirAnnotation.getStringArgument(name: Name, session: FirSession): String? = getPrimitiveArgumentValue(name, session)","completion":"private inline fun FirAnnotation.getPrimitiveArgumentValue(name: Name, session: FirSession): T? {\n val argument = findArgumentByName(name) ?: return null\n val literal = argument.evaluateAs>(session) ?: return null\n return literal.value as? T\n}<|endoftext|>"} {"prompt":"class Other : Base\n\nfun id(arg: K): K = arg\n\nfun test1(arg: Derived) {\n id>(Inv(arg))\n id>(InvExact(arg))\n}","completion":"fun Inv<@Exact R>.select(first: R, second: R): R = TODO()\n\nfun test2(derived: Derived, other: Other) {\n Inv(derived).select(derived, other)\n}<|endoftext|>"} {"prompt":"emptyList()\n else\n getDeserializedCallables(compiledPackageFragment)\n\n private fun getDeserializedCallables(compiledPackageFragment: PackageFragmentDescriptor) =\n compiledPackageFragment.getMemberScope()\n .getContributedDescriptors(DescriptorKindFilter.CALLABLES, MemberScope.ALL_NAME_FILTER)","completion":".filterIsInstance()\n\n private val shouldGeneratePartHierarchy =\n state.languageVersionSettings.getFlag(JvmAnalysisFlags.inheritMultifileParts)\n\n private val partInternalNamesSorted = run {\n val partInternalNamesSet = hashSetOf()\n for (file in files) {<|endoftext|>"} {"prompt":"const val KOTLIN_JAVA_RUNTIME_JRE7_NAME = \"kotlin-stdlib-jre7\"\n const val KOTLIN_JAVA_RUNTIME_JRE7_JAR = \"$KOTLIN_JAVA_RUNTIME_JRE7_NAME.jar\"","completion":"const val KOTLIN_JAVA_RUNTIME_JRE7_SRC_JAR = \"$KOTLIN_JAVA_RUNTIME_JRE7_NAME-sources.jar\"\n\n const val KOTLIN_JAVA_RUNTIME_JDK7_NAME = \"kotlin-stdlib-jdk7\"<|endoftext|>"} {"prompt":"val inlinedClass = type.getInlinedClass() ?: return element\n val field = getInlineClassBackingField(inlinedClass)\n return IrGetFieldImpl(startOffset, endOffset, field.symbol, field.type, this)\n }\n }\n\n fun toPrimitiveArrayLiteral(elements: List) =","completion":"elements.toArrayLiteral(context, primitiveArrayType, primitiveElementType)\n}<|endoftext|>"} {"prompt":"}\n\n\/**\n * Returns the greater of the given values.\n * \n * If there are multiple equal maximal values, returns the first of them.\n *\/\n@SinceKotlin(\"1.4\")\npublic expect fun > maxOf(a: T, vararg other: T): T\n\n\/**\n * Returns the greater of the given values.\n *\/\n@SinceKotlin(\"1.4\")","completion":"public expect fun maxOf(a: Byte, vararg other: Byte): Byte\n\n\/**\n * Returns the greater of the given values.\n *\/\n@SinceKotlin(\"1.4\")\npublic expect fun maxOf(a: Short, vararg other: Short): Short\n\n\/**\n * Returns the greater of the given values.\n *\/\n@SinceKotlin(\"1.4\")<|endoftext|>"} {"prompt":"* Two arrays are considered structurally equal if they have the same size, and elements at corresponding indices are equal.\n * Elements are compared for equality using the [equals][Any.equals] function.\n * This means `NaN` is equal to itself and `-0.0` is not equal to `0.0`.\n * \n * The arrays are also considered structurally equal if both are `null`.\n *","completion":"* @param other the array to compare with this array.\n * @return `true` if the two arrays are structurally equal, `false` otherwise.\n * \n * @sample samples.collections.Arrays.ContentOperations.doubleArrayContentEquals\n *\/\n@SinceKotlin(\"1.4\")\npublic actual infix fun FloatArray?.contentEquals(other: FloatArray?): Boolean {<|endoftext|>"} {"prompt":"assertContains(commandParts, \"-XX:+UseCodeCacheFlushing\")\n }\n\n @DisplayName(\"-XX:-UseParallelGC is handled\")\n @Test\n fun testDisablingParallelGC() {\n val commandParts = leaseSessionAndExtractCommand(listOf(\"XX:-UseParallelGC\"))","completion":"assert(commandParts.none { it.startsWith(\"-XX:+Use\") && it.endsWith(\"GC\") }) {\n \"Expected no explicitly enabled garbage collector via JVM arguments: $commandParts\"\n }\n }\n\n private fun leaseSessionAndExtractCommand(additionalJvmArguments: List = emptyList()): List {<|endoftext|>"} {"prompt":"val MAX_VERTEX_TEXTURE_IMAGE_UNITS: Int\n val MAX_TEXTURE_IMAGE_UNITS: Int\n val MAX_FRAGMENT_UNIFORM_VECTORS: Int\n val SHADER_TYPE: Int\n val DELETE_STATUS: Int\n val LINK_STATUS: Int\n val VALIDATE_STATUS: Int","completion":"val ATTACHED_SHADERS: Int\n val ACTIVE_UNIFORMS: Int\n val ACTIVE_ATTRIBUTES: Int\n val SHADING_LANGUAGE_VERSION: Int\n val CURRENT_PROGRAM: Int\n val NEVER: Int\n val LESS: Int\n val EQUAL: Int\n val LEQUAL: Int\n val GREATER: Int<|endoftext|>"} {"prompt":"\/\/ MODULE: main(cinterop)\n\/\/ FILE: main.kt\n\n@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)\n\n\nimport kotlinx.cinterop.*\nimport kotlin.test.*\nimport structAnonym.*\n\nfun box(): String {\n retByValue_StructAnonRecordMember_ImplicitAlignment()\n .useContents {","completion":"assertEquals(1, a[0])\n assertEquals(4, a[3])\n assertEquals(42, b)\n }\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"\"Compiler behavior in such mode is undefined; please, consider moving to the latest stable version \" +\n \"or turning off progressive mode.\"\n )\n }\n }\n\n protected open fun defaultLanguageVersion(collector: MessageCollector): LanguageVersion =\n LanguageVersion.LATEST_STABLE\n\n protected open fun checkPlatformSpecificSettings(languageVersionSettings: LanguageVersionSettings, collector: MessageCollector) {","completion":"}\n\n protected open fun checkIrSupport(languageVersionSettings: LanguageVersionSettings, collector: MessageCollector) {\n \/\/ backend-specific\n }\n\n private enum class VersionKind(val text: String) {\n LANGUAGE(\"Language\"), API(\"API\")\n }\n\n private fun parseOrConfigureLanguageVersion(collector: MessageCollector): LanguageVersion {<|endoftext|>"} {"prompt":"\"org.jetbrains.kotlin.native.framework.name\",\n String::class.java\n )\n }\n}\n\nprivate val hostManager by lazy { HostManager() }\n\nprivate val targetsEnabledOnAllHosts by lazy { hostManager.enabledByHost.values.reduce { acc, targets -> acc intersect targets } }\n\n\/**","completion":"* The set of konanTargets is considered 'host specific' if the shared compilation of said set can *not* be built\n * on *all* potential hosts. e.g. a set like (iosX64, macosX64) can only be built on macos hosts, and is therefore considered\n * 'host specific'.\n *\/<|endoftext|>"} {"prompt":"fun case_3(value_1: Boolean): Int = when(value_1) { }\n\n\/\/ TESTCASE NUMBER: 4\nfun case_4(value_1: Boolean): String = when {\n value_1 == true -> \"\"\n value_1 == false -> \"\"\n}","completion":"\/*\n * TESTCASE NUMBER: 5\n * DISCUSSION: maybe use const propagation here?\n * ISSUES: KT-25265\n *\/\nfun case_5(value_1: Boolean): String {\n val trueValue = true\n val falseValue = false\n\n return when (value_1) {\n trueValue -> \"\"<|endoftext|>"} {"prompt":"if (this.b != null) b.funNullableAny()\n if (this.b != null) b","completion":"if (b != null) this.b.equals(null)\n if (b != null) this.b.propT<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.js.translate.context.TemporaryConstVariable\nimport org.jetbrains.kotlin.js.translate.context.TranslationContext\nimport org.jetbrains.kotlin.js.translate.expression.PatternTranslator\nimport org.jetbrains.kotlin.js.translate.general.AbstractTranslator","completion":"import org.jetbrains.kotlin.js.translate.general.Translation\nimport org.jetbrains.kotlin.js.translate.intrinsic.functions.factories.ArrayFIF\nimport org.jetbrains.kotlin.js.translate.utils.AnnotationsUtils\nimport org.jetbrains.kotlin.js.translate.utils.JsAstUtils<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesEReverse(): Invariant<*> = Invariant()\n\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesF(): Invariant = Invariant()","completion":"fun testVarianceDifferentReturnTypesF(): Invariant = Invariant()\n\n fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant()\n @Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant()<|endoftext|>"} {"prompt":"assertFalse(\"Nothing found in package ${LoadDescriptorUtil.TEST_PACKAGE_FQNAME}\", packageView.isEmpty())\n\n val expectedFile = File(ktFilePath.replaceFirst(\"\\\\.kt$\".toRegex(), \".txt\"))\n validateAndCompareDescriptorWithFile(packageView, CONFIGURATION, expectedFile)\n }\n\n fun compileKotlinWithJava(","completion":"javaFiles: List,\n kotlinFiles: List,\n outDir: File,\n disposable: Disposable,\n aptMode: Boolean\n ): Boolean {\n val environment = createEnvironmentWithMockJdkAndIdeaAnnotations(disposable)\n updateConfiguration(environment.configuration)<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER\n\/\/ !CHECK_TYPE\n\nfun foo(a: Array): Array> = throw Exception()\n\nfun test1(a1: Array) {\n val b1: Array> = foo(a1)","completion":"val c1 = foo(a1)\n c1 checkType { _>>() }\n}\n\nfun test2(a2: Array) {\n val b2: Array> = foo(a2)\n val c2 = foo(a2)\n c2 checkType { _>>() }\n}<|endoftext|>"} {"prompt":"* PRIMARY LINKS: overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 2\n * overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 11 -> sentence 1\n * NUMBER: 3","completion":"* DESCRIPTION: The sets of non-extension member callables named f of type T;\n *\/\n\nclass Marker {\n fun foo() = println(\"non-extension member toplevel Marker.foo()\")\n val foo: String = \"non-extension member toplevel Marker.foo\"\n}\n\n\/\/ TESTCASE NUMBER: 1\nclass Case1() {<|endoftext|>"} {"prompt":"Files.write(file1, \"other\".toByteArray())\n registerAddedOrChangedFile(file2)\n Files.write(file2, \"other\".toByteArray())\n markAsSuccessful()\n throw Exception()\n }\n }\n assertEquals(\"something\", String(Files.readAllBytes(file1)))\n assertFalse(Files.exists(file2))\n }","completion":"@Test\n fun testChangesAreRevertedOnCachesCloseException() {\n val file1 = workingDir.resolve(\"1.txt\")\n val file2 = workingDir.resolve(\"2.txt\")\n Files.write(file1, \"something\".toByteArray())\n assertThrows {\n useTransaction {\n cachesManager = CacheMock(true)<|endoftext|>"} {"prompt":"throw java.lang.IllegalArgumentException()\n }\n \/\/ x *is* initialized here, because if myRun was never called -> exception\n \/\/ were thrown and control flow wouldn't be here\n println(x)\n}\n\nfun catchThrowIfNotCalled() {\n val x: Int\n try {\n myRun outer@ {\n unknownRun {\n myRun {\n x = 42","completion":"return@outer\n }\n }\n throw java.lang.IllegalArgumentException()\n }\n } catch (ignored: java.lang.IllegalArgumentException) { }\n\n \/\/ x *isn't* initialized here!\n println(x)\n}<|endoftext|>"} {"prompt":"var Results: CPointer?\n get() = memberAt>(0).value\n set(value) { memberAt>(0).value = value }\n \n var NumResults: Int\n get() = memberAt(8).value","completion":"set(value) { memberAt(8).value = value }\n}\n\n@CNaturalStruct(\"context\", \"visit\")\nclass CXCursorAndRangeVisitor(rawPtr: NativePtr) : CStructVar(rawPtr) {<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {}","completion":"open fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {}\n\n open fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {}<|endoftext|>"} {"prompt":"checkExactType>(buildee)\n}\n\n\n\n\nclass TargetType\n\nfun consumeNullableAny(value: Any?) {}\n\nopen class Buildee {\n fun getTypeVariable(): TV = storage\n private var storage: TV = null!!\n}\n\nclass DerivedBuildee: Buildee()","completion":"fun build(instructions: Buildee.() -> Unit): Buildee {\n return DerivedBuildee().apply(instructions)\n}<|endoftext|>"} {"prompt":"assertEquals(0.052, \"+5.2e-2d\".toDouble())\n assertEquals(52340000000.0, \"+5.234e+10d\".toDouble())\n assertEquals(5.234E123, \"+5.234e+123d\".toDouble())\n assertEquals(5.234E123, \"+5.234e+123f\".toDouble())","completion":"assertEquals(5.234E123, \"+5.234e+123\".toDouble())\n assertEquals(5.5, \"5.5f\".toDouble())\n assertEquals(2.71, \"\\u0009 \\u000A 2.71 \\u000D\".toDouble())\n assertEquals(42.3, \"\\n 42.3 \".toDouble())<|endoftext|>"} {"prompt":"private val trace: BindingTrace,\n private val argumentType: KotlinType,\n private val typeParameterDescriptor: TypeParameterDescriptor,\n private val baseDiagnostic: DiagnosticFactory2 = UPPER_BOUND_VIOLATED,","completion":"private val diagnosticForTypeAliases: DiagnosticFactory3 = UPPER_BOUND_VIOLATED_IN_TYPEALIAS_EXPANSION\n) {\n fun report(typeArgumentReference: KtTypeReference, substitutedBound: KotlinType) {<|endoftext|>"} {"prompt":"checkNotEqual(id(c0::target1), id(c1::target1))\n checkNotEqual(id(c0::target1), id(c1::target2))\n checkNotEqual(id(c0::adapted1), id(c1::adapted1))\n\n return \"OK\"\n}\n\n\/\/ FILE: fromOtherFile.kt","completion":"private fun id(f: Runnable): Any = f\n\nfun target1FromOtherFile(c0: C): Any = id(c0::target1)\nfun adapted1FromOtherFile(c0: C): Any = id(c0::adapted1)\nfun adapted2FromOtherFile(c0: C): Any = id(c0::adapted2)<|endoftext|>"} {"prompt":"internal inline fun generateExpressionValue(type: IrType, crossinline generate: () -> IrExpression) =\n object : ExpressionValue(type) {\n override fun load(): IrExpression = generate()\n }\n\ninternal class OnceExpressionValue(val irExpression: IrExpression) : LValue, AssignmentReceiver {\n private var instantiated = false\n\n override fun load(): IrExpression {","completion":"if (instantiated) throw AssertionError(\"Single expression value for ${irExpression.render()} is already instantiated\")\n instantiated = true\n return irExpression\n }\n\n override val type: IrType get() = irExpression.type\n\n override fun store(irExpression: IrExpression): IrExpression {<|endoftext|>"} {"prompt":"if (this@BaseIrGenerator !is SerializableCompanionIrGenerator) {\n \/\/ otherwise call Companion.serializer()\n callSerializerFromCompanion(kType, typeArgs, emptyList(), enumSerializerId)?.let { return it }\n }\n\n val enumArgs = mutableListOf(\n irString(kType.serialName()),","completion":"irCall(enumDescriptor.owner.findEnumValuesMethod()),\n )\n\n if (enumSerializerFactoryFunc != null && annotatedEnumSerializerFactoryFunc != null) {\n \/\/ runtime contains enum serializer factory functions\n val factoryFunc: IrSimpleFunctionSymbol = if (enumDescriptor.owner.isEnumWithSerialInfoAnnotation()) {<|endoftext|>"} {"prompt":"ExpectedData(0x5408a1df99d4affUL, 0x7da9e81d89fda7adUL, 0x274157cabe71440dUL, 0x2c22d9a480b331f7UL, 0xe835c8ac746472d5UL),","completion":"ExpectedData(0xa8b27a6bcaeeed4bUL, 0xd45a938b79f54e8fUL, 0x366b219d6d133e48UL, 0x5b14be3c25c49405UL, 0xfdd791d48811a572UL),<|endoftext|>"} {"prompt":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.PropertyFieldDeclarationMissingInitializer\n\ninternal class LateinitPropertyFieldDeclarationWithInitializerImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.LateinitPropertyFieldDeclarationWithInitializer\n\ninternal class LateinitFieldInValPropertyImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.analysis.api.fir.components\n\nimport org.jetbrains.kotlin.analysis.api.components.KtSubstitutorProvider\nimport org.jetbrains.kotlin.analysis.api.fir.KtFirAnalysisSession\nimport org.jetbrains.kotlin.analysis.api.fir.utils.firSymbol","completion":"import org.jetbrains.kotlin.analysis.api.symbols.KtClassOrObjectSymbol\nimport org.jetbrains.kotlin.analysis.api.types.KtSubstitutor\nimport org.jetbrains.kotlin.fir.resolve.substitution.chain\nimport org.jetbrains.kotlin.fir.scopes.substitutorForSuperType<|endoftext|>"} {"prompt":"if (!(element10 in 3L until 1L) != !range1.contains(element10)) throw AssertionError()\n if (!(element10 !in 3L until 1L) != range1.contains(element10)) throw AssertionError()\n}\n\nfun testR1xE11() {\n \/\/ with possible local optimizations","completion":"if (1L in 3L until 1L != range1.contains(1L)) throw AssertionError()\n if (1L !in 3L until 1L != !range1.contains(1L)) throw AssertionError()\n if (!(1L in 3L until 1L) != !range1.contains(1L)) throw AssertionError()<|endoftext|>"} {"prompt":"wasCalled = true\n }\n }\n\n builder(expectException = true) {\n try {\n suspendWithException(Exception(\"OK\"))\n } catch (e: RuntimeException) {\n suspendWithValue(\"fail\")\n throw RuntimeException(\"fail 3\")\n } finally {\n suspendWithValue(\"ignored 3\")\n wasCalled = true\n }\n }","completion":"builder(expectException = true) {\n try {\n suspendWithException(Exception(\"OK\"))\n } catch (e: RuntimeException) {\n suspendWithValue(\"fail\")\n return@builder \"xyz\"\n } finally {\n suspendWithValue(\"ignored 4\")\n wasCalled = true\n }\n }\n\n builder {\n try {<|endoftext|>"} {"prompt":"val file = moduleRoot.findChild(if (useSig) PsiJavaModule.MODULE_INFO_CLASS + \".sig\" else PsiJavaModule.MODULE_INFO_CLS_FILE)\n ?: return null\n val moduleInfo = JavaModuleInfo.read(file, javaFileManager, allScope) ?: return null\n return systemModulesCache.getOrPut(moduleInfo.moduleName) {","completion":"JavaModule.Explicit(\n moduleInfo,\n when {\n useLastJdkApi -> listOf(JavaModule.Root(moduleRoot, isBinary = true, isBinarySignature = useSig))\n useSig -> createModuleFromSignature(moduleInfo)\n else -> error(\"Can't find ${moduleRoot.path} module\")\n },<|endoftext|>"} {"prompt":"\/\/ CHECK-OPT-NOT: Foo#toString(){}kotlin.String\"\n\/\/ CHECK-OPT: call %struct.ObjHeader* @Kotlin_String_plusImpl\n\/\/ CHECK-OPT-NOT: kfun:kotlin.String#plus(kotlin.Any?)\n\n\/\/ CHECK: ret %struct.ObjHeader*","completion":"fun manualPlusMemberAny(str: String, maybeAny: kotlin.Any?): kotlin.String =\n str + maybeAny\n\n\/\/ CHECK-LABEL: define %struct.ObjHeader* @\"kfun:codegen.stringConcatenationTypeNarrowing.kt53119_plus_member#manualPlusMemberString<|endoftext|>"} {"prompt":"if (!METHOD_OF_ANY_NAMES.contains(member.name.asString())) return false\n if (member.modality == Modality.ABSTRACT) return false\n\n return isImplementingMethodOfAnyInternal(member, HashSet())\n }\n\n private fun isImplementingMethodOfAnyInternal(\n member: CallableMemberDescriptor,","completion":"visitedClasses: MutableSet\n ): Boolean {\n for (overridden in member.overriddenDescriptors) {\n val containingDeclaration = overridden.containingDeclaration\n if (containingDeclaration !is ClassDescriptor) continue\n if (visitedClasses.contains(containingDeclaration)) continue<|endoftext|>"} {"prompt":"if (!(element5 !in emptyCollection.indices) != range1.contains(element5)) throw AssertionError()\n}\n\nfun testR1xE6() {\n \/\/ with possible local optimizations\n if (0 in emptyCollection.indices != range1.contains(0)) throw AssertionError()","completion":"if (0 !in emptyCollection.indices != !range1.contains(0)) throw AssertionError()\n if (!(0 in emptyCollection.indices) != !range1.contains(0)) throw AssertionError()\n if (!(0 !in emptyCollection.indices) != range1.contains(0)) throw AssertionError()\n \/\/ no local optimizations<|endoftext|>"} {"prompt":"TODO(\"Not yet implemented\")\n }\n },\n ENTRY2() {\n override fun abstractFunc() {\n TODO(\"Not yet implemented\")\n }\n };\n\n constructor(arg: UserKlass = UserKlass()) : this(arg, UserKlass())\n constructor() : this(UserKlass(), UserKlass())\n\n abstract fun abstractFunc()","completion":"}\n\n enum class EnumerationCAA {\n ENTRY;\n\n constructor()\n }\n\n enum class EnumerationCAB {\n ENTRY1,\n ENTRY2;\n\n constructor()\n }\n\n enum class EnumerationCAC {\n ENTRY1,\n ENTRY2();\n\n constructor()\n }<|endoftext|>"} {"prompt":"val producer = rootProject.createSubproject(\n \"producer\",\n resolutionStrategy = strategy,\n ) {\n kotlin { producerTarget() }\n }\n val consumer = rootProject.createSubproject(\n \"consumer\",\n resolutionStrategy = strategy,\n ) {\n kotlin {\n consumerTarget()\n sourceSets.commonMain {\n dependencies {","completion":"dependencyScope()(project(\":${producer.name}\"))\n }\n }\n }\n }\n\n listOf(rootProject, producer, consumer).forEach { it.evaluate() }\n producer.publishFakeResources(producer.multiplatformExtension.producerTarget())\n\n assert(consumer, producer)\n }\n\n private fun testTransitiveDependencyOnResourcesProducer(<|endoftext|>"} {"prompt":"import java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\nimport javax.annotation.Nonnull;\nimport javax.annotation.meta.TypeQualifierNickname;\nimport javax.annotation.meta.When;\n\n@Target({ElementType.METHOD, ElementType.PARAMETER})\n@Retention(RetentionPolicy.RUNTIME)","completion":"@Documented\n@Nonnull\n@TypeQualifierNickname\npublic @interface NotNull {\n}\n\n\n\/\/ FILE: J1.java\n\nimport spr.*;\n\npublic interface J1 {\n @Nullable\n T getFoo();\n}\n\n\/\/ FILE: J2.java\n\nimport spr.*;\n\npublic class J2 implements J1 {\n @NotNull<|endoftext|>"} {"prompt":"when (irFunction.valueParameters.size) {\n 1 -> AssertionError(\"Assertion failed\").handleUserException(environment)\n 2 -> AssertionError(environment.callStack.popState().asString()).handleUserException(environment)\n }\n }\n}\n\ninternal object DataClassArrayToString : IntrinsicBase() {","completion":"override fun getListOfAcceptableFunctions(): List {\n return listOf(\"kotlin.internal.ir.dataClassArrayMemberToString\")\n }\n\n private fun arrayToString(array: Any?): String {\n return when (array) {\n null -> \"null\"\n is Array<*> -> Arrays.toString(array)<|endoftext|>"} {"prompt":"val INFER_MAIN_MODULE by directive(\n description = \"Infer main module automatically using dependency graph\",\n applicability = DirectiveApplicability.Global\n )\n\n val RUN_PLAIN_BOX_FUNCTION by directive(\n description = \"\",\n applicability = DirectiveApplicability.Global\n )\n\n val NO_INLINE by directive(","completion":"description = \"Disable inline in js module\",\n applicability = DirectiveApplicability.Module\n )\n\n val SKIP_NODE_JS by directive(\n description = \"\",\n applicability = DirectiveApplicability.Global\n )\n\n val SKIP_MINIFICATION by directive(\n description = \"\",\n applicability = DirectiveApplicability.Global\n )<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {}\nfun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {}","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {}<|endoftext|>"} {"prompt":"dependencyProviders,\n )\n\n register(\n FirSymbolProvider::class,\n FirCachingCompositeSymbolProvider(\n this, providers,\n expectedCachesToBeCleanedOnce = generatedSymbolsProvider != null\n )\n )\n\n generatedSymbolsProvider?.let { register(FirSwitchableExtensionDeclarationsSymbolProvider::class, it) }","completion":"register(DEPENDENCIES_SYMBOL_PROVIDER_QUALIFIED_KEY, FirCachingCompositeSymbolProvider(this, dependencyProviders))\n }\n }\n\n private fun FirSession.computeDependencyProviderList(moduleData: FirModuleData): List {\n \/\/ dependsOnDependencies can actualize declarations from their dependencies. Because actual declarations can be more specific<|endoftext|>"} {"prompt":"assertEquals(123456789012345L, bigLongConstCopy)\n}\n\n\/\/ PROPERTY_READ_COUNT: name=longConst count=1 scope=testImportedLongConstInlinedLocally\n\/\/ PROPERTY_READ_COUNT: name=L42 count=1 scope=testImportedLongConstInlinedLocally","completion":"\/\/ PROPERTY_READ_COUNT: name=L_42 count=4 scope=testImportedLongConstInlinedLocally\n\/\/ PROPERTY_READ_COUNT: name=L84 count=2 scope=testImportedLongConstInlinedLocally\n\/\/ PROPERTY_READ_COUNT: name=bigLongConst count=1 scope=testImportedLongConstInlinedLocally<|endoftext|>"} {"prompt":"private class CirClassifierIndexBuilder {\n companion object {\n const val initialCapacity = 1000\n }\n\n private val typeAliasesByUnderlyingType = CommonizerMap>(initialCapacity)\n private val classifiersById = CommonizerMap(initialCapacity)","completion":"private val classifierIds = CommonizerSet(initialCapacity)\n\n operator fun invoke(tree: CirTreeRoot) {\n tree.modules.forEach { module -> this(module) }\n }\n\n operator fun invoke(module: CirTreeModule) {\n module.packages.forEach { pkg -> this(pkg) }\n }<|endoftext|>"} {"prompt":"@Test\n @TestMetadata(\"changedExternalDependency\")\n fun testChangedExternalDependency() = withRootDir(File(\"$TEST_SUITE_PATH\/externalDependency\")) {\n val externalLib = compileLibrary(\"externalLib\") {\n outputDir = \"external\"\n \"externalLib\/file1.kt\" copyTo \"file1.kt\"","completion":"\"externalLib\/file2.kt\" copyTo \"file2.kt\"\n }\n val userLib = compileLibrary(\"userLib\", externalLib) {\n \"userLib\/file1.kt\" copyTo \"file1.kt\"\n \"userLib\/file2.kt\" copyTo \"file2.kt\"\n }\n val main = compileToExecutable(\"main\", externalLib, userLib) {<|endoftext|>"} {"prompt":"internal fun __kernel_sin(x: Double, y: Double, iy: Int): Double {\n var z: Double\n var r: Double\n var v: Double\n var ix: Int\n ix = __HI(x) and 0x7fffffff \/* high word of x *\/\n if (ix < 0x3e400000) \/* |x| < 2**-27 *\/ {","completion":"if (x.toInt() == 0) return x\n } \/* generate inexact *\/\n z = x * x\n v = z * x\n r = S2 + z * (S3 + z * (S4 + z * (S5 + z * S6)))\n if (iy == 0) return x + v * (S1 + z * r)<|endoftext|>"} {"prompt":"fun checkIntegrationTestOutput(targetName: String) {\n val classReportHtml = projectDir\n .resolve(\"build\/reports\/tests\/${targetName}IntegrationTest\/classes\/com.example.HelloIntegrationTest.html\")\n .readText()","completion":"assertTrue(\"test[$targetName]\" in classReportHtml, \"Test report should contain 'test[$targetName]':\\n$classReportHtml\")\n assertTrue(\"secondTest\" !in classReportHtml, \"Test report should not contain 'secondTest':\\n$classReportHtml\")<|endoftext|>"} {"prompt":"* - `acosh(x)` is `NaN` when `x < 1`\n * - `acosh(+Inf)` is `+Inf`\n *\/\n@SinceKotlin(\"1.2\")\npublic expect fun acosh(x: Float): Float\n\n\/**\n * Computes the inverse hyperbolic tangent of the value [x].\n *","completion":"* The returned value is `y` such that `tanh(y) == x`.\n *\n * Special cases:\n * - `tanh(NaN)` is `NaN`\n * - `tanh(x)` is `NaN` when `x > 1` or `x < -1`\n * - `tanh(1.0)` is `+Inf`<|endoftext|>"} {"prompt":"override var source: KtSourceElement? = null\n override var coneTypeOrNull: ConeKotlinType? = null\n lateinit var anonymousObject: FirAnonymousObject\n\n override val annotations: MutableList\n get() = shouldNotBeCalled()\n\n override fun build(): FirAnonymousObjectExpression {\n return FirAnonymousObjectExpressionImpl(\n source,","completion":"coneTypeOrNull,\n anonymousObject,\n )\n }\n\n}\n\n@OptIn(ExperimentalContracts::class)\ninline fun buildAnonymousObjectExpression(init: FirAnonymousObjectExpressionBuilder.() -> Unit): FirAnonymousObjectExpression {\n contract {\n callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE)\n }<|endoftext|>"} {"prompt":"if (featuresThatForcePreReleaseBinaries.isNotEmpty()) {\n collector.report(\n CompilerMessageSeverity.STRONG_WARNING,\n \"Following manually enabled features will force generation of pre-release binaries: ${featuresThatForcePreReleaseBinaries.joinToString()}\"\n )\n }\n\n if (disabledFeaturesFromUnsupportedVersions.isNotEmpty()) {\n collector.report(","completion":"CompilerMessageSeverity.ERROR,\n \"The following features cannot be disabled manually, because the version they first appeared in is no longer \" +\n \"supported:\\n${disabledFeaturesFromUnsupportedVersions.joinToString()}\"\n )\n }\n }\n\n fun toLanguageVersionSettings(collector: MessageCollector): LanguageVersionSettings {\n return toLanguageVersionSettings(collector, emptyMap())\n }<|endoftext|>"} {"prompt":"* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 8 -> sentence 1\n * NUMBER: 3\n * DESCRIPTION: a callable reference is itself an argument to an overloaded function call\n *\/\n\n\/\/ TESTCASE NUMBER: 1\nclass Case1() {","completion":"fun foo(x: () -> Int): String = TODO() \/\/ (1.1)\n fun foo(x: () -> Any): Unit = TODO() \/\/ (1.2)\n\n fun case1() {\n foo(::x)<|endoftext|>"} {"prompt":"\/\/ JVM_ABI_K1_K2_DIFF: KT-63984\nclass P {\n var x : Int = 0\n private set\n\n fun foo() {\n ({ x = 4 }).let { it() }\n }\n}\n\nfun box() : String {\n val p = P()\n p.foo()","completion":"return if (p.x == 4) \"OK\" else \"fail\"\n}<|endoftext|>"} {"prompt":"syntheticPropertiesScope.processPropertiesByName(name, processor)\n }\n}\n\nprivate val JAVA_ENHANCEMENT_FOR_DECLARED_MEMBERS = scopeSessionKey()","completion":"private val JAVA_ENHANCEMENT_FOR_STATIC_DECLARED_MEMBERS = scopeSessionKey()\n\nprivate val JAVA_ENHANCEMENT_FOR_ALL_DECLARED_MEMBERS = scopeSessionKey()<|endoftext|>"} {"prompt":"listOf(\n \":libraryProject:compileKotlinJs\",\n \":mainProject:compileKotlinJs\",\n \":mainProject:compileProductionExecutableKotlinJs\",\n \":mainProject:browserProductionWebpack\"\n )\n )\n }\n\n @MppGradlePluginTests\n @DisplayName(\"works with Multiplatform\")\n @GradleTest","completion":"fun testRelocationMultiplatform(gradleVersion: GradleVersion) {\n val (firstProject, secondProject) = prepareTestProjects(\"new-mpp-lib-with-tests\", gradleVersion)\n\n checkBuildCacheRelocation(\n firstProject,\n secondProject,\n listOf(\"build\"),\n listOf(\n \":compileCommonMainKotlinMetadata\",<|endoftext|>"} {"prompt":"assertEquals(0, lineNo)\n throw MyException()\n }\n\n fail()\n }\n\n @Test(expected = MyException::class)\n fun failure5() {\n \/\/ Source code module ID not specified.\n val originalText = \"\"\"","completion":"|1 org.sample:liba,org.sample:liba-native[2.0] #0[2.0] #2[1.0]\n |${'\\t'}\/some\/path\/liba.klib\n |2 org.sample:libb,org.sample:libb-native #0[1.0]<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.light.classes.symbol.isOriginEquivalentTo\nimport org.jetbrains.kotlin.light.classes.symbol.modifierLists.InitializedModifiersBox\nimport org.jetbrains.kotlin.light.classes.symbol.modifierLists.SymbolLightClassModifierList","completion":"import org.jetbrains.kotlin.load.java.structure.LightClassOriginKind\nimport org.jetbrains.kotlin.psi.KtEnumEntry\n\ninternal class SymbolLightClassForEnumEntry(\n private val enumConstant: SymbolLightFieldForEnumEntry,\n private val enumClass: SymbolLightClassBase,\n ktModule: KtModule,<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/KT-1680 Warn if non-null variable is compared to null\npackage kt1680\n\nfun foo() {\n val x = 1\n if (x != null) {} \/\/ <-- need a warning here!\n if (x == null) {}","completion":"if (null != x) {}\n if (null == x) {}\n\n val y : Int? = 1\n if (y != null) {}\n if (y == null) {}\n}<|endoftext|>"} {"prompt":"Inner(1)\n }\n }\n}\n\nfun foo() {\n Outer.Inner()\n Outer.Inner(1)\n}\n\n\/\/ FILE: imported.kt\nimport abc.Outer","completion":"import abc.Outer.Inner\n\nfun bar() {\n Inner()\n Inner(1)\n\n with(Outer()) {\n Inner()\n Inner(1)\n }\n}<|endoftext|>"} {"prompt":"fun id(p: T): T = p\n\nfun main() {\n f()\n\n val a: A = f()","completion":"f<A>()\n\n val b: Int = f()\n f()\n\n val \u0441: A = id(f())\n}<|endoftext|>"} {"prompt":"\/\/ JDK_RELEASE: 9\n\/\/ CHECK_BYTECODE_TEXT\n\/\/ 2 CHECKCAST java\/lang\/ReflectiveOperationException\n\/\/ 1 LOCALVARIABLE reflective Ljava\/lang\/ReflectiveOperationException;\n\nfun cond() = true\n\nfun test(iae: IllegalAccessException?, cnfe: ClassNotFoundException?) {\n val reflective = if (cond()) iae else cnfe\n}","completion":"fun box(): String {\n test(null, null)\n return \"OK\"\n}<|endoftext|>"} {"prompt":"assertContains(array as Array, null)\n }\n testFailureMessage(\"Expected the array to contain the element.\\nArray <${array.contentToString()}>, element <5>.\") {\n assertContains(array, \"5\")\n }\n }\n\n @Test\n fun testAssertContainsCharArray() {","completion":"val array = charArrayOf('x', 'y', 'z')\n\n assertContains(array, 'z')\n\n testFailureMessage(\"Expected the array to contain the element.\\nArray <${array.contentToString()}>, element <5>.\") {\n assertContains(array, '5')\n }\n }\n\n @OptIn(ExperimentalUnsignedTypes::class)\n @Test<|endoftext|>"} {"prompt":"\/\/ IGNORE_BACKEND: WASM\n\/\/ WASM_MUTE_REASON: FAILS_IN_JS_IR\n\/\/ IGNORE_BACKEND: JS, JS_IR\n\/\/ IGNORE_BACKEND: JS_IR_ES6\n\/\/ FILE: test.kt\n\nfun checkEqual(x: Any, y: Any) {","completion":"if (x != y || y != x) throw AssertionError(\"$x and $y should be equal\")\n if (x.hashCode() != y.hashCode()) throw AssertionError(\"$x and $y should have the same hash code\")\n}\n\nfun checkNotEqual(x: Any, y: Any) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.klib.reader.testUtils.render\nimport org.jetbrains.kotlin.analysis.api.klib.reader.testUtils.testDataDir\nimport org.jetbrains.kotlin.test.KotlinTestUtils\nimport kotlin.test.Test\nimport kotlin.test.fail","completion":"class ReadKlibDeclarationAddressesBlackBoxTest {\n\n @Test\n fun `test - testProject`() {\n val addresses = readKlibDeclarationAddresses(providedTestProjectKlib) ?: fail(\"Failed loading klib: $providedTestProjectKlib\")\n KotlinTestUtils.assertEqualsToFile(testDataDir.resolve(\"!testProject.addresses\"), addresses.render())<|endoftext|>"} {"prompt":"is CharArray -> treeMaker.NewArray(null, JavacList.nil(), mapJList(value.asIterable(), ::convertDeeper))\n is ShortArray -> treeMaker.NewArray(null, JavacList.nil(), mapJList(value.asIterable(), ::convertDeeper))","completion":"is IntArray -> treeMaker.NewArray(null, JavacList.nil(), mapJList(value.asIterable(), ::convertDeeper))\n is LongArray -> treeMaker.NewArray(null, JavacList.nil(), mapJList(value.asIterable(), ::convertDeeper))<|endoftext|>"} {"prompt":"private fun testCoding(base64: Base64, text: String, encodedText: String) {\n val encodedBytes = ByteArray(encodedText.length) { encodedText[it].code.toByte() }\n val bytes = ByteArray(text.length) { text[it].code.toByte() }\n encodedBytes.inputStream().decodingWith(base64).use { inputStream ->","completion":"assertEquals(text, inputStream.reader().readText())\n }\n encodedBytes.inputStream().decodingWith(base64).use { inputStream ->\n assertContentEquals(bytes, inputStream.readBytes())\n }\n ByteArrayOutputStream().let { outputStream ->\n outputStream.encodingWith(base64).use {\n it.write(bytes)\n }<|endoftext|>"} {"prompt":"super.visitGetValue(expression)\n }\n })\n blockInfo.variables.forEach {\n if (it.declaration.symbol !in referencedValues) {\n it.explicitEndLabel = continueLabel\n }\n }\n }\n\n private fun unwindBlockStack(\n endLabel: Label,\n data: BlockInfo,","completion":"nestedTryWithoutFinally: MutableList = arrayListOf(),\n stop: (LoopInfo) -> Boolean\n ): LoopInfo? {\n @Suppress(\"RemoveExplicitTypeArguments\")\n return data.handleBlock {\n when {\n it is TryWithFinallyInfo -> {\n genFinallyBlock(it, null, endLabel, data, nestedTryWithoutFinally)<|endoftext|>"} {"prompt":"fun box(stepId: Int): String {\n val x = test(stepId)\n when (stepId) {\n 0 -> if (x != 5) return \"Fail, x == $x\"\n 1 -> if (x != 32) return \"Fail, x == $x\"\n 2 -> if (x != 0) return \"Fail, x == $x\"","completion":"3 -> if (x != 0) return \"Fail, x == $x\"\n else -> return \"Unkown\"\n }\n return \"OK\"\n}<|endoftext|>"} {"prompt":"* \u21aa project.multiplatformExtension.awaitSourceSets() \/\/ <- instead of .sourceSets | suspending until finally available\n * }\n * ```\n *\n * #### Example: Checker that requires platform compilations of a given SourceSet\n * ```kotlin\n * override suspend fun KotlinGradleProjectCheckerContext.runChecks(collector: KotlinToolingDiagnosticsCollector) {","completion":"* \u21aa project.multiplatformExtension.awaitSourceSets().getByName(\"commonMain\") \/\/ suspending until all source sets available\n * \u21aa .internal.awaitPlatformCompilations() \/\/ suspending until all platform compilations are finally known\n * }\n * ```\n *\n * #### Example: Checker that just wants to run in a given [KotlinPluginLifecycle.Stage]<|endoftext|>"} {"prompt":"@Target(PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, FIELD, VALUE_PARAMETER, TYPE_PARAMETER, FUNCTION, CLASS, CONSTRUCTOR, TYPEALIAS, TYPE)\n@JsAnnotationForAnnotationClassesOnly(\"annotation-class\")\n@CommonAnnotationForAnnotationClassesOnly(\"annotation-class\")","completion":"annotation class JsAnnotation(val text: String)\n\n@JsAnnotation(\"property\")\n@CommonAnnotation(\"property\")\nvar propertyWithoutBackingField\n @JsAnnotation(\"getter\") @CommonAnnotation(\"getter\") get() = 3.14<|endoftext|>"} {"prompt":"}\n}\n\n\nclass DeclarationScopeProviderForLocalClassifierAnalyzer(\n lazyDeclarationResolver: LazyDeclarationResolver,\n fileScopeProvider: FileScopeProvider,\n private val localClassDescriptorManager: LocalClassDescriptorHolder\n) : DeclarationScopeProviderImpl(lazyDeclarationResolver, fileScopeProvider) {","completion":"override fun getResolutionScopeForDeclaration(elementOfDeclaration: PsiElement): LexicalScope {\n if (localClassDescriptorManager.isMyClass(elementOfDeclaration)) {\n return localClassDescriptorManager.getResolutionScopeForClass(elementOfDeclaration as KtClassOrObject)\n }\n return super.getResolutionScopeForDeclaration(elementOfDeclaration)\n }<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\nimport kotlin.test.*\n\nfun sumIB(a:Int, b:Byte ) = a + b\nfun sumIS(a:Int, b:Short ) = a + b\nfun sumII(a:Int, b:Int ) = a + b\nfun sumIL(a:Int, b:Long ) = a + b","completion":"fun sumIF(a:Int, b:Float ) = a + b\nfun sumID(a:Int, b:Double) = a + b\n\nfun modID(a:Int, b:Double) = a % b\n\nfun box(): String {\n if (sumIB(2, 3) != 5) throw Error()\n if (sumIS(2, 3) != 5) throw Error()<|endoftext|>"} {"prompt":"forceCallKind ?: if (qualifiedAccess is FirFunctionCall) CallKind.Function else CallKind.VariableAccess,\n name,\n explicitReceiver,\n argumentList,\n isImplicitInvoke = qualifiedAccess is FirImplicitInvokeCall,\n isUsedAsGetClassReceiver = isUsedAsGetClassReceiver,\n typeArguments,\n session,\n components.file,","completion":"containingDeclarations,\n origin = origin,\n resolutionMode = resolutionMode,\n )\n towerResolver.reset()\n val result = towerResolver.runResolver(info, resolutionContext, collector)\n\n var (reducedCandidates, newApplicability) = reduceCandidates(result, explicitReceiver, resolutionContext)<|endoftext|>"} {"prompt":"arrayOf(\"2\", \"-d\", \"3\", \"out.txt\", \"something\", \"else\", \"in\", \"string\")) }\n assertTrue(\"Too many arguments! Couldn't process argument something\" in exception.message!!)\n }\n\n @Test\n fun testUnknownOption() {\n val argParser = ArgParser(\"testParser\")","completion":"val output by argParser.option(ArgType.String, \"output\", \"o\", \"Output file\")\n val input by argParser.option(ArgType.String, \"input\", \"i\", \"Input file\")\n val exception = assertFailsWith {\n argParser.parse(arrayOf(\"-o\", \"out.txt\", \"-d\", \"-i\", \"input.txt\"))\n }<|endoftext|>"} {"prompt":"throwable = sourceSet.isRegisteredByKotlinSourceSetConventionAt\n )\n }\n\n object IosSourceSetConventionUsedWithoutIosTarget : ToolingDiagnosticFactory(WARNING) {\n operator fun invoke(sourceSet: KotlinSourceSet) = build(\n \"\"\"\n |Accessed '$sourceSet' without registering any ios target:\n | kotlin {","completion":"| \/* Register at least one of the following targets *\/\n | iosX64()\n | iosArm64()\n | iosSimulatorArm64()\n |\n | \/* Use convention *\/\n | sourceSets.${sourceSet.name}.dependencies {\n |\n | }\n | }\n \"\"\".trimMargin(),<|endoftext|>"} {"prompt":"@kotlin.SinceKotlin(version = \"1.9\")\n @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})\n public open override val endExclusive: kotlin.ULong { get; }\n\n public open override val endInclusive: kotlin.ULong { get; }","completion":"public open override val start: kotlin.ULong { get; }\n\n public open override operator fun contains(value: kotlin.ULong): kotlin.Boolean\n\n public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean\n\n public open override fun hashCode(): kotlin.Int\n\n public open override fun isEmpty(): kotlin.Boolean<|endoftext|>"} {"prompt":"block: StateKeeperScope.(Entity, Context) -> Unit,\n) {\n if (list != null) {\n for (entity in list) {\n if (entity != null) {\n StateKeeperScope(entity).block(entity, context)\n }\n }\n }\n}\n\n\/**\n * Defines a [StateKeeper] using a builder DSL.","completion":"* This function is supposed to be the main entry point for [StateKeeper] creation.\n *\n * @param block a function that defines state preservation rules.\n * The function collects rules for each individual owner separately.\n * Nested owners can be handled inside [entity] or [entityList] blocks.\n *\/<|endoftext|>"} {"prompt":"class WasmFailingTestSuppressor(testServices: TestServices) : AfterAnalysisChecker(testServices) {\n override fun suppressIfNeeded(failedAssertions: List): List {\n val testFile = testServices.moduleStructure.originalTestDataFiles.first()","completion":"val failFile = testFile.parentFile.resolve(\"${testFile.name}.fail\").takeIf { it.exists() }\n ?: return failedAssertions\n if (failedAssertions.any { it is WrappedException.FromFacade }) return emptyList()\n return failedAssertions + AssertionError(\"Fail file exists but no exception was thrown. Please remove ${failFile.name}\").wrap()<|endoftext|>"} {"prompt":"override fun bar(): Int {\n return 10\n }\n override fun foo(t: Int) { }\n}\n\ninterface KotlinInterface : Java1\n\ninterface KotlinInterface2: Java1 {\n val a: Int\n fun foo(t: Int) { }\n fun bar(): Int {\n return 10\n }\n}","completion":"fun test(a:A, b: B, c: C, d: D, e: E, f: F, g: G, h: H){\n b.a\n b.foo(1)\n b.bar()\n d.a\n d.foo(\"\")\n d.bar()\n e.a\n e.bar()\n e.foo(1)\n f.a<|endoftext|>"} {"prompt":"valueParameterConstraints[adapteeParameter] = parameterConstraint\n }\n\n return SignatureAdaptationConstraints(\n if (valueParameterConstraints.isEmpty()) emptyMap() else valueParameterConstraints,\n returnTypeConstraint\n )\n }","completion":"private fun computeParameterTypeAdaptationConstraint(adapteeType: IrType, expectedType: IrType): TypeAdaptationConstraint? {\n if (adapteeType !is IrSimpleType)\n throw AssertionError(\"Simple type expected: ${adapteeType.render()}\")\n if (expectedType !is IrSimpleType)\n throw AssertionError(\"Simple type expected: ${expectedType.render()}\")<|endoftext|>"} {"prompt":"fun foo() = B.prop.toString()\n }\n) {\/* ClassDeclarationStructureElement *\/\n constructor()\/* DeclarationStructureElement *\/\n}\n\nclass G : A(\n {\n fun foo() = B.prop.toString()\n }\n) {\/* ClassDeclarationStructureElement *\/\n constructor() : super(\n {","completion":"fun foo() = B.prop.toString()\n }\n )\/* DeclarationStructureElement *\/\n}\n\nclass H : A {\/* ClassDeclarationStructureElement *\/\n constructor() : super(\n {\n fun foo() = B.prop.toString()\n }\n )\/* DeclarationStructureElement *\/\n}<|endoftext|>"} {"prompt":"J { s: String -> s} \/\/ should be prohibited, because SAM value parameter has nullable type\n J { \"\" + it.length }","completion":"J { null }\n J { it?.length?.toString() }<|endoftext|>"} {"prompt":"if (declaration is IrField) {\n declaration.initializer?.let { originalBody ->\n declaration.initializer = context.irFactory.createExpressionBody(\n startOffset = originalBody.startOffset,\n endOffset = originalBody.endOffset,\n expression = originalBody.expression.deepCopyWithSymbols(declaration),\n )\n }\n }\n\n return null","completion":"}\n}<|endoftext|>"} {"prompt":"* If any of values produced by [selector] function is `NaN`, the returned result is `NaN`.\n * \n * @throws NoSuchElementException if the array is empty.\n *\/\n@SinceKotlin(\"1.4\")\n@OptIn(kotlin.experimental.ExperimentalTypeInference::class)\n@OverloadResolutionByLambdaReturnType\n@kotlin.internal.InlineOnly","completion":"public inline fun DoubleArray.maxOf(selector: (Double) -> Double): Double {\n if (isEmpty()) throw NoSuchElementException()\n var maxValue = selector(this[0])\n for (i in 1..lastIndex) {\n val v = selector(this[i])\n maxValue = maxOf(maxValue, v)\n }\n return maxValue\n}\n\n\/**<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.codegen.optimization.fixStack.peek\nimport org.jetbrains.kotlin.codegen.optimization.fixStack.top\nimport org.jetbrains.kotlin.codegen.optimization.transformer.MethodTransformer\nimport org.jetbrains.kotlin.codegen.pseudoInsns.PseudoInsn","completion":"import org.jetbrains.kotlin.codegen.pseudoInsns.asNotNull\nimport org.jetbrains.kotlin.codegen.pseudoInsns.isPseudo\nimport org.jetbrains.kotlin.codegen.state.GenerationState\nimport org.jetbrains.kotlin.resolve.jvm.AsmTypes<|endoftext|>"} {"prompt":"val processorsStatsReportFile: File?,\n val fileReadHistoryReportFile: File?\n) : KaptFlags {\n override fun get(flag: KaptFlag) = flags[flag]\n\n class Builder {\n var projectBaseDir: File? = null\n val compileClasspath: MutableList = mutableListOf()","completion":"val javaSourceRoots: MutableList = mutableListOf()\n\n val changedFiles: MutableList = mutableListOf()\n val compiledSources: MutableList = mutableListOf()\n var incrementalCache: File? = null\n val classpathChanges: MutableList = mutableListOf()\n\n var sourcesOutputDir: File? = null<|endoftext|>"} {"prompt":"visitor!!.visitTypeParameterDescriptor(this, null)\n }\n\n override fun toString(): String = super.toString() + \"\\nParent: $containingDeclaration\"\n}\n\nfun IrTypeParameter.toIrBasedDescriptor() = IrBasedTypeParameterDescriptor(this)","completion":"open class IrBasedVariableDescriptor(owner: IrVariable) : VariableDescriptor, IrBasedCallableDescriptor(owner) {\n\n override fun getContainingDeclaration() = (owner.parent as IrDeclaration).toIrBasedDescriptor()\n override fun getType() = owner.type.toIrBasedKotlinType()\n override fun getReturnType() = getType()<|endoftext|>"} {"prompt":"val factory = dispatcher.getDiagnostic(conflictingDeclaration, symbols, context)\n\n if (factory != null) {\n reporter.reportOn(source, factory, symbols, context)\n }\n }\n }\n\n private val FirBasedSymbol<*>.isPrimaryConstructor: Boolean","completion":"get() = this is FirConstructorSymbol && isPrimary || origin == FirDeclarationOrigin.Synthetic.TypeAliasConstructor\n\n private fun checkFile(file: FirFile, inspector: FirDeclarationCollector>, context: CheckerContext) {<|endoftext|>"} {"prompt":"\/\/ Will be initialized only when we found a branch that compares\n \/\/ subject with compile-time known enum entry.\n val subjectOrdinalProvider = lazy {\n context.createIrBuilder(currentScope!!.scope.scopeOwnerSymbol, subject.startOffset, subject.endOffset).run {\n val integer = if (subject.type.isNullable())","completion":"irIfNull(context.irBuiltIns.intType, irGet(subject), irInt(-1), mapRuntimeEnumEntry(this, irGet(subject)))\n else\n mapRuntimeEnumEntry(this, irGet(subject))\n scope.createTemporaryVariable(integer).also {\n expression.statements.add(1, it)\n }\n }\n }<|endoftext|>"} {"prompt":"parent: LexicalScope,\n override val ownerDescriptor: DeclarationDescriptor,\n override val isOwnerDescriptorAccessibleByLabel: Boolean,\n redeclarationChecker: LocalRedeclarationChecker,\n override val kind: LexicalScopeKind\n) : LexicalScopeStorage(parent, redeclarationChecker) {","completion":"override val implicitReceiver: ReceiverParameterDescriptor?\n get() = null\n override val contextReceiversGroup: List\n get() = emptyList()\n\n private var canWrite: Boolean = true\n private var lastSnapshot: Snapshot? = null\n\n fun freeze() {\n canWrite = false\n }<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\n@file:JvmName(\"TestKt\")\npackage test\n\nimport kotlinx.parcelize.*\nimport android.os.Parcel\nimport android.os.Parcelable\nimport java.util.Arrays\n\n@Parcelize\ndata class A(val params: @RawValue Array<*>? = null): Parcelable\n\nfun box() = parcelTest { parcel ->","completion":"val a1 = A(arrayOf(1,2,3))\n val b1 = A()\n a1.writeToParcel(parcel, 0)\n b1.writeToParcel(parcel, 0)\n\n val bytes = parcel.marshall()\n parcel.unmarshall(bytes, 0, bytes.size)\n parcel.setDataPosition(0)<|endoftext|>"} {"prompt":"cases += SwitchBranchData.SwitchDefaultData(branch.result)\n break@l\n }\n }\n else -> return null\n }\n }\n\n val s = varSymbol\n\n \/\/ Seems it is not reasonable to optimize very simple when\n if (caseCount < 3) return null","completion":"if (s?.owner?.type?.isSuitableForSwitch() == true) return SwitchData(s, cases)\n return null\n }\n\n private fun buildJsSwitch(switch: SwitchData): JsStatement {\n\n val exprTransformer = IrElementToJsExpressionTransformer()\n val stmtTransformer = IrElementToJsStatementTransformer()<|endoftext|>"} {"prompt":"val ConeKotlinType.isLong: Boolean get() = isBuiltinType(StandardClassIds.Long, isNullable = false)\nval ConeKotlinType.isFloat: Boolean get() = isBuiltinType(StandardClassIds.Float, isNullable = false)","completion":"val ConeKotlinType.isDouble: Boolean get() = isBuiltinType(StandardClassIds.Double, isNullable = false)\n\nval ConeKotlinType.isAny: Boolean get() = isBuiltinType(StandardClassIds.Any, isNullable = false)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.expressions.FirAnnotation\nimport org.jetbrains.kotlin.fir.expressions.FirBlock\nimport org.jetbrains.kotlin.fir.references.FirControlFlowGraphReference\nimport org.jetbrains.kotlin.fir.symbols.FirBasedSymbol","completion":"import org.jetbrains.kotlin.fir.symbols.impl.FirAnonymousInitializerSymbol\nimport org.jetbrains.kotlin.fir.visitors.FirTransformer\nimport org.jetbrains.kotlin.fir.visitors.FirVisitor\nimport org.jetbrains.kotlin.fir.visitors.transformInplace<|endoftext|>"} {"prompt":"private fun isNotLessSpecific(\n sigA: FlatSignature>,\n sigB: FlatSignature>,\n ): Boolean = createEmptyConstraintSystem().isSignatureNotLessSpecific(\n sigA,\n sigB,\n OverloadabilitySpecificityCallbacks,","completion":"session.typeSpecificityComparatorProvider?.typeSpecificityComparator ?: TypeSpecificityComparator.NONE,\n )\n\n private fun createSignature(declaration: FirCallableSymbol<*>): FlatSignature> {\n val valueParameters = (declaration as? FirFunctionSymbol<*>)?.valueParameterSymbols.orEmpty()<|endoftext|>"} {"prompt":"configure: KotlinNativeTargetWithHostTests.() -> Unit = { }\n ): KotlinNativeTargetWithHostTests =\n configureOrCreate(\n name,\n @Suppress(\"DEPRECATION\")\n presets.getByName(\"mingwX64\") as KotlinNativeTargetWithHostTestsPreset,\n configure\n )","completion":"fun mingwX64() = mingwX64(\"mingwX64\") { }\n fun mingwX64(name: String) = mingwX64(name) { }\n fun mingwX64(name: String, configure: Action) = mingwX64(name) { configure.execute(this) }<|endoftext|>"} {"prompt":"val MinUS = UShort.MIN_VALUE\nval MaxUL = ULong.MAX_VALUE\nval MinUL = ULong.MIN_VALUE\n\nfun box(): String {\n val list1 = ArrayList()\n for (i in MaxUI..MinUI step 1) {\n list1.add(i)\n if (list1.size > 23) break\n }","completion":"if (list1 != listOf()) {\n return \"Wrong elements for MaxUI..MinUI step 1: $list1\"\n }\n\n val list2 = ArrayList()\n for (i in MaxUB..MinUB step 1) {\n list2.add(i)\n if (list2.size > 23) break\n }<|endoftext|>"} {"prompt":"x.addAll(mc())\n x.addAllMC(mc())\n\n x.addAll(mc())","completion":"x.addAllMC(mc())\n\n x.addAll(c())\n x.addAll(c())\n\n x.addAllInv(mc())<|endoftext|>"} {"prompt":"expect annotation class B(val a: Array)\n\n@OptionalExpectation\nexpect annotation class C()\n\n@OptionalExpectation\nexpect annotation class D()\n\nactual annotation class D actual constructor()\n\n@Suppress(\"OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE\")\n@A(42)\n@B([\"OK\", \"\"])\n@C","completion":"@D()\nfun ok() {}<|endoftext|>"} {"prompt":"analysisFlag(AnalysisFlags.muteExpectActualClassesWarning, trueOrNull(LanguageSettingsDirectives.ENABLE_EXPECT_ACTUAL_CLASSES_WARNING in directives) != true),\n analysisFlag(AnalysisFlags.dontWarnOnErrorSuppression, trueOrNull(LanguageSettingsDirectives.DONT_WARN_ON_ERROR_SUPPRESSION in directives)),","completion":"analysisFlag(JvmAnalysisFlags.jvmDefaultMode, directives.singleOrZeroValue(LanguageSettingsDirectives.JVM_DEFAULT_MODE)),\n analysisFlag(JvmAnalysisFlags.inheritMultifileParts, trueOrNull(LanguageSettingsDirectives.INHERIT_MULTIFILE_PARTS in directives)),<|endoftext|>"} {"prompt":".withArtifacts(JvmLibrary::class.java, SourcesArtifact::class.java)\n .execute()\n\n val sourcesArtifacts = resolutionResult.resolvedComponents.flatMap { resolved ->\n resolved.getArtifacts(SourcesArtifact::class.java).filterIsInstance()\n }\n\n sourcesArtifacts.forEach { artifact ->","completion":"binaryDependencies[Coordinates(artifact)]?.forEach { dependency ->\n dependency.sourcesClasspath.add(artifact.file)\n }\n }\n }\n\n private fun selectConfiguration(sourceSet: KotlinSourceSet): Configuration {\n val platformCompilation = sourceSet.internal.compilations.singleOrNull { it.platformType != KotlinPlatformType.common }<|endoftext|>"} {"prompt":"node.instructions.remove(value.boxingInsn)\n } else {\n val iterator = value.progressionIterator ?: error(\"iterator should not be null because isFromProgressionIterator returns true\")\n\n \/\/add checkcast to kotlin\/Iterator before next() call","completion":"node.instructions.insertBefore(value.boxingInsn, TypeInsnNode(Opcodes.CHECKCAST, iterator.type.internalName))\n\n \/\/invoke concrete method (kotlin\/iterator.next())\n node.instructions.set(\n value.boxingInsn,\n MethodInsnNode(\n Opcodes.INVOKEVIRTUAL,<|endoftext|>"} {"prompt":"if (s != null) s.funT()\n\n if (s != null) s.funAny()","completion":"if (s != null) s.funNullableT()\n\n if (s != null) s.funNullableAny()<|endoftext|>"} {"prompt":"compileSdk = 31\n flavorDimensions += \"version\"\n productFlavors {\n create(\"demo\") {\n it.dimension = \"version\"\n }\n create(\"full\") {\n it.dimension = \"version\"\n }\n }\n }\n val kotlin = multiplatformExtension\n val androidTarget = kotlin.androidTarget()\n\n evaluate()","completion":"assertEquals(\n listOf(\n listOf(\"commonMain\"),\n listOf(\"androidDebug\", \"androidFull\", \"androidFullDebug\", \"androidMain\"),\n ),\n resourceDirectoriesCopyingOrder(androidTarget.compilations.getByName(\"fullDebug\"))\n )\n assertEquals(\n listOf(\n listOf(\"commonMain\"),<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.commonizer.stats\n\nimport org.jetbrains.kotlin.commonizer.CommonizerTarget\n\nfun StatsCollector(type: StatsType, targets: List): StatsCollector? {\n return when (type) {\n StatsType.RAW -> RawStatsCollector(targets)","completion":"StatsType.AGGREGATED -> AggregatedStatsCollector(targets)\n StatsType.NONE -> null\n }\n}\n\nenum class StatsType {\n RAW, AGGREGATED, NONE;\n}\n\ninterface StatsCollector {\n data class StatsKey(\n val id: String,\n val extensionReceiver: String?,\n val parameterNames: List,<|endoftext|>"} {"prompt":"override fun check(declaration: FirRegularClass, context: CheckerContext, reporter: DiagnosticReporter) {\n if (context.languageVersionSettings.doesDataClassCopyRespectConstructorVisibility()) {\n return\n }\n if (declaration.classKind != ClassKind.CLASS || !declaration.isData) {\n return\n }","completion":"val primaryConstructor = declaration.primaryConstructorIfAny(context.session) ?: return\n if (primaryConstructor.visibility == Visibilities.Public) {\n return\n }\n val isAlreadyAnnotated = declaration.hasAnnotation(StandardClassIds.Annotations.ConsistentCopyVisibility, context.session) ||<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.generators.test.evaluate\n\nimport junit.framework.TestCase\nimport org.jetbrains.kotlin.generators.evaluate.DEST_FILE\nimport org.jetbrains.kotlin.generators.evaluate.generate\nimport org.jetbrains.kotlin.test.KotlinTestUtils","completion":"class GenerateOperationsMapTest : TestCase() {\n fun testGeneratedDataIsUpToDate(): Unit {\n val text = generate()\n KotlinTestUtils.assertEqualsToFile(DEST_FILE, text)\n }\n}<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1284\n\/\/ MODULE_KIND: AMD\npackage foo\n\n@JsModule(\"lib\")\nexternal class A(x: Int = definedExternally) {\n val x: Int\n\n fun foo(y: Int): Int = definedExternally\n\n fun bar(vararg arg: String): String = definedExternally\n}\n\nclass C {","completion":"val e = arrayOf(\"e\")\n val f = arrayOf(\"f\")\n val a = A(1)\n\n fun qux() = a.bar(*e, *f)\n}\n\n\nfun box(): String {\n val a = A(23)\n assertEquals(23, a.x)\n assertEquals(65, a.foo(42))<|endoftext|>"} {"prompt":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.VariableNeverRead\n\ninternal class UselessCallOnNotNullImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.UselessCallOnNotNull\n\ninternal class ReturnNotAllowedImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"if (b != null || this.b != null) this.b.propNullableT","completion":"if (b != null || this.b != null) this.b.propNullableAny<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.backend.common.serialization.mangle\n\nimport org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.types.model.*\n\n\/**\n * A base implementation of the [KotlinMangleComputer] interface containing routines that are common for all frontends and backends.\n *","completion":"* @param Declaration A class representing a Kotlin declaration.\n * @param Type A class representing a Kotlin type.\n * @param TypeParameter A class representing a type parameter of a Kotlin class or function.\n * @param ValueParameter A class representing a value parameter declaration of a Kotlin function.\n * @param TypeParameterContainer A class representing something that can have type parameters, like a Kotlin function or class declaration.<|endoftext|>"} {"prompt":"\/\/ FILE: ClassWithExternalAnnotatedMembers.java\npublic class ClassWithExternalAnnotatedMembers {\n public String externalNotNullMethod() {\n return \"\";\n }\n}\n\n\/\/ FILE: annotations.xml\n\n \n ","completion":"<\/item>\n<\/root>\n\n\n\n\/\/ FILE: main.kt\nimport ClassWithExternalAnnotatedMembers\n\nfun test(a: ClassWithExternalAnnotatedMembers) = a.externalNotNullMethod()<|endoftext|>"} {"prompt":"append(\"(\\\"${ktType.render(position = Variance.INVARIANT)}\\\") \")\n append(base.text)\n }\n }\n })\n }\n testServices.assertions.assertEqualsToFile(testDataPath, actualText)\n }\n\n override fun configureTest(builder: TestConfigurationBuilder) {\n super.configureTest(builder)","completion":"builder.useAdditionalSourceProviders(AbstractIsDenotableTest::TestHelperProvider)\n builder.defaultDirectives {\n +ConfigurationDirectives.WITH_STDLIB\n }\n }\n\n private class TestHelperProvider(testServices: TestServices) : AdditionalSourceProvider(testServices) {\n override fun produceAdditionalFiles(globalDirectives: RegisteredDirectives, module: TestModule): List {<|endoftext|>"} {"prompt":"internal lateinit var components: FirRendererComponents\n private val printer get() = components.printer\n\n fun render(element: FirElementWithResolveState) {\n @OptIn(ResolveStateAccess::class)\n val text = when (element) {\n is FirSyntheticProperty -> \"[ ${element.resolvePhase}] \"","completion":"is FirSyntheticPropertyAccessor -> \"[ ${element.delegate.resolveState}] \"\n else -> \"[${element.resolveState}] \"\n }\n\n printer.print(text)\n }\n\n fun render(element: FirAnnotationCall) {\n printer.print(\"[${element.annotationResolvePhase}]\")\n }\n}<|endoftext|>"} {"prompt":"finallyBlock()\n }\n return res\n}\n\n\/\/ FILE: 2.kt\n\nimport test.*\n\nclass Holder {\n var value: String = \"\"\n}\n\nfun test0(h: Holder): Long {\n val localResult = doCall2 (\n {\n h.value += \"OK_NONLOCAL\"\n if (true) {\n throw RuntimeException()\n }","completion":"return 1.toLong()\n },\n {\n h.value += \", OK_EXCEPTION\"\n return 2.toLong()\n },\n {\n h.value += \", OK_FINALLY\"\n \"OK_FINALLY\"\n }, \"FAIL\")\n\n return -1.toLong()\n}\n\nfun test1(h: Holder): Long {<|endoftext|>"} {"prompt":"if (captureThisType != null) {\n StackValue.field(\n captureThisType, Type.getObjectType(v.thisName), AsmUtil.CAPTURED_THIS_FIELD,\n false, StackValue.LOCAL_0\n ).put(captureThisType, codegen.v)\n }","completion":"val isInterfaceMethod = DescriptorUtils.isInterface(suspendFunctionJvmView.containingDeclaration)\n val callableAccessorMethod =\n typeMapper.mapToCallableMethod(\n context.accessibleDescriptor(suspendFunctionJvmView.unwrapFrontendVersion(), null),\n \/\/ Obtain default impls method for interfaces\n isInterfaceMethod\n )\n\n val callableMethod =<|endoftext|>"} {"prompt":"fun buildVariable(\n parent: IrDeclarationParent?,\n startOffset: Int,\n endOffset: Int,\n origin: IrDeclarationOrigin,\n name: Name,\n type: IrType,\n isVar: Boolean = false,\n isConst: Boolean = false,\n isLateinit: Boolean = false,\n): IrVariable {\n return IrVariableImpl(\n startOffset, endOffset, origin,","completion":"IrVariableSymbolImpl(),\n name, type, isVar, isConst, isLateinit\n ).also {\n if (parent != null) {\n it.parent = parent\n }\n }\n}<|endoftext|>"} {"prompt":"packageSegments = arrayOf(\"foo\", \"bar\", \"baz\"),\n rawRelativeNameSegments = emptyList()\n ),\n TestRow(\n rawEntityId = \"My\",\n packageSegments = emptyArray(),\n rawRelativeNameSegments = listOf(\"My\")\n ),\n TestRow(\n rawEntityId = \"My.Test\",\n packageSegments = emptyArray(),","completion":"rawRelativeNameSegments = listOf(\"My\", \"Test\")\n ),\n TestRow(\n rawEntityId = \"My.Test.Class\",\n packageSegments = emptyArray(),\n rawRelativeNameSegments = listOf(\"My\", \"Test\", \"Class\")\n ),\n TestRow(\n rawEntityId = \"\/My\",\n packageSegments = emptyArray(),<|endoftext|>"} {"prompt":"private val bodyResolveComponents = createStubBodyResolveComponents(firSession)\n private val firCallCompleter = FirCallCompleter(\n bodyResolveComponents.transformer,\n bodyResolveComponents,\n )\n private val resolutionStageRunner = ResolutionStageRunner()\n\n fun resolveSingleCandidate(\n resolutionParameters: ResolutionParameters\n ): FirFunctionCall? {","completion":"val infoProvider = createCandidateInfoProvider(resolutionParameters)\n if (infoProvider.shouldFailBeforeResolve())\n return null\n\n val callInfo = infoProvider.callInfo()\n val explicitReceiverKind = infoProvider.explicitReceiverKind()\n val dispatchReceiverValue = infoProvider.dispatchReceiverValue()\n val implicitExtensionReceiverValue = infoProvider.implicitExtensionReceiverValue()<|endoftext|>"} {"prompt":"public fun WebGLContextAttributes(alpha: Boolean? = true, depth: Boolean? = true, stencil: Boolean? = false, antialias: Boolean? = true, premultipliedAlpha: Boolean? = true, preserveDrawingBuffer: Boolean? = false, preferLowPowerToHighPerformance: Boolean? = false, failIfMajorPerformanceCaveat: Boolean? = false): WebGLContextAttributes { js(\"return { alpha, depth,","completion":"stencil, antialias, premultipliedAlpha, preserveDrawingBuffer, preferLowPowerToHighPerformance, failIfMajorPerformanceCaveat<|endoftext|>"} {"prompt":"SpecialNames.UNDERSCORE_FOR_UNUSED_VAR\n } else {\n identifier.nameAsSafeName()\n }\n\n return DestructuringEntry(\n source = entry.toFirSourceElement(),\n returnTypeRef = firType ?: implicitType,\n name = name,\n annotations = annotations,\n )\n }\n\n \/**","completion":"* @see org.jetbrains.kotlin.parsing.KotlinParsing.parsePropertyComponent\n *\/\n private fun convertGetterOrSetter(\n getterOrSetter: LighterASTNode,\n propertyTypeRef: FirTypeRef,\n propertyVisibility: Visibility,\n propertySymbol: FirPropertySymbol,\n propertyModifiers: Modifier,<|endoftext|>"} {"prompt":"0x7ff8000000000000UL, 0x3fac05ed8c8adffeUL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, \n 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL,","completion":"0x3fac05ed8c8adffeUL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, \n 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0x7ff8000000000000UL, 0xc240237a93013752UL,<|endoftext|>"} {"prompt":"override fun containsAll(elements: Collection>): Boolean = elements.all { storage.contains(it.x) }\n override fun isEmpty(): Boolean = TODO()\n}\n\nfun checkBoxed(c: Collection, element: T): Boolean {\n return c.contains(element) && c.containsAll(listOf(element))\n}","completion":"fun box(): String {\n val uints = MyUIntArray(intArrayOf(0, 1, 42))\n\n if (MyUInt(42) !in uints) return \"Fail 1\"\n\n val ints = listOf(MyUInt(1), MyUInt(0))\n if (!uints.containsAll(ints)) return \"Fail 2\"<|endoftext|>"} {"prompt":"LookupSymbol(name = \"FineGrainedFirstBuild_CoarseGrainedSecondBuild_Class\", scope = \"com.example\"),\n LookupSymbol(name = \"modifiedField\", scope = \"com.example.FineGrainedFirstBuild_FineGrainedSecondBuild_Class\"),\n LookupSymbol(name = \"modifiedMethod\", scope = \"com.example.FineGrainedFirstBuild_FineGrainedSecondBuild_Class\"),","completion":"LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = \"com.example.FineGrainedFirstBuild_FineGrainedSecondBuild_Class\")\n ),\n fqNames = setOf(\n \"com.example.CoarseGrainedFirstBuild_CoarseGrainedSecondBuild_Class\",\n \"com.example.CoarseGrainedFirstBuild_FineGrainedSecondBuild_Class\",<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.gradle.targets.js.npm\n\nimport com.github.gundy.hidden.antlr.v4.runtime.tree.TerminalNode\nimport com.github.gundy.semver4j.generated.grammar.NodeSemverExpressionBaseVisitor","completion":"import com.github.gundy.semver4j.generated.grammar.NodeSemverExpressionParser\nimport com.github.gundy.semver4j.model.Version\nimport org.jetbrains.kotlin.gradle.utils.toSetOrEmpty\n\nclass NpmRangeVisitor : NodeSemverExpressionBaseVisitor>() {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.backend.common.serialization.proto.IrBlockBody as ProtoBlockBody\nimport org.jetbrains.kotlin.backend.common.serialization.proto.IrBranch as ProtoBranch\nimport org.jetbrains.kotlin.backend.common.serialization.proto.IrBreak as ProtoBreak","completion":"import org.jetbrains.kotlin.backend.common.serialization.proto.IrCall as ProtoCall\nimport org.jetbrains.kotlin.backend.common.serialization.proto.IrCatch as ProtoCatch\nimport org.jetbrains.kotlin.backend.common.serialization.proto.IrClass as ProtoClass<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ WITH_REFLECT\nimport kotlin.reflect.KCallable\n\nfun defaultsOnly(x: String = \"\") = 1\n\nfun regularAndDefaults(x1: String, x2: String = \"\") = 1\n\nfun varargs(vararg xs: String) = 1\n\nclass C(val x: String = \"\")","completion":"fun useKCallableStar(fn: KCallable<*>) {}\n\n\nfun testDefaultsOnlyStar() { useKCallableStar(::defaultsOnly) }\n\nfun testRegularAndDefaultsStar() { useKCallableStar(::regularAndDefaults) }\n\nfun testVarargsStar() { useKCallableStar(::varargs) }<|endoftext|>"} {"prompt":"val INAPPLICABLE_OPERATOR_MODIFIER: KtDiagnosticFactory1 by error1(SourceElementPositioningStrategies.OPERATOR_MODIFIER)","completion":"val NO_EXPLICIT_VISIBILITY_IN_API_MODE: KtDiagnosticFactory0 by error0(SourceElementPositioningStrategies.DECLARATION_START_TO_NAME)<|endoftext|>"} {"prompt":"spec.summary = 'CocoaPods test library'\n spec.vendored_frameworks = 'cocoapods.xcframework'\n spec.libraries = 'c++'\n spec.ios.deployment_target = '13.5'\n end\n \"\"\".trimIndent()\n\n private val publishPodspecCustomContent =\n \"\"\"","completion":"Pod::Spec.new do |spec|\n spec.name = 'CustomPod'\n spec.version = '2.0'\n spec.homepage = 'https:\/\/github.com\/JetBrains\/kotlin'\n spec.source = { :http=> ''}\n spec.authors = { 'Kotlin Dev' => 'kotlin.dev@jetbrains.com' }<|endoftext|>"} {"prompt":"assertEquals(setOf(\"foo\"), Optional.of(\"foo\").toSet())\n assertEquals(emptySet(), Optional.empty().toSet())\n\n \/\/ List element type can be a supertype\n assertEquals(setOf(\"foo\"), Optional.of(\"foo\").toSet())\n }\n\n @Test\n fun optionalAsSequence() {","completion":"assertEquals(listOf(\"foo\"), Optional.of(\"foo\").asSequence().toList())\n assertEquals(emptyList(), Optional.empty().asSequence().toList())\n\n \/\/ List element type can be a supertype\n assertEquals(listOf(\"foo\"), Optional.of(\"foo\").asSequence().toList())\n }\n}<|endoftext|>"} {"prompt":"private val assignedNames: SetMultimap = LinkedHashMultimap.create()\n\n open fun writers(variableDescriptor: VariableDescriptor): MutableSet = assignedNames[variableDescriptor.name]\n\n fun hasWriters(variableDescriptor: VariableDescriptor) = writers(variableDescriptor).isNotEmpty()","completion":"private var currentDeclaration: KtDeclaration? = null\n\n override fun visitDeclaration(declaration: KtDeclaration) {\n val previous = currentDeclaration\n if (declaration is KtDeclarationWithBody || declaration is KtClassOrObject || declaration is KtAnonymousInitializer) {\n currentDeclaration = declaration\n }\n super.visitDeclaration(declaration)<|endoftext|>"} {"prompt":"`.B19.``.C19.``.D19.``\"), DEBUG_INFO_SMARTCAST!>a.B19.C19.D19.equals(null)","completion":"`.B19.``.C19.``.D19.``\"), DEBUG_INFO_SMARTCAST!>a.B19.C19.D19.propT<|endoftext|>"} {"prompt":"parcelableClass: ClassDescriptor,\n parcelableCreatorClassType: KotlinType,\n creatorClass: ClassDescriptorImpl,\n parcelerObject: ClassDescriptor?\n ) {\n val builtIns = parcelableClass.builtIns\n val parcelableAsmType = codegen.typeMapper.mapType(parcelableClass)","completion":"val overriddenFunction = parcelableCreatorClassType.findFunction(NEW_ARRAY)\n ?: error(\"Can't resolve 'android.os.Parcelable.Creator.${NEW_ARRAY.methodName}' method\")\n createMethod(creatorClass, NEW_ARRAY, Modality.FINAL,\n builtIns.getArrayType(Variance.INVARIANT, parcelableClass.defaultType),<|endoftext|>"} {"prompt":"DEBUG_INFO_SMARTCAST!>a) {","completion":"a\n b\n b.equals(null)<|endoftext|>"} {"prompt":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.DataClassVarargParameter\n\ninternal class DataClassNotPropertyParameterImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.DataClassNotPropertyParameter\n\ninternal class AnnotationArgumentKclassLiteralOfTypeParameterErrorImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"return callablesGenerator.createIrVariable(variable, irParent, givenOrigin).also {\n localStorage.putVariable(variable, it.symbol)\n }\n }\n\n fun getIrValueSymbol(firVariableSymbol: FirVariableSymbol<*>): IrSymbol {\n return when (val firDeclaration = firVariableSymbol.fir) {","completion":"is FirEnumEntry -> classifierStorage.getIrEnumEntrySymbol(firDeclaration)\n\n is FirValueParameter -> localStorage.getParameter(firDeclaration)\n ?: getIrVariableSymbol(firDeclaration) \/\/ catch parameter is FirValueParameter in FIR but IrVariable in IR\n\n else -> getIrVariableSymbol(firDeclaration)\n }\n }<|endoftext|>"} {"prompt":"scriptCompilationConfiguration: ScriptCompilationConfiguration\n ) {\n data[script to scriptCompilationConfiguration.notTransientData] = compiledScript\n _storedScripts++\n }\n}\n\nprivate class FileBasedScriptCache(val baseDir: File) : ScriptingCacheWithCounters {\n\n override fun get(script: SourceCode, scriptCompilationConfiguration: ScriptCompilationConfiguration): CompiledScript? {","completion":"val file = File(baseDir, uniqueScriptHash(script, scriptCompilationConfiguration))\n return if (!file.exists()) null else file.readCompiledScript().also { retrievedScripts++ }\n }\n\n override fun store(\n compiledScript: CompiledScript,\n script: SourceCode,\n scriptCompilationConfiguration: ScriptCompilationConfiguration\n ) {<|endoftext|>"} {"prompt":"add(\"Results are not equal for $testName: $r1 vs $r2\")\n } else if (r1.isSuccess) {\n if (r1.getOrNull()?.descriptor != r2.getOrNull()?.descriptor)\n add(\"Not equal descriptors: $r1 vs $r2\")\n }\n}\n\nfun box(): String {","completion":"val res = buildList {\n \/\/ Check that all variations of @Serializable do not change result of lookup\n isIntrinsicEqual(\"ByDefault\")\n isIntrinsicEqual<@Serializable(NotDefaultSerializer::class) ByDefault>(\"@Serializable(with) ByDefault\")\n isIntrinsicEqual(\"typealias NotDefault\")<|endoftext|>"} {"prompt":"callsInPlace(block, InvocationKind.EXACTLY_ONCE)\n }\n return block()\n}\n\nfun indefiniteVarReassignment(n: Int) {\n var x: Int\n repeat(n) {\n myRun { x = 42 }\n }\n x.inc()\n}","completion":"fun nonAnonymousLambdas() {\n \/\/ Named lambdas are not inlined, even in theory it could be done for some simple cases as this one\n var x: Int\n val initializer = { x = 42 }\n myRun(initializer)\n x.inc()\n}\n\nfun branchingIndetermineFlow(a: Any) {<|endoftext|>"} {"prompt":"internal object MultiplatformLayoutV2AndroidStyleSourceDirUsageChecker : KotlinAndroidSourceSetLayoutChecker {\n\n override fun checkCreatedSourceSet(\n diagnosticsCollector: KotlinToolingDiagnosticsCollector,\n target: KotlinAndroidTarget,\n layout: KotlinAndroidSourceSetLayout,\n kotlinSourceSet: KotlinSourceSet,","completion":"@Suppress(\"TYPEALIAS_EXPANSION_DEPRECATION\") androidSourceSet: DeprecatedAndroidSourceSet\n ) {\n if (target.project.kotlinPropertiesProvider.ignoreMppAndroidSourceSetLayoutV2AndroidStyleDirs) return\n val projectRoot = target.project.rootDir<|endoftext|>"} {"prompt":"override fun foo4(d: Array) { }\n}\n\nabstract class D : Java3 \/\/Kotlin \u2190 Java \u2190 Kotlin \u2190 Java\n\nclass E : Java3 { \/\/Kotlin \u2190 Java \u2190 Kotlin \u2190 Java with explicit override\n override fun foo(a: MutableList?) { }","completion":"override fun bar(): MutableList {\n return mutableListOf()\n }\n\n override fun foo2(c: MutableSet?) { }\n override fun bar2(): MutableSet {\n return mutableSetOf()\n }\n\n override fun foo3(d: IntArray?) { }\n override fun bar3(): IntArray {<|endoftext|>"} {"prompt":"\"FirDeclaration.psi (${this::class.simpleName}) should be KtDeclaration but was ${psi::class.simpleName}\",\n fir = this,\n psi = psi,\n )\n }\n }\n\ninternal val FirDeclaration.containingKtFileIfAny: KtFile?\n get() = psi?.containingFile as? KtFile","completion":"internal fun KtDeclaration.isNonAnonymousClassOrObject() =\n this is KtClassOrObject\n && !this.isObjectLiteral()<|endoftext|>"} {"prompt":"\")!>select(A2(), id { a, b, c -> a;","completion":"b; c<|endoftext|>"} {"prompt":"const val shortVal = 2.toShort()\nconst val intVal = 2\nconst val longVal = 2L\nconst val floatVal = 2.0f","completion":"const val doubleVal = 2.0\n\nconst val compareTo1 = oneVal.compareTo(twoVal)\nconst val compareTo2 = twoVal.compareTo(twoVal)<|endoftext|>"} {"prompt":"hasRequiredFields = true\n true\n }\n else -> {\n println(\" = $defaultValue\")\n true\n }\n }\n return needNewLine to hasRequiredFields\n }\n\n private fun SmartPrinter.printDeprecationOnUselessFieldIfNeeded(\n field: AbstractField<*>,\n builder: Builder,","completion":"fieldIsUseless: Boolean,\n ) {\n if (fieldIsUseless) {\n println(\n \"@Deprecated(\\\"Modification of '\",\n field.name,\n \"' has no impact for \",\n builder.typeName,\n \"\\\", level = DeprecationLevel.HIDDEN)\",\n )\n }\n }\n\n context(ImportCollector)<|endoftext|>"} {"prompt":"0x1770, 0x1772, 0x1774, 0x1780, 0x17b4, 0x17b7, 0x17be, 0x17c4, 0x17c9, 0x17d4, 0x17d5, 0x17da, 0x17dd, 0x17e0, 0x17ea, 0x17f0, 0x17fa,","completion":"0x1800, 0x1804, 0x1809,<|endoftext|>"} {"prompt":"\/\/ BODY_RESOLVE\npackage util\n\n@Target(AnnotationTarget.TYPE)\nannotation class Anno(val str: String)\n\nconst val prop = \"str\"\nfun bar(): @Anno(\"bar $prop\") List<@Anno(\"nested bar $prop\") Collection<@Anno(\"nested nested bar $prop\") Int>>? = null\n\nfun foo() {\n class Local {","completion":"fun doo() = foo()\n fun foo() = bar()\n fun baz() = foo()\n }\n}<|endoftext|>"} {"prompt":"val DOCUMENT_TYPE_NODE: Short\n val DOCUMENT_FRAGMENT_NODE: Short\n val NOTATION_NODE: Short\n val DOCUMENT_POSITION_DISCONNECTED: Short\n val DOCUMENT_POSITION_PRECEDING: Short\n val DOCUMENT_POSITION_FOLLOWING: Short\n val DOCUMENT_POSITION_CONTAINS: Short","completion":"val DOCUMENT_POSITION_CONTAINED_BY: Short\n val DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: Short\n }\n}\n\n\/**\n * Exposes the JavaScript [HTMLProgressElement](https:\/\/developer.mozilla.org\/en\/docs\/Web\/API\/HTMLProgressElement) to Kotlin\n *\/\npublic external abstract class HTMLProgressElement : HTMLElement, JsAny {<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.codegen.range\n\nimport org.jetbrains.kotlin.codegen.ExpressionCodegen\nimport org.jetbrains.kotlin.codegen.generateCallReceiver\nimport org.jetbrains.kotlin.codegen.generateCallSingleArgument","completion":"import org.jetbrains.kotlin.codegen.range.forLoop.IteratorForLoopGenerator\nimport org.jetbrains.kotlin.codegen.range.inExpression.InContinuousRangeOfComparableExpressionGenerator\nimport org.jetbrains.kotlin.descriptors.CallableDescriptor\nimport org.jetbrains.kotlin.psi.KtForExpression<|endoftext|>"} {"prompt":"if (PREFIX + MAX_LONG != ((PREFIX as String?)::plus)(Long.MAX_VALUE)) return \"fail \\\"$PREFIX\\\"?::plus\"\n\/\/ if (PREFIX + MAX_LONG != prefixNPlus(Long.MAX_VALUE)) return \"fail prefixNPlus(Long.MAX_VALUE)\"","completion":"\/\/ if (PREFIX + MAX_LONG != customToString(Long.MAX_VALUE, (PREFIX as String?)::plus)) return \"fail customToString(Long.MAX_VALUE, \\\"$PREFIX\\\"?::plus)\"\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"expectFailure(linkage(\"Function 'getInterfaceToEnumClassImpl' can not be called: Function uses class 'InterfaceToEnumClassImpl' that inherits from final enum class 'InterfaceToEnumClass'\")) { getInterfaceToEnumClassImpl() }","completion":"expectFailure(linkage(\"Constructor 'InterfaceToEnumClassImpl.' can not be called: Class 'InterfaceToEnumClassImpl' inherits from final enum class 'InterfaceToEnumClass'\")) { getInterfaceToEnumClassImplAsAny() }<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/ !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_ANONYMOUS_PARAMETER\n\n\/\/ FILE: A.java\nimport java.util.Comparator;\n\npublic class A {\n public A(Comparator comparator) {}\n}\n\n\/\/ FILE: main.kt\n\nfun foo() {","completion":"val result: A = A { x, y -> 1 }\n}<|endoftext|>"} {"prompt":"values()\n }\n }\n\n}\n\n\n\/\/ FILE: TestCase4.kt\n\/\/ TESTCASE NUMBER: 4\npackage testsCase4\n\nopen class A {\n operator fun invoke(value: String) = print(\"invoke $value\")","completion":"}\n\ninterface Super_0 {\n object valueOf : A()\n\n private fun case() {\n valueOf(\"\")\n }\n}\n\nopen class Super_1 : Super_0 {\n object valueOf : A() {}<|endoftext|>"} {"prompt":"import kotlin.test.*\n\ninterface I1 {\n fun foo(x: T): String\n}\ninterface I2 {\n fun foo(x: T): String\n}\nclass C : I1, I2 {\n override fun foo(x: String) = \"I1.foo($x)\"","completion":"override fun foo(x: Int) = \"I2.foo($x)\"\n}\n\nfun box(): String {\n val c = C()\n val i1: I1 = c\n assertEquals(\"I1.foo(str)\", i1.foo(\"str\"))\n val i2: I2 = c<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.types.IrType\nimport org.jetbrains.kotlin.name.Name\n\nclass Fir2IrLazyTypeAlias(\n c: Fir2IrComponents,\n override val startOffset: Int,\n override val endOffset: Int,\n override var origin: IrDeclarationOrigin,\n override val fir: FirTypeAlias,","completion":"override val symbol: IrTypeAliasSymbol,\n override var parent: IrDeclarationParent\n) : IrTypeAlias(), AbstractFir2IrLazyDeclaration, Fir2IrTypeParametersContainer, Fir2IrComponents by c {\n init {\n symbol.bind(this)\n classifierStorage.preCacheTypeParameters(fir)\n }<|endoftext|>"} {"prompt":"declarationProvider: PackageMemberDeclarationProvider,\n result: MutableSet\n ) {\n }\n\n fun generateSyntheticMethods(\n thisDescriptor: ClassDescriptor,\n name: Name,\n bindingContext: BindingContext,\n fromSupertypes: List,\n result: MutableCollection","completion":") {\n }\n\n fun generateSyntheticProperties(\n thisDescriptor: ClassDescriptor,\n name: Name,\n bindingContext: BindingContext,\n fromSupertypes: ArrayList,\n result: MutableSet\n ) {\n }\n\n fun generateSyntheticSecondaryConstructors(<|endoftext|>"} {"prompt":"* - specific extension -> all extension instances: extension accessor on `FirExtensionService`\n * - all declarations matching extension with predicate -> FirPredicateBasedProvider.getSymbolsByPredicate\n * - all specific extensions interested in specific declaration -> TODO with StateMachine\n *\/\nabstract class FirExtension(val session: FirSession) {\n abstract val name: FirExtensionPointName","completion":"abstract val extensionType: KClass\n\n fun interface Factory {\n fun create(session: FirSession): P\n }\n\n open fun FirDeclarationPredicateRegistrar.registerPredicates() {}\n}\n\ndata class FirExtensionPointName(val name: Name) {<|endoftext|>"} {"prompt":"override fun shouldKeepTypeVariableBasedType(marker: TypeVariableTypeConstructorMarker, isK2: Boolean): Boolean = isK2\n\n object SaveAnonymousTypes : PublicDeclaration(localTypes = false, anonymous = false)\n object ApproximateAnonymousTypes : PublicDeclaration(localTypes = false, anonymous = true)\n }","completion":"sealed class AbstractCapturedTypesApproximation(val approximatedCapturedStatus: CaptureStatus?) :\n AllFlexibleSameValue() {\n override val allFlexible: Boolean get() = true\n override val errorType: Boolean get() = true\n\n \/\/ i.e. will be approximated only approximatedCapturedStatus captured types<|endoftext|>"} {"prompt":"boundSymbol = WeakPair(session, symbol)\n}\n\n@SymbolInternals\nfun ConeClassLikeLookupTag.toFirRegularClass(session: FirSession): FirRegularClass? = toFirRegularClassSymbol(session)?.fir\n\nfun FirSymbolProvider.getSymbolByLookupTag(lookupTag: ConeClassifierLookupTag): FirClassifierSymbol<*>? {","completion":"return lookupTag.toSymbol(session)\n}\n\nfun FirSymbolProvider.getSymbolByLookupTag(lookupTag: ConeClassLikeLookupTag): FirClassLikeSymbol<*>? {\n return lookupTag.toSymbol(session)\n}<|endoftext|>"} {"prompt":"private fun IrExpression.unwrapSingleExpressionBlock(): IrExpression =\n (this as? IrBlock)?.statements?.singleOrNull() as? IrExpression ?: this\n\n override fun visitWhen(expression: IrWhen, data: IrDeclaration?): IrExpression {\n val isCompilerGenerated = expression.origin == null\n expression.transformChildren(this, data)","completion":"\/\/ Remove all branches with constant false condition.\n expression.branches.removeIf {\n it.condition.isFalseConst() && isCompilerGenerated\n }\n if (expression.origin == IrStatementOrigin.ANDAND) {\n assert(\n expression.type.isBoolean()\n && expression.branches.size == 2\n && expression.branches[1].condition.isTrueConst()<|endoftext|>"} {"prompt":"* Returns an average value of elements in the array.\n *\/\n@kotlin.jvm.JvmName(\"averageOfInt\")\npublic fun Array.average(): Double {\n var sum: Double = 0.0\n var count: Int = 0\n for (element in this) {\n sum += element\n ++count\n }\n return if (count == 0) Double.NaN else sum \/ count","completion":"}\n\n\/**\n * Returns an average value of elements in the array.\n *\/\n@kotlin.jvm.JvmName(\"averageOfLong\")\npublic fun Array.average(): Double {\n var sum: Double = 0.0\n var count: Int = 0\n for (element in this) {\n sum += element\n ++count\n }<|endoftext|>"} {"prompt":"\/\/ FILE: Base_ShouldBeOpen.java\nimport org.jetbrains.kotlin.fir.plugin.AllOpen2;\n\n@AllOpen2\npublic abstract class Base_ShouldBeOpen {\n public void baseMethod() {}\n}\n\n\/\/ FILE: Intf.java\nimport org.jetbrains.kotlin.fir.plugin.AllOpen2;\n\n@AllOpen2\npublic interface Intf {","completion":"void intfMethod();\n}\n\n\/\/ FILE: main.kt\nopen class BaseImpl : Base_ShouldBeOpen() {\n fun baseImplMethod_ShouldBeOpen() {}\n}\n\nclass BaseImpl2_ShouldBeOpen : BaseImpl() {\n fun baseImpl2Method_ShouldBeOpen() {}\n val baseImpl2Property_ShouldBeOpen = \"\"\n}\n\nopen class IntfImpl : Intf {<|endoftext|>"} {"prompt":"@Another.Foo class ClassMarkedWithBar {\n class NonMarkedClass {\n class NonMarkedClass\n @Foo class ClassMarkedWithFoo\n @Bar class ClassMarkedWithAnotherFoo\n @Another.Foo class ClassMarkedWithBar\n @Another.Bar class ClassMarkedWithAnotherBar\n }\n @Foo class ClassMarkedWithFoo","completion":"@Bar class ClassMarkedWithAnotherFoo\n @Another.Foo class ClassMarkedWithBar\n @Another.Bar class ClassMarkedWithAnotherBar\n}\n@Another.Bar class ClassMarkedWithAnotherBar {\n class NonMarkedClass {\n class NonMarkedClass\n @Foo class ClassMarkedWithFoo\n @Bar class ClassMarkedWithAnotherFoo<|endoftext|>"} {"prompt":"val dependencyProfiles = this.propertyList(\"dependencyProfiles\")\n return dependencies.map { dependency ->\n dependency to dependencyProfiles.flatMap { profile ->\n val candidateSpecs = propertyList(\"$dependency.$profile\")\n if (profile == \"default\" && candidateSpecs.isEmpty()) {\n listOf(DependencySource.Remote.Public)\n } else {","completion":"candidateSpecs.map { candidateSpec ->\n when (candidateSpec) {\n \"remote:public\" -> DependencySource.Remote.Public\n \"remote:internal\" -> DependencySource.Remote.Internal\n else -> DependencySource.Local(File(candidateSpec))\n }\n }\n }\n }\n }.toMap()\n}<|endoftext|>"} {"prompt":"val fields: MutableList = mutableListOf()\n var materializedElement: Element? = null\n\n override val allFields: List by lazy {\n mutableSetOf().apply {\n parents.forEach { this += it.allFields }\n this += fields\n }.toList()\n }","completion":"override val uselessFields: List = emptyList()\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.testbase.*\nimport org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet\nimport org.junit.jupiter.api.Disabled\nimport org.junit.jupiter.api.DisplayName\nimport org.junit.jupiter.api.io.TempDir\nimport java.nio.file.Path","completion":"import java.util.zip.ZipFile\nimport kotlin.io.path.*\n\n@JvmGradlePluginTests\n@DisplayName(\"KGP simple tests\")\nclass SimpleKotlinGradleIT : KGPBaseTest() {\n\n @GradleTest\n @DisplayName(\"On second run common tasks should be up-to-date\")\n fun testSimpleCompile(gradleVersion: GradleVersion) {<|endoftext|>"} {"prompt":"Renderers.TO_STRING\n )\n MAP.put(\n ComposeErrors.COMPOSE_APPLIER_PARAMETER_MISMATCH,\n \"A {0} composable parameter was provided where a {1} composable was expected\",\n Renderers.TO_STRING,\n Renderers.TO_STRING\n )\n MAP.put(","completion":"ComposeErrors.COMPOSE_APPLIER_DECLARATION_MISMATCH,\n \"The composition target of an override must match the ancestor target\"\n )\n MAP.put(\n ComposeErrors.COMPOSE_INVALID_DELEGATE,\n \"Composable setValue operator is not currently supported.\"\n )\n MAP.put(<|endoftext|>"} {"prompt":"}\n\n fun execute(closure: Closure<*>) = executeClosure(closure)\n}\n\nopen class KaptJavacOptionsDelegate: KaptJavacOption {\n internal val options = LinkedHashMap()\n\n override fun option(name: Any, value: Any) {\n options.put(name.toString(), value.toString())\n }","completion":"override fun option(name: Any) {\n options.put(name.toString(), \"\")\n }\n\n fun execute(closure: Closure<*>) = executeClosure(closure)\n}\n\nprivate fun Any?.executeClosure(closure: Closure<*>) {\n closure.resolveStrategy = Closure.DELEGATE_FIRST\n closure.delegate = this\n closure.call()<|endoftext|>"} {"prompt":"val cl: @Composable () -> Unit = identity { A() }\n \"\"\")\n }\n\n @Test\n fun testGenericComposableInference4() {\n assumeTrue(useFir)\n check(\"\"\"\n import androidx.compose.runtime.Composable\n\n fun identity(value: T): T = value","completion":"\/\/ We should infer `T` as `Function0` from the context and\n \/\/ reject the lambda which is explicitly typed as `ComposableFunction...`.\n val cl: () -> Unit = identity(@Composable {})\n \"\"\")\n }\n\n @Test\n fun testGenericComposableInference5() {<|endoftext|>"} {"prompt":"val source = this@constructFunctionTypeRef.source?.fakeElement(KtFakeSourceElementKind.ImplicitTypeRef)\n return if (diagnostic == null) {\n buildResolvedTypeRef {\n this.source = source\n this.type = type\n }\n } else {\n buildErrorTypeRef {\n this.source = source\n this.type = type\n this.diagnostic = diagnostic","completion":"}\n }\n}\n\nfun createFunctionType(\n kind: FunctionTypeKind,\n parameters: List,\n receiverType: ConeKotlinType?,\n rawReturnType: ConeKotlinType,\n contextReceivers: List = emptyList(),\n): ConeLookupTagBasedType {<|endoftext|>"} {"prompt":"NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>references[1] = references[index]<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: JS_IR\n\/\/ TARGET_BACKEND: JS_IR_ES6\n\/\/ EXPECTED_REACHABLE_NODES: 1238\n\/\/ FILE: bar.kt\n@file:JsQualifier(\"bar\")\npackage bar\n\nexternal interface Bar {\n companion object {\n fun ok(): String\n }\n}\n\n\/\/ FILE: test.kt\nimport bar.Bar","completion":"fun box(): String {\n return Bar.ok()\n}\n\n\/\/ FILE: test.js\nvar bar = function() {\n var Bar = {\n ok() {\n return \"OK\"\n }\n };\n return {\n Bar: Bar\n }\n}();<|endoftext|>"} {"prompt":"$i$a$-f1-LibraryKt$foo$10\\96\\573\\56:int=0:int, $i$f$test\\97\\563:int=0:int","completion":"\/\/ library.kt:58 box: $i$f$foo\\56\\65:int=0:int, array\\56:java.lang.Integer[]=java.lang.Integer[], myClass\\56:MyClass=MyClass, this_\\94:MyClass=MyClass, $i$f$f1\\94\\563:int=0:int,<|endoftext|>"} {"prompt":"fun test4(): @setparam:Suppress Int = TODO()\nfun test5(i: (@setparam:Suppress Int) -> Unit) {}","completion":"fun ((@setparam:Suppress Int) -> Unit).test6() {}\n\nfun test7(): ((@setparam:Suppress Int) -> Unit) = TODO()<|endoftext|>"} {"prompt":"public inline val RequestDestination.Companion.MEDIA: RequestDestination get() = \"media\".asDynamic().unsafeCast()\n\npublic inline val RequestDestination.Companion.OBJECT: RequestDestination get() = \"object\".asDynamic().unsafeCast()","completion":"public inline val RequestDestination.Companion.REPORT: RequestDestination get() = \"report\".asDynamic().unsafeCast()\n\npublic inline val RequestDestination.Companion.SCRIPT: RequestDestination get() = \"script\".asDynamic().unsafeCast()<|endoftext|>"} {"prompt":"tasks.named(\"testPublicPackageJson\") {\n enabled = false\n }\n \"\"\".trimIndent()\n }\n\n build(\"assemble\") {\n assertTasksExecuted(\":app:packageJson\")\n assertTasksExecuted(\":base:packageJson\")\n assertTasksExecuted(\":lib:packageJson\")\n }\n\n build(\"check\") {","completion":"assertTasksUpToDate(\":app:packageJson\")\n assertTasksUpToDate(\":base:packageJson\")\n assertTasksUpToDate(\":lib:packageJson\")\n\n assertTasksSkipped(\":app:testPackageJson\")\n assertTasksExecuted(\":lib:testPackageJson\")\n assertTasksExecuted(\":base:testPackageJson\")\n }<|endoftext|>"} {"prompt":"arrayOf(upperBound ?: Any::class.java)\n\n override fun getLowerBounds(): Array =\n if (lowerBound == null) emptyArray() else arrayOf(lowerBound)\n\n override fun getTypeName(): String = when {\n lowerBound != null -> \"? super ${typeToString(lowerBound)}\"","completion":"upperBound != null && upperBound != Any::class.java -> \"? extends ${typeToString(upperBound)}\"\n else -> \"?\"\n }\n\n override fun equals(other: Any?): Boolean =\n other is WildcardType && upperBounds.contentEquals(other.upperBounds) && lowerBounds.contentEquals(other.lowerBounds)\n\n override fun hashCode(): Int =<|endoftext|>"} {"prompt":"for (o1 in o) {\n }","completion":"o[1]\n o[1] = o\n val (o2) = o<|endoftext|>"} {"prompt":"\/\/ Inferring lambda parameter types by other specified lambda parameters; expected type is a functional type with type variables in parameter types\n takeLambdas({ it }, { x: Int -> }, { x: Nothing -> x })","completion":"takeLambdas({ it }, { } as (Int) -> Unit, { x: Nothing -> x })\n takeLambdas({ it }, { } as (Nothing) -> Unit, { x: Int -> x })<|endoftext|>"} {"prompt":"override fun testGood(x: Any) { assertIs(x, x is Function15<*, *, *, *, *, *, *, *, *, *, *, *, *, *, *, *>) }","completion":"override fun testBad(x: Any) { assertIsNot(x, x !is Function15<*, *, *, *, *, *, *, *, *, *, *, *, *, *, *, *>) }\n}<|endoftext|>"} {"prompt":"}\n\n override fun replaceReceiverParameter(newReceiverParameter: FirReceiverParameter?) {\n receiverParameter = newReceiverParameter\n }\n\n override fun replaceDeprecationsProvider(newDeprecationsProvider: DeprecationsProvider) {\n deprecationsProvider = newDeprecationsProvider\n }","completion":"override fun replaceContextReceivers(newContextReceivers: List) {\n contextReceivers = newContextReceivers.toMutableOrEmpty()\n }\n\n override fun replaceDelegate(newDelegate: FirExpression?) {\n delegate = newDelegate\n }\n\n override fun replaceGetter(newGetter: FirPropertyAccessor?) {<|endoftext|>"} {"prompt":"}.toMap()\n\n val substitutor = substitutorByMap(substitution, session)\n val substitutedType = substitutor.substituteOrSelf(originalFirDeclaration.returnTypeRef.coneType)\n callTypeCanBeNullable = Fir2IrImplicitCastInserter.typeCanBeEnhancedOrFlexibleNullable(substitutedType, session)","completion":"substitutedType.toIrType(c, typeOrigin)\n }\n true -> {\n callTypeCanBeNullable = false\n irBuiltIns.unitType\n }\n }\n\n val irCall = IrCallImpl(\n startOffset,\n endOffset,\n callReturnType,\n originalFunctionSymbol,\n originalFirDeclaration.typeParameters.size,<|endoftext|>"} {"prompt":"val l1: ICLong by Delegate { ICLong(22) }\n val o1: ICOverIC by Delegate { ICOverIC(ICLong(33)) }\n\n var i2 by Delegate { ICInt(0) }\n var l2 by Delegate { ICLong(0) }\n var o2 by Delegate { ICOverIC(ICLong(0)) }\n}","completion":"fun box(): String {\n if (Demo.i0.i != 1) return \"Fail 1\"\n if (Demo.l0.l != 2L) return \"Fail 2\"\n if (Demo.o0.o.l != 3L) return \"Fail 3\"\n\n if (Demo.i1.i != 11) return \"Fail 2 1\"<|endoftext|>"} {"prompt":"at MyTest.foo (\/Users\/user\/repos\/check-kotlin-js-test\/src\/test\/kotlin\/MyTest.kt:7:8)","completion":"at Context. (\/Users\/user\/repos\/check-kotlin-js-test\/build\/js\/packages\/check-kotlin-js-test-test\/adapter.js:53115:31)\"\"\".trimIndent()\n\n assertEquals(\n expected,\n processKarmaStackTrace(stackTrace)\n )\n }\n\n @Test<|endoftext|>"} {"prompt":"foo()\n this.foo()","completion":"this@Case1.foo()\n }\n }\n}<|endoftext|>"} {"prompt":"class AndroidExtensionPropertiesComponentContainerContributor : StorageComponentContainerContributor {\n override fun registerModuleComponents(\n container: StorageComponentContainer, platform: TargetPlatform, moduleDescriptor: ModuleDescriptor\n ) {\n if (platform.isJvm()) {\n container.useInstance(AndroidExtensionPropertiesCallChecker())\n }\n }\n}","completion":"class ParcelizeDeclarationCheckerComponentContainerContributor : StorageComponentContainerContributor {\n override fun registerModuleComponents(\n container: StorageComponentContainer, platform: TargetPlatform, moduleDescriptor: ModuleDescriptor\n ) {\n if (platform.isJvm()) {\n container.useInstance(ParcelableDeclarationChecker())\n container.useInstance(ParcelableAnnotationChecker())\n }<|endoftext|>"} {"prompt":"\/\/ test.kt:18 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String=\"\":java.lang.String, d:char=0:char\n\/\/ test.kt:8 getArrayOfA:","completion":"\/\/ test.kt:18 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String=\"\":java.lang.String, d:char=0:char<|endoftext|>"} {"prompt":"if (atomicfu_compareAndSet(cur, upd, `atomicfu$getter`, `atomicfu$setter`)) return\n }\n}\n\ninternal inline fun atomicfu_getAndUpdate(function: (T) -> T, `atomicfu$getter`: () -> T, `atomicfu$setter`: (T) -> Unit): T {\n while (true) {","completion":"val cur = `atomicfu$getter`()\n val upd = function(cur)\n if (atomicfu_compareAndSet(cur, upd, `atomicfu$getter`, `atomicfu$setter`)) return cur\n }\n}<|endoftext|>"} {"prompt":")\n super.applySpecificArgs(argsBuilder)\n }\n\n override fun applyDependencies(argsBuilder: ArgsBuilder): Unit = with(argsBuilder) {\n super.applyDependencies(argsBuilder)\n addFlattened(dependencies.libraries) { library -> listOf(\"-l\", library.path) }\n }\n}","completion":"internal class GivenLibraryCompilation(givenArtifact: KLIB) : TestCompilation() {\n override val result = TestCompilationResult.Success(givenArtifact, LoggedData.NoopCompilerCall(givenArtifact.klibFile))\n}\n\ninternal class CInteropCompilation(\n targets: KotlinNativeTargets,\n classLoader: KotlinNativeClassLoader,<|endoftext|>"} {"prompt":"IdeJvmAndAndroidPlatformBinaryDependencyResolver(project).resolve(kotlin.sourceSets.getByName(\"jvmAndAndroidMain\"))\n .assertMatches(jvmAndAndroidDependencies)\n\n IdeJvmAndAndroidPlatformBinaryDependencyResolver(project).resolve(kotlin.sourceSets.getByName(\"jvmAndAndroidTest\"))","completion":".assertMatches(jvmAndAndroidDependencies)\n }\n\n @Test\n fun `test - project to multiplatform project dependency`() {\n val root = buildProject { setMultiplatformAndroidSourceSetLayoutVersion(2) }\n val producer = buildProject({ withParent(root).withName(\"producer\") }) { configureAndroidAndMultiplatform() }<|endoftext|>"} {"prompt":"if (v != null || this.v != null) this.v.funAny()","completion":"if (v != null || this.v != null) this.v.funNullableT()<|endoftext|>"} {"prompt":"if (subType.isMarkedNullable() && !superType.isMarkedNullable()) return false\n\n return AbstractStrictEqualityTypeChecker.strictEqualTypes(\n this,\n subType.withNullability(false),\n superType.withNullability(false)\n )\n }","completion":"if (subType.isStubTypeForBuilderInference() && superType.isStubTypeForBuilderInference())\n return isStubTypeSubtypeOfAnother(subType, superType) || state.isStubTypeEqualsToAnything\n\n if (subType.isStubType() || superType.isStubType())\n return state.isStubTypeEqualsToAnything<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.declarations.IrModuleFragment\nimport org.jetbrains.kotlin.ir.types.IrTypeSystemContextImpl\nimport org.jetbrains.kotlin.ir.util.*\nimport org.jetbrains.kotlin.library.IrLibrary\nimport org.jetbrains.kotlin.library.KotlinAbiVersion","completion":"import org.jetbrains.kotlin.library.KotlinLibrary\nimport org.jetbrains.kotlin.library.containsErrorCode\nimport org.jetbrains.kotlin.utils.memoryOptimizedMap\n\nclass JsIrLinker(\n private val currentModule: ModuleDescriptor?, messageLogger: IrMessageLogger, builtIns: IrBuiltIns, symbolTable: SymbolTable,<|endoftext|>"} {"prompt":"reporter.reportOn(declaration.source, FirJsErrors.EXTERNAL_TYPE_EXTENDS_NON_EXTERNAL_TYPE, context)\n }\n }\n\n if (!isEffectivelyExternal) {\n val fakeOverriddenMethod = declaration.findFakeMethodOverridingExternalWithOptionalParams(context)\n\n if (fakeOverriddenMethod != null) {","completion":"reporter.reportOn(\n declaration.source, FirJsErrors.OVERRIDING_EXTERNAL_FUN_WITH_OPTIONAL_PARAMS_WITH_FAKE,\n fakeOverriddenMethod, context\n )\n }\n }\n\n if (\n !context.languageVersionSettings.supportsFeature(LanguageFeature.JsAllowImplementingFunctionInterface) &&<|endoftext|>"} {"prompt":"task.compilerOptions.freeCompilerArgs.zip(task.modeProperty) { freeArgs, mode ->\n freeArgs.toMutableList().apply {\n commonJsAdditionalCompilerFlags(compilation)\n\n when (mode) {\n KotlinJsBinaryMode.PRODUCTION -> {\n configureOptions(\n compilation,\n ENABLE_DCE,","completion":"MINIMIZED_MEMBER_NAMES\n )\n }\n\n KotlinJsBinaryMode.DEVELOPMENT -> {\n configureOptions(\n compilation\n )\n }\n else -> throw InvalidUserDataException(\n \"Unknown KotlinJsBinaryMode to configure the build: $mode\"\n )\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.codegen.optimization.common.removeAll\nimport org.jetbrains.kotlin.codegen.optimization.fixStack.peek\nimport org.jetbrains.kotlin.codegen.optimization.fixStack.top\nimport org.jetbrains.kotlin.codegen.optimization.transformer.MethodTransformer","completion":"import org.jetbrains.org.objectweb.asm.Opcodes\nimport org.jetbrains.org.objectweb.asm.Type\nimport org.jetbrains.org.objectweb.asm.tree.*\nimport org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue\nimport org.jetbrains.org.objectweb.asm.tree.analysis.Frame<|endoftext|>"} {"prompt":"if (!(element5 !in 1.0..3.0) != range0.contains(element5)) throw AssertionError()\n}\n\nfun testR0xE6() {\n \/\/ with possible local optimizations\n if (2F in 1.0..3.0 != range0.contains(2F)) throw AssertionError()","completion":"if (2F !in 1.0..3.0 != !range0.contains(2F)) throw AssertionError()\n if (!(2F in 1.0..3.0) != !range0.contains(2F)) throw AssertionError()\n if (!(2F !in 1.0..3.0) != range0.contains(2F)) throw AssertionError()<|endoftext|>"} {"prompt":"* by substituting format specifiers in the format string with the provided arguments,\n * using the default locale.\n *\n * See [java.util.Formatter] class documentation\n * for the syntax of format specifiers for the format string.\n *\n * @sample samples.text.Strings.formatStatic\n *\/\n@kotlin.internal.InlineOnly","completion":"public inline fun String.Companion.format(format: String, vararg args: Any?): String = java.lang.String.format(format, *args)\n\n\/**\n * Uses this string as a format string and returns a string obtained\n * by substituting format specifiers in the format string with the provided arguments,\n * using the specified locale. If [locale] is `null` then no localization is applied.\n *<|endoftext|>"} {"prompt":"return s;\n}\n\nunsigned short unsigned_short_id(unsigned short s) {\n return s;\n}\n\nint callbackUser(int (*fn)(int, short)) {\n return fn(5,5);\n}\n\n\/\/ MODULE: main(cinterop)\n\/\/ FILE: main.kt\n\n@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)","completion":"import signext_zeroext_interop_input.*\nimport kotlinx.cinterop.*\n\n\/\/ CHECK-DEFAULTABI-CACHE_NO: declare zeroext i1 @Kotlin_Char_isHighSurrogate(i16 zeroext){{.*}}<|endoftext|>"} {"prompt":"* If the array contains multiple elements equal to the specified [element], there is no guarantee which one will be found.\n * \n * @param element the to search for.\n * @param fromIndex the start of the range (inclusive) to search in, 0 by default.\n * @param toIndex the end of the range (exclusive) to search in, size of this array by default.\n *","completion":"* @return the index of the element, if it is contained in the array within the specified range;\n * otherwise, the inverted insertion point `(-insertion point - 1)`.\n * The insertion point is defined as the index at which the element should be inserted,\n * so that the array (or the specified subrange of array) still remains sorted.\n *<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.types.KotlinType\nimport org.jetbrains.kotlin.types.TypeUtils\nimport org.jetbrains.kotlin.types.typeUtil.isNothing\nimport org.jetbrains.kotlin.types.typeUtil.isUnit\n\n@InternalKotlinNativeApi\nclass ObjCExportMapper(","completion":"internal val deprecationResolver: DeprecationResolver? = null,\n private val local: Boolean = false,\n internal val unitSuspendFunctionExport: UnitSuspendFunctionObjCExport,\n) {\n fun getCustomTypeMapper(descriptor: ClassDescriptor): CustomTypeMapper? = CustomTypeMappers.getMapper(descriptor)<|endoftext|>"} {"prompt":"}\n }\n\n override fun addManifestAddend(properties: Properties) {\n manifestProperties.putAll(properties)\n }\n\n override fun commit() {\n manifestProperties.saveToFile(libraryLayout.manifestFile)\n if (!nopack) {\n libraryLayout.unzippedDir.zipDirAs(klibFile)","completion":"libraryLayout.unzippedDir.deleteRecursively()\n }\n }\n}\n\n\/**\n * Requires non-null [target].\n *\/\nclass KotlinLibraryWriterImpl(\n moduleName: String,\n versions: KotlinLibraryVersioning,\n builtInsPlatform: BuiltInsPlatform,\n nativeTargets: List,\n nopack: Boolean = false,<|endoftext|>"} {"prompt":"val nonFixedToVariablesSubstitutor = createNonFixedTypeToVariableSubstitutor()\n\n val nonFixedTypesToResult = nonFixedToVariablesSubstitutor.map.mapValues { substitutor.safeSubstitute(it.value) }\n val nonFixedTypesToResultSubstitutor = ComposedSubstitutor(substitutor, nonFixedToVariablesSubstitutor)","completion":"val atomCompleter = createResolvedAtomCompleter(\n nonFixedTypesToResultSubstitutor,\n topLevelCallContext.replaceBindingTrace(findTopLevelTrace()).replaceInferenceSession(this)\n )\n\n for (expression in commonExpressions) {\n updateExpressionDescriptorAndType(expression, nonFixedTypesToResultSubstitutor)\n }<|endoftext|>"} {"prompt":"if (u != null || this.u != null) u.funNullableT()","completion":"if (u != null || this.u != null) u.funNullableAny()<|endoftext|>"} {"prompt":"val expression: IrFunctionAccessExpression,\n val signature: JvmMethodSignature,\n val classCodegen: ClassCodegen,\n val argsTypes: List,\n) {\n abstract fun genInvokeInstruction(v: InstructionAdapter)\n\n open fun invoke(\n v: InstructionAdapter,\n codegen: ExpressionCodegen,\n data: BlockInfo,","completion":"expression: IrFunctionAccessExpression,\n ): StackValue {\n loadArguments(codegen, data)\n with(codegen) { expression.markLineNumber(startOffset = true) }\n genInvokeInstruction(v)\n return StackValue.onStack(signature.returnType)\n }\n\n private fun loadArguments(codegen: ExpressionCodegen, data: BlockInfo) {<|endoftext|>"} {"prompt":"if (funWithReturnsNotNull(value_1 is String) != null) println(value_1.length)\n if (!(funWithReturnsNotNull(value_1 is String) == null)) println(value_1.length)\n}\n\n\/\/ TESTCASE NUMBER: 9","completion":"fun case_9(value_1: String?) {\n if (funWithReturnsTrue(value_1 != null)) println(value_1.length)\n if (funWithReturnsTrueAndInvertCondition(value_1 == null)) println(value_1.length)<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\nimport kotlin.test.*\n\nclass Outer(val s: String) {\n inner class Inner {\n constructor(x: Int) {\n this.x = x\n }\n\n constructor(z: String) {\n x = z.length\n }\n\n val x: Int\n\n fun foo() = s\n }\n\n}","completion":"fun box(): String {\n assertEquals(\"OK\", Outer(\"OK\").Inner(42).foo())\n return Outer(\"OK\").Inner(\"zzz\").foo()\n}<|endoftext|>"} {"prompt":"override fun find(startIndex: Int, testString: CharSequence, matchResult: MatchResultImpl): Int {\n var index = startIndex\n while (index < testString.length) {\n index = testString.indexOf(char, index, ignoreCase)\n if (index < 0) {\n return -1\n }\n \/\/ Remove params.","completion":"if (!testString.isLowSurrogate(index + 1)\n && next.matches(index + charCount, testString, matchResult) >= 0) {\n return index\n }\n index++\n }\n return -1\n }\n\n override fun findBack(leftLimit: Int, rightLimit: Int, testString: CharSequence, matchResult: MatchResultImpl): Int {<|endoftext|>"} {"prompt":"class ActualDiagnostic constructor(val diagnostic: Diagnostic, override val platform: String?, withNewInference: Boolean) :\n AbstractTestDiagnostic {\n override var inferenceCompatibility = if (withNewInference)\n TextDiagnostic.InferenceCompatibility.NEW\n else\n TextDiagnostic.InferenceCompatibility.OLD\n\n override val name: String","completion":"get() = diagnostic.factory.name\n\n val file: PsiFile\n get() = diagnostic.psiFile\n\n override fun compareTo(other: AbstractTestDiagnostic): Int {\n return if (this.diagnostic is DiagnosticWithParameters1<*, *> && other is ActualDiagnostic && other.diagnostic is DiagnosticWithParameters1<*, *>) {<|endoftext|>"} {"prompt":"c: ResolutionContext<*>,\n dataFlowValueForWholeExpression: () -> DataFlowValue\n ): TypeParameterDescriptor? {\n if (c.languageVersionSettings.supportsFeature(LanguageFeature.ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated)) return null\n if (TypeUtils.noExpectedType(c.expectedType)) return null","completion":"var foundSubtypeTypeParameter: TypeParameterDescriptor? = null\n\n @OptIn(ClassicTypeCheckerStateInternals::class)\n val typeState: TypeCheckerState = object : ClassicTypeCheckerState(isErrorTypeEqualsToAnything = true) {\n private var expectsTypeArgument = false<|endoftext|>"} {"prompt":"val x = swapVararg(named = 42, namedVararg = arrayOf(\"1\", \"2\"),)\n\nfun swap(string: String, int: Int){}\nfun swap(int: Int, string: String){}","completion":"val y = swap(int = 42, string = \"2\")<|endoftext|>"} {"prompt":"val INEFFICIENT_EQUALS_OVERRIDING_IN_VALUE_CLASS by warning(PositioningStrategy.DECLARATION_NAME) {\n parameter(\"type\")\n }\n }\n\n val IMPORTS by object : DiagnosticGroup(\"Imports\") {","completion":"val CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON by error(PositioningStrategy.IMPORT_LAST_NAME) {\n parameter(\"objectName\")\n }\n\n val PACKAGE_CANNOT_BE_IMPORTED by error(PositioningStrategy.IMPORT_LAST_NAME)<|endoftext|>"} {"prompt":"\/\/ override fun hasNext() : Boolean = current > 0\n\/\/ override fun remove() {throw UnsupportedOperationException()}\n\/\/ }\n\/\/}\n\n\/\/ fun Char.isDigit() = Character.isDigit(this)\n\nfun Reader.forEachChar(body : (Char) -> Unit) {\n do {\n var i = read();\n if (i == -1) break","completion":"body(i.toChar())\n } while(true)\n}<|endoftext|>"} {"prompt":"}\n\n override fun nondeterministicJump(label: List independentFunction(value: A): E\n }\n}<|endoftext|>"} {"prompt":"}\n }\n}\n\n\/\/ TESTCASE NUMBER: 3\nfun case_3(x: Any?) where T: CharSequence, T: Number {\n class Case1 where K : T {\n inline fun case_1() {\n if (x is T) {","completion":"x\n x.toByte()\n x.length<|endoftext|>"} {"prompt":"private val valueDirectivesMap = mutableMapOf, CompilerConfigurationKey<*>>()\n\n fun register(\n directive: SimpleDirective,\n key: CompilerConfigurationKey,\n isInverted: Boolean = false\n ) {\n booleanDirectivesMap[directive] = key\n if (isInverted) {\n invertedBooleanDirectives += directive","completion":"}\n }\n\n fun register(\n directive: ValueDirective,\n key: CompilerConfigurationKey\n ) {\n valueDirectivesMap[directive] = key\n }\n\n fun configure(configuration: CompilerConfiguration, registeredDirectives: RegisteredDirectives) {\n for ((directive, key) in booleanDirectivesMap) {<|endoftext|>"} {"prompt":"val descriptor = trace.get(BindingContext.ANNOTATION, entry) ?: continue\n val classDescriptor = descriptor.annotationClass ?: continue\n \/\/ This check matters for the applicable annotations only.\n val applicableTargets = AnnotationChecker.applicableTargetSetFromTargetAnnotationOrNull(classDescriptor)","completion":"if (applicableTargets == null || !applicableTargets.contains(KotlinTarget.FILE)) continue\n fileAnnotationsToCheck.add(Pair(entry, classDescriptor))\n }\n\n val isMultifileClass = fileAnnotationsToCheck.any { it.second.fqNameSafe == JVM_MULTIFILE_CLASS }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.symbols.KtCallableSymbol\nimport org.jetbrains.kotlin.analysis.api.symbols.KtClassLikeSymbol\nimport org.jetbrains.kotlin.kdoc.psi.impl.KDocName\nimport org.jetbrains.kotlin.name.FqName","completion":"import org.jetbrains.kotlin.psi.KtFile\nimport org.jetbrains.kotlin.psi.KtThisExpression\n\ninternal class KtFe10ReferenceShortener(\n override val analysisSession: KtFe10AnalysisSession,\n) : KtReferenceShortener(), Fe10KtAnalysisSessionComponent {\n override val token: KtLifetimeToken<|endoftext|>"} {"prompt":"STRING_NULL_DEFAULT,\n EMPTY_STRING_LIST_DEFAULT,\n EMPTY_STRING_ARRAY_DEFAULT,\n LANGUAGE_VERSIONS,\n API_VERSIONS,\n JVM_TARGET_VERSIONS,\n JS_ECMA_VERSIONS,\n JS_MODULE_KINDS,\n JS_SOURCE_MAP_CONTENT_MODES,","completion":"JS_MAIN,\n JS_SOURCE_MAP_NAMES_POLICY,\n}\n\nenum class GradleInputTypes(val gradleType: String) {\n INPUT(\"org.gradle.api.tasks.Input\"),\n INTERNAL(\"org.gradle.api.tasks.Internal\")\n}<|endoftext|>"} {"prompt":"var l1: Int = 0; abstract get abstract set","completion":"var n: Int abstract get abstract set(v: Int) {}\n}<|endoftext|>"} {"prompt":"@SinceKotlin(\"1.1\")\n @kotlin.internal.IntrinsicConstEvaluation\n public inline operator fun rem(other: Long): Long =\n this.toLong() % other\n\n \/**\n * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).\n *","completion":"* The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor.\n *\/\n @SinceKotlin(\"1.1\")\n @kotlin.internal.IntrinsicConstEvaluation\n public inline operator fun rem(other: Float): Float =\n this.toFloat() % other\n\n \/**<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.test.framework.utils.executeOnPooledThreadInReadAction\nimport org.jetbrains.kotlin.psi.KtFile\nimport org.jetbrains.kotlin.test.services.TestServices\nimport org.jetbrains.kotlin.test.services.assertions","completion":"abstract class AbstractRendererTest : AbstractAnalysisApiBasedTest() {\n override fun doTestByMainFile(mainFile: KtFile, mainModule: KtTestModule, testServices: TestServices) {\n val renderer = KtDeclarationRendererForSource.WITH_SHORT_NAMES.with {<|endoftext|>"} {"prompt":"\/\/ !CHECK_TYPE\n\n\/\/KT-2176 non-nullability is not inferred after !! or \"as\"\npackage kt2176\n\nimport checkSubtype\n\nfun f1(a: String?) {\n a!!\n checkSubtype(a)\n}\n\nfun f2(a: String) {","completion":"a!!\n checkSubtype(a)\n}\n\nfun f3(a: Any?) {\n a as String\n checkSubtype(a)\n}\n\nfun f4(a: Any) {\n a as String<|endoftext|>"} {"prompt":"val x: (Int) -> @Ann(unresolved_reference) Unit = {} \/\/ OK, no error in IDE and in the compiler\n}\n\n\/*\n * TESTCASE NUMBER: 2\n * UNEXPECTED BEHAVIOUR\n *\/\nfun case_2() {","completion":"val x: (@Ann(unresolved_reference) Int) -> Unit = { a: Int -> println(a) } \/\/ OK, no error in IDE and in the compiler\n}\n\n\/\/ TESTCASE NUMBER: 3\nfun case_3() {<|endoftext|>"} {"prompt":"\/\/ DONT_TARGET_EXACT_BACKEND: JS\n\/\/ EXPECTED_REACHABLE_NODES: 1270\n\/\/ SKIP_MINIFICATION\n\/\/ ES_MODULES\n\/\/ WITH_STDLIB\n\n\/\/ MODULE: vararg\n\/\/ FILE: lib.kt\n@JsExport\nfun uintVararg(vararg uints: UInt): String {\n for (u in uints) {","completion":"if (u == 0u) return \"Failed\"\n }\n\n return \"OK\"\n}\n\n@JsExport\nfun uint(a: Int): UInt {\n return a.toUInt()\n}\n\n\/\/ FILE: main.mjs\n\/\/ ENTRY_ES_MODULE\nimport { uint, uintVararg } from \".\/vararg-vararg_v5.mjs\"<|endoftext|>"} {"prompt":"model(it, \"sealedInheritors\")\n }\n\n test {\n model(it, \"sealedInheritors\")\n }\n }\n\n component(\"multiplatformInfoProvider\") {\n test {\n model(it, \"expectForActual\")\n }\n }","completion":"component(\"psiTypeProvider\") {\n test {\n model(it, \"psiType\/forDeclaration\")\n }\n\n test {\n model(it, \"psiType\/forExpression\")\n }<|endoftext|>"} {"prompt":"fun IrSimpleType.toBuilder(): IrSimpleTypeBuilder =\n IrSimpleTypeBuilder().also { b ->\n b.kotlinType = originalKotlinType\n if (this is IrCapturedType) {\n b.captureStatus = captureStatus\n b.capturedLowerType = lowerType\n b.capturedTypeConstructor = constructor\n } else {\n b.classifier = classifier\n }","completion":"b.nullability = nullability\n b.arguments = arguments\n b.annotations = annotations\n b.abbreviation = abbreviation\n }\n\nfun IrSimpleTypeBuilder.buildSimpleType(): IrSimpleType =\n if (classifier == null) {\n check(captureStatus != null && capturedTypeConstructor != null) {\n \"Neither classifier nor captured type constructor is provided\"\n }<|endoftext|>"} {"prompt":"is SomeClass, is","completion":"OtherClass<|endoftext|>"} {"prompt":"\/\/ IMPORTANT!\n\/\/ Please, when your changes cause failures in bytecodeText tests for 'for' loops,\n\/\/ examine the resulting bytecode shape carefully.\n\/\/ Range and progression-based loops generated with Kotlin compiler should be\n\/\/ as close as possible to Java counter loops ('for (int i = a; i < b; ++i) { ... }').\n\/\/ Otherwise it may result in performance regression due to missing HotSpot optimizations.","completion":"\/\/ Run Kotlin compiler benchmarks (https:\/\/github.com\/Kotlin\/kotlin-benchmarks)\n\/\/ with compiler built from your changes if you are not sure.\n\nfun intArray() = intArrayOf(0, 0, 0, 0)\nfun longArray() = longArrayOf(0, 0, 0, 0)\n\nfun f(): Int {\n var n = 0\n for (i in intArray()) {<|endoftext|>"} {"prompt":"private fun popBuilder(): ControlFlowInstructionsGeneratorWorker {\n val worker = builders.pop()\n builder = if (!builders.isEmpty()) {\n builders.peek()\n } else {\n null\n }\n return worker\n }\n\n override fun enterSubroutine(subroutine: KtElement, eventOccurrencesRange: EventOccurrencesRange?) {\n val builder = builder","completion":"val shouldInlnie = eventOccurrencesRange != null\n if (builder != null && subroutine is KtFunctionLiteral) {\n pushBuilder(subroutine, builder.returnSubroutine, shouldInlnie)\n } else {\n pushBuilder(subroutine, subroutine, shouldInlnie)\n }\n delegateBuilder.enterBlockScope(subroutine)<|endoftext|>"} {"prompt":"return listOf(bar.doSomething())\n }\n }\n}\n\nclass Bar() : IInterfaceInput, IInterfaceOutput {\n override fun doSomething(input: Baz) {\n throw UnsupportedOperationException(\"not implemented\")\n }\n\n override fun doSomething(): Baz {","completion":"throw UnsupportedOperationException(\"not implemented\")\n }\n\n}\n\ndata class Baz(val myField: Int)<|endoftext|>"} {"prompt":")\n\n buildWithCocoapodsWrapper(\":linkPodDebugFrameworkIOS\") {\n assertTasksExecuted(\":podBuildAFNetworkingIphonesimulator\")\n assertTasksExecuted(\":podBuildSDWebImageIphonesimulator\")\n assertTasksExecuted(\":podBuildSSZipArchiveIphonesimulator\")","completion":"assertTasksExecuted(\":cinteropSDWebImageIOS\")\n\n extractNativeTasksCommandLineArgumentsFromOutput(\":linkPodDebugFrameworkIOS\") {\n assertCommandLineArgumentsContainSequentially(\"-linker-option\", \"-framework\", \"-linker-option\", \"AFNetworking\")<|endoftext|>"} {"prompt":"attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(NativeDependenciesUsage.NATIVE_DEPENDENCY))\n }\n }\n\n \/**\n * Root directory where to place all dependencies.\n *\/\n abstract val dependenciesDirectory: DirectoryProperty\n\n \/**\n * Dependency repository.\n *\/\n abstract val repositoryURL: Property","completion":"abstract class Target @Inject constructor(\n private val owner: NativeDependenciesDownloaderExtension,\n private val _target: TargetWithSanitizer,\n ) {\n val target by _target::target\n val sanitizer by _target::sanitizer\n\n private val project by owner::project\n\n private val platformManager = project.extensions.getByType()<|endoftext|>"} {"prompt":"assertEquals(null, TestObject.readOnlyNativeFooNWrapper.nativeFooN?.s)\n\n assertEquals(null, TestObject.readOnlyNativeFooNWrapperN?.nativeFooN?.s)\n TestObject.nativeFooNWrapperN = NativeFooNWrapper(NativeFoo(\"Boston\"))","completion":"assertEquals(\"Boston\", TestObject.readOnlyNativeFooNWrapperN?.nativeFooN?.s)\n TestObject.nativeFooNWrapperN = NativeFooNWrapper(null)\n assertEquals(null, TestObject.readOnlyNativeFooNWrapperN?.nativeFooN?.s)\n\n nullifyTestProperties(TestObject)\n}<|endoftext|>"} {"prompt":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.NotSupportedInlineParameterInInlineParameterDefaultValue\n\ninternal class ReifiedTypeParameterInOverrideImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.ReifiedTypeParameterInOverride\n\ninternal class InlinePropertyWithBackingFieldImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"parameterFromSuperclass\n )\n )\n }\n }\n }\n\n private fun checkNameAndDefaultForFakeOverrideParameter(\n containingFunction: CallableMemberDescriptor,\n descriptor: ValueParameterDescriptor,\n multipleDefaultsInSuper: Boolean\n ) {\n val containingClass = containingFunction.containingDeclaration","completion":"val classElement = DescriptorToSourceUtils.descriptorToDeclaration(containingClass) as KtClassOrObject?\n ?: error(\"Declaration not found for class: $containingClass\")\n\n if (multipleDefaultsInSuper) {<|endoftext|>"} {"prompt":"fun popCycledSymbolIfExists(): FirCallableSymbol<*>? = cycledSymbol?.also { cycledSymbol = null }\n}\n\n\/**\n * This resolver is responsible for [IMPLICIT_TYPES_BODY_RESOLVE][FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE] phase.\n *\n * This resolver:","completion":"* - Transforms [FirImplicitTypeRef] into [FirResolvedTypeRef][org.jetbrains.kotlin.fir.types.FirResolvedTypeRef].\n *\n * Before the transformation, the resolver [recreates][BodyStateKeepers] all bodies\n * to prevent corrupted states due to [PCE][com.intellij.openapi.progress.ProcessCanceledException].\n *<|endoftext|>"} {"prompt":"parameter(\"reference\")\n }\n\n val DUPLICATE_PARAMETER_NAME_IN_FUNCTION_TYPE by error()\n\n val MISSING_DEPENDENCY_CLASS by error(PositioningStrategy.REFERENCED_NAME_BY_QUALIFIED) {\n parameter(\"type\")\n }","completion":"val MISSING_DEPENDENCY_CLASS_IN_EXPRESSION_TYPE by warning(PositioningStrategy.REFERENCED_NAME_BY_QUALIFIED) {\n parameter(\"type\")\n }<|endoftext|>"} {"prompt":"fun FirMemberDeclaration.setLazyPublishedVisibility(annotations: List, parentProperty: FirProperty?, session: FirSession) {\n setLazyPublishedVisibility(\n hasPublishedApi = annotations.any { it.unexpandedClassId == StandardClassIds.Annotations.PublishedApi },\n parentProperty,\n session\n )\n}","completion":"fun FirMemberDeclaration.setLazyPublishedVisibility(hasPublishedApi: Boolean, parentProperty: FirProperty?, session: FirSession) {\n if (!hasPublishedApi) return\n\n lazyPublishedApiEffectiveVisibility = lazy {\n val containingClassLookupTag = (when {\n parentProperty != null -> parentProperty.symbol.callableId.classId<|endoftext|>"} {"prompt":"model(\"codegen\/boxInline\")\n }\n\n testClass(\"FirBlackBoxModernJdkCodegenTestGeneratedWithInlineScopes\") {\n model(\"codegen\/boxModernJdk\")\n }\n }\n\n \/\/ ---------------------------------------------- FIR tests ----------------------------------------------","completion":"testGroup(testsRoot = \"compiler\/fir\/analysis-tests\/tests-gen\", testDataRoot = \"compiler\/testData\") {\n testClass(suiteTestClassName = \"FirPsiOldFrontendDiagnosticsTestGenerated\") {\n model(\n \"diagnostics\/tests\", pattern = \"^(.*)\\\\.kts?$\",<|endoftext|>"} {"prompt":"modification.execute(moduleTestDir, moduleSourceDir) {}\n }\n\n val outputKlibFile = resolveModuleArtifact(module, buildDir)\n\n val friends = mutableListOf()\n if (moduleStep.rebuildKlib) {\n val dependencies = mutableListOf(File(STDLIB_KLIB), File(KOTLIN_TEST_KLIB))","completion":"for (dep in moduleStep.dependencies) {\n val klibFile = resolveModuleArtifact(dep.moduleName, buildDir)\n dependencies += klibFile\n if (dep.isFriend) {\n friends += klibFile\n }\n }\n val configuration = createConfiguration(module, projStep.language, projectInfo.moduleKind)<|endoftext|>"} {"prompt":"\/** Subtracts the other value from this value. *\/\n @kotlin.internal.IntrinsicConstEvaluation\n public inline operator fun minus(other: Byte): Int =\n this.toInt() - other.toInt()\n\n \/** Subtracts the other value from this value. *\/\n @kotlin.internal.IntrinsicConstEvaluation","completion":"public inline operator fun minus(other: Short): Int =\n this.toInt() - other.toInt()\n\n \/** Subtracts the other value from this value. *\/\n @kotlin.internal.IntrinsicConstEvaluation\n public inline operator fun minus(other: Int): Int =\n this.toInt() - other\n\n \/** Subtracts the other value from this value. *\/<|endoftext|>"} {"prompt":"if (envBuildType == null || envTargets.isEmpty() || envEmbeddedFrameworksDir == null) {\n locateOrRegisterTask(frameworkTaskName) { task ->\n task.group = BasePlugin.BUILD_GROUP\n task.description = \"Embed and sign ${framework.namePrefix} framework as requested by Xcode's environment variables\"\n task.doFirst {","completion":"fireEnvException(frameworkTaskName)\n }\n }\n return\n }\n\n val checkSandboxAndWriteProtectionTask = locateOrRegisterTask(AppleXcodeTasks.checkSandboxAndWriteProtection) { task ->\n task.group = BasePlugin.BUILD_GROUP<|endoftext|>"} {"prompt":"val classSuite = expectations.getOrCreateClassSuite(className)\n\n when (kind) {\n \"class\" -> classSuite.addClassExpectation(className, jvmSignature, genericSignature)\n \"field\" -> classSuite.addFieldExpectation(className, memberName, jvmSignature, genericSignature)","completion":"\"method\" -> classSuite.addMethodExpectation(className, memberName, jvmSignature, genericSignature)\n else -> throw AssertionError(\"$ktFile:${lineNo + 1}: unsupported expectation kind: $kind\")\n }\n\n \/\/ Expectation, skip the following 'jvm signature' and 'generic signature' lines\n lineNo += 3\n } else {<|endoftext|>"} {"prompt":"if (resolvedArgument !is ResolvedCallArgument.SimpleArgument) {\n error(\"Incorrect resolved argument for parameter $parameter :$resolvedArgument\")\n } else {\n if (resolvedArgument.callArgument.isSpread) {\n addDiagnostic(NonVarargSpread(resolvedArgument.callArgument))\n }\n }\n }\n }","completion":"for (parameter in parameters) {\n if (!result.containsKey(parameter.original)) {\n if (parameter.hasDefaultValue()) {\n result[parameter.original] = ResolvedCallArgument.DefaultArgument\n } else if (parameter.isVararg) {\n result[parameter.original] = ResolvedCallArgument.VarargArgument(emptyList())\n } else {<|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-60450\nfun main() {\n val l = listOf()\n l.zip(l).forEach { left, right\n\n }","completion":"l.zip(l).forEach { left, right ->\n\n }\n}<|endoftext|>"} {"prompt":"DEBUG_INFO_SMARTCAST!>y()","completion":"if (z == null) {\n `.``? & kotlin.Nothing?\")!>z\n }\n }\n}\n\n\/\/ TESTCASE NUMBER: 26<|endoftext|>"} {"prompt":"val superclassName = (supertype.classifier as? KmClassifier.Class)?.name ?: return@supertype\n if (!superclassName.isInSamePackage()) return@supertype\n val sealedClass = sealedClassesMap[superclassName] ?: return@supertype\n sealedClass.sealedSubclasses += clazz.name\n }\n }\n}","completion":"internal fun CirClassConstructor.serializeConstructor(\n context: CirTreeSerializationContext\n): KmConstructor = KmConstructor().also { constructor ->\n constructor.modifiersFrom(this)\n annotations.mapTo(constructor.annotations) { it.serializeAnnotation() }\n \/\/ TODO: nowhere to write constructor type parameters<|endoftext|>"} {"prompt":"\/\/ non-default accessor modality is always final, so we check property.modality instead\n ProtoEnumFlags.modality(property.modality!!),\n !isDefault,\n accessor.isExternal,\n accessor.isInline\n )\n }\n\n private fun createChildSerializer(declaration: FirDeclaration): FirElementSerializer =\n FirElementSerializer(","completion":"session, scopeSession, declaration, Interner(typeParameters), extension,\n typeTable, versionRequirementTable, serializeTypeTableToFunction = false,\n typeApproximator, languageVersionSettings, produceHeaderKlib\n )\n\n val stringTable: FirElementAwareStringTable\n get() = extension.stringTable\n\n private fun useTypeTable(): Boolean = extension.shouldUseTypeTable()<|endoftext|>"} {"prompt":"fun getMissingCases(expression: KtWhenExpression, context: BindingContext, nullable: Boolean) =\n if (nullable) getNullCaseIfMissing(expression, context) else listOf()\n\n private fun getNullCaseIfMissing(expression: KtWhenExpression, context: BindingContext): List {\n for (entry in expression.entries) {","completion":"for (condition in entry.conditions) {\n if (condition is KtWhenConditionWithExpression) {\n condition.expression?.let {\n val type = context.getType(it)\n if (type != null && KotlinBuiltIns.isNullableNothing(type)) {\n return listOf()\n }\n }\n }\n }\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinBinaryAttributes\nimport org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinBinaryCapability\nimport org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinBinaryCoordinates\nimport org.junit.Test","completion":"class IdeaKotlinBinaryCoordinatesSerializationTest : AbstractSerializationTest() {\n override fun serialize(value: IdeaKotlinBinaryCoordinates): ByteArray = IdeaKotlinBinaryCoordinatesProto(value).toByteArray()\n\n override fun deserialize(data: ByteArray): IdeaKotlinBinaryCoordinates =<|endoftext|>"} {"prompt":"tailrec fun testDifferencesInTailrecModifierPresenceReverse() {}\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testDifferencesInTailrecModifierPresenceReverse() {}","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) private fun testIdenticalPrivateVisibility() {}\nprivate fun testIdenticalPrivateVisibility() {}<|endoftext|>"} {"prompt":"\/\/ JVM_ABI_K1_K2_DIFF: KT-63861\n\n\/\/ FILE: 1.kt\n\npackage test\n\npublic inline fun doCall(block: ()-> Int, exception: (e: Exception)-> Unit, finallyBlock: ()-> Int, res: Int = -111) : Int {\n try {\n return block()\n } catch (e: Exception) {\n exception(e)","completion":"} finally {\n finallyBlock()\n }\n return res\n}\n\npublic inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R, res: R) : R {\n try {\n return block()\n } catch (e: Exception) {\n exception(e)\n } finally {\n finallyBlock()<|endoftext|>"} {"prompt":"\/\/ This file was generated automatically. See compiler\/fir\/tree\/tree-generator\/Readme.md.\n\/\/ DO NOT MODIFY IT MANUALLY.\n\n@file:Suppress(\"DuplicatedCode\", \"unused\")\n\npackage org.jetbrains.kotlin.fir.expressions.builder\n\nimport kotlin.contracts.*","completion":"import org.jetbrains.kotlin.KtSourceElement\nimport org.jetbrains.kotlin.fir.FirImplementationDetail\nimport org.jetbrains.kotlin.fir.builder.FirAnnotationContainerBuilder\nimport org.jetbrains.kotlin.fir.builder.FirBuilderDsl<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\nimport kotlin.test.assertEquals\n\nenum class TestEnumClass(val x: Int) {\n ZERO\n\/\/ {\n\/\/ init {\n\/\/ }\n\/\/ }\n ;\n constructor(): this(0)\n}\n\nfun box(): String {\n assertEquals(TestEnumClass.ZERO.x, 0)\n\n return \"OK\"","completion":"}<|endoftext|>"} {"prompt":"0x0000, 0x0020, 0x0022, 0x0027, 0x002b, 0x002e, 0x0030, 0x003a, 0x003c, 0x003f, 0x0041, 0x005b, 0x005e, 0x0061, 0x007b, 0x007e, 0x007f, 0x00a0, 0x00a2,","completion":"0x00a6,<|endoftext|>"} {"prompt":"const val minus8 = twoVal.minus(doubleVal)\n\nconst val times1 = oneVal.times(twoVal)\nconst val times2 = twoVal.times(twoVal)","completion":"const val times3 = threeVal.times(twoVal)\nconst val times4 = twoVal.times(byteVal)\nconst val times5 = twoVal.times(shortVal)<|endoftext|>"} {"prompt":"package cases.whenMappings\n\nenum class SampleEnum {\n A,\n B,\n C\n}\n\nfun SampleEnum.deacronimize() = when (this) {\n SampleEnum.A -> \"Apple\"\n SampleEnum.B -> \"Biscuit\"\n SampleEnum.C -> \"Cinnamon\"\n}","completion":"inline fun SampleEnum.switch(thenA: () -> Unit, thenB: () -> Unit, thenC: () -> Unit) = when (this) {\n SampleEnum.C -> thenC()\n SampleEnum.B -> thenB()\n SampleEnum.A -> thenA()\n}<|endoftext|>"} {"prompt":"const val rem1 = byteVal.rem(byteVal)\nconst val rem2 = byteVal.rem(shortVal)","completion":"const val rem3 = byteVal.rem(intVal)\nconst val rem4 = byteVal.rem(longVal)<|endoftext|>"} {"prompt":"public external abstract class SVGTransform : JsAny {\n open val type: Short\n open val matrix: DOMMatrix\n open val angle: Float\n fun setMatrix(matrix: DOMMatrixReadOnly)\n fun setTranslate(tx: Float, ty: Float)\n fun setScale(sx: Float, sy: Float)\n fun setRotate(angle: Float, cx: Float, cy: Float)","completion":"fun setSkewX(angle: Float)\n fun setSkewY(angle: Float)\n\n companion object {\n val SVG_TRANSFORM_UNKNOWN: Short\n val SVG_TRANSFORM_MATRIX: Short\n val SVG_TRANSFORM_TRANSLATE: Short\n val SVG_TRANSFORM_SCALE: Short<|endoftext|>"} {"prompt":"takeUByte(EXPLICIT_INT)\n\n takeUShort(IMPLICIT_INT)\n takeUShort(BIGGER_THAN_UBYTE)\n\n takeUInt(IMPLICIT_INT)\n\n takeULong(IMPLICIT_INT)\n\n takeUBytes(IMPLICIT_INT, EXPLICIT_INT, 42u)","completion":"takeLong(IMPLICIT_INT)\n\n takeIntWithoutAnnotation(IMPLICIT_INT)\n\n takeUIntWithoutAnnotaion(UINT_CONST)\n\n takeUByte(LONG_CONST)<|endoftext|>"} {"prompt":"override val pub1: String\n get() = \"\"\n\n}\n\nfun case1(){\n val a = Case1()\n a.priv()\n a.prot()\n a.int()\n a.pub()","completion":"a.priv1\n a.prot1\n a.int1\n a.pub1\n}\n\n\/\/MODULE: implBase(base)\n\/\/FILE: Impl.kt\npackage implBase\nimport base.*\n\n\/\/ TESTCASE NUMBER: 2\nfun case2() {<|endoftext|>"} {"prompt":"javaClass.somethingPublic = 1\n}\n\n\/\/ FILE: JavaClass.java\npublic class JavaClass {\n public int getSomethingPublic() { return 1; }\n protected int getSomethingProtected() { return 1; }\n private int getSomethingPrivate() { return 1; }","completion":"int getSomethingPackage() { return 1; }\n\n protected void setSomethingPublic(int value) {}\n}<|endoftext|>"} {"prompt":"operator fun invoke(usedDeprecatedFlags: List) = build(\n \"The following properties are obsolete and no longer supported:\\n\" +\n \"${usedDeprecatedFlags.joinToString()}\\n\" +\n \"Read the details here: https:\/\/kotlinlang.org\/docs\/multiplatform-compatibility-guide.html#deprecate-hmpp-properties\",\n )\n }","completion":"object DeprecatedKotlinNativeTargetsDiagnostic : ToolingDiagnosticFactory(ERROR) {\n operator fun invoke(usedTargetIds: List) = build(\n \"The following removed Kotlin\/Native targets were used in the project: ${usedTargetIds.joinToString()}\"\n )\n }<|endoftext|>"} {"prompt":"add(fragment.exportBlock)\n add(fragment.initializerBlock)\n fragment.tests?.let { add(it) }\n fragment.mainFunction?.let { add(it) }\n addAll(fragment.inlinedLocalDeclarations.values)\n })\n\n val definedNames = collectDefinedNamesInAllScopes(allCode)","completion":"serializedNames.forEach {\n assert(!it.isTemporary || it in definedNames || it in knownNames) { \"JsName ${it.ident} is unbound\" }\n }\n }\n}<|endoftext|>"} {"prompt":"fun case_8(value_1: SealedClassMixed?): String = when(value_1) {\n SealedMixedChildObject1 -> \"\"\n}\n\n\/*\n * TESTCASE NUMBER: 9\n * DISCUSSION: maybe make exhaustive without else?\n *\/","completion":"fun case_9(value_1: Any?): String = when (value_1) {\n is Any -> \"\"\n null -> \"\"\n}\n\n\/*\n * TESTCASE NUMBER: 10\n * DISCUSSION\n * ISSUES: KT-26044\n *\/<|endoftext|>"} {"prompt":"public val T.annotationClass: KClass\n get() = (this as java.lang.annotation.Annotation).annotationType().kotlin as KClass\n\n\/**\n * Returns a Java [Class] instance of the enum the given constant belongs to.\n *\n * @see java.lang.Enum.getDeclaringClass\n *\/","completion":"@SinceKotlin(\"1.7\")\n@InlineOnly\npublic inline val > Enum.declaringJavaClass: Class\n get() = (this as java.lang.Enum).declaringClass<|endoftext|>"} {"prompt":"\/\/ Note: this is default for clang on at least on iOS and macOS.\n enforceFramePointer(llvmFunction, context)\n }\n}\n\n\/**\n * Set target cpu and its features to make LLVM generate correct machine code.\n *\/\ninternal fun addTargetCpuAndFeaturesAttributes(context: Context, llvmFunction: LLVMValueRef) {\n context.config.platform.targetCpu?.let {","completion":"LLVMAddTargetDependentFunctionAttr(llvmFunction, \"target-cpu\", it)\n }\n context.config.platform.targetCpuFeatures?.let {\n LLVMAddTargetDependentFunctionAttr(llvmFunction, \"target-features\", it)\n }\n}\n\nprivate fun shouldEnforceFramePointer(context: Context): Boolean {\n \/\/ TODO: do we still need it?<|endoftext|>"} {"prompt":"\/\/ FIR_IDENTICAL\n\/\/If this test hangs, it means something is broken.\nobject A {\n val iii = 42\n}\n\n\/\/inappropriate but participating in resolve functions\nfun foo(s: String, a: Any) = s + a\nfun foo(a: Any, s: String) = s + a\nfun foo(i: Int, j: Int) = i + j","completion":"fun foo(a: Any, i: Int) = \"$a$i\"\nfun foo(f: (Int)->Int, i: Int) = f(i)\nfun foo(f: (String)->Int, s: String) = f(s)\nfun foo(f: (Any)->Int, a: Any) = f(a)<|endoftext|>"} {"prompt":"package kotlin.math.fdlibm\n\nimport kotlin.wasm.internal.wasm_f64_sqrt as sqrt\n\ninternal fun __ieee754_hypot(x: Double, y: Double): Double {\n var a: Double\n var b: Double\n var t1: Double\n var t2: Double\n var y1: Double\n var y2: Double","completion":"var w: Double\n var j: Int\n var k: Int\n var ha: Int\n var hb: Int\n\n ha = __HI(x) and 0x7fffffff \/* high word of x *\/\n hb = __HI(y) and 0x7fffffff \/* high word of y *\/\n if (hb > ha) {<|endoftext|>"} {"prompt":"annotations: List = emptyList(),\n parameters: List = emptyList(),\n typeParameters: List = emptyList(),\n result: Type = UnitType,\n body: List = emptyList()\n ) : this(\n name,\n FunctionType(\n name,\n annotations = annotations,\n parameters = parameters,","completion":"typeParameters = typeParameters,\n result = result\n ),\n body\n )\n\n val open = type.typeParameters.isNotEmpty()\n\n override fun accept(visitor: Visitor) = visitor.visit(this)\n\n override fun visitChildren(visitor: Visitor) {\n walk(type.parameters, visitor)\n walk(body, visitor)\n }<|endoftext|>"} {"prompt":"\"useOptIn\" -> optInAnnotations += item.getAttribute(\"annotation\").value\n }\n }\n\n return ModuleData(\n moduleName,\n timestamp,\n outputDir,\n moduleNameQualifier,\n classpath,\n sources,\n javaSourceRoots,\n friendDirs,\n optInAnnotations,\n modularJdkRoot,","completion":"jdkHome,\n isCommon,\n )\n }\n\n private fun loadModuleDumpFile(file: File): List {\n val rootElement = JDOMUtil.load(file)\n val modules = rootElement.getChildren(\"module\")\n val arguments = rootElement.getChild(\"compilerArguments\")?.let { loadCompilerArguments(it) }<|endoftext|>"} {"prompt":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass)\n }\n\n\n class TestMultipleIdenticalValueParameters {","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB)\n constructor(arg1: UserKlassA, arg2: UserKlassB)\n }<|endoftext|>"} {"prompt":"\/\/ that is illegal access since enum entries are not yet initialized:\n \/\/ enum class E(...) {\n \/\/ E1, E2, ...\n \/\/ val m1 = E1\n \/\/ }\n \/\/ ~>\n \/\/ class E {\n \/\/ E m1 ...\n \/\/ E(...) { \/\/ \n \/\/ m1 = E1\n \/\/ }","completion":"\/\/ final static E1, E2, ...\n \/\/ static { \/\/ \n \/\/ E1 = new E(...)\n \/\/ ...\n \/\/ }\n \/\/ }\n \/\/\n \/\/ A companion object is desugared to a static final singleton, and initialized in too. However, enum lowering goes first,<|endoftext|>"} {"prompt":"fun NBtoB(bb: IB?) = bb as? IB\nfun BtoNB(bb: IB) = bb as? IB?\n\nfun nullToNullB(aa: Any?) = aa as? IB?\nfun notNullToNullB(aa: Any) = aa as? IB?\nfun nullToNotNullB(aa: Any?) = aa as? IB","completion":"fun notNullToNotNullB(aa: Any) = aa as? IB\n\nfun nullToNullC(aa: Any?) = aa as? IC?\nfun notNullToNullC(aa: Any) = aa as? IC?\nfun nullToNotNullC(aa: Any?) = aa as? IC\nfun notNullToNotNullC(aa: Any) = aa as? IC<|endoftext|>"} {"prompt":"object O {\n @BeforeTest fun before() { println(\"before (A.object)\") }\n @AfterTest fun after() { println(\"after (A.object)\") }\n @Test fun test1() { println(\"test1 (A.object)\") }\n @Ignore @Test fun ignoredTest() { throw AssertionError(\"Ignored test\") }","completion":"@BeforeClass fun beforeClass() { println(\"beforeClass (A.object)\") }\n @AfterClass fun afterClass() { println(\"afterClass (A.object)\") }\n }\n}\n\nobject O {\n @BeforeTest fun before() { println(\"before (object)\") }\n @AfterTest fun after() { println(\"after (object)\") }<|endoftext|>"} {"prompt":"private fun String.throwInvalidNumberOfDigits(startIndex: Int, endIndex: Int, maxDigits: Int, requireMaxLength: Boolean) {\n val specifier = if (requireMaxLength) \"exactly\" else \"at most\"\n val substring = substring(startIndex, endIndex)\n throw NumberFormatException(","completion":"\"Expected $specifier $maxDigits hexadecimal digits at index $startIndex, but was $substring of length ${endIndex - startIndex}\"\n )\n}\n\nprivate fun String.throwNotContainedAt(index: Int, endIndex: Int, part: String, partName: String) {\n val substring = substring(index, (index + part.length).coerceAtMost(endIndex))<|endoftext|>"} {"prompt":"\/**\n * Empty [symbols] list equals to unresolved reference.\n *\/\n fun KtAnalysisSession.renderResolvedTo(\n symbols: List,\n renderPsiClassName: Boolean = false,\n renderer: KtDeclarationRenderer = KtDeclarationRendererForDebug.WITH_QUALIFIED_NAMES,","completion":"additionalInfo: KtAnalysisSession.(KtSymbol) -> String? = { null }\n ): String {\n if (symbols.isEmpty()) return UNRESOLVED_REFERENCE_RESULT\n\n return symbols.map { renderResolveResult(it, renderPsiClassName, renderer, additionalInfo) }\n .sorted()\n .withIndex()<|endoftext|>"} {"prompt":"testGroup(\"plugins\/fir-plugin-prototype\/tests-gen\", \"plugins\/fir-plugin-prototype\/testData\") {\n testClass {\n model(\"diagnostics\")\n }\n\n testClass {\n model(\"box\")\n }","completion":"testClass {\n model(\"firLoadK2Compiled\")\n }\n\n testClass {\n model(\"firLoadK2Compiled\")\n }\n }\n\n testGroup(<|endoftext|>"} {"prompt":"const val anotherPropName = SomeClassWithName::anotherProperty.name\nconst val fooName = SomeClassWithName::foo.name","completion":"const val barName = SomeClassWithName::bar.name\n\nconst val stringClassName = ::String.name<|endoftext|>"} {"prompt":"protected fun createFunctionSymbol(declaration: Function, signature: IdSignature?): IrSimpleFunctionSymbol {\n return signature?.let { createPublicFunctionSymbol(declaration, signature) } ?: createPrivateFunctionSymbol(declaration)\n }\n\n protected open fun createPublicFunctionSymbol(declaration: Function, signature: IdSignature): IrSimpleFunctionSymbol {","completion":"return IrSimpleFunctionPublicSymbolImpl(signature)\n }\n\n protected open fun createPrivateFunctionSymbol(declaration: Function): IrSimpleFunctionSymbol {\n return IrSimpleFunctionSymbolImpl()\n }\n\n \/\/ ------------------------------------ type parameter ------------------------------------\n\n fun declareGlobalTypeParameter(\n declaration: TypeParameter,\n typeParameterFactory: (IrTypeParameterSymbol) -> IrTypeParameter,<|endoftext|>"} {"prompt":"val id: Long?,\n val mask: Long,\n val description: String?,\n ) : IdSignature() {\n\n @Deprecated(\n \"When constructing 'CommonSignature', you need to set 'description' to the mangled name from which 'id' was \" +\n \"computed, or to null if it's not applicable\",\n level = DeprecationLevel.WARNING,\n )","completion":"constructor(\n packageFqName: String,\n declarationFqName: String,\n id: Long?,\n mask: Long,\n ) : this(packageFqName, declarationFqName, id, mask, null)\n\n override val isPubliclyVisible: Boolean get() = true\n\n override fun packageFqName(): FqName = FqName(packageFqName)<|endoftext|>"} {"prompt":"\/\/ TODO: muted automatically, investigate should it be ran for JS or not\n\/\/ IGNORE_BACKEND: JS\n\ntailrec fun withWhen2(counter : Int) : Int =\n when {\n counter == 0 -> counter\n counter == 50 -> 1 + withWhen2(counter - 1)","completion":"withWhen2(0) == 0 -> withWhen2(counter - 1)\n else -> 1\n }\n\nfun box() : String = if (withWhen2(100000) == 1) \"OK\" else \"FAIL\"<|endoftext|>"} {"prompt":"\/\/ p.Annotations\n\npackage p\n\n\nclass Annotations {\n\n @R(\"a\") @R(\"b\") @R(\"c\")\n fun repeatables1() {\n\n }\n\n @R(\"a\")\n fun repeatables2() {\n\n }\n\n @R(\"a\") @S(\"b\") @R(\"c\") @S(\"D\") @R(\"f\")","completion":"fun repeatables3() {\n\n }\n\n}\n\n@Repeatable\n@Retention(AnnotationRetention.SOURCE)\nannotation class S(val g: String)\n\n@Repeatable\n@Retention(AnnotationRetention.SOURCE)\nannotation class R(val s: String)<|endoftext|>"} {"prompt":"assertFalse(eqBooleanDoubleQ(false, null))\n assertFalse(eqBooleanDoubleQ(false, undefined))\n assertFalse(eqBooleanDoubleQ(true, 0.toDouble()))\n assertFalse(eqBooleanDoubleQ(true, 1.toDouble()))\n assertFalse(eqBooleanDoubleQ(true, null))\n assertFalse(eqBooleanDoubleQ(true, undefined))","completion":"assertFalse(eqBooleanQDouble(false, 0.toDouble()))\n assertFalse(eqBooleanQDouble(false, 1.toDouble()))\n assertFalse(eqBooleanQDouble(true, 0.toDouble()))\n assertFalse(eqBooleanQDouble(true, 1.toDouble()))\n assertFalse(eqBooleanQDouble(null, 0.toDouble()))<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.parcelize.fir.diagnostics.KtErrorsParcelize.INAPPLICABLE_IGNORED_ON_PARCEL\nimport org.jetbrains.kotlin.parcelize.fir.diagnostics.KtErrorsParcelize.INAPPLICABLE_IGNORED_ON_PARCEL_CONSTRUCTOR_PROPERTY","completion":"import org.jetbrains.kotlin.parcelize.fir.diagnostics.KtErrorsParcelize.NO_PARCELABLE_SUPERTYPE\nimport org.jetbrains.kotlin.parcelize.fir.diagnostics.KtErrorsParcelize.OVERRIDING_WRITE_TO_PARCEL_IS_NOT_ALLOWED<|endoftext|>"} {"prompt":"* - either `step > 0` and `start <= end`,\n * - or `step < 0` and `start >= end`.\n *\n * @param start first element of the progression\n * @param end ending bound for the progression\n * @param step increment, or difference of successive elements in the progression\n * @return the final element of the progression\n * @suppress\n *\/\n@PublishedApi","completion":"internal fun getProgressionLastElement(start: Long, end: Long, step: Long): Long = when {\n step > 0 -> if (start >= end) end else end - differenceModulo(end, start, step)\n step < 0 -> if (start <= end) end else end + differenceModulo(start, end, -step)\n else -> throw kotlin.IllegalArgumentException(\"Step is zero.\")\n}<|endoftext|>"} {"prompt":"x.funT()\n x.funAny()","completion":"x.funNullableT()\n x.funNullableAny()\n }\n}\n\n\/\/ TESTCASE NUMBER: 5\nfun case_5() {<|endoftext|>"} {"prompt":"c.resume(value)\n COROUTINE_SUSPENDED\n }\n}\n\nfun builder(c: suspend Controller.() -> Unit): String {\n val controller = Controller()\n c.startCoroutine(controller, EmptyContinuation)\n return controller.result\n}\n\nfun box(): String {\n val value = builder {\n try {","completion":"outer@for (x in listOf(\"A\", \"B\")) {\n try {\n result += suspendWithResult(x)\n for (y in listOf(\"C\", \"D\")) {\n try {\n result += suspendWithResult(y)\n if (y == \"D\") {\n break@outer\n }\n }\n finally {\n result += \"!\"\n }<|endoftext|>"} {"prompt":"return when (unwrapped) {\n is FlexibleType -> unwrapped\n is SimpleType -> KotlinTypeFactory.flexibleType(unwrapped, unwrapped.makeNullableAsSpecified(true))\n }.inheritEnhancement(unwrapped)\n }\n\n override fun replaceAttributes(newAttributes: TypeAttributes): UnwrappedType =","completion":"KotlinTypeFactory.flexibleType(lowerBound.replaceAttributes(newAttributes), upperBound.replaceAttributes(newAttributes))\n\n override fun render(renderer: DescriptorRenderer, options: DescriptorRendererOptions): String {\n if (options.debugMode) {\n return \"(${renderer.renderType(lowerBound)}..${renderer.renderType(upperBound)})\"\n }<|endoftext|>"} {"prompt":"\/\/ TESTCASE NUMBER: 4\nclass Case4(x: Int = null)\n\n\/\/ TESTCASE NUMBER: 5\nclass Case5 constructor(x: Any = null)\n\n\/\/ TESTCASE NUMBER: 6\nclass Case6 {","completion":"fun foo(x: Nothing = null) {}\n}\n\n\/\/ TESTCASE NUMBER: 7\nclass Case7 {\n val x: Int get() = null\n}\n\n\/\/ TESTCASE NUMBER: 8\nclass Case8 {\n var x: Any = 0<|endoftext|>"} {"prompt":"public inline fun kotlin.BooleanArray.maxOf(selector: (kotlin.Boolean) -> kotlin.Double): kotlin.Double\n\n@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.OverloadResolutionByLambdaReturnType\n@kotlin.internal.InlineOnly","completion":"public inline fun kotlin.BooleanArray.maxOf(selector: (kotlin.Boolean) -> kotlin.Float): kotlin.Float\n\n@kotlin.SinceKotlin(version = \"1.4\")\n@kotlin.OverloadResolutionByLambdaReturnType\n@kotlin.internal.InlineOnly<|endoftext|>"} {"prompt":"\"SUPERTYPE_INITIALIZED_IN_INTERFACE\",\n \"INTERFACE_WITH_SUPERCLASS\",\n \"FINAL_SUPERTYPE\",\n \"CLASS_CANNOT_BE_EXTENDED_DIRECTLY\",\n \"SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE\",\n \"SINGLETON_IN_SUPERTYPE\",","completion":"\"NULLABLE_SUPERTYPE\",\n \"MANY_CLASSES_IN_SUPERTYPE_LIST\",\n \"SUPERTYPE_APPEARS_TWICE\",\n \"CLASS_IN_SUPERTYPE_FOR_ENUM\",\n \"SEALED_SUPERTYPE\",\n \"SEALED_SUPERTYPE_IN_LOCAL_CLASS\",<|endoftext|>"} {"prompt":"\/\/ SKIP_KT_DUMP\n\/\/ TARGET_BACKEND: JVM\n\n\/\/ FILE: Java1.java\npublic class Java1 extends KotlinClass { }\n\n\/\/ FILE: Java2.java\npublic class Java2 extends KotlinClass { }\n\n\/\/ FILE: Java3.java\npublic class Java3 extends KotlinClass {\n public void foo(T t) { }","completion":"public Number bar() {\n return null;\n }\n}\n\n\/\/ FILE: Java4.java\npublic class Java4 extends KotlinClass2 { }\n\n\/\/ FILE: Java5.java\npublic class Java5 extends KotlinClass2 { }\n\n\/\/ FILE: Java6.java\npublic class Java6 extends KotlinClass2 {\n @Override\n public void foo(Number t) {}\n @Override<|endoftext|>"} {"prompt":"override fun isSubClassOf(subClass: KtClassOrObjectSymbol, superClass: KtClassOrObjectSymbol): Boolean {\n return isSubClassOf(subClass, superClass, allowIndirectSubtyping = true)\n }\n\n override fun isDirectSubClassOf(subClass: KtClassOrObjectSymbol, superClass: KtClassOrObjectSymbol): Boolean {","completion":"return isSubClassOf(subClass, superClass, allowIndirectSubtyping = false)\n }\n\n private fun isSubClassOf(subClass: KtClassOrObjectSymbol, superClass: KtClassOrObjectSymbol, allowIndirectSubtyping: Boolean): Boolean {\n require(subClass is KtFirSymbol<*>)<|endoftext|>"} {"prompt":"fun src(src : String) { \/*...*\/ }\n }\n\n class Library : ClassPathEntry {\n fun classpath(entries : ClassPathEntry\/*...*\/) { \/*...*\/ }\n }\n\n fun library(initializer : Library.() -> Library) {\n val lib = Library()\n lib.initializer()\n return lib\n }\n\n fun classpath(\/*...*\/)","completion":"fun module(\/*...*\/)\n}<|endoftext|>"} {"prompt":"\/\/ `(P * Q)(primitive)` -> `P(primitive), Q(primitive)`\n else -> Pair(argument, argument)\n }\n\n private fun generateAlias(argument: JsExpression): Pair {\n val tmp = JsScope.declareTemporary()\n val statementContext = lastStatementLevelContext","completion":"statementContext.addPrevious(newVar(tmp, null))\n return Pair(assignment(tmp.makeRef(), argument), tmp.makeRef())\n }\n\n private val JsExpression.needsAlias: Boolean\n get() = when (this) {\n is JsLiteral.JsValueLiteral -> false\n else -> !isLocalVar\n }<|endoftext|>"} {"prompt":"val DOCUMENT_POSITION_CONTAINS: Short\n val DOCUMENT_POSITION_CONTAINED_BY: Short\n val DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: Short\n }\n}\n\n\/**\n * Exposes the JavaScript [HTMLSourceElement](https:\/\/developer.mozilla.org\/en\/docs\/Web\/API\/HTMLSourceElement) to Kotlin\n *\/","completion":"public external abstract class HTMLSourceElement : HTMLElement, JsAny {\n open var src: String\n open var type: String\n open var srcset: String\n open var sizes: String\n open var media: String\n\n companion object {\n val ELEMENT_NODE: Short\n val ATTRIBUTE_NODE: Short\n val TEXT_NODE: Short<|endoftext|>"} {"prompt":"protected val outputXCFrameworkFile: File\n get() = outputDir.resolve(buildType.getName()).resolve(\"${xcFrameworkName.get()}.xcframework\")\n\n \/**\n * Adds the specified frameworks in this XCFramework.\n *\/\n fun from(vararg frameworks: Framework) {\n frameworks.forEach { framework ->","completion":"require(framework.konanTarget.family.isAppleFamily) {\n \"XCFramework supports Apple frameworks only\"\n }\n dependsOn(framework.linkTask)\n }\n fromFrameworkDescriptors(frameworks.map { FrameworkDescriptor(it) })\n }<|endoftext|>"} {"prompt":"val OVERLOADS_PRIVATE: KtDiagnosticFactory0 by warning0()\n val DEPRECATED_JAVA_ANNOTATION: KtDiagnosticFactory1 by warning1()","completion":"val JVM_PACKAGE_NAME_CANNOT_BE_EMPTY: KtDiagnosticFactory0 by error0()\n val JVM_PACKAGE_NAME_MUST_BE_VALID_NAME: KtDiagnosticFactory0 by error0()<|endoftext|>"} {"prompt":"val emptyMap: Map? = emptyMap()\n assertTrue(emptyMap.isNullOrEmpty())\n\n val map: Map? = mapOf('a' to 1, 'b' to 2, 'c' to 3)\n assertFalse(map.isNullOrEmpty())\n }\n\n @Sample\n fun mapOrEmpty() {","completion":"val nullMap: Map? = null\n assertPrints(nullMap.orEmpty(), \"{}\")\n\n val map: Map? = mapOf('a' to 1, 'b' to 2, 'c' to 3)\n assertPrints(map.orEmpty(), \"{a=1, b=2, c=3}\")\n }\n\n @Sample<|endoftext|>"} {"prompt":"classpath = classpath?.let(FileUtilRt::toSystemIndependentName)\n jdkHome = jdkHome?.let(FileUtilRt::toSystemIndependentName)\n kotlinHome = kotlinHome?.let(FileUtilRt::toSystemIndependentName)","completion":"friendPaths?.forEachIndexed { index, s -> friendPaths!![index] = FileUtilRt.toSystemIndependentName(s) }\n }\n\n is K2JSCompilerArguments -> {\n outputDir = (outputDir ?: outputFile)?.let(FileUtilRt::toSystemIndependentName)<|endoftext|>"} {"prompt":"fun testFailures(array: A, fill: A.(E, Int, Int) -> Unit, element: E, arraySize: Int) {\n assertFailsWith {\n array.fill(element, -1, arraySize)\n }\n assertFailsWith {","completion":"array.fill(element, 0, arraySize + 1)\n }\n assertFailsWith {\n array.fill(element, 1, 0)\n }\n }\n\n testFailures(BooleanArray(5) { it % 2 == 0 }, BooleanArray::fill, true, 5)<|endoftext|>"} {"prompt":"* DESCRIPTION: Implicit receiver: set of implicitly-imported extension callables\n *\/\n\n\/\/ FILE: Extensions.kt\npackage libPackage\n\nprivate fun String.padEnd(length: Int, padChar: Char = ' '): String = TODO()\n\n\/\/ FILE: TestCase.kt\npackage testCase1\nimport libPackage.*\n\n\/\/ TESTCASE NUMBER: 1\nfun case2(s: String) {","completion":"s.padEnd(length = 5)\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.types.IrSimpleType\n\nfun getInlineClassUnderlyingType(irClass: IrClass): IrSimpleType {\n val representation = irClass.inlineClassRepresentation ?: error(\"Not an inline class: ${irClass.render()}\")\n return representation.underlyingType\n}\n\nfun getInlineClassBackingField(irClass: IrClass): IrField {","completion":"for (declaration in irClass.declarations) {\n if (declaration is IrField && !declaration.isStatic)\n return declaration\n\n if (declaration is IrProperty) {\n val backingField = declaration.backingField\n if (backingField != null && !backingField.isStatic) {\n return backingField\n }\n }\n }<|endoftext|>"} {"prompt":"return categoryCode == CharCategory.DECIMAL_DIGIT_NUMBER.code\n }\n\n private fun isLetter(categoryCode: String): Boolean {\n return categoryCode in listOf(\n CharCategory.UPPERCASE_LETTER,\n CharCategory.LOWERCASE_LETTER,\n CharCategory.TITLECASE_LETTER,\n CharCategory.MODIFIER_LETTER,","completion":"CharCategory.OTHER_LETTER\n ).map { it.code }\n }\n\n private val otherLowerChars = listOf(\n ${otherLowercaseRanges.joinToString { it.hexIntRangeLiteral() }}\n ).flatten().toHashSet()\n\n private fun isLowerCase(char: Char, categoryCode: String): Boolean {<|endoftext|>"} {"prompt":"dependencyKind = DependencyKind.Source\n }\n\n useConfigurators(\n ::CommonEnvironmentConfigurator,\n ::JvmEnvironmentConfigurator,\n ::ScriptingPluginEnvironmentConfigurator\n )\n\n facadeStep(::FirFrontendFacade)\n firHandlersStep {\n useHandlers(\n ::FirDiagnosticsHandler\n )","completion":"commonFirHandlersForCodegenTest()\n }\n\n facadeStep(::Fir2IrResultsConverter)\n irHandlersStep {\n useHandlers(\n ::IrTextDumpHandler,\n ::IrPrettyKotlinDumpHandler,\n )\n }\n facadeStep(::JvmIrBackendFacade)\n jvmArtifactsHandlersStep {<|endoftext|>"} {"prompt":"}\n\n\/**\n * Returns a list of all elements sorted according to the specified [comparator].\n * \n * The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.\n *\/\npublic fun Iterable.sortedWith(comparator: Comparator): List {\n if (this is Collection) {","completion":"if (size <= 1) return this.toList()\n @Suppress(\"UNCHECKED_CAST\")\n return (toTypedArray() as Array).apply { sortWith(comparator) }.asList()\n }\n return toMutableList().apply { sortWith(comparator) }\n}\n\n\/**<|endoftext|>"} {"prompt":"\"shared:assembleReleaseAppleFrameworkForXcodeIosArm64\",\n \"shared:assembleDebugAppleFrameworkForXcodeIosArm64\",\n \"shared:assembleCustomDebugAppleFrameworkForXcodeIosX64\",\n \"shared:assembleCustomReleaseAppleFrameworkForXcodeIosX64\",\n \"shared:assembleCustomDebugAppleFrameworkForXcodeIosArm64\",","completion":"\"shared:assembleCustomReleaseAppleFrameworkForXcodeIosArm64\",\n ),\n environmentVariables = environmentVariables,\n )\n buildAndFail(\n \":shared:embedAndSignCustomAppleFrameworkForXcode\",\n environmentVariables = environmentVariables\n ) {\n assertTasksFailed(\":shared:embedAndSignCustomAppleFrameworkForXcode\")<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.fir.renderer\n\nimport org.jetbrains.kotlin.fir.symbols.FirBasedSymbol\nimport org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol\nimport org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol","completion":"open class FirSymbolRenderer {\n\n internal lateinit var components: FirRendererComponents\n protected val printer get() = components.printer\n\n open fun printReference(symbol: FirBasedSymbol<*>) {\n printer.print(renderReference(symbol))\n }\n\n protected open fun renderReference(symbol: FirBasedSymbol<*>): String {<|endoftext|>"} {"prompt":"class A {\n fun foo(i: A) {}\n\n fun baz(i: A) {}\n}\n\nclass B {\n fun foo(s: B) {}\n fun foo(c: Char) {}\n\n fun baz(s: B) {}\n}\n\nfun bar(f: (T) -> Unit): T = TODO()\n\nfun test() {","completion":"myWith(A()) {\n val t1 = bar(::foo)\n\n val t2 = bar(::baz)<|endoftext|>"} {"prompt":"causeOfIncorporationConstraint.kind,\n )\n val isFromVariableFixation = otherConstraint.position.from is FixVariableConstraintPosition<*>\n || causeOfIncorporationConstraint.position.from is FixVariableConstraintPosition<*>\n\n if (!causeOfIncorporationConstraint.kind.isEqual() &&","completion":"!isUsefulForNullabilityConstraint &&\n !isFromVariableFixation &&\n !containsConstrainingTypeWithoutProjection(newConstraintType, causeOfIncorporationConstraint)\n ) return\n\n if (trivialConstraintTypeInferenceOracle.isGeneratedConstraintTrivial(<|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-56949\n\n\/\/ IGNORE_LIGHT_ANALYSIS\n\/\/ IGNORE_BACKEND: ANY\n\/\/ REASON: red code (see corresponding diagnostic test)\n\nfun box(): String {\n build {\n setTypeVariable(TargetType())\n consumeDifferentTypeSubtype(getTypeVariable())\n }\n return \"OK\"\n}\n\n\n\n\nclass TargetType\nclass DifferentType","completion":"fun consumeDifferentTypeSubtype(value: T) {}\n\nclass Buildee {\n fun setTypeVariable(value: TV) { storage = value }\n fun getTypeVariable(): TV = storage\n private var storage: TV = TargetType() as TV\n}\n\nfun build(instructions: Buildee.() -> Unit): Buildee {<|endoftext|>"} {"prompt":"j.I {}\n}\n\nfun K.testK() {\n C()\n C2()\n I {}\n}\n\nfun testK2(k: K) {","completion":"k.C()\n k.C2()\n k.I {}\n}\n\n\/\/ MODULE: m2(m1)\n\/\/ FILE: testResolutionContinues.kt\nfun J.testResolutionContinues() {\n acceptI(I {})\n}<|endoftext|>"} {"prompt":"if (f != null) f\n\n if (x != null) x.equals(null)","completion":"if (x != null) x.propT\n\n if (x != null) x.propAny<|endoftext|>"} {"prompt":"private fun handleAsIncOrDecOperator(context: BindingContext, unaryExpression: KtUnaryExpression): KtCallInfo? {\n if (unaryExpression.operationToken !in KtTokens.INCREMENT_AND_DECREMENT) return null\n val operatorCall = unaryExpression.getResolvedCall(context) ?: return null","completion":"val resolvedCalls = mutableListOf(operatorCall)\n val operatorPartiallyAppliedSymbol = operatorCall.toPartiallyAppliedFunctionSymbol(context) ?: return null\n val baseExpression = unaryExpression.baseExpression\n val kind = unaryExpression.getInOrDecOperationKind()\n val precedence = when (unaryExpression) {<|endoftext|>"} {"prompt":"fun invoke()\n}\n\nfun interface F5 {\n val functionDelegate: Any? get() = null\n fun invoke()\n}\n\nfun interface F6 {\n val String.functionDelegate: Function<*>? get() = null","completion":"fun getFunctionDelegate(x: Any?): Function<*>? = null\n fun invoke()\n}<|endoftext|>"} {"prompt":"if (fullyExpandedType.isArrayOfNothing()) {\n reporter.reportOn(source, FirErrors.UNSUPPORTED, \"Array is illegal\", context)\n } else {\n for (typeArg in fullyExpandedType.typeArguments) {\n val typeArgType = typeArg.type ?: continue\n checkTypeAndTypeArguments(typeArgType, source, context, reporter)","completion":"}\n }\n }\n}<|endoftext|>"} {"prompt":"fun testVarianceDifferentReturnTypesCReverse(): Invariant = Invariant()\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesCReverse(): Invariant<*> = Invariant()","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesD(): Invariant = Invariant()\nfun testVarianceDifferentReturnTypesD(): Invariant<*> = Invariant()<|endoftext|>"} {"prompt":"\/\/ https:\/\/webassembly.github.io\/gc\/core\/binary\/types.html\n const val FUNC_TYPE: Byte = -0x20 \/\/ 0x60\n const val STRUCT_TYPE: Byte = -0x21 \/\/ 0x5F\n const val ARRAY_TYPE: Byte = -0x22 \/\/ 0x5E\n const val SUB_TYPE: Byte = -0x30 \/\/ 0x50","completion":"const val SUB_FINAL_TYPE: Byte = -0x31 \/\/ 0x4F\n const val REC_GROUP: Byte = -0x32 \/\/ 0x4E\n\n @JvmInline\n value class Section private constructor(val id: UShort) {\n companion object {\n \/\/ https:\/\/webassembly.github.io\/spec\/core\/binary\/modules.html#sections<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertTrue\nimport org.jetbrains.kotlin.test.services.JUnit5Assertions.fail\nimport java.io.File\n\ninternal class PredefinedTestCaseGroupProvider(annotation: PredefinedTestCases) : TestCaseGroupProvider {","completion":"private val testCaseIdToPredefinedTestCase: Map = buildMap {\n annotation.testCases.forEach { predefinedTestCase ->\n val testCaseId = TestCaseId.Named(predefinedTestCase.name)\n if (put(testCaseId, predefinedTestCase) != null)<|endoftext|>"} {"prompt":"val nearestClass = this as? IrClass ?: parentClassOrNull ?: return false\n val outermostClass = generateSequence(nearestClass) { it.parentClassOrNull }.last()\n return outermostClass.visibility == DescriptorVisibilities.PRIVATE\n }\n}\n\n\/** An optimization to avoid re-computing file for every visited declaration *\/","completion":"internal abstract class FileAwareIrElementTransformerVoid(startingFile: PLFile?) : IrElementTransformerVoid() {\n private var _currentFile: PLFile? = startingFile\n val currentFile: PLFile get() = _currentFile ?: error(\"No information about current file\")\n\n protected fun runInFile(file: PLFile, block: () -> T): T {<|endoftext|>"} {"prompt":"private val SINGLE_VALUE_RANGE = SINGLE_VALUE_PATTERN.toRegex()\n }\n}\n\ninternal fun fixSemver(version: String): String {\n var i = 0\n var number = 0\n var major = \"0\"\n var minor = \"0\"\n var patch = \"0\"\n val rest = StringBuilder()\n val digits = StringBuilder()","completion":"fun setComponent() {\n val digitsFiltered = digits.toString().trimStart { it == '0' }.takeIf { it.isNotEmpty() } ?: \"0\"\n when (number) {\n 0 -> major = digitsFiltered\n 1 -> minor = digitsFiltered\n 2 -> patch = digitsFiltered\n else -> error(number)\n }\n }<|endoftext|>"} {"prompt":"incrementalResultsConsumer?.run {\n processPackagePart(ioFile, compiledFile.metadata, empty, empty)\n with(compiledFile.irData!!) {\n processIrFile(\n ioFile,\n fileData,\n types,\n signatures,\n strings,\n declarations,\n bodies,\n fqName.toByteArray(),\n fileMetadata,","completion":"debugInfo,\n )\n }\n }\n },\n processKlibHeader = {\n incrementalResultsConsumer?.processHeader(it)\n },\n )\n\n val fullSerializedIr = serializerOutput.serializedIr ?: error(\"Metadata-only KLIBs are not supported in Kotlin\/JS\")\n\n val versions = KotlinLibraryVersioning(<|endoftext|>"} {"prompt":"parameters.printJoin(\", \")\n println(\" ->\")\n } else {\n println()\n }\n indented {\n body?.print()\n }\n println()\n println(\"}\")\n }\n }\n\n override fun visitTypeOperator(expression: IrTypeOperatorCall) {\n when (expression.operator) {","completion":"IrTypeOperator.IMPLICIT_COERCION_TO_UNIT -> {\n expression.argument.print()\n }\n IrTypeOperator.NOT_INSTANCEOF -> {\n expression.argument.print()\n }\n IrTypeOperator.CAST, IrTypeOperator.SAFE_CAST, IrTypeOperator.IMPLICIT_CAST -> {\n expression.argument.print()\n }<|endoftext|>"} {"prompt":"val startCollectionCount = startCounts?.collectionCount ?: 0\n measurements += GarbageCollectionMeasurement(\n it.name,\n it.collectionTime - startCollectionTime,\n it.collectionCount - startCollectionCount\n )\n }\n }\n\n private fun recordJitCompilationTime() {\n if (!isEnabled) return","completion":"val bean = ManagementFactory.getCompilationMXBean() ?: return\n measurements += JitCompilationMeasurement(bean.totalCompilationTime)\n }\n\n private fun recordInitializationTime() {\n val time = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - initStartNanos)\n measurements += CompilerInitializationMeasurement(time)<|endoftext|>"} {"prompt":"is ClassDescriptor -> \"class\"\n else -> \"non-function declaration\"\n }\n declaration.modifierList?.getModifier(KtTokens.EXTERNAL_KEYWORD)?.let {\n trace.report(Errors.WRONG_MODIFIER_TARGET.on(it, KtTokens.EXTERNAL_KEYWORD, target))\n }\n return\n }","completion":"if (DescriptorUtils.isInterface(descriptor.containingDeclaration)) {\n trace.report(ErrorsJvm.EXTERNAL_DECLARATION_IN_INTERFACE.on(declaration))\n }\n else if (descriptor.modality == Modality.ABSTRACT) {\n if (declaration is KtPropertyAccessor) {<|endoftext|>"} {"prompt":"import kotlin.reflect.KClass\n\nprivate val NamedDomainObjectContainer.jvmMain\n get() = maybeCreate(\"jvmMain\")\n\nprivate val Project.jvmWarmup: Int\n get() = (property(\"jvmWarmup\") as String).toInt()\n\nprivate val Project.jvmBenchResults: String\n get() = property(\"jvmBenchResults\") as String","completion":"open class KotlinNativeBenchmarkExtension @Inject constructor(project: Project) : BenchmarkExtension(project) {\n var jvmSrcDirs: Collection = emptyList()\n var mingwSrcDirs: Collection = emptyList()\n var posixSrcDirs: Collection = emptyList()<|endoftext|>"} {"prompt":"}\n\n if (rhs.isMarkedNullable) {\n trace.report(ACTUAL_TYPE_ALIAS_TO_NULLABLE_TYPE.on(declaration))\n return\n }\n }\n }\n\n private fun getUsedTypeAliasParameters(type: KotlinType, typeAlias: TypeAliasDescriptor): Set =","completion":"type.constituentTypes().mapNotNullTo(HashSet()) {\n val descriptor = it.constructor.declarationDescriptor as? TypeParameterDescriptor\n descriptor?.takeIf { it.containingDeclaration == typeAlias }\n }\n\n private class TypeAliasDeclarationCheckingReportStrategy(\n private val trace: BindingTrace,<|endoftext|>"} {"prompt":"visitLoop(x)\n\n open fun visitDocComment(comment: JsDocComment): Unit =\n visitElement(comment)\n\n open fun visitSingleLineComment(comment: JsSingleLineComment): Unit =\n visitElement(comment)\n\n open fun visitMultiLineComment(comment: JsMultiLineComment): Unit =\n visitElement(comment)","completion":"open fun visitExport(export: JsExport): Unit =\n visitElement(export)\n\n open fun visitImport(import: JsImport): Unit =\n visitElement(import)\n\n protected open fun visitElement(node: JsNode) {\n }\n}<|endoftext|>"} {"prompt":"\/\/ !LANGUAGE: -AllowBreakAndContinueInsideWhen\n\nfun breakContinueInWhen(i: Int) {\n for (y in 0..10) {\n when(i) {\n 0 -> continue\n 1 -> break\n 2 -> {","completion":"for(z in 0..10) {\n break\n }\n for(w in 0..10) {\n continue\n }\n }\n }\n }\n}\n\n\nfun breakContinueInWhenWithWhile(i: Int, j: Int) {\n while (i > 0) {\n when (i) {<|endoftext|>"} {"prompt":"capturedVar.putFieldInsns.forEach { set(it, VarInsnNode(storeOpcode, capturedVar.localVarIndex)) }\n }\n }\n\n }\n}\n\ninternal const val REF_ELEMENT_FIELD = \"element\"\ninternal const val INIT_METHOD_NAME = \"\"","completion":"internal val REF_TYPE_TO_ELEMENT_TYPE = HashMap().apply {\n put(AsmTypes.OBJECT_REF_TYPE.internalName, AsmTypes.OBJECT_TYPE)\n PrimitiveType.entries.forEach {\n put(AsmTypes.sharedTypeForPrimitive(it).internalName, AsmTypes.valueTypeForPrimitive(it))\n }<|endoftext|>"} {"prompt":"var xx: String? = null\n\n init {\n class A {\n val x = str\n }\n\n xx = A().x\n }\n}\n\nfun testFun3(str: String): String = TestClass(str).xx!!\n\n\nfun String.testFun4(): String {\n class A {\n val x = this@testFun4\n }\n return A().x\n}","completion":"fun box(): String {\n return when {\n testFun1(\"test1\") != \"test1\" -> \"Fail #1 (local class with capture)\"\n testFun2(\"test2\") != \"test2\" -> \"Fail #2 (local class with capture ctor in another context)\"\n testFun3(\"test3\") != \"test3\" -> \"Fail #3 (local class with capture ctor in init{ ... })\"<|endoftext|>"} {"prompt":"\/\/ WITH_STDLIB\n\nimport kotlin.test.*\n\n@Suppress(\"NOTHING_TO_INLINE\")\ninline fun foo(i4: Int, i5: Int): Int {\n if (i4 > 0) return i4\n return i5\n}\n\nfun bar(i1: Int, i2: Int): Int {\n return foo(i1, i2)\n}","completion":"fun box(): String {\n assertEquals(3, bar(3, 8))\n return \"OK\"\n}<|endoftext|>"} {"prompt":"val f_reduceRightIndexedOrNullSuper = fn(\"reduceRightIndexedOrNull(operation: (index: Int, T, acc: S) -> S)\") {\n include(Lists, ArraysOfObjects)\n } builder {\n since(\"1.4\")\n inline()\n\n doc { reduceDoc(\"reduceRightIndexedOrNull\") }","completion":"sample(\"samples.collections.Collections.Aggregates.reduceRightOrNull\")\n typeParam(\"S\")\n typeParam(\"T : S\")\n returns(\"S?\")\n body {\n \"\"\"\n var index = lastIndex\n if (index < 0) return null\n\n var accumulator: S = get(index--)\n while (index >= 0) {<|endoftext|>"} {"prompt":"super.visitCallableReferenceAccess(callableReferenceAccess)\n }\n\n override fun visitResolvedQualifier(resolvedQualifier: FirResolvedQualifier) {\n processResolvedQualifier(resolvedQualifier)\n super.visitResolvedQualifier(resolvedQualifier)\n }","completion":"override fun visitErrorResolvedQualifier(errorResolvedQualifier: FirErrorResolvedQualifier) {\n processResolvedQualifier(errorResolvedQualifier)\n super.visitErrorResolvedQualifier(errorResolvedQualifier)\n }\n\n private fun processErrorNameReference(resolvable: FirResolvable) {<|endoftext|>"} {"prompt":"items.mapNotNull { (it.content.firstOrNull() as? Text)?.textTrim }\n } else {\n listOfNotNull((it.content.firstOrNull() as? Text)?.textTrim)\n }\n }\n return null\n}\n\nprivate fun readV2Config(element: Element): KotlinFacetSettings {\n return readV2AndLaterConfig(element)\n}","completion":"private fun readLatestConfig(element: Element): KotlinFacetSettings {\n return readV2AndLaterConfig(element) { el, bean -> CompilerArgumentsDeserializerV5(bean).deserializeFrom(el) }\n}\n\nfun deserializeFacetSettings(element: Element): KotlinFacetSettings {\n val version = try {\n element.getAttribute(\"version\")?.intValue<|endoftext|>"} {"prompt":"\/\/ rootProject will be handled with the SingleActionPerProject above\n if (project.rootProject !== project) {\n doHandleHierarchicalStructureFlagsMigration(project)\n }\n}\n\nprivate fun doHandleHierarchicalStructureFlagsMigration(project: Project) {\n with(PropertiesProvider(project)) {\n if (hierarchicalStructureSupport) {","completion":"if (project === project.rootProject)\n project.extensions.extraProperties.getOrPut(PropertyNames.KOTLIN_MPP_ENABLE_GRANULAR_SOURCE_SETS_METADATA) { \"true\" }\n PropertiesProvider(project).mpp13XFlagsSetByPlugin = true\n }\n }\n}<|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-45970\n\nval a_1: Byte = 1\nvar a_2: Byte = 1\nval b_1: Short = 1\nvar b_2: Short = 1\nval c_1: Int = 1\nvar c_2: Int = 1\nval d_1: Long = 1\nvar d_2: Long = 1","completion":"val e_1: Byte = 1 + 2\nvar e_2: Byte = 1 + 2<|endoftext|>"} {"prompt":"import javax.inject.Inject\n\n\n@DisableCachingByDefault(because = \"Swift Export is experimental, so no caching for now\")\ninternal abstract class SwiftExportTask : DefaultTask() {\n\n @get:InputFiles\n @get:PathSensitive(PathSensitivity.RELATIVE)\n abstract val swiftExportClasspath: ConfigurableFileCollection\n\n @get:Inject","completion":"abstract val workerExecutor: WorkerExecutor\n\n @get:Nested\n abstract val parameters: SwiftExportParameters\n\n @TaskAction\n fun run() {\n val workQueue = workerExecutor.classLoaderIsolation { workerSpec ->\n workerSpec.classpath.from(swiftExportClasspath)\n }\n\n workQueue.submit(SwiftExportAction::class.java) { workParameters -><|endoftext|>"} {"prompt":"override fun getContributedDescriptors(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean) =\n addedDescriptors.subList(0, descriptorLimit)\n\n override fun getContributedClassifier(name: Name, location: LookupLocation) =\n variableOrClassDescriptorByName(name, descriptorLimit) as? ClassifierDescriptor","completion":"\/\/ NB. This is important to have this explicit override, otherwise calls will be delegated to `this`-delegate,\n \/\/ which will use default implementation from `ResolutionScope`, which will call `getContributedClassifier` on\n \/\/ the `LexicalWritableScope` instead of calling it on this snapshot\n override fun getContributedClassifierIncludeDeprecated(\n name: Name,\n location: LookupLocation<|endoftext|>"} {"prompt":"scope.offsetInBits += sizeInBits\n val alignInBits = expression.type.alignment\n scope.offsetInBits = alignTo(scope.offsetInBits, alignInBits)\n @Suppress(\"UNCHECKED_CAST\")\n scope.members.add(DICreateMemberType(\n refBuilder = builder,","completion":"refScope = scope.scope as DIScopeOpaqueRef,\n name = expression.computeSymbolName(),\n file = irFile.diFileScope(),\n lineNum = expression.startLine(),\n sizeInBits = sizeInBits,\n alignInBits = alignInBits,\n offsetInBits = scope.offsetInBits,\n flags = 0,<|endoftext|>"} {"prompt":"bar2 {}\n bar2 {1}\n bar2 {it}\n bar2 {it -> it}\n}","completion":"fun bar(f : (Int, Int) -> Int) {}\nfun bar1(f : (Int) -> Int) {}\nfun bar2(f : () -> Int) {}\n\ninfix fun String.to(dest : String) {\n\n}\n\ninfix fun String.on(predicate : (s : URI) -> Boolean) : URI {\n return URI(this)\n}<|endoftext|>"} {"prompt":"return getMetricReporter(chunk)?.measure(metric, action) ?: action.invoke()\n }\n\n override fun reportDirtyFiles(kotlinDirtySourceFilesHolder: KotlinDirtySourceFilesHolder) {\n getMetricReporter(kotlinDirtySourceFilesHolder.chunk)?.let {","completion":"it.addChangedFiles(kotlinDirtySourceFilesHolder.allRemovedFilesFiles.map { it.path })\n it.addChangedFiles(kotlinDirtySourceFilesHolder.allDirtyFiles.map { it.path })\n }\n }\n\n override fun reportCompilerArguments(chunk: ModuleChunk, kotlinChunk: KotlinChunk) {<|endoftext|>"} {"prompt":"val cacheMode = testRunSettings.get()\n when {\n cacheMode.useStaticCacheForUserLibraries -> {\n this[\"staticCache\"] = \"TestMode.Scope.EVERYWHERE\"\n this[\"lazyIr\"] = \"TestMode.Scope.NOWHERE\" \/\/ by default LazyIR is disabled\n }\n cacheMode.useStaticCacheForDistributionLibraries -> {","completion":"this[\"staticCache\"] = \"TestMode.Scope.DISTRIBUTION\"\n this[\"lazyIr\"] = \"TestMode.Scope.NOWHERE\" \/\/ by default LazyIR is disabled\n }\n }\n }\n\n override fun customizeModuleSources(moduleName: String, moduleSourceDir: File) {\n if (moduleName == MAIN_MODULE_NAME)<|endoftext|>"} {"prompt":"@Suppress(\"NOTHING_TO_INLINE\")\ninternal inline fun compactMapOf(key: K, value: V): Map =\n singletonMap(key, value)\n\n@Suppress(\"NOTHING_TO_INLINE\")","completion":"internal inline fun compactMapOf(key1: K, value1: V, key2: K, value2: V): Map =\n SmartFMap.emptyMap().plus(key1, value1).plus(key2, value2)\n\ninternal inline fun Iterable.firstNonNull() = firstIsInstance()<|endoftext|>"} {"prompt":"GCInfo(key, accumulator.gcTime + element.gcTime, accumulator.collections + element.collections)\n },\n (components.toList() + other.components.toList()).groupingBy { (name, _) -> name }.fold(0L) { a, b -> a + b.second },\n files + other.files,\n lines + other.lines\n )","completion":"}\n\n fun totalTime() = components.values.sum()\n }\n\n protected lateinit var totalPassResult: CumulativeTime\n\n override fun beforePass(pass: Int) {\n totalPassResult = CumulativeTime()\n totalModules.clear()\n okModules.clear()\n errorModules.clear()\n crashedModules.clear()<|endoftext|>"} {"prompt":"nameBindings[tag] = readString()\n }\n }\n\n return JsIrModuleHeaderNames(definitions, nameBindings, optionalCrossModuleImports)\n }\n\n protected fun CodedOutputStream.commitJsIrModuleHeaderNames(jsIrHeader: JsIrModuleHeader) {\n val names = mutableMapOf>()","completion":"for ((tag, name) in jsIrHeader.nameBindings) {\n names[tag] = NameType.NAME_BINDINGS.typeMask to name\n }\n for (tag in jsIrHeader.optionalCrossModuleImports) {\n val maskAndName = names[tag]<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol\nimport org.jetbrains.kotlin.fir.types.*\nimport org.jetbrains.kotlin.fir.visitors.FirTransformer\nimport org.jetbrains.kotlin.fir.visitors.FirVisitor","completion":"import org.jetbrains.kotlin.name.StandardClassIds\nimport org.jetbrains.kotlin.types.TypeApproximatorConfiguration\n\nclass FirWhenExhaustivenessTransformer(private val bodyResolveComponents: BodyResolveComponents) : FirTransformer() {\n companion object {\n private val exhaustivenessCheckers = listOf(<|endoftext|>"} {"prompt":"public inline fun ByteArray.filter(predicate: (Byte) -> Boolean): List {\n return filterTo(ArrayList(), predicate)\n}\n\n\/**\n * Returns a list containing only elements matching the given [predicate].\n * \n * @sample samples.collections.Collections.Filtering.filter\n *\/","completion":"public inline fun ShortArray.filter(predicate: (Short) -> Boolean): List {\n return filterTo(ArrayList(), predicate)\n}\n\n\/**\n * Returns a list containing only elements matching the given [predicate].\n * \n * @sample samples.collections.Collections.Filtering.filter\n *\/<|endoftext|>"} {"prompt":"\/\/ TARGET_BACKEND: NATIVE\n\/\/ MODULE: cinterop\n\/\/ FILE: kt57640.def\nlanguage = Objective-C\nheaders = kt57640.h\n\n\/\/ FILE: kt57640.h\n#import \n\n@interface Base : NSObject\n@property (readwrite) Base* delegate;\n@end\n\n@protocol Foo","completion":"@property (readwrite) id delegate;\n@end\n\n@protocol Bar\n@property (readwrite) id delegate;\n@end\n\n@interface Derived : Base\n\/\/ This interface does not have re-declaration of property `delegate`.\n\/\/ Return type of getter `delegate()` and param type of setter `setDelegate()` are:<|endoftext|>"} {"prompt":"public abstract operator fun get(index: kotlin.Int): kotlin.Char\n\n public abstract fun subSequence(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence\n}\n\npublic interface Comparable {\n public abstract operator fun compareTo(other: T): kotlin.Int\n}","completion":"public final class Double private constructor() : kotlin.Number, kotlin.Comparable {\n public companion object {\n public const final val MAX_VALUE: kotlin.Double = COMPILED_CODE \/* compiled code *\/\n\n public const final val MIN_VALUE: kotlin.Double = COMPILED_CODE \/* compiled code *\/<|endoftext|>"} {"prompt":"\/\/ EXPECTED_REACHABLE_NODES: 1312\npackage foo\n\nopen class X(private val x: String) {\n fun foo(): String {\n class B : X(\"fail1\") {\n inner class C {\n fun bar() = x\n }\n\n fun baz() = C().bar()\n }\n return B().baz()\n }\n}","completion":"open class Y(private val x: String) {\n fun foo(): String {\n class B {\n inner class C : Y(\"fail2\") {\n fun bar() = x\n }\n\n fun baz() = C().bar()\n }\n return B().baz()\n }\n}\n\nfun box(): String {\n val x = X(\"OK\").foo()<|endoftext|>"} {"prompt":"\/\/ is declared to extend Super, and propagating data here is highly non-trivial, so we only look at the head type constructor\n \/\/ (outermost type), unless the type in the subclass is interchangeable with the all the types in superclasses:\n \/\/ e.g. we have (Mutable)List! in the subclass and { List, (Mutable)List! } from superclasses","completion":"\/\/ Note that `this` is flexible here, so it's equal to it's bounds\n val onlyHeadTypeConstructor = forceOnlyHeadTypeConstructor ||\n (isCovariant && overrides.any { !this@computeIndexedQualifiers.isEqual(it) })\n\n val treeSize = if (onlyHeadTypeConstructor) 1 else indexedThisType.size<|endoftext|>"} {"prompt":"fun serializeIrFile(file: IrFile): SerializedIrFile = declarationTable.inFile(file) {\n val topLevelDeclarations = mutableListOf()\n\n val proto = ProtoFile.newBuilder()\n .addAllFqName(serializeFqName(file.packageFqName.asString()))","completion":".addAllAnnotation(serializeAnnotations(file.annotations))\n\n file.declarations.forEach {\n if (skipIfPrivate(it)) {\n \/\/ Skip the declaration if producing header klib and the declaration is not public.\n return@forEach\n }\n if (it.descriptor.isExpectMember && !it.descriptor.isSerializableExpectClass) {<|endoftext|>"} {"prompt":"override fun resolveFriendPaths(compilation: InternalKotlinCompilation<*>): Iterable {\n return mutableListOf().apply {\n compilation.allAssociatedCompilations.forEach {\n add(it.output.classesDirs)\n \/\/ Adding classes that could be produced to non-default destination for JVM target\n \/\/ Check KotlinSourceSetProcessor for details","completion":"@Suppress(\"UNCHECKED_CAST\")\n add(\n compilation.project.files(\n (it.compileTaskProvider as TaskProvider).flatMap { task -> task.destinationDirectory }\n )\n )\n }\n add(friendArtifactResolver.resolveFriendArtifacts(compilation))\n }\n }\n\n \/* Resolution of friend artifacts *\/<|endoftext|>"} {"prompt":"* Returns a copy of this string converted to upper case using the rules of the specified [locale].\n *\n * This function supports one-to-many and many-to-one character mapping,\n * thus the length of the returned string can be different from the length of the original string.\n *\n * @sample samples.text.Strings.uppercaseLocale\n *\/\n@SinceKotlin(\"1.5\")","completion":"@WasExperimental(ExperimentalStdlibApi::class)\n@kotlin.internal.InlineOnly\npublic inline fun String.uppercase(locale: Locale): String = (this as java.lang.String).toUpperCase(locale)\n\n\/**\n * Encodes the contents of this string using the specified character set and returns the resulting byte array.<|endoftext|>"} {"prompt":"case.foo(::y, ::y)\n case.foo(::y, ::y)\n\n this.foo(::x, ::y)","completion":"this.foo(::x, ::y)\n this.foo(::x, ::y)\n }\n\n}\n\n\n\/\/ TESTCASE NUMBER: 3\nclass Case3() {\n fun foo(vararg x: ()->Short): String = TODO() \/\/ (1.1)<|endoftext|>"} {"prompt":"glColor3f(1.0f, 0.0f, 0.0f)\n glTranslatef(0.0f, 0.0f, 0.0f)\n glRotatef(rotation, 0.0f, 1.0f, 0.0f)\n glRotatef(90.0f, 0.0f, 1.0f, 0.0f)","completion":"\/\/ Draw the teapot\n glutSolidTeapot(1.0)\n glPopMatrix()\n\n\n rotation += rotationSpeed\n glutSwapBuffers()\n}\n\n\nfun initialize() {\n \/\/ select projection matrix\n glMatrixMode(GL_PROJECTION)\n\n \/\/ set the viewport\n glViewport(0, 0, windowWidth, windowHeight)<|endoftext|>"} {"prompt":"fun tvosX64(name: String, configure: Action) = tvosX64(name) { configure.execute(this) }\n fun tvosX64(configure: Action) = tvosX64 { configure.execute(this) }\n\n fun tvosSimulatorArm64(","completion":"name: String = \"tvosSimulatorArm64\",\n configure: KotlinNativeTargetWithSimulatorTests.() -> Unit = { }\n ): KotlinNativeTargetWithSimulatorTests =\n configureOrCreate(\n name,\n @Suppress(\"DEPRECATION\")\n presets.getByName(\"tvosSimulatorArm64\") as KotlinNativeTargetWithSimulatorTestsPreset,<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin\n\nimport com.intellij.lang.LighterASTNode\nimport com.intellij.lang.TreeBackedLighterAST\nimport com.intellij.openapi.util.Ref\nimport com.intellij.psi.PsiComment\nimport com.intellij.psi.PsiElement\nimport com.intellij.psi.PsiFile","completion":"import com.intellij.psi.PsiWhiteSpace\nimport com.intellij.psi.tree.IElementType\nimport com.intellij.util.diff.FlyweightCapableTreeStructure\nimport org.jetbrains.kotlin.name.Name\nimport org.jetbrains.kotlin.util.OperatorNameConventions<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.test.model.Frontend2BackendConverter\nimport org.jetbrains.kotlin.test.model.FrontendFacade\nimport org.jetbrains.kotlin.test.model.FrontendKinds\n\nopen class AbstractIrLocalVariableTest : AbstractLocalVariableTestBase(FrontendKinds.ClassicFrontend) {","completion":"override val frontendFacade: Constructor>\n get() = ::ClassicFrontendFacade\n\n override val frontendToBackendConverter: Constructor>\n get() = ::ClassicFrontend2IrConverter<|endoftext|>"} {"prompt":"}\n\n val message = {\n \"Build service Gradle Node Modules should be already registered\"\n }\n\n requireNotNull(rootProjectDir, message)\n requireNotNull(cacheDir, message)\n\n return project.gradle.sharedServices.registerIfAbsent(serviceName, serviceClass) {\n it.parameters.rootProjectDir.set(rootProjectDir)","completion":"it.parameters.cacheDir.set(cacheDir)\n }\n }\n\n fun registerIfAbsent(\n project: Project,\n rootProjectDir: File?,\n cacheDir: Provider?\n ) = registerIfAbsentImpl(project, rootProjectDir, cacheDir).also { serviceProvider -><|endoftext|>"} {"prompt":"addSubtypesOf(builtIns.throwable.defaultType)\n\n is MergeInstruction ->\n addTypePredicates(it.outputValue)\n\n is AccessValueInstruction -> {\n val accessTarget = it.target\n val receiverValue = it.receiverValues[value]\n if (receiverValue != null) {","completion":"typePredicates.add(getReceiverTypePredicate((accessTarget as AccessTarget.Call).resolvedCall, receiverValue))\n } else {\n val expectedType = when (accessTarget) {\n is AccessTarget.Call ->\n (accessTarget.resolvedCall.resultingDescriptor as? VariableDescriptor)?.type\n is AccessTarget.Declaration ->\n accessTarget.descriptor.type<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.analysis.api.lifetime.withValidityAssertion\nimport org.jetbrains.kotlin.analysis.api.symbols.KtFunctionSymbol\nimport org.jetbrains.kotlin.analysis.api.symbols.KtReceiverParameterSymbol","completion":"import org.jetbrains.kotlin.analysis.api.symbols.KtTypeParameterSymbol\nimport org.jetbrains.kotlin.analysis.api.symbols.KtValueParameterSymbol\nimport org.jetbrains.kotlin.analysis.api.symbols.markers.KtSymbolKind<|endoftext|>"} {"prompt":"outer@ while (true) {\n inner@ while (x == null) {\n break@outer\n }\n }\n x","completion":"x.length\n}\n\n\/*\n * TESTCASE NUMBER: 2\n * UNEXPECTED BEHAVIOUR\n * ISSUES: KT-22454\n *\/\nfun case_2() {\n var x: String? = null<|endoftext|>"} {"prompt":"fun getSyntheticGetter(expression: IrGetField, scopes: List): IrSimpleFunctionSymbol {\n val dispatchReceiverType = expression.receiver?.type\n val dispatchReceiverClassSymbol = dispatchReceiverType?.classifierOrNull as? IrClassSymbol\n val symbol = expression.symbol","completion":"val parent = symbol.owner.accessorParent(dispatchReceiverClassSymbol?.owner ?: symbol.owner.parent, scopes) as IrClass\n return getterMap.getOrPut(FieldKey(symbol, parent, expression.superQualifierSymbol)) {\n makeGetterAccessorSymbol(symbol, parent, expression.superQualifierSymbol)\n }\n }<|endoftext|>"} {"prompt":"* Counts the number of consecutive least significant bits that are zero in the binary representation of this [Long] number.\n *\/\n@SinceKotlin(\"1.4\")\npublic actual fun Long.countTrailingZeroBits(): Int =\n if (this == 0L) 64 else countTrailingZeroBits(this)\n\n\/**","completion":"* Returns a number having a single bit set in the position of the most significant set bit of this [Long] number,\n * or zero, if this number is zero.\n *\/\n@SinceKotlin(\"1.4\")\npublic actual fun Long.takeHighestOneBit(): Long =\n if (this == 0L) 0L else 1L.shl(64 - 1 - countLeadingZeroBits(this))\n\n\/**<|endoftext|>"} {"prompt":"inline fun foo4(t: T){}\n}\n\nclass B : Java1() \/\/Kotlin \u2190 Java \u2190 Kotlin\n\nclass C : Java1() { \/\/Kotlin \u2190 Java \u2190 Kotlin with explicit override\n override suspend fun foo3() { }\n override fun foo2() {}\n}\n\nsuspend fun test(b: B, c: C) {","completion":"b.foo()\n b.foo2()\n b.foo3()\n b.foo4(1)\n\n c.foo()\n c.foo2()\n c.foo3()\n c.foo4(\"\")\n}<|endoftext|>"} {"prompt":"case133 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 134\nfun case134(){\n val case134 = '\\u42ff'\n case134\n case134 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 135\nfun case135(){","completion":"val case135 = '\\u4300'\n case135\n case135 checkType { check()}\n}\n\/\/ TESTCASE NUMBER: 136\nfun case136(){\n val case136 = '\\u43ff'<|endoftext|>"} {"prompt":"object EnumWithContextualSerializer: ToDoSerializer(\"contextual|EnumWithContextual\")\nobject NestedEnumWithContextualSerializer: ToDoSerializer(\"contextual|Container.NestedEnumWithContextual\")","completion":"object EnumWithUseContextualSerializer: ToDoSerializer(\"contextual|EnumWithUseContextual\")\nobject NestedEnumWithUseContextualSerializer: ToDoSerializer(\"contextual|Container.NestedEnumWithUseContextual\")<|endoftext|>"} {"prompt":"fun getScriptInternalName(typeConstructor: TypeConstructorMarker): String\n\n \/\/ NB: The counterpart, [KotlinTypeMapper#writeGenericType], doesn't have restriction on [type]\n fun Writer.writeGenericType(type: KotlinTypeMarker, asmType: Type, mode: TypeMappingMode)\n}\n\nobject AbstractTypeMapper {","completion":"fun > mapClass(\n context: TypeMappingContext,\n typeConstructor: TypeConstructorMarker,\n materialized: Boolean\n ): Type {\n return with(context.typeContext) {\n when {\n typeConstructor.isClassTypeConstructor() -> {<|endoftext|>"} {"prompt":"operator fun Case.E.plusAssign(value: Int) {}\noperator fun Case.Inv.invoke(i: Int) {}\n\n\n\/\/ FILE: Lib22.kt\n\/\/ TESTCASE NUMBER: 4\npackage testPackCase4\nimport testPackCase4.Case\nimport testPackCase4.Case.Inv\nimport testPackCase4.Case.E","completion":"operator fun Case.E.plusAssign(value: Int) {}\noperator fun Case.Inv.invoke(i: Int) {}\n\n\n\/\/ FILE: TestCase4.kt\n\/\/ TESTCASE NUMBER: 4\npackage testPackCase4\nimport libPackage1.*\nclass Case() {\n\n operator fun plusAssign(value: Int) {}\n\n class E(val plusAssign: Inv? = null) {<|endoftext|>"} {"prompt":"in x !is String -> {}\n in x < x -> {}\n in x > x -> {}","completion":"in x <= x -> {}\n in x >= x -> {}\n in x == x -> {}<|endoftext|>"} {"prompt":"testGroup(\"native\/native.tests\/tests-gen\", \"native\/native.tests\/testData\") {\n testClass(\n suiteTestClassName = \"LldbTestGenerated\",\n annotations = listOf(\n debugger(),\n provider(),\n forceDebugMode(),\n forceHostTarget()\n )\n ) {","completion":"model(\"lldb\")\n }\n }\n testGroup(\"native\/native.tests\/tests-gen\", \"native\/native.tests\/testData\") {\n testClass(\n suiteTestClassName = \"FirLldbTestGenerated\",\n annotations = listOf(\n debugger(),\n provider(),\n forceDebugMode(),<|endoftext|>"} {"prompt":"get() = hasSerializableAnnotationWithoutArgs\n || (!annotations.hasSerializableAnnotation && hasMetaSerializableAnnotation)\n\nprivate val ClassDescriptor.hasSerializableAnnotationWithoutArgs: Boolean\n get() {\n if (!hasSerializableAnnotation) return false\n \/\/ If provided descriptor is lazy, carefully look at psi in order not to trigger full resolve which may be recursive.","completion":"\/\/ Otherwise, this descriptor is deserialized from another module, and it is OK to check value right away.\n val psi = findSerializableAnnotationDeclaration() ?: return (serializableWith == null)\n return psi.valueArguments.isEmpty()\n }\n\nprivate val ClassDescriptor.hasSerializableAnnotationWithArgs: Boolean\n get() {\n if (!hasSerializableAnnotation) return false<|endoftext|>"} {"prompt":"diagnosticHolder.report(ErrorsParcelize.NO_PARCELABLE_SUPERTYPE.on(reportElement))\n }\n\n for (supertypeEntry in declaration.superTypeListEntries) {\n supertypeEntry as? KtDelegatedSuperTypeEntry ?: continue\n val delegateExpression = supertypeEntry.delegateExpression ?: continue","completion":"val type = bindingContext[BindingContext.TYPE, supertypeEntry.typeReference] ?: continue\n if (type.isParcelable()) {\n val reportElement = supertypeEntry.byKeywordNode?.psi ?: delegateExpression\n diagnosticHolder.report(ErrorsParcelize.PARCELABLE_DELEGATE_IS_NOT_ALLOWED.on(reportElement))\n }<|endoftext|>"} {"prompt":"noLibraries: Boolean = false,\n target: TargetBackend = TargetBackend.JVM,\n useJdk11: Boolean = false\n) {\n useConfigurators(::SerializationEnvironmentConfigurator.bind(noLibraries))\n\n if (useJdk11) {\n configureModernJavaTest(TestJdkKind.FULL_JDK_11, JvmTarget.JVM_11)","completion":"}\n\n if (!noLibraries) {\n when (target) {\n TargetBackend.JVM, TargetBackend.JVM_IR -> useCustomRuntimeClasspathProviders(::SerializationRuntimeClasspathJvmProvider)\n TargetBackend.JS_IR, TargetBackend.JS_IR_ES6 -> useCustomRuntimeClasspathProviders(::SerializationRuntimeClasspathJsProvider)<|endoftext|>"} {"prompt":"@file:Suppress(\"NOTHING_TO_INLINE\")\n\npackage com.example\n\nclass SomeClass {\n\n @JvmName(\"changedFunctionJvmName\")\n fun changedFunction(): Int = 0\n\n val changedPropertyAccessor: Int\n @JvmName(\"changedPropertyAccessorJvmName\")\n get() = 0\n}\n\n@JvmName(\"changedInlineFunctionJvmName\")","completion":"inline fun changedInlineFunction(): Int = 0\n\ninline val changedInlinePropertyAccessor: Int\n @JvmName(\"changedInlinePropertyAccessorJvmName\")\n get() = 0<|endoftext|>"} {"prompt":"valueTypeConstructor.getApproximatedType()\n }\n is TypedCompileTimeConstant -> {\n val typeFromCall = callForArgument.resultingDescriptor.returnType?.lowerIfFlexible()\n if (typeFromCall != null) {\n typeFromCall\n } else {\n val constantValue = compileTimeValue.constantValue","completion":"if (constantValue is ErrorValue) return\n \/\/ Values of all numeric constants are held in Long value\n val value = constantValue.value as? Long ?: return\n IntegerLiteralTypeConstructor(value, moduleDescriptor, compileTimeValue.parameters).getApproximatedType()\n }\n }\n else -> return\n }<|endoftext|>"} {"prompt":"class Test {\n companion object {\n public var prop: Int = 0\n set(i : Int) {\n field = i\n }\n }\n}\n\n\/\/ TESTED_OBJECT_KIND: property\n\/\/ TESTED_OBJECTS: Test, prop\n\/\/ FLAGS: ACC_STATIC, ACC_PRIVATE\n\n\/\/ TESTED_OBJECT_KIND: property","completion":"\/\/ TESTED_OBJECTS: Test$Companion, prop\n\/\/ ABSENT: TRUE<|endoftext|>"} {"prompt":"const val a2 = tryFinally(10)\nconst val a3 = outerReturnTryFinally(10)\nconst val a4 = outerReturnUnitTryFinally(10)","completion":"const val b1 = tryFinally2()\nconst val c1 = "} {"prompt":"is KtContractReturnsNotNullEffectDeclaration, is KtContractReturnsSuccessfullyEffectDeclaration -> Unit\n is KtContractReturnsSpecificValueEffectDeclaration ->\n appendProperty(value::value, ::renderKtContractConstantValue, endWithNewLine)\n }\n }\n }\n }","completion":"private fun Context.renderKtContractConstantValue(value: KtContractConstantValue, endWithNewLine: Boolean = true): Unit =\n printer.appendHeader(value::class) {\n appendSimpleProperty(value::constantType, endWithNewLine)\n }\n\nprivate fun Context.renderKtContractParameterValue(value: KtContractParameterValue, endWithNewLine: Boolean = true): Unit =<|endoftext|>"} {"prompt":"interface FirCallableDeclaration> : FirTypedDeclaration, FirSymbolOwner {\n abstract override fun accept(visitor: FirVisitor, data: D): R\n}","completion":"abstract class FirVariable> : FirPureAbstractElement(), FirCallableDeclaration, FirAnnotatedDeclaration, FirStatement {\n abstract override fun accept(visitor: FirVisitor, data: D): R\n}\n\nabstract class FirWhenExpression {\n abstract val subjectVariable: FirVariable<*>?\n}<|endoftext|>"} {"prompt":"name = Name.identifier(CONTINUATION_RESULT_FIELD_NAME)\n type = context.ir.symbols.resultOfAnyType\n visibility = JavaDescriptorVisibilities.PACKAGE_VISIBILITY\n }\n val capturedThisField = dispatchReceiverParameter?.let {\n addField {\n name = Name.identifier(\"this$0\")\n type = it.type","completion":"origin = IrDeclarationOrigin.FIELD_FOR_OUTER_THIS\n visibility = JavaDescriptorVisibilities.PACKAGE_VISIBILITY\n isFinal = true\n }\n }\n val labelField = addField(COROUTINE_LABEL_FIELD_NAME, context.irBuiltIns.intType, JavaDescriptorVisibilities.PACKAGE_VISIBILITY)<|endoftext|>"} {"prompt":"assertTrue(eqShortQBooleanQ(null, null))\n assertTrue(eqShortQBooleanQ(null, undefined))\n assertFalse(eqShortQBooleanQ(undefined, false))\n assertFalse(eqShortQBooleanQ(undefined, true))\n assertTrue(eqShortQBooleanQ(undefined, null))\n assertTrue(eqShortQBooleanQ(undefined, undefined))","completion":"assertTrue(eqShortShort(0.toShort(), 0.toShort()))\n assertFalse(eqShortShort(0.toShort(), 1.toShort()))\n assertFalse(eqShortShort(1.toShort(), 0.toShort()))\n assertTrue(eqShortShort(1.toShort(), 1.toShort()))<|endoftext|>"} {"prompt":"Type.OBJECT -> if (STRING_BUILDER_OBJECT_APPEND_ARG_TYPES.contains(type)) type else AsmTypes.OBJECT_TYPE\n Type.ARRAY -> AsmTypes.OBJECT_TYPE\n Type.BYTE, Type.SHORT -> Type.INT_TYPE\n else -> type\n }\n }","completion":"fun create(state: GenerationState, mv: InstructionAdapter) =\n StringConcatGenerator(state.config.runtimeStringConcat, mv)\n }\n}<|endoftext|>"} {"prompt":"\/\/ IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM\n\/\/ FIR status: KT-46419, ILT conversions to Byte and Short are not supported by design\n\nfun box(): String {\n val a1: Byte? = 1.unaryMinus()\n val a2: Short? = 1.unaryMinus()","completion":"val a3: Int? = 1.unaryMinus()\n val a4: Long? = 1.unaryMinus()\n val a5: Double? = 1.0.unaryMinus()\n val a6: Float? = 1f.unaryMinus()\n\n if (a1!! != (-1).toByte()) return \"fail 1\"<|endoftext|>"} {"prompt":"@JsExport\nfun provideULong(): ULong = ULong.MAX_VALUE\n\n@JsExport\nfun provideNullableULong(nullable: Boolean): ULong? = if (nullable) null else ULong.MAX_VALUE\n\n@JsExport\nfun consumeULong(x: ULong) = x.toString()\n\n@JsExport","completion":"fun consumeNullableULong(x: ULong?) = x?.toString()\n\nfun box(): String = \"OK\"\n\n\/\/ FILE: entry.mjs\n\nimport {\n makeC,\n getX,\n getString,\n isEven,\n anyAsEI,\n eiAsAny,\n provideUByte,\n provideUShort,\n provideUInt,<|endoftext|>"} {"prompt":"if (element is KtParameter && element.getStrictParentOfType() is KtPrimaryConstructor) {\n val containingClassDescriptor = context.trace[BindingContext.CLASS, containingClass]\n val thisAnnotationDescriptor = context.trace[BindingContext.ANNOTATION, annotationEntry]","completion":"if (containingClass != null && containingClassDescriptor != null && thisAnnotationDescriptor != null) {\n \/\/ We can ignore value arguments here cause @TypeParceler is a zero-parameter annotation\n if (containingClassDescriptor.annotations.any { it.type == thisAnnotationDescriptor.type }) {<|endoftext|>"} {"prompt":"* Returns the sum of all values produced by [selector] function applied to each element in the array.\n *\/\n@SinceKotlin(\"1.4\")\n@OptIn(kotlin.experimental.ExperimentalTypeInference::class)\n@OverloadResolutionByLambdaReturnType\n@kotlin.jvm.JvmName(\"sumOfBigDecimal\")\n@kotlin.internal.InlineOnly","completion":"public inline fun DoubleArray.sumOf(selector: (Double) -> java.math.BigDecimal): java.math.BigDecimal {\n var sum: java.math.BigDecimal = 0.toBigDecimal()\n for (element in this) {\n sum += selector(element)\n }\n return sum\n}\n\n\/**<|endoftext|>"} {"prompt":"interface DeprecatedModifierContainingDeclaration : KtFirDiagnostic {\n override val diagnosticClass get() = DeprecatedModifierContainingDeclaration::class\n val modifier: KtModifierKeywordToken\n val target: String\n }\n\n interface InapplicableOperatorModifier : KtFirDiagnostic {","completion":"override val diagnosticClass get() = InapplicableOperatorModifier::class\n val message: String\n }\n\n interface NoExplicitVisibilityInApiMode : KtFirDiagnostic {\n override val diagnosticClass get() = NoExplicitVisibilityInApiMode::class\n }<|endoftext|>"} {"prompt":"val receiversCount = listOf(expression.dispatchReceiver, expression.extensionReceiver).count { it != null }\n return when (receiversCount) {\n 0 -> { \/\/ Cache KProperties with no arguments.\n val field = kProperties.getOrPut(expression.symbol.owner) {\n createKProperty(expression, kTypeGenerator, this) to kProperties.size\n }","completion":"irCall(arrayItemGetter).apply {\n dispatchReceiver = irGetField(null, kPropertiesField)\n putValueArgument(0, irInt(field.second))\n }\n }\n\n 1 -> createKProperty(expression, kTypeGenerator, this) \/\/ Has receiver.<|endoftext|>"} {"prompt":"subProjectTempRoot?.let {\n try {\n fs.delete {\n delete(it)\n }\n } catch (e: Exception) {\n logger.warn(\"Can't delete test temp root folder $it\", e.printStackTrace())\n }\n }\n }\n\n if (parallel && jUnitMode != JUnitMode.JUnit5) {","completion":"val forks = (totalMaxMemoryForTestsMb \/ memoryPerTestProcessMb).coerceAtMost(16)\n maxParallelForks =\n project.providers.gradleProperty(\"kotlin.test.maxParallelForks\").orNull?.toInt()\n ?: forks.coerceIn(1, Runtime.getRuntime().availableProcessors())\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.ir.expressions.IrWhen\nimport org.jetbrains.kotlin.ir.expressions.IrWhileLoop\nimport org.jetbrains.kotlin.ir.expressions.impl.IrIfThenElseImpl\nimport org.jetbrains.kotlin.ir.symbols.IrReturnTargetSymbol","completion":"import org.jetbrains.kotlin.ir.symbols.IrTypeAliasSymbol\nimport org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI\nimport org.jetbrains.kotlin.ir.types.IrDynamicType\nimport org.jetbrains.kotlin.ir.types.IrErrorType<|endoftext|>"} {"prompt":"operator fun A.component1(): Int = fizz(a)\n\ninline operator fun A.component2(): Int = buzz(b)\n\ninline operator fun A.component3(): Int = buzz(c)\n\noperator fun A.component4(): Int = fizz(d)\n\ninline operator fun A.component5(): Int = buzz(e)\n\nfun box(): String {","completion":"val (a, b, c, d, e) = A(1, 2, 3, 4, 5)\n\n assertEquals(1, a)\n assertEquals(2, b)\n assertEquals(3, c)\n assertEquals(4, d)\n assertEquals(5, e)<|endoftext|>"} {"prompt":"?.contains { (it.unwrap() as? ConeTypeParameterType)?.lookupTag == typeParameter.symbol.toLookupTag() } != false\n\n if (valueParameters.any { it.returnTypeRef.isBadType() } || receiverParameter?.typeRef?.isBadType() == true) return false\n\n return true\n}","completion":"private fun ConeKotlinType.unwrap(): ConeSimpleKotlinType = lowerBoundIfFlexible().let {\n if (it is ConeDefinitelyNotNullType) it.original.unwrap() else it\n}<|endoftext|>"} {"prompt":"for (i in 4.toLong() downTo 0.toInt() step 2L) sb.append(i); sb.appendLine()\n for (i in 4.toLong() downTo 0.toLong() step 2L) sb.append(i); sb.appendLine()\n for (i in 'a' .. 'd' step 2) sb.append(i); sb.appendLine()","completion":"for (i in 'a' until 'd' step 2) sb.append(i); sb.appendLine()\n for (i in 'd' downTo 'a' step 2) sb.append(i); sb.appendLine()\n\n assertEquals(\"\"\"\n 01234\n 01234\n 01234\n 01234\n 01234\n 01234\n 01234\n 01234<|endoftext|>"} {"prompt":"open class Class {\n open fun test() {}\n}\n\nclass MyClass : Class() {\n @JsName(\"test\") val notTest = 1\n}\n\n\/\/ FILE: OpenInheritedMethodClashedWithChildPropertyGetterJsName.kt","completion":"package OpenInheritedMethodClashedWithChildPropertyGetterJsName\nopen class Class {\n open fun test() {}\n}\n\nclass MyClass : Class() {\n val notTest: Int\n @JsName(\"test\") get() = 1\n}<|endoftext|>"} {"prompt":"\/\/ others will be early-returned\n val valueToMap = future.await()\n synchronized(value) {\n if (value.isCompleted) return@synchronized\n value.complete(transform(valueToMap))\n transform = { throw IllegalStateException(\"Unexpected 'transform' in future\") }\n }\n return value.getCompleted()\n }","completion":"override fun getOrThrow(): R = synchronized(value) {\n if (value.isCompleted) return value.getCompleted()\n value.complete(transform(future.getOrThrow()))\n transform = { throw IllegalStateException(\"Unexpected 'transform' in future\") }\n value.getCompleted()\n }\n\n private fun writeReplace(): Any {\n return Surrogate(getOrThrow())\n }<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.backend.common.phaser.PhaseDescription\nimport org.jetbrains.kotlin.backend.jvm.JvmBackendContext\nimport org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin\nimport org.jetbrains.kotlin.backend.jvm.ir.isJvmInterface","completion":"import org.jetbrains.kotlin.descriptors.DescriptorVisibilities\nimport org.jetbrains.kotlin.descriptors.Modality\nimport org.jetbrains.kotlin.ir.builders.declarations.addFunction\nimport org.jetbrains.kotlin.ir.builders.declarations.addTypeParameter<|endoftext|>"} {"prompt":"bytes[byteIndex++] = REPLACEMENT_BYTE_SEQUENCE[2]\n } else {\n bytes[byteIndex++] = ((codePoint shr 18) or 0xF0).toByte()\n bytes[byteIndex++] = (((codePoint shr 12) and 0x3F) or 0x80).toByte()","completion":"bytes[byteIndex++] = (((codePoint shr 6) and 0x3F) or 0x80).toByte()\n bytes[byteIndex++] = ((codePoint and 0x3F) or 0x80).toByte()\n charIndex++\n }\n }\n }\n }\n\n return if (bytes.size == byteIndex) bytes else bytes.copyOf(byteIndex)\n}<|endoftext|>"} {"prompt":"sourceFile(SourceFile.URanges)\n }\n }\n }\n\n val f_reversed = fn(\"reversed()\") {\n include(ProgressionsOfPrimitives, rangePrimitives)\n } builder {\n doc { \"Returns a progression that goes over the same range in the opposite direction with the same step.\" }\n returns(\"TProgression\")\n body {","completion":"\"return TProgression.fromClosedRange(last, first, -step)\"\n }\n }\n\n val f_step = fn(\"step(step: STEP)\") {\n include(ProgressionsOfPrimitives, rangePrimitives)\n } builder {\n infix(true)\n doc { \"Returns a progression that goes over the same range with the given step.\" }<|endoftext|>"} {"prompt":"@kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Double): kotlin.Double { \/* compiled code *\/ }\n\n @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Float): kotlin.Double { \/* compiled code *\/ }","completion":"@kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Int): kotlin.Double { \/* compiled code *\/ }\n\n @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Long): kotlin.Double { \/* compiled code *\/ }<|endoftext|>"} {"prompt":"override fun visitLocalDelegatedPropertyReference(expression: IrLocalDelegatedPropertyReference, data: Nothing?) {\n visitLocalDelegatedPropertyReference(expression)\n }\n\n fun visitLocalDelegatedPropertyReference(expression: IrLocalDelegatedPropertyReference) {\n visitCallableReference(expression)\n }","completion":"override fun visitClassReference(expression: IrClassReference, data: Nothing?) {\n visitClassReference(expression)\n }\n\n fun visitClassReference(expression: IrClassReference) {\n visitDeclarationReference(expression)\n }\n\n override fun visitConst(expression: IrConst<*>, data: Nothing?) {\n visitConst(expression)\n }<|endoftext|>"} {"prompt":"abstract val argumentsWithConversion: Map\n abstract val argumentsWithSuspendConversion: Map\n abstract val argumentsWithUnitConversion: Map","completion":"abstract val argumentsWithConstantConversion: Map\n abstract fun setCandidateDescriptor(newCandidateDescriptor: CallableDescriptor)\n}\n\nclass SamConversionDescription(\n val convertedTypeByOriginParameter: UnwrappedType,\n val convertedTypeByCandidateParameter: UnwrappedType, \/\/ expected type for corresponding argument<|endoftext|>"} {"prompt":"if (old.hasDelegateMethod()) {\n if (!checkEquals(old.delegateMethod, new.delegateMethod)) return false\n }\n\n return true\n }\n\n open fun checkEquals(old: ProtoBuf.Annotation.Argument.Value, new: ProtoBuf.Annotation.Argument.Value): Boolean {","completion":"if (old.hasType() != new.hasType()) return false\n if (old.hasType()) {\n if (old.type != new.type) return false\n }\n\n if (old.hasIntValue() != new.hasIntValue()) return false\n if (old.hasIntValue()) {\n if (old.intValue != new.intValue) return false\n }<|endoftext|>"} {"prompt":"System.out?.println(\" else escape(i + 1, result + escapeChar(this.get(i)))\");\n System.out?.println();\n System.out?.println(\"fun main(args : Array) {\");\n System.out?.println(\" val s = \\\"\" + s.escape() + \"\\\";\");\n System.out?.println(s);\n return \"OK\"","completion":"}<|endoftext|>"} {"prompt":"fun typeDesc(type: PsiType): String = when (type) {\n PsiType.VOID -> primitive(VOID_TYPE)\n\n PsiType.BOOLEAN -> primitive(BOOLEAN_TYPE)\n\n PsiType.CHAR -> primitive(CHAR_TYPE)\n PsiType.INT -> primitive(INT_TYPE)","completion":"PsiType.BYTE -> primitive(BYTE_TYPE)\n PsiType.SHORT -> primitive(SHORT_TYPE)\n PsiType.LONG -> primitive(LONG_TYPE)\n\n PsiType.FLOAT -> primitive(FLOAT_TYPE)\n PsiType.DOUBLE -> primitive(DOUBLE_TYPE)<|endoftext|>"} {"prompt":"\/\/ library.kt:30 baz: param:int=6:int, b:int=2:int, inlineCallParam1\\1:int=1:int, inlineCallParam2\\1:int=2:int, $i$f$inlineCall\\1\\10:int=0:int, e\\1:int=5:int, baz1Param\\2:int=1:int,","completion":"$i$f$baz1\\2\\50:int=0:int, baz1Var\\2:int=3:int, baz1BlockParam\\4:int=1:int, $i$a$-baz1-LibraryKt$inlineCall$1\\4\\53\\1:int=0:int, baz1LambdaVar\\4:int=1:int,<|endoftext|>"} {"prompt":"@kotlin.internal.IntrinsicConstEvaluation\n public operator fun compareTo(other: Long): Int\n\n \/**\n * Compares this value with the specified value for order.\n * Returns zero if this value is equal to the specified other value, a negative number if it's less than other,\n * or a positive number if it's greater than other.\n *\/","completion":"@kotlin.internal.IntrinsicConstEvaluation\n public operator fun compareTo(other: Float): Int\n\n \/**\n * Compares this value with the specified value for order.\n * Returns zero if this value is equal to the specified other value, a negative number if it's less than other,\n * or a positive number if it's greater than other.\n *\/<|endoftext|>"} {"prompt":"\/\/ (discarding the exception or aborting a previous jump in the process) so merge all data just in case.\n else -> persistentMapOf(label to data.values.reduce { a, b -> mergeInfo(a, b, to) })\n }\n }\n\n override fun visitNode(\n node: CFGNode<*>,\n data: PathAwareControlFlowInfo","completion":"): PathAwareControlFlowInfo = data\n}\n\ninline fun PersistentMap.merge(other: PersistentMap, block: (V, V) -> V): PersistentMap =\n mutate {\n other.mapValuesTo(it) { (label, rightValue) -><|endoftext|>"} {"prompt":"!(nx == x) -> \"Fail 6\"\n !(nx != y) -> \"Fail 7\"\n nn == 0L -> \"Fail 8\"\n !(nn != 0L) -> \"Fail 9\"\n nn == x -> \"Fail 10\"\n !(nn != x) -> \"Fail 11\"\n ax != 0L -> \"Fail 12\"\n ax == 1L -> \"Fail 13\"","completion":"!(ax == 0L) -> \"Fail 14\"\n !(ax != 1L) -> \"Fail 15\"\n ax != x -> \"Fail 16\"\n ax == y -> \"Fail 17\"\n !(ax == x) -> \"Fail 18\"\n !(ax != y) -> \"Fail 19\"\n ax != bx -> \"Fail 20\"\n ax == by -> \"Fail 21\"<|endoftext|>"} {"prompt":"conflictingSymbol: FirBasedSymbol<*>,\n conflictingPresentation: String? = null,\n conflictingFile: FirFile? = null,\n) {\n conflictingSymbol.lazyResolveToPhase(FirResolvePhase.STATUS)\n if (conflictingSymbol == declaration) return\n if (\n declaration.moduleData != conflictingSymbol.moduleData &&","completion":"!shouldCheckForMultiplatformRedeclaration(declaration, conflictingSymbol)\n ) return\n val actualConflictingPresentation = conflictingPresentation ?: FirRedeclarationPresenter.represent(conflictingSymbol)\n if (actualConflictingPresentation != declarationPresentation) return\n val actualConflictingFile =\n conflictingFile ?: when (conflictingSymbol) {<|endoftext|>"} {"prompt":"private val firSymbolProvider: FirSymbolProvider,\n) : KtSymbolProvider(), KtFirAnalysisSessionComponent {\n\n override fun getParameterSymbol(psi: KtParameter): KtVariableLikeSymbol {\n return when {\n psi.isFunctionTypeParameter -> errorWithFirSpecificEntries(","completion":"\"Creating KtValueParameterSymbol for function type parameter is not possible. Please see the KDoc of getParameterSymbol\",\n psi = psi,\n )\n\n psi.isLoopParameter || psi.isCatchParameter -> {\n firSymbolBuilder.variableLikeBuilder.buildLocalVariableSymbol(<|endoftext|>"} {"prompt":"@GCUnsafeCall(\"Kotlin_Long_countOneBits\")\npublic actual external fun Long.countOneBits(): Int\n\n\/**\n * Counts the number of consecutive most significant bits that are zero in the binary representation of [Long] [value].\n * Returns undefined result for zero [value].\n *\/\n@GCUnsafeCall(\"Kotlin_Long_countLeadingZeroBits\")","completion":"private external fun countLeadingZeroBits(value: Long): Int\n\n\/**\n * Counts the number of consecutive most significant bits that are zero in the binary representation of this [Long] number.\n *\/\n@SinceKotlin(\"1.4\")\npublic actual fun Long.countLeadingZeroBits(): Int =\n if (this == 0L) 64 else countLeadingZeroBits(this)\n\n\/**<|endoftext|>"} {"prompt":"super.testAbiChangeInLib_changeMethodSignature(gradleVersion)\n }\n\n @Disabled(\"KT-57147\")\n @GradleTest\n override fun testNonAbiChangeInLib_changeMethodBody(gradleVersion: GradleVersion) {\n super.testNonAbiChangeInLib_changeMethodBody(gradleVersion)\n }\n}","completion":"@DisplayName(\"Default incremental compilation with disabled precise compilation outputs backup\")\nabstract class IncrementalJavaChangeWithoutPreciseCompilationBackupIT : IncrementalJavaChangeDefaultIT() {\n override val defaultBuildOptions = super.defaultBuildOptions.copy(usePreciseOutputsBackup = false, keepIncrementalCompilationCachesInMemory = false)\n}\n\n@DisplayName(\"Default incremental compilation with precise compilation outputs backup on K1\")<|endoftext|>"} {"prompt":"constructor(container: KDeclarationContainerImpl, descriptor: PropertyDescriptor) : super(container, descriptor)\n\n private val _getter = lazy(PUBLICATION) { Getter(this) }\n\n override val getter: Getter get() = _getter.value\n\n override fun get(receiver: T): V = getter.call(receiver)","completion":"private val delegateSource = lazy(PUBLICATION) { computeDelegateSource() }\n\n override fun getDelegate(receiver: T): Any? = getDelegateImpl(delegateSource.value, receiver, null)\n\n override fun invoke(receiver: T): V = get(receiver)<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext\nimport org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirBasicDeclarationChecker\nimport org.jetbrains.kotlin.fir.analysis.diagnostics.wasm.FirWasmErrors.ASSOCIATED_OBJECT_INVALID_BINDING","completion":"import org.jetbrains.kotlin.fir.declarations.FirClass\nimport org.jetbrains.kotlin.fir.declarations.FirDeclaration\nimport org.jetbrains.kotlin.fir.declarations.hasAnnotation\nimport org.jetbrains.kotlin.fir.types.coneType<|endoftext|>"} {"prompt":"internal class KotlinStaticData(override val generationState: NativeGenerationState, override val llvm: CodegenLlvmHelpers, module: LLVMModuleRef) : ContextUtils, StaticData(module, llvm) {\n private val stringLiterals = mutableMapOf()\n\n \/\/ Must match OBJECT_TAG_PERMANENT_CONTAINER in C++.","completion":"private fun permanentTag(typeInfo: ConstPointer): ConstPointer {\n return typeInfo.addBits(llvm, kTypeInfoPtr, 1)\n }\n\n\n private fun objHeader(typeInfo: ConstPointer): Struct {\n return Struct(runtime.objHeaderType, permanentTag(typeInfo))\n }\n\n private fun arrayHeader(typeInfo: ConstPointer, length: Int): Struct {<|endoftext|>"} {"prompt":"open class BaseClass(private val _prop: String) : BaseInterface {\n final override val prop: String get() = _prop\n}\n\n@JsExport\nfun getImpl(): BaseInterface = Impl()\n\n@JsExport\nfun getBase(): BaseInterface = BaseClass(\"base\")\n\n\/\/ FILE: main.mjs\n\/\/ ENTRY_ES_MODULE","completion":"import { getBase, getImpl } from \".\/exportInterfaceWithoutClases-export_interface_v5.mjs\"\n\nexport function box() {\n if (getBase().prop != \"base\") return \"fail 1\";\n if (getImpl().prop != \"foobar\") return \"fail 2\";\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"x\n x.not()\n}\n\n\/\/ TESTCASE NUMBER: 12\nfun case_12(x: Boolean?) {\n while (true) {","completion":"break || x!!\n }\n\n x\n x.not()\n}\n\n\/\/ TESTCASE NUMBER: 13<|endoftext|>"} {"prompt":"override fun any(): Any = Any()\n override fun anyN(): Any? = Any()\n override fun block(): () -> Int = { 42 }\n override fun blockN(): (() -> Int)? = null\n override fun pointer(): CPointer<*> = 1L.toCPointer()!!\n override fun pointerN(): CPointer<*>? = null","completion":"override fun int(): Int = 42\n override fun longN(): Long? = null\n override fun double(): Double = 3.14\n}\n\n@Throws(Throwable::class)\nfun testSwiftThrowing(methods: SwiftOverridableMethodsWithThrows) = with(methods) {\n assertSwiftThrowing { unit() }\n assertSwiftThrowing { nothing() }<|endoftext|>"} {"prompt":"set(value) = definedExternally\n var clientY: Int? \/* = 0 *\/\n get() = definedExternally\n set(value) = definedExternally\n var button: Short? \/* = 0 *\/\n get() = definedExternally\n set(value) = definedExternally\n var buttons: Short? \/* = 0 *\/\n get() = definedExternally\n set(value) = definedExternally","completion":"var relatedTarget: EventTarget? \/* = null *\/\n get() = definedExternally\n set(value) = definedExternally\n var region: String? \/* = null *\/\n get() = definedExternally\n set(value) = definedExternally\n}\n\n@Suppress(\"UNUSED_PARAMETER\")<|endoftext|>"} {"prompt":"method.selectors.size == 1 && method.parameters.size == 0\n )\n\n if (method.selectors.size == 1 && method.parameters.size == 0) {\n append(method.selectors[0])\n } else {\n for (i in 0 until method.selectors.size) {\n if (i > 0) append(' ')","completion":"val parameter = method.parameters[i]\n val selector = method.selectors[i]\n append(selector)\n append(\"(\")\n append(parameter.type.render())\n append(\")\")\n append(parameter.name)\n }\n }\n }\n\n fun appendAttributes() {\n appendPostfixDeclarationAttributes(method.attributes)\n }<|endoftext|>"} {"prompt":"val method = typeMapper.mapToCallableMethod(delegateTo, true)\n val myParameters = signature.valueParameters\n val calleeParameters = method.getValueParameters()\n\n if (myParameters.size != calleeParameters.size) {\n throw AssertionError(\n \"Method from super interface has a different signature.\\n\" +","completion":"\"This method:\\n%s\\n%s\\n%s\\nSuper method:\\n%s\\n%s\\n%s\".format(\n descriptor, signature, myParameters, delegateTo, method, calleeParameters\n )\n )\n }\n\n var k = 0\n val it = calleeParameters.iterator()\n for (parameter in myParameters) {<|endoftext|>"} {"prompt":"val unusedDiagnostic = asTextDiagnostic(unresolvedReference, \"i\")\n val toManyArguments = asTextDiagnostic(diagnostics[7])\n val range = asDiagnosticRange(unresolvedReference, unusedDiagnostic, toManyArguments)\n val wrongParameter = wrongParameters(\n unusedDiagnostic,","completion":"\"OI;UNRESOLVED_REFERENCE(xx)\",\n unresolvedReference.startOffset,\n unresolvedReference.endOffset\n )\n\n doTest(object : Test(wrongParameter) {\n override fun makeTestData(diagnostics: MutableList, diagnosedRanges: MutableList) {<|endoftext|>"} {"prompt":"val buildOptions = this.buildOptions.copy(\n nativeOptions = this.buildOptions.nativeOptions.copy(\n cocoapodsPlatform = \"iphonesimulator\",\n cocoapodsArchs = \"x86_64\",\n cocoapodsConfiguration = \"Debug\"\n )\n )\n buildAndFail(\"syncFramework\", buildOptions = buildOptions) {","completion":"assertOutputContains(\"error: Could not find com.example.unknown:dependency:0.0.1.\")\n }\n }\n }\n\n @DisplayName(\"Xcode style errors when sync framework compilation failed\")\n @GradleTest\n fun testSyncFrameworkUseXcodeStyleErrorsWhenCompilationFailed(gradleVersion: GradleVersion) {<|endoftext|>"} {"prompt":"visitLabel(readEndLabel)\n load(inputVar, kInputType)\n load(descVar, descType)\n invokeinterface(\n kInputType.internalName, CallingConventions.end,\n \"(\" + descType.descriptor + \")V\"\n )\n if (!serializableDescriptor.isInternalSerializable) {\n \/\/validate all required (constructor) fields","completion":"for ((i, property) in properties.serializableConstructorProperties.withIndex()) {\n if (property.optional || property.transient) {\n if (!property.isConstructorParameterWithDefault)\n throw CompilationException(\n \"Property ${property.name} was declared as optional\/transient but has no default value\",\n null,\n null\n )\n } else {<|endoftext|>"} {"prompt":"dependOnBuiltIns\n )\n val project = files.firstOrNull()?.project ?: throw AssertionError(\"No files to analyze\")\n\n val multiplatformLanguageSettings = object : LanguageVersionSettings by languageVersionSettings {\n override fun getFeatureSupport(feature: LanguageFeature): LanguageFeature.State =\n if (feature == LanguageFeature.MultiPlatformProjects) LanguageFeature.State.ENABLED","completion":"else languageVersionSettings.getFeatureSupport(feature)\n }\n\n val resolverForModuleFactory = CommonResolverForModuleFactory(\n CommonAnalysisParameters(metadataPartProviderFactory),\n targetEnvironment,\n targetPlatform,\n shouldCheckExpectActual = false,\n dependenciesContainer\n )\n\n val projectContext = explicitProjectContext ?: ProjectContext(project, \"metadata serializer\")<|endoftext|>"} {"prompt":"FirDiagnosticsCompilerResultsReporter.reportToMessageCollector(\n diagnosticsReporter,\n messageCollector,\n configuration.getBoolean(CLIConfigurationKeys.RENDER_DIAGNOSTIC_INTERNAL_NAME)\n )\n\n ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()\n return state\n }\n}","completion":"fun CompilerConfiguration.configureSourceRoots(chunk: List, buildFile: File? = null) {\n val hmppCliModuleStructure = get(CommonConfigurationKeys.HMPP_MODULE_STRUCTURE)\n for (module in chunk) {\n val commonSources = getBuildFilePaths(buildFile, module.getCommonSourceFiles()).toSet()<|endoftext|>"} {"prompt":"accumulator = operation(index, accumulator, this[index])\n result.add(accumulator)\n }\n return result\n}\n\n\/**\n * Returns a list containing successive accumulation values generated by applying [operation] from left to right\n * to each element, its index in the original array and current accumulator value that starts with the first element of this array.\n *","completion":"* Note that `acc` value passed to [operation] function should not be mutated;\n * otherwise it would affect the previous value in resulting list.\n * \n * @param [operation] function that takes the index of an element, current accumulator value\n * and the element itself, and calculates the next accumulator value.\n * \n * @sample samples.collections.Collections.Aggregates.runningReduce\n *\/<|endoftext|>"} {"prompt":"fun KtExpression.getPropertyResolvedCallWithAssert(context: BindingContext): ResolvedCall {\n val resolvedCall = getResolvedCallWithAssert(context)\n assert(resolvedCall.resultingDescriptor is PropertyDescriptor) {\n \"ResolvedCall for this expression must be ResolvedCall: ${this.getTextWithLocation()}\"","completion":"}\n @Suppress(\"UNCHECKED_CAST\")\n return resolvedCall as ResolvedCall\n}\n\nfun KtExpression.getVariableResolvedCallWithAssert(context: BindingContext): ResolvedCall {\n val resolvedCall = getResolvedCallWithAssert(context)<|endoftext|>"} {"prompt":"nativeProject(\"expect-actual-fun-or-class-ic\", gradleVersion) {\n build(\"assemble\")\n\n listOf(\"jvmMain\", \"jsMain\", \"nativeMain\").forEach { sourceSet ->\n \/\/ just touch the file. expected logic is this:\n \/\/ actual declaration needs to be recompiled -> we add expect declaration to the list of compiled files","completion":"kotlinSourcesDir(sourceSet).resolve(\"ActualFunFoo.kt\").addPrivateVal()\n }\n\n build(\"assemble\", buildOptions = defaultBuildOptions.copy(logLevel = LogLevel.DEBUG)) {\n assertTasksExecuted(\":compileKotlinJvm\", \":compileKotlinJs\", \":compileKotlinNative\")\n assertIncrementalCompilation(<|endoftext|>"} {"prompt":"* [CirTypeParameterType] [CirClassOrTypeAliasType]\n * \/ \\\n * [CirClassType] [CirTypeAliasType]\n *\/\nsealed class CirType {\n final override fun toString() = buildString { appendDescriptionTo(this) }\n internal abstract fun appendDescriptionTo(builder: StringBuilder)\n}","completion":"data class CirFlexibleType(val lowerBound: CirSimpleType, val upperBound: CirSimpleType) : CirType() {\n override fun appendDescriptionTo(builder: StringBuilder) {\n builder.append(\"lower = \")\n lowerBound.appendDescriptionTo(builder)\n builder.append(\", upper = \")\n upperBound.appendDescriptionTo(builder)\n }\n}\n\n\/**<|endoftext|>"} {"prompt":"argumentExpression.accept(this, null).ifNotValidConst { return it }\n }\n ConstantArgumentKind.VALID_CONST\n }\n else -> ConstantArgumentKind.NOT_CONST\n }\n }\n\n override fun visitQualifiedAccessExpression(\n qualifiedAccessExpression: FirQualifiedAccessExpression, data: Nothing?\n ): ConstantArgumentKind {","completion":"val expressionType = qualifiedAccessExpression.getExpandedType()\n if (expressionType.isReflectFunctionType(session) || expressionType.isKProperty(session) || expressionType.isKMutableProperty(session)) {\n return qualifiedAccessExpression.dispatchReceiver?.accept(this, data) ?: ConstantArgumentKind.VALID_CONST\n }<|endoftext|>"} {"prompt":"@file:JvmName(\"OtherKt\")\npackage one.two\n\nconst val FOO = 1\n\nconst val BAZ = Bar.BAR + 1","completion":"\/\/ This class is presented here to check that on super type resolve phase we have resolved `JvmName` annotation\nclass Child : Bar()\n\nfun box(): String {\n return \"OK\"\n}<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.konan.test.blackbox.support.util.*\nimport org.jetbrains.kotlin.test.directives.model.Directive\nimport org.jetbrains.kotlin.test.directives.model.RegisteredDirectives\nimport org.jetbrains.kotlin.test.services.JUnit5Assertions","completion":"import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertEquals\nimport org.jetbrains.kotlin.test.services.JUnit5Assertions.assertFalse\nimport org.jetbrains.kotlin.test.services.JUnit5Assertions.assertNotEquals<|endoftext|>"} {"prompt":"package org.jetbrains.kotlin.contracts.description.expressions\n\nimport org.jetbrains.kotlin.contracts.description.BooleanExpression\nimport org.jetbrains.kotlin.contracts.description.ContractDescriptionElement\nimport org.jetbrains.kotlin.contracts.description.ContractDescriptionVisitor","completion":"import org.jetbrains.kotlin.descriptors.ParameterDescriptor\n\n\ninterface ContractDescriptionValue : ContractDescriptionElement {\n override fun accept(contractDescriptionVisitor: ContractDescriptionVisitor, data: D): R =\n contractDescriptionVisitor.visitValue(this, data)\n}\n\nopen class ConstantReference(val name: String) : ContractDescriptionValue {<|endoftext|>"} {"prompt":"constructor(arg1A: UserKlassA, arg2A: UserKlassB)\n}\n@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersBReverse(arg1B: UserKlassA, arg2B: UserKlassB) {}\n\nclass TestMultipleTypeAliasedValueParameterTypesA {","completion":"@Deprecated(message = \"\", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB)\n}\nfun TestMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {}\n\nclass TestMultipleTypeAliasedValueParameterTypesAReverse {<|endoftext|>"} {"prompt":"IdeaKotlinBinaryCoordinates(\n group = \"myGroup\",\n module = \"myModule\",\n version = \"myVersion\",\n sourceSetName = null\n )\n )\n\n @Test\n fun `sample 3`() = testSerialization(\n IdeaKotlinBinaryCoordinates(\n group = \"myGroup\",\n module = \"myModule\",","completion":"version = \"myVersion\",\n sourceSetName = null,\n capabilities = setOf(\n IdeaKotlinBinaryCapability(\"my\", \"capability\", \"1.0.0\"),\n IdeaKotlinBinaryCapability(\"my\", \"other-capability\", \"1.0.0\")\n )\n )\n )\n\n @Test<|endoftext|>"} {"prompt":"private fun buildInfoForRoot(root: FirFunctionSymbol<*>): Map, Fork> {\n assignedLocalVariablesByDeclaration?.let { return it }\n\n val data = MiniCfgBuilder.MiniCfgData()\n MiniCfgBuilder().visitElement(root.fir, data)\n\n assignedLocalVariablesByDeclaration = data.forks","completion":"variableAssignments = data.assignments\n\n return data.forks\n }\n\n private fun enterScope(\n symbol: FirBasedSymbol<*>,\n evaluatedInPlace: Boolean,\n ): Pair {\n val currentInfo = getInfoForDeclaration(symbol)\n val prohibitInThisScope = scopes.top().second.copy()<|endoftext|>"} {"prompt":"public fun linkedMapOf(vararg pairs: kotlin.Pair): kotlin.collections.LinkedHashMap\n\n@kotlin.SinceKotlin(version = \"1.1\")\n@kotlin.internal.InlineOnly\npublic inline fun linkedSetOf(): kotlin.collections.LinkedHashSet","completion":"public fun linkedSetOf(vararg elements: T): kotlin.collections.LinkedHashSet\n\npublic fun linkedStringMapOf(vararg pairs: kotlin.Pair): kotlin.collections.LinkedHashMap<|endoftext|>"} {"prompt":"selector = annotation.getAnnotationStringValue(\"selector\"),\n encoding = annotation.getAnnotationStringValue(\"encoding\"),\n isStret = annotation.getAnnotationValueOrNull(\"isStret\") ?: false,\n directSymbol = null,\n)\n\n\/**\n * @param onlyExternal indicates whether to accept overriding methods from Kotlin classes\n *\/","completion":"private fun FunctionDescriptor.getObjCMethodInfo(onlyExternal: Boolean): ObjCMethodInfo? {\n if (this.kind.isReal) {\n this.decodeObjCMethodAnnotation()?.let { return it }\n\n if (onlyExternal) {\n return null\n }\n }<|endoftext|>"} {"prompt":"0x0006, 0x0011, 0x001a, 0x0005, 0x0004, 0x0006, 0x0018, 0x0009, 0x0018, 0x0011, 0x14b1, 0x0011, 0x0005, 0x0011, 0x0005, 0x0225, 0x0005, 0x18a5,","completion":"0x0006, 0x4625,<|endoftext|>"} {"prompt":"}\n\n val list4 = ArrayList()\n for (i in (5L downTo 3L).reversed()) {\n list4.add(i)\n if (list4.size > 23) break\n }\n if (list4 != listOf(3, 4, 5)) {","completion":"return \"Wrong elements for (5L downTo 3L).reversed(): $list4\"\n }\n\n val list5 = ArrayList()\n for (i in ('c' downTo 'a').reversed()) {\n list5.add(i)\n if (list5.size > 23) break\n }<|endoftext|>"} {"prompt":"val alreadyDone: MutableSet = mutableSetOf(),\n var depth: Int = 0,\n var phaseCount: Int = 0,\n val stickyPostconditions: MutableSet> = mutableSetOf()\n) {\n fun copyOf() = PhaserState(alreadyDone.toMutableSet(), depth, phaseCount, stickyPostconditions)\n}","completion":"\/\/ Copy state, forgetting the sticky postconditions (which will not be applicable to the new type)\nfun PhaserState.changePhaserStateType() = PhaserState(alreadyDone, depth, phaseCount, mutableSetOf())\n\ninline fun PhaserState.downlevel(nlevels: Int, block: () -> R): R {\n depth += nlevels<|endoftext|>"} {"prompt":"* UNEXPECTED BEHAVIOUR\n * ISSUES: KT-28159\n *\/\nfun case_2(x: Nothing?) {","completion":"if (x !== null && x !== null) {<|endoftext|>"} {"prompt":"public const val degree: Char = '\\u00B0'\n \/** The character ± *\/\n public const val plusMinus: Char = '\\u00B1'\n \/** The character ¶ *\/\n public const val paragraph: Char = '\\u00B6'\n \/** The character · *\/","completion":"public const val middleDot: Char = '\\u00B7'\n \/** The character ½ *\/\n public const val half: Char = '\\u00BD'\n \/** The character – *\/\n public const val ndash: Char = '\\u2013'\n \/** The character — *\/\n public const val mdash: Char = '\\u2014'<|endoftext|>"} {"prompt":".toSet()\n val compilationOut = transformer.generateModule(loweredIr.allModules, translationModes, isEsModules)\n return BinaryArtifacts.Js.JsIrArtifact(outputFile, compilationOut).dump(module)\n }\n\n private fun IrModuleFragment.resolveTestPaths() {\n files.forEach(jsIrPathReplacer::lower)\n }","completion":"private fun loadIrFromKlib(module: TestModule, configuration: CompilerConfiguration): IrModuleInfo {\n val filesToLoad = module.files.takeIf { !firstTimeCompilation }?.map { \"\/${it.relativePath}\" }?.toSet()\n\n val messageLogger = configuration.irMessageLogger<|endoftext|>"} {"prompt":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.NativeSetterWrongReturnType\n\ninternal class JsNameIsNotOnAllAccessorsImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,","completion":") : KtAbstractFirDiagnostic(firDiagnostic, token), KtFirDiagnostic.JsNameIsNotOnAllAccessors\n\ninternal class JsNameProhibitedForNamedNativeImpl(\n firDiagnostic: KtPsiDiagnostic,\n token: KtLifetimeToken,<|endoftext|>"} {"prompt":"open external class A {\n open fun f(x: Int = definedExternally)\n}\n\nclass B : A() {\n override fun f(x: Int) {}\n}\n\nclass BB : A()\n\nexternal class C : A {\n override fun f(x: Int)\n}","completion":"external interface I {\n fun f(x: Int = definedExternally)\n}\n\ninterface J {\n fun f(x: Int = 23)\n}\n\ninterface II {\n fun f(x: Int)\n}\n\ninterface IIJ : II, J\n\nopen external class D {\n open fun f(x: Int)\n}\n\nclass E : D() {<|endoftext|>"} {"prompt":"tokens: List, atStreamEdge: Boolean, getter: WhitespacesAndCommentsBinder.TokenTextGetter\n ): Int {\n if (tokens.isEmpty()) return 0\n\n var result = 0\n tokens@ for (idx in tokens.indices) {\n val tokenType = tokens[idx]\n when (tokenType) {","completion":"KtTokens.WHITE_SPACE -> if (StringUtil.containsLineBreak(getter[idx])) break@tokens\n\n KtTokens.EOL_COMMENT, KtTokens.BLOCK_COMMENT -> result = idx + 1\n\n else -> break@tokens\n }\n }\n\n return result\n }\n}<|endoftext|>"} {"prompt":"checkCopyOfRangeArguments(fromIndex, toIndex, size)\n return copyOfUninitializedElements(fromIndex, toIndex)\n}\n\n\/**\n * Returns a new array which is a copy of the specified range of the original array.\n * \n * @param fromIndex the start of the range (inclusive) to copy.\n * @param toIndex the end of the range (exclusive) to copy.\n *","completion":"* @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.\n * @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].\n *\/\npublic actual fun ByteArray.copyOfRange(fromIndex: Int, toIndex: Int): ByteArray {\n checkCopyOfRangeArguments(fromIndex, toIndex, size)<|endoftext|>"} {"prompt":"values()\n }\n }\n\n inner class Inner : Super_1() {\n private fun case() {","completion":"values()\n }\n }\n\n}\n\n\n\/\/ FILE: TestCase4.kt\n\/\/ TESTCASE NUMBER: 4\npackage testsCase4\n\nopen class A {\n operator fun invoke(value: String) = print(\"invoke $value\")<|endoftext|>"} {"prompt":"override fun getUnsubstitutedMemberScope() = super.getUnsubstitutedMemberScope() as LazyJavaClassMemberScope\n override fun getConstructors() = unsubstitutedMemberScope.constructors()\n\n override val annotations = c.resolveAnnotations(jClass)\n\n private val declaredParameters = c.storageManager.createLazyValue {","completion":"jClass.typeParameters.map { p ->\n c.typeParameterResolver.resolveTypeParameter(p)\n ?: throw AssertionError(\"Parameter $p surely belongs to class $jClass, so it must be resolved\")\n }\n }\n\n override fun getDeclaredTypeParameters() = declaredParameters()\n\n override fun getDefaultFunctionTypeForSamInterface(): SimpleType? =<|endoftext|>"} {"prompt":"\/\/ Actually, only reified types get here, and it would be properly to put assertion here\n \/\/ However, it's better to generate wrong code than crash\n return regularAndUnstable()\n }\n\n fun mangledAndStable() = NameAndStability(getStableMangledName(baseName, encodeSignature(descriptor)), true)","completion":"fun mangledInternal() = NameAndStability(getInternalMangledName(baseName, encodeSignature(descriptor)), true)\n fun mangledPrivate() = NameAndStability(getPrivateMangledName(baseName, descriptor), false)\n\n val effectiveVisibility = descriptor.ownEffectiveVisibility\n\n val containingDeclaration = descriptor.containingDeclaration\n return when (containingDeclaration) {<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.name.ClassId\nimport org.jetbrains.kotlin.name.FqName\nimport org.jetbrains.kotlin.name.JvmStandardClassIds.JVM_DEFAULT_CLASS_ID\nimport org.jetbrains.kotlin.name.Name\n\n\/**\n * A generator for delegated members from implementation by delegation.\n *","completion":"* It assumes a synthetic field with the super-interface type has been created for the delegate expression. It looks for delegatable\n * methods and properties in the super-interface, and creates corresponding members in the subclass.\n * TODO: generic super interface types and generic delegated members.\n *\/\nclass DelegatedMemberGenerator(private val c: Fir2IrComponents) : Fir2IrComponents by c {<|endoftext|>"} {"prompt":"@A2(\"Test\") T>","completion":"}\n }\n}<|endoftext|>"} {"prompt":"get() = asIr().isNoinline\n override val ValueParameterSymbolMarker.isCrossinline: Boolean\n get() = asIr().isCrossinline\n override val ValueParameterSymbolMarker.hasDefaultValue: Boolean\n get() = asIr().hasDefaultValue()\n\n override val ValueParameterSymbolMarker.hasDefaultValueNonRecursive: Boolean","completion":"get() = asIr().defaultValue != null\n\n override fun CallableSymbolMarker.isAnnotationConstructor(): Boolean {\n val irConstructor = safeAsIr() ?: return false\n return irConstructor.constructedClass.isAnnotationClass\n }\n\n override val TypeParameterSymbolMarker.bounds: List<|endoftext|>"} {"prompt":"firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }\n add(FirErrors.NO_VALUE_FOR_PARAMETER) { firDiagnostic ->\n NoValueForParameterImpl(\n firSymbolBuilder.buildSymbol(firDiagnostic.a),\n firDiagnostic as KtPsiDiagnostic,\n token,","completion":")\n }\n add(FirErrors.NAMED_PARAMETER_NOT_FOUND) { firDiagnostic ->\n NamedParameterNotFoundImpl(\n firDiagnostic.a,\n firDiagnostic as KtPsiDiagnostic,\n token,\n )\n }<|endoftext|>"} {"prompt":"open fun visitStubNode(node: StubNode) {\n visitNode(node)\n }\n\n open fun visitVariableDeclarationNode(node: VariableDeclarationNode) {\n visitNode(node)\n }\n\n open fun visitVariableAssignmentNode(node: VariableAssignmentNode) {\n visitNode(node)\n }","completion":"open fun visitEnterSafeCallNode(node: EnterSafeCallNode) {\n visitNode(node)\n }\n\n open fun visitExitSafeCallNode(node: ExitSafeCallNode) {\n visitNode(node)\n }\n\n \/\/ ---------------------------------------------------------------------------------------------------------------------\n\n final override fun visitNode(node: CFGNode<*>, data: Nothing?) {\n visitNode(node)\n }<|endoftext|>"} {"prompt":"var index = size\n val result = java.util.Arrays.copyOf(this, index + elements.size)\n for (element in elements) result[index++] = element\n return result\n}\n\n\/**\n * Returns an array containing all elements of the original array and then all elements of the given [elements] collection.\n *\/","completion":"public actual operator fun ShortArray.plus(elements: Collection): ShortArray {\n var index = size\n val result = java.util.Arrays.copyOf(this, index + elements.size)\n for (element in elements) result[index++] = element\n return result\n}\n\n\/**\n * Returns an array containing all elements of the original array and then all elements of the given [elements] collection.<|endoftext|>"} {"prompt":"this@with.yield(\"\")\n\n yield2(\"\")","completion":"this@with.yield2(\"\")\n }\n }\n }\n\n buildSequence a@{\n yield(1)\n yield2(1)\n buildSequence {\n yield(\"\")\n yield2(\"\")<|endoftext|>"} {"prompt":"test(SIMPLE0, PrivateClass().call_private_baz)\n test(NATIVE, PrivateClass().call_private_native_baz)\n\n testGroup = \"Open Public Class\"\n test(STABLE) { OpenPublicClass().public_baz(0) }\n test(NATIVE) { OpenPublicClass().public_baz(\"native\") }","completion":"test(INTERNAL) { OpenPublicClass().internal_baz(0) }\n test(NATIVE) { OpenPublicClass().internal_baz(\"native\") }\n testMangledPrivate(OpenPublicClass().call_private_baz)\n test(NATIVE, OpenPublicClass().call_private_native_baz)\n\n testGroup = \"Open Internal Class\"<|endoftext|>"} {"prompt":"listener: (Elements, Trees) -> TaskListener? = { _, _ -> null }\n) {\n val compiler = ToolProvider.getSystemJavaCompiler()\n compiler.getStandardFileManager(null, null, null).use { fileManager ->\n val javaSrcs = fileManager.getJavaFileObjectsFromFiles(srcFiles)\n val compilationTask =\n compiler.getTask(","completion":"null,\n fileManager,\n null,\n listOf(\"-proc:only\", \"-s\", generatedSources.absolutePath, \"-d\", generatedSources.absolutePath, \"-cp\", classpath.joinToString(separator = File.pathSeparator)),\n null,\n javaSrcs\n ) as JavacTaskImpl<|endoftext|>"} {"prompt":"interface RttiExpressionChecker {\n fun check(rttiInformation: RttiExpressionInformation, reportOn: PsiElement, trace: BindingTrace)\n}\n\nenum class RttiOperation {\n IS,\n NOT_IS,\n AS,\n SAFE_AS\n}\n\nclass RttiExpressionInformation(\n val subject: KtElement,\n val sourceType: KotlinType?,","completion":"val targetType: KotlinType?,\n val operation: RttiOperation\n)<|endoftext|>"} {"prompt":"statisticsData.getKotlinLanguageVersion()?.also {\n withIndent(\"Task info:\") {\n println(\"Kotlin language version: $it\")\n }\n }\n\n if (statisticsData.getIcLogLines().isNotEmpty()) {\n withIndent(\"Compilation log for task '${statisticsData.getTaskName()}':\") {","completion":"statisticsData.getIcLogLines().forEach { println(it) }\n }\n }\n}<|endoftext|>"} {"prompt":"constantValuesCache.getOrPut(IrConstValueCacheKey(value)) {\n evaluateConstantValueImpl(value)\n }\n\n private fun evaluateConstantValueImpl(value: IrConstantValue): ConstValue {\n val symbols = context.ir.symbols\n return when (value) {\n is IrConstantPrimitive -> {\n val constructedType = value.value.type","completion":"if (context.getTypeConversion(constructedType, value.type) != null) {\n if (value.value.kind == IrConstKind.Null) {\n Zero(value.type.toLLVMType(llvm))\n } else {\n require(value.type.toLLVMType(llvm) == codegen.kObjHeaderPtr) {<|endoftext|>"} {"prompt":"private val processOptions: ProcessForkOptions = DefaultProcessForkOptions(fileResolver)\n\n @get:Internal\n val executableProperty: Property = project.objects.property(FileCollection::class.java)\n\n @get:PathSensitive(PathSensitivity.ABSOLUTE)\n @get:IgnoreEmptyDirectories\n @get:NormalizeLineEndings","completion":"@get:InputFiles \/\/ use FileCollection & @InputFiles rather than @InputFile to allow for task dependencies built-into this FileCollection\n @get:SkipWhenEmpty\n @Suppress(\"UNUSED\") \/\/ Gradle input\n internal val executableFiles: FileCollection \/\/ Gradle < 5.0 seems to not work properly with @InputFiles Property\n get() = executableProperty.get()\n\n private val executableFile<|endoftext|>"} {"prompt":"assertEquals(kotlinOnyFiles.size, expansionResult.size)\n assertEquals(kotlinOnyFiles, expansionResult.toSet())\n }\n }\n\n @Test\n fun dirPattern() {\n val fileNames = listOf(\"one.kt\", \"two.kt\", \"three.kt\", \"four.java\", \"five.py\")","completion":"val dirNames = listOf(null, \"foo\", \"bar\", \"baz\")\n val pattern = \"ba*\/*.kt\" \/\/ covers \"bar\" & \"baz\" dirs\n\n dirNames.forEach { dirName -> createDirWithFiles(dirName, fileNames) }\n\n val fullPattern = testDir.resolve(pattern)\n val expansionResult = expandGlob(fullPattern)<|endoftext|>"} {"prompt":"\/\/ like dropLast but creates a view to the original list instead of copying content of it\nprivate fun List.subListWithoutLast(n: Int) = if (size > n) subList(0, size - n) else emptyList()\n\nprivate sealed class BlockOrBody {\n abstract val element: IrElement\n\n data class Body(val body: IrBody) : BlockOrBody() {","completion":"override val element get() = body\n }\n\n data class Block(val block: IrBlock) : BlockOrBody() {\n override val element get() = block\n }\n}\n\n\/**\n * Finds the most narrow block or body which contains all usages of each of the given variables\n *\/<|endoftext|>"} {"prompt":"fun test(b: B, c: C) {\n val k: Nothing = b.a\n b.foo(k)\n val k2: Nothing = b.bar()\n val k3: List = b.b\n\n val k4: Nothing? = b.c\n b.foo2(k4)\n val k5: Nothing? = b.bar2()","completion":"val k6: List = b.d\n\n\n val k7: Nothing = c.a\n c.foo(k)\n val k8: Nothing = c.bar()\n val k9: List = c.b\n\n val k10: Nothing? = c.c\n c.foo2(k4)\n val k11: Nothing? = c.bar2()<|endoftext|>"} {"prompt":"assert(p1!!.call() is OnlyPrimary)\n\n val p2 = PrimaryWithSecondary::class.primaryConstructor\n assertNotNull(p2)\n assert(p2!!.call(\"beer\").toString() == \"beer\")\n\n val p3 = OnlySecondary::class.primaryConstructor\n assertNull(p3)\n\n val p4 = TwoSecondaries::class.primaryConstructor","completion":"assertNull(p4)\n\n assertNotNull(En::class.primaryConstructor)\n\n assertNull(I::class.primaryConstructor)\n assertNull(O::class.primaryConstructor)\n assertNull(C.Companion::class.primaryConstructor)\n\n assertNull(object {}::class.primaryConstructor)\n\n return \"OK\"\n}<|endoftext|>"} {"prompt":"fun visitConstructorCall(expression: IrConstructorCall) {\n visitFunctionAccess(expression)\n }\n\n override fun visitSingletonReference(expression: IrGetSingletonValue, data: Nothing?) {\n visitSingletonReference(expression)\n }\n\n fun visitSingletonReference(expression: IrGetSingletonValue) {\n visitDeclarationReference(expression)\n }","completion":"override fun visitGetObjectValue(expression: IrGetObjectValue, data: Nothing?) {\n visitGetObjectValue(expression)\n }\n\n fun visitGetObjectValue(expression: IrGetObjectValue) {\n visitSingletonReference(expression)\n }\n\n override fun visitGetEnumValue(expression: IrGetEnumValue, data: Nothing?) {<|endoftext|>"} {"prompt":"private val cache: FirCache = firCachesFactory.createCache { session ->\n @Suppress(\"UNCHECKED_CAST\")\n DeprecationsPerUseSite(\n all?.computeDeprecationInfoOrNull(session),","completion":"bySpecificSite?.mapValues { (_, info) -> info.computeDeprecationInfoOrNull(session) }?.filterValues { it != null }\n as Map?\n )\n }\n\n override fun getDeprecationsInfo(session: FirSession): DeprecationsPerUseSite {\n return cache.getValue(session, null)\n }<|endoftext|>"} {"prompt":"messageCollector?.report(ERROR, errorMessageWithStackTrace)\n }\n }\n }\n\n val extensionStorage = CompilerPluginRegistrar.ExtensionStorage()\n for (registrar in configuration.getList(CompilerPluginRegistrar.COMPILER_PLUGIN_REGISTRARS)) {\n with(registrar) { extensionStorage.registerExtensions(configuration) }","completion":"}\n extensionStorage.registerInProject(project) { createErrorMessage(it) }\n }\n\n private fun registerApplicationServicesForCLI(applicationEnvironment: KotlinCoreApplicationEnvironment) {\n \/\/ ability to get text from annotations xml files\n applicationEnvironment.registerFileType(PlainTextFileType.INSTANCE, \"xml\")\n applicationEnvironment.registerParserDefinition(JavaParserDefinition())\n }<|endoftext|>"} {"prompt":"\"kotlin.text.StringsKt.trimIndent\", \"kotlin.text.trimIndent\" -> str.trimIndent()\n \"kotlin.text.StringsKt.trimMargin\", \"kotlin.text.trimMargin\" -> {","completion":"val marginPrefix = environment.callStack.loadState(irFunction.valueParameters.single().symbol).asString()\n str.trimMargin(marginPrefix)\n }\n \"kotlin.text.StringsKt.trimMargin\\$default\", \"kotlin.text.trimMargin\\$default\" -> str.trimMargin()<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.backend.konan.ir.actualCallee\nimport org.jetbrains.kotlin.backend.konan.ir.isVirtualCall\nimport org.jetbrains.kotlin.backend.konan.llvm.IntrinsicType","completion":"import org.jetbrains.kotlin.backend.konan.llvm.tryGetIntrinsicType\nimport org.jetbrains.kotlin.backend.konan.logMultiple\nimport org.jetbrains.kotlin.backend.konan.lower.*\nimport org.jetbrains.kotlin.ir.IrElement<|endoftext|>"} {"prompt":"for (i in (5.toShort() downTo 3.toShort()).reversed()) {\n list3.add(i)\n if (list3.size > 23) break\n }\n if (list3 != listOf(3, 4, 5)) {\n return \"Wrong elements for (5.toShort() downTo 3.toShort()).reversed(): $list3\"","completion":"}\n\n val list4 = ArrayList()\n for (i in (5L downTo 3L).reversed()) {\n list4.add(i)\n if (list4.size > 23) break\n }\n if (list4 != listOf(3, 4, 5)) {<|endoftext|>"} {"prompt":"if (x !== null && x != null) x.propNullableAny<|endoftext|>"} {"prompt":"\/\/ IGNORE_BACKEND: JVM\n\/\/ WITH_STDLIB\n\/\/ WORKS_WHEN_VALUE_CLASS\n\/\/ LANGUAGE: +ValueClasses, +GenericInlineClassParameter\n\nOPTIONAL_JVM_INLINE_ANNOTATION\nvalue class A(val value: T)\n\nfun interface B {\n fun f(x: A): A\n}","completion":"inline fun g(unit: Unit = Unit, b: B): A {\n return b.f(A(\"Fail\"))\n}\n\nfun box(): String {\n val b = { _ : A<*> -> A(\"O\") }\n return g(b = b).value + g { A(\"K\") }.value\n}<|endoftext|>"} {"prompt":"assertFalse(m == mapOf(\"a\" to \"1\", \"b\" to \"2\", \"c\" to \"4\"))\n assertFalse(m == mapOf(\"a\" to \"1\", \"b\" to \"2\", \"c\" to \"5\"))\n assertFalse(m == mapOf(\"a\" to \"1\", \"b\" to \"2\"))\n assertEquals(m.keys, expected.keys)","completion":"assertEquals(m.values.toList(), expected.values.toList())\n assertEquals(m.entries, expected.entries)\n }\n\n @Test fun hashCodeTest() {\n val expected = mapOf(\"a\" to \"1\", \"b\" to \"2\", \"c\" to \"3\")\n val m = HashMap(expected)<|endoftext|>"} {"prompt":"protected var mutableProperty: String = \"text\"\n\n @set:[Ann]\n protected var mutablePropertyWithAnnotationList: String = \"text\"\n\n @set:Ann\n protected var delegatedProperty: String by CustomDelegate()\n\n @set:Ann\n var propertyWithCustomSetter: Int\n get() = 5\n set(v) {}","completion":"@set:Ann\n fun annotationOnFunction(a: Int) = a + 5\n\n fun anotherFun() {\n @set:Ann<|endoftext|>"} {"prompt":"\"UByteArray\" -> UnsignedArrayType.UBYTEARRAY\n \"UShortArray\" -> UnsignedArrayType.USHORTARRAY\n \"UIntArray\" -> UnsignedArrayType.UINTARRAY\n \"ULongArray\" -> UnsignedArrayType.ULONGARRAY\n else -> null\n }\n\n fun isUnsignedArrayClass(descriptor: DeclarationDescriptor): Boolean {","completion":"val container = descriptor.containingDeclaration\n return container is PackageFragmentDescriptor &&\n container.fqName == StandardNames.BUILT_INS_PACKAGE_FQ_NAME &&\n descriptor.name in unsignedArrayTypeNames\n }\n}<|endoftext|>"} {"prompt":"return@mapNotNull PackagePartsCacheData(proto.`package`, context)\n }\n }\n\n override fun computePackageSetWithNonClassDeclarations() = packageAndMetadataPartProvider.computePackageSetWithNonClassDeclarations()\n\n override fun knownTopLevelClassesInPackage(packageFqName: FqName) = metadataTopLevelClassesInPackageCache.getValue(packageFqName)","completion":"override fun extractClassMetadata(classId: ClassId, parentContext: FirDeserializationContext?): ClassMetadataFindResult? {\n val classData = classDataFinder.findClassData(classId) ?: return null\n return ClassMetadataFindResult.Metadata(\n classData.nameResolver,\n classData.classProto,\n annotationDeserializer = annotationDeserializer,<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER\n\/\/ !OPT_IN: kotlin.RequiresOptIn\n\/\/ NI_EXPECTED_FILE\n\n@file:OptIn(ExperimentalTypeInference::class)\n\nimport kotlin.experimental.ExperimentalTypeInference\n\ninterface Base\n\ninterface Controller : Base {\n suspend fun yield(t: T) {}\n}","completion":"fun generate(g: suspend Controller.() -> Unit): S = TODO()\n\nfun Base.baseExtension() {}\nfun Controller.outNullableAnyExtension() {}\nfun Controller.outAnyExtension() {}\nfun Controller.invNullableAnyExtension() {}\nfun Controller.genericExtension() {}<|endoftext|>"} {"prompt":"private fun mockType(packageName: String, className: String, vararg arguments: Pair?): AbiType {\n return SimpleTypeImpl(\n classifierReference = ClassReferenceImpl(AbiQualifiedName(AbiCompoundName(packageName), AbiCompoundName(className))),\n arguments = arguments.map { argument ->\n if (argument == null)","completion":"StarProjectionImpl\n else\n TypeProjectionImpl(argument.first, argument.second)\n },\n nullability = AbiTypeNullability.NOT_SPECIFIED\n )\n }\n}<|endoftext|>"} {"prompt":"0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,\n 0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,","completion":"0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB,\n 0x404858EB, 0x404921FB,\n)\n\n\/*\n * invpio2: 53 bits of 2\/pi\n * pio2_1: first 33 bit of pi\/2<|endoftext|>"} {"prompt":"val DOCUMENT_POSITION_PRECEDING: Short\n val DOCUMENT_POSITION_FOLLOWING: Short\n val DOCUMENT_POSITION_CONTAINS: Short\n val DOCUMENT_POSITION_CONTAINED_BY: Short\n val DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: Short\n }\n}\n\n\/**","completion":"* Exposes the JavaScript [CDATASection](https:\/\/developer.mozilla.org\/en\/docs\/Web\/API\/CDATASection) to Kotlin\n *\/\npublic external open class CDATASection : Text {\n companion object {\n val ELEMENT_NODE: Short\n val ATTRIBUTE_NODE: Short\n val TEXT_NODE: Short<|endoftext|>"} {"prompt":"fun box(stepId: Int): String {\n val x = test()\n if (stepId == 4) {\n \/\/ this is known issue, that return type doesn not affect IdSignature\n \/\/ https:\/\/youtrack.jetbrains.com\/issue\/KT-51707\n if (x != 41) return \"Fail; got $x\"\n } else {","completion":"if (stepId != x) return \"Fail; got $x\"\n }\n return \"OK\"\n}<|endoftext|>"} {"prompt":"assert(numInput != 0UL)\n assert(buffer.len() > 0)\n assert(offsetInput > 0 && offsetInput <= buffer.len())\n\n var num = numInput\n var offset = offsetInput\n do {\n val t = num \/ 10U\n val r = num % 10U\n num = t\n offset--","completion":"buffer.set(offset, digitToChar(r.toInt()))\n } while (num > 0U)\n}\n\n\nprivate fun Boolean.toInt() = if (this) 1 else 0\nprivate fun Boolean.toLong() = if (this) 1L else 0L\n\nprivate fun decimalCount32(value: UInt): Int {\n if (value < 100000u) {<|endoftext|>"} {"prompt":"typealias R = R\n\ntypealias L = List\n\ntypealias A = B","completion":"typealias B = A\n\ntypealias F1 = (Int) -> F2\ntypealias F2 = (F1) -> Int\ntypealias F3 = (F1) -> Int<|endoftext|>"} {"prompt":"val generateDeclaredClassFilter: GenerateClassFilter,\n val targetId: TargetId?,\n moduleName: String?,\n val outDirectory: File?,\n private val onIndependentPartCompilationEnd: GenerationStateEventCallback,\n val jvmBackendClassResolver: JvmBackendClassResolver,\n val isIrBackend: Boolean,\n val ignoreErrors: Boolean,","completion":"val diagnosticReporter: DiagnosticReporter,\n val isIncrementalCompilation: Boolean\n) {\n class Builder(\n private val project: Project,\n private val builderFactory: ClassBuilderFactory,\n private val module: ModuleDescriptor,\n private val bindingContext: BindingContext,\n private val configuration: CompilerConfiguration\n ) {<|endoftext|>"} {"prompt":"description = \"\"\"\n Command line arguments to pass to the executable.\n Note that this directive makes sense only in combination with \/\/ KIND: STANDALONE_NO_TR\n \"\"\".trimIndent()\n )\n\n val ASSERTIONS_MODE by enumDirective(\n description = \"\"\"\n Force assertions mode to given value, overriding calculated mode which is derived from cacheMode and optimizationMode.","completion":"\"\"\".trimIndent()\n ) {\n AssertionsMode.fromStringOrNull(it)\n }\n}\n\n\/\/ mimics class `JVMAssertionsMode`\nenum class AssertionsMode(val description: String) {\n ALWAYS_ENABLE(\"always-enable\"),\n ALWAYS_DISABLE(\"always-disable\"),\n JVM(\"jvm\"),<|endoftext|>"} {"prompt":"internal fun __ieee754_exp(_x: Double): Double \/* default IEEE double exp *\/ {\n var x: Double = _x\n var y: Double\n var hi: Double = 0.0\n var lo: Double = 0.0\n var c: Double\n var t: Double\n var k: Int = 0\n var xsb: Int\n var hx: UInt","completion":"hx = __HIu(x) \/* high word of x *\/\n xsb = ((hx shr 31) and 1U).toInt() \/* sign bit of x *\/\n hx = hx and 0x7fffffffU \/* high word of |x| *\/\n\n \/* filter out non-finite argument *\/<|endoftext|>"} {"prompt":"internalVarTopLevel = 1\n privateVarTopLevel","completion":"privateVarTopLevel = 1\n\n publishedVar\n publishedVar = 1\n }\n\n\n @PublishedApi\n internal inline var publishedVar: Int\n get() {\n publicFun()<|endoftext|>"} {"prompt":"class JsKlibTestModuleCompiler : CliTestModuleCompiler() {\n override val compilerKind = CompilerExecutor.CompilerKind.JS\n\n override fun buildPlatformCompilerOptions(module: TestModule, testServices: TestServices): List {\n return listOf(","completion":"K2JSCompilerArguments::libraries.cliArgument, testServices.standardLibrariesPathProvider.fullJsStdlib().absolutePath,\n )\n }\n}\n\n\/**\n * [DispatchingTestModuleCompiler] chooses the appropriate compiler for a module based on its platform.\n * In case all tests in a suite should compile libraries for a single platform, one of the underlying [TestModuleCompiler]s<|endoftext|>"} {"prompt":"0x0UL, 0x0UL, 0x7ff8000000000000UL, 0x0UL, \n 0x3ff0000000000000UL, 0x0UL, 0x7ff0000000000000UL, 0x3ff0000000000000UL,","completion":"0x3ff0000000000000UL, 0x3ff0000000000000UL, 0x3ff0000000000000UL, 0x3ff0000000000000UL, \n 0x0UL, 0x7ff0000000000000UL, 0x3ff0000000000000UL, 0x3ff0000000000000UL,<|endoftext|>"} {"prompt":"val stringArgumentPropertiesMap = CompilerArgumentsContentProspector.getStringCompilerArgumentProperties(compilerArguments::class)\n .associateBy { it.name }\n stringArgumentsByName.forEach { (name, arg) ->\n val mutableProp = stringArgumentPropertiesMap[name].safeAs>() ?: return@forEach","completion":"mutableProp.set(compilerArguments, arg)\n }\n val arrayArgumentsByName = readArrayArguments(element)\n val arrayArgumentPropertiesMap = CompilerArgumentsContentProspector.getArrayCompilerArgumentProperties(compilerArguments::class)\n .associateBy { it.name }\n arrayArgumentsByName.forEach { (name, arr) -><|endoftext|>"} {"prompt":"\/\/ ISSUE: KT-58002\n\n\/\/ TARGET_BACKEND: JVM_IR\n\n\/\/ FILE: NLS.java\nimport java.lang.annotation.*;\n\n@Target(ElementType.TYPE_USE)\npublic @interface NLS {\n enum Capitalization { NotSpecified, Specified }\n Capitalization capitalization() default Capitalization.NotSpecified;\n}\n\n\/\/ FILE: BaseInspection.java","completion":"public class BaseInspection {\n @NLS(capitalization = NLS.Capitalization.Specified)\n public static String fetchProbableBugs() {\n return \"OK\";\n }\n}\n\n\/\/ FILE: main.kt\n\nfun getGroupDisplayName() = BaseInspection.fetchProbableBugs()\nfun box(): String = getGroupDisplayName()<|endoftext|>"} {"prompt":"\/\/ !OPT_IN: kotlin.contracts.ExperimentalContracts\n\n\/*\n * KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)\n *\n * SECTIONS: contracts, analysis, common\n * NUMBER: 1\n * DESCRIPTION: Analysis by contracts with mixed CallsInPlace and Returns effects.\n *\/\n\n\/\/ FILE: contracts.kt\n\npackage contracts","completion":"import kotlin.contracts.*\n\n\/\/ TESTCASE NUMBER: 1\ninline fun case_1(value_1: Int?, block: () -> Unit): Boolean {\n contract {\n callsInPlace(block, InvocationKind.EXACTLY_ONCE)\n returns(true) implies (value_1 != null)\n }\n block()\n return value_1 != null\n}<|endoftext|>"} {"prompt":"val l2: Byte = -1.toLong()\n\n\/\/ val l3: false\nval l3: Int = -1.toLong()\n\n\/\/ val l4: false","completion":"val l4: Short = -1.toLong()\n\n\n\/\/ val b1: false\nval b1: Byte = -1.toByte()\n\n\/\/ val b2: false<|endoftext|>"} {"prompt":"import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.RootPackageJsonTask\nimport org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin\nimport org.jetbrains.kotlin.gradle.tasks.CleanDataTask\nimport org.jetbrains.kotlin.gradle.tasks.registerTask","completion":"import org.jetbrains.kotlin.gradle.utils.castIsolatedKotlinPluginClassLoaderAware\nimport org.jetbrains.kotlin.gradle.utils.getFile\nimport org.jetbrains.kotlin.gradle.utils.onlyIfCompat\nimport org.jetbrains.kotlin.gradle.utils.providerWithLazyConvention<|endoftext|>"} {"prompt":"\/\/ !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION\n\/\/ SKIP_TXT\n\n\/*\n * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)\n *\n * SPEC VERSION: 0.1-544\n * MAIN LINK: declarations, classifier-declaration, class-declaration, constructor-declaration -> paragraph 5 -> sentence 1","completion":"* PRIMARY LINKS: declarations, classifier-declaration, class-declaration, constructor-declaration -> paragraph 4 -> sentence 1\n * declarations, classifier-declaration, class-declaration -> paragraph 1 -> sentence 1\n * declarations, classifier-declaration, class-declaration, constructor-declaration -> paragraph 2 -> sentence 1<|endoftext|>"} {"prompt":"\/\/ IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, WASM\n\/\/ FILE: lib.kt\nval x: String = computeX()\n\nfun computeX(): String = throw IllegalStateException(\"1\")\n\nval y: String = computeY()\n\nfun computeY(): String = \"2\"\n\n\/\/ FILE: main.kt\nfun box() : String {\n try {\n x","completion":"return \"FAIL 1\"\n } catch(t: Error) {\n val cause = t.cause\n if (cause !is IllegalStateException) return \"FAIL 2\"\n if (cause.message != \"1\") return \"FAIL 3\"\n }\n try {\n y\n return \"FAIL 4\"\n } catch(t: Error) {<|endoftext|>"} {"prompt":"\/\/ DIAGNOSTICS: -UNUSED_PARAMETER\n\/\/ !LANGUAGE: +RequiredPrimaryConstructorDelegationCallInEnums\n\nenum class Enum1(val a: String) {\n A;\n constructor()\n}","completion":"enum class Enum2(val a: String) {\n A, B;\n constructor(): this(\"\")\n}\n\nenum class Enum3(val a: String = \"\") {<|endoftext|>"} {"prompt":"a8: A8,\n a9: A9,\n a10: A10,\n c1: MutableList,\n c2: MutableList\n) {\n a1.removeAt(1)\n a1.remove(\"\")\n\n a2.removeAt(1)\n a2.remove(\"\")\n\n a3.removeAt(1)","completion":"a3.remove(\"\")\n\n a4.removeAt(1)\n a4.remove(\"\")\n\n a5.removeAt(1)\n a5.remove(\"\")\n\n a6.removeAt(1)\n a6.remove(\"\")\n\n a7.removeAt(1)\n a7.remove(\"\")\n\n a8.removeAt(1)<|endoftext|>"} {"prompt":") as KtConstantReference\n )\n }\n\n override fun visitConditionalEffectDeclaration(\n conditionalEffect: KtConditionalEffectDeclaration,\n data: Nothing?\n ): ConeContractDescriptionElement {\n return ConeConditionalEffectDeclaration(","completion":"conditionalEffect.effect.accept(this, data) as KtEffectDeclaration,\n conditionalEffect.condition.accept(this, data) as KtBooleanExpression\n )\n }\n\n override fun visitLogicalBinaryOperationContractExpression(<|endoftext|>"} {"prompt":"\"Non-script class in a script should NOT have the metadata flag set\",\n scriptClass.classLoader.loadClass(\"Metadata_flag\\$RandomClass\").isFlagSet()\n )\n }\n\n private fun compileScript(\n scriptPath: String,\n scriptDefinition: KotlinScriptDefinition,\n runIsolated: Boolean = true,\n suppressOutput: Boolean = false,","completion":"saveClassesDir: File? = null\n ): Class<*>? {\n val messageCollector =\n if (suppressOutput) MessageCollector.NONE\n else PrintingMessageCollector(System.err, MessageRenderer.PLAIN_FULL_PATHS, false)<|endoftext|>"} {"prompt":"internal fun storeTypeFromCallee(access: FirQualifiedAccessExpression, isLhsOfAssignment: Boolean) {\n val typeFromCallee = components.typeFromCallee(access)\n access.resultType = if (isLhsOfAssignment) {\n session.typeApproximator.approximateToSubType(","completion":"typeFromCallee.type, TypeApproximatorConfiguration.FinalApproximationAfterResolutionAndInference\n )\n } else {\n session.typeApproximator.approximateToSuperType(\n typeFromCallee.type, TypeApproximatorConfiguration.IntermediateApproximationToSupertypeAfterCompletionInK2\n )\n } ?: typeFromCallee.type<|endoftext|>"} {"prompt":"fun protectedAndInternal1() = doTestFailure(\n Protected.toMock(), Internal.toMock()\n )\n\n @Test(expected = IllegalCommonizerStateException::class)\n fun protectedAndInternal2() = doTestFailure(\n Protected.toMock(), Protected.toMock(), Internal.toMock()\n )","completion":"@Test(expected = IllegalCommonizerStateException::class)\n fun publicAndPrivate() = doTestFailure(\n Public.toMock(), Private.toMock()\n )\n\n @Test(expected = IllegalCommonizerStateException::class)\n fun privateOnly() = doTestFailure(\n Private.toMock()\n )\n }\n}<|endoftext|>"} {"prompt":"public inline operator fun kotlin.collections.MutableMap.set(key: K, value: V): kotlin.Unit\n\n@kotlin.internal.InlineOnly","completion":"public inline operator fun kotlin.collections.MutableMap.setValue(thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V): kotlin.Unit\n\n@kotlin.SinceKotlin(version = \"1.4\")<|endoftext|>"} {"prompt":"private val parent: ClassLoader,\n private val allowedPackage: String,\n) : ClassLoader(null) { \/\/ `null` parent means that the parent is the bootstrap classloader\n override fun loadClass(name: String, resolve: Boolean): Class<*> {\n return if (name.startsWith(allowedPackage)) {\n parent.loadClass(name)\n } else {","completion":"super.loadClass(name, resolve)\n }\n }\n}<|endoftext|>"} {"prompt":"fun testR0xE9() {\n \/\/ with possible local optimizations\n if (1.toShort() in intArray.indices != range0.contains(1.toShort())) throw AssertionError()\n if (1.toShort() !in intArray.indices != !range0.contains(1.toShort())) throw AssertionError()","completion":"if (!(1.toShort() in intArray.indices) != !range0.contains(1.toShort())) throw AssertionError()\n if (!(1.toShort() !in intArray.indices) != range0.contains(1.toShort())) throw AssertionError()\n \/\/ no local optimizations<|endoftext|>"} {"prompt":"p.println(\"====== Id to file map\")\n p.println(idToFile.dump())\n\n val lookupsStrings = lookupSymbols.groupBy { LookupSymbolKey(it.name, it.scope) }\n\n for (lookup in lookupMap.keys.sorted()) {\n val fileIds = lookupMap[lookup]!!","completion":"val key = if (lookup in lookupsStrings) {\n lookupsStrings[lookup]!!.map { \"${it.scope}#${it.name}\" }.sorted().joinToString(\", \")\n } else {\n lookup.toString()\n }\n\n val value = fileIds.map { it.toString() }.sorted().joinToString(\", \")<|endoftext|>"} {"prompt":"\"\"\".trimIndent(),\n setOf(\"com.foo.bar\", \"com.bar.foo\")\n )\n\n @Test\n fun testCommentsAreIgnored() = testConfigParsing(\n \"\"\"\n \/\/ Comment first line\n com.foo.bar\n \/\/ Comment last line\n \"\"\".trimIndent(),\n setOf(\"com.foo.bar\")\n )","completion":"@Test\n fun whitespaceIgnored() = testConfigParsing(\n \"\"\"\n\n com.foo.bar\n\n \"\"\".trimIndent(),\n setOf(\"com.foo.bar\")\n )\n\n @Test\n fun testWildcardsAreParsed() = testConfigParsing(\n \"\"\"\n \/\/ Comment first line\n com.*\n \/\/ Comment last line<|endoftext|>"} {"prompt":"interface OverloadsAnnotationClassConstructorWarning : KtFirDiagnostic {\n override val diagnosticClass get() = OverloadsAnnotationClassConstructorWarning::class\n }\n\n interface OverloadsPrivate : KtFirDiagnostic {\n override val diagnosticClass get() = OverloadsPrivate::class\n }","completion":"interface DeprecatedJavaAnnotation : KtFirDiagnostic {\n override val diagnosticClass get() = DeprecatedJavaAnnotation::class\n val kotlinName: FqName\n }\n\n interface JvmPackageNameCannotBeEmpty : KtFirDiagnostic {<|endoftext|>"} {"prompt":"g.propAny\n g.propNullableT","completion":"g.propNullableAny\n g.funT()<|endoftext|>"} {"prompt":"isTailrec = declaration.isTailrec,\n isSuspend = declaration.isSuspend,\n isOperator = declaration.isOperator,\n isInfix = declaration.isInfix,\n isExternal = declaration.isExternal,\n ).apply {\n parent = parentClass\n contextReceiverParametersCount = declaration.contextReceiverParametersCount\n annotations = declaration.copyAnnotations()","completion":"typeParameters = declaration.typeParameters.map { copyTypeParameter(it, this) }\n for ((i, thisTypeParameter) in typeParameters.withIndex()) {\n val otherTypeParameter = declaration.typeParameters[i]\n thisTypeParameter.superTypes = otherTypeParameter.superTypes.map(typeRemapper::remapType)\n }<|endoftext|>"} {"prompt":"actual fun withTypeParamIncorrect(p: Foo.Inner) {}\n\nactual fun star(p: Foo.Inner<*>) {}","completion":"actual fun starVsNonStar(p: Foo.Inner) {}<|endoftext|>"} {"prompt":"val klibPlatform = \"${File.separator}klib${File.separator}platform${File.separator}\".replace(\"\\\\\", \"\\\\\\\\\")\n\n assertTasksExecuted(\":commonizeNativeDistribution\")\n assertTasksExecuted(\":checkLinuxX64MainPlatformDependencies\")\n assertTasksExecuted(\":checkLinuxArm64MainPlatformDependencies\")","completion":"assertOutputContains(Regex(\"\"\".*linuxX64Main.*$klibPlatform.*[Pp]osix.*\"\"\"))\n assertOutputContains(Regex(\"\"\".*linuxArm64Main.*$klibPlatform.*[Pp]osix.*\"\"\"))\n }\n }\n }\n\n @DisplayName(\"KT-50592 - isolated jvm subproject - should not fail commonization\")<|endoftext|>"} {"prompt":"\/\/ SKIP_KT_DUMP\n\/\/ TARGET_BACKEND: JVM\n\/\/ JDK_KIND: FULL_JDK_21\n\/\/ WITH_STDLIB\n\n\/\/ FILE: 1.kt\nimport java.util.*\nabstract class A : SortedSet, Set\n\nabstract class B(override val size: Int) : SortedSet, Set {","completion":"override fun reversed(): SortedSet {\n return null!!\n }\n\n override fun first(): Int {\n return 1\n }\n}\n\nabstract class C : SortedSet, MutableSet\n\nabstract class D : SortedSet, MutableSet {\n override fun reversed(): SortedSet? {<|endoftext|>"} {"prompt":"* as it may be passed to [operation] function later because of sequence's lazy nature.\n * \n * @param [operation] function that takes current accumulator value and an element, and calculates the next accumulator value.\n *\n * The operation is _intermediate_ and _stateless_.\n * \n * @sample samples.collections.Collections.Aggregates.runningFold\n *\/\n@SinceKotlin(\"1.4\")","completion":"public fun Sequence.runningFold(initial: R, operation: (acc: R, T) -> R): Sequence {\n return sequence {\n yield(initial)\n var accumulator = initial\n for (element in this@runningFold) {\n accumulator = operation(accumulator, element)\n yield(accumulator)\n }\n }\n}<|endoftext|>"} {"prompt":"+irReturn(irCall(closureClassConstructor).also { it.putValueArgument(0, irGet(result.valueParameters[0])) })\n }\n\n additionalDeclarations += closureClass\n additionalDeclarations += result\n return result\n }\n\n private fun createJsClosureCaller(info: FunctionTypeInfo): IrSimpleFunction {\n val result = context.irFactory.buildFun {","completion":"name = Name.identifier(\"__callJsClosure_${info.signatureString}\")\n returnType = info.adaptedResultType\n isExternal = true\n }\n result.parent = currentParent\n result.addValueParameter {\n name = Name.identifier(\"f\")\n type = jsRelatedSymbols.jsAnyType\n }\n val arity = info.adaptedParameterTypes.size<|endoftext|>"}