Support new suspend convention in frontend
#KT-14924 In Progress
This commit is contained in:
@@ -36,6 +36,7 @@ import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowValue;
|
||||
import org.jetbrains.kotlin.resolve.calls.smartcasts.ExplicitSmartCasts;
|
||||
import org.jetbrains.kotlin.resolve.calls.smartcasts.ImplicitSmartCasts;
|
||||
import org.jetbrains.kotlin.resolve.constants.CompileTimeConstant;
|
||||
import org.jetbrains.kotlin.resolve.coroutine.CoroutineReceiverValue;
|
||||
import org.jetbrains.kotlin.resolve.diagnostics.Diagnostics;
|
||||
import org.jetbrains.kotlin.resolve.scopes.LexicalScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.Qualifier;
|
||||
@@ -135,6 +136,9 @@ public interface BindingContext {
|
||||
WritableSlice<KtExpression, ResolvedCall<FunctionDescriptor>> LOOP_RANGE_NEXT_RESOLVED_CALL = Slices.createSimpleSlice();
|
||||
WritableSlice<KtExpression, ResolvedCall<FunctionDescriptor>> RETURN_HANDLE_RESULT_RESOLVED_CALL = Slices.createSimpleSlice();
|
||||
|
||||
WritableSlice<Call, CoroutineReceiverValue> COROUTINE_RECEIVER_FOR_SUSPENSION_POINT = Slices.createSimpleSlice();
|
||||
WritableSlice<Call, SimpleFunctionDescriptor> ENCLOSING_SUSPEND_FUNCTION_FOR_SUSPEND_FUNCTION_CALL = Slices.createSimpleSlice();
|
||||
|
||||
WritableSlice<VariableAccessorDescriptor, ResolvedCall<FunctionDescriptor>> DELEGATED_PROPERTY_RESOLVED_CALL = Slices.createSimpleSlice();
|
||||
WritableSlice<VariableAccessorDescriptor, Call> DELEGATED_PROPERTY_CALL = Slices.createSimpleSlice();
|
||||
|
||||
|
||||
@@ -64,7 +64,6 @@ private val DEFAULT_DECLARATION_CHECKERS = listOf(
|
||||
UnderscoreChecker,
|
||||
InlineParameterChecker,
|
||||
InfixModifierChecker(),
|
||||
SuspendModifierChecker,
|
||||
CoroutineModifierChecker,
|
||||
SinceKotlinAnnotationValueChecker,
|
||||
ReifiedTypeParameterAnnotationChecker()
|
||||
|
||||
+31
-6
@@ -19,22 +19,47 @@ package org.jetbrains.kotlin.resolve.calls.checkers
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor
|
||||
import org.jetbrains.kotlin.diagnostics.Errors
|
||||
import org.jetbrains.kotlin.psi.KtExpression
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.coroutine.CoroutineReceiverValue
|
||||
import org.jetbrains.kotlin.resolve.inline.InlineUtil
|
||||
import org.jetbrains.kotlin.resolve.scopes.LexicalScope
|
||||
import org.jetbrains.kotlin.resolve.scopes.utils.getImplicitReceiversHierarchy
|
||||
import org.jetbrains.kotlin.resolve.scopes.utils.parentsWithSelf
|
||||
|
||||
object CoroutineSuspendCallChecker : CallChecker {
|
||||
override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) {
|
||||
val descriptor = resolvedCall.candidateDescriptor as? FunctionDescriptor ?: return
|
||||
if (!descriptor.isSuspend || descriptor.initialSignatureDescriptor == null) return
|
||||
val descriptor = resolvedCall.candidateDescriptor as? SimpleFunctionDescriptor ?: return
|
||||
if (!descriptor.isSuspend) return
|
||||
|
||||
val dispatchReceiverOwner = (resolvedCall.dispatchReceiver as? CoroutineReceiverValue)?.declarationDescriptor ?: return
|
||||
val callElement = resolvedCall.call.callElement as KtExpression
|
||||
val closestCoroutineReceiver =
|
||||
context.scope.getImplicitReceiversHierarchy().firstOrNull { it.value is CoroutineReceiverValue }?.value as CoroutineReceiverValue?
|
||||
|
||||
if (!InlineUtil.checkNonLocalReturnUsage(dispatchReceiverOwner, callElement, context.resolutionContext)) {
|
||||
context.trace.report(Errors.NON_LOCAL_SUSPENSION_POINT.on(reportOn))
|
||||
val enclosingSuspendFunction =
|
||||
context.scope.parentsWithSelf.filterIsInstance<LexicalScope>().takeWhile {
|
||||
closestCoroutineReceiver == null || it.implicitReceiver?.value != closestCoroutineReceiver
|
||||
}.firstOrNull {
|
||||
(it.ownerDescriptor as? FunctionDescriptor)?.isSuspend == true
|
||||
}?.ownerDescriptor as? SimpleFunctionDescriptor
|
||||
|
||||
when {
|
||||
enclosingSuspendFunction != null -> {
|
||||
// TODO: check if tail call
|
||||
context.trace.record(BindingContext.ENCLOSING_SUSPEND_FUNCTION_FOR_SUSPEND_FUNCTION_CALL, resolvedCall.call, enclosingSuspendFunction)
|
||||
}
|
||||
closestCoroutineReceiver != null -> {
|
||||
|
||||
val callElement = resolvedCall.call.callElement as KtExpression
|
||||
|
||||
if (!InlineUtil.checkNonLocalReturnUsage(closestCoroutineReceiver.declarationDescriptor, callElement, context.resolutionContext)) {
|
||||
context.trace.report(Errors.NON_LOCAL_SUSPENSION_POINT.on(reportOn))
|
||||
}
|
||||
|
||||
context.trace.record(BindingContext.COROUTINE_RECEIVER_FOR_SUSPENSION_POINT, resolvedCall.call, closestCoroutineReceiver)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.resolve.checkers
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.coroutines.isValidContinuation
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.diagnostics.DiagnosticSink
|
||||
import org.jetbrains.kotlin.diagnostics.Errors
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.types.typeUtil.isUnit
|
||||
import org.jetbrains.kotlin.utils.sure
|
||||
|
||||
object SuspendModifierChecker : SimpleDeclarationChecker {
|
||||
private val ALLOW_SUSPEND_EXTENSIONS_ANNOTATION_FQ_NAME =
|
||||
KotlinBuiltIns.COROUTINES_PACKAGE_FQ_NAME.child(Name.identifier("AllowSuspendExtensions"))
|
||||
|
||||
override fun check(
|
||||
declaration: KtDeclaration,
|
||||
descriptor: DeclarationDescriptor,
|
||||
diagnosticHolder: DiagnosticSink,
|
||||
bindingContext: BindingContext
|
||||
) {
|
||||
val functionDescriptor = descriptor as? FunctionDescriptor ?: return
|
||||
if (!functionDescriptor.isSuspend) return
|
||||
|
||||
val suspendModifierElement = declaration.modifierList?.getModifier(KtTokens.SUSPEND_KEYWORD).sure { declaration.text }
|
||||
fun report(message: String) {
|
||||
diagnosticHolder.report(Errors.INAPPLICABLE_MODIFIER.on(suspendModifierElement, KtTokens.SUSPEND_KEYWORD, message))
|
||||
}
|
||||
|
||||
if (functionDescriptor.dispatchReceiverParameter == null) {
|
||||
if (functionDescriptor.extensionReceiverParameter == null) {
|
||||
report("function must be either a class member or an extension")
|
||||
return
|
||||
}
|
||||
|
||||
val classDescriptor =
|
||||
functionDescriptor.extensionReceiverParameter!!.type.constructor.declarationDescriptor as? ClassDescriptor
|
||||
if (classDescriptor == null) {
|
||||
report("function must be an extension to class")
|
||||
return
|
||||
}
|
||||
|
||||
if (!classDescriptor.annotations.hasAnnotation(ALLOW_SUSPEND_EXTENSIONS_ANNOTATION_FQ_NAME)) {
|
||||
report("controller class must be annotated with AllowSuspendExtensions annotation")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
val continuationParameterType = functionDescriptor.valueParameters.lastOrNull()?.type
|
||||
val isValidContinuation = continuationParameterType?.isValidContinuation() ?: false
|
||||
if (!isValidContinuation) {
|
||||
report("last parameter of suspend function should have a type of Continuation<T>")
|
||||
return
|
||||
}
|
||||
|
||||
if (continuationParameterType?.arguments?.firstOrNull()?.isStarProjection == true) {
|
||||
report("Continuation<*> is prohibited as a last parameter of suspend function")
|
||||
}
|
||||
|
||||
if (functionDescriptor.returnType?.isUnit() != true) {
|
||||
report("return type of suspension function must be a kotlin.Unit, but ${functionDescriptor.returnType} was found")
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-12
@@ -21,9 +21,9 @@ import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.VariableDescriptor
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.calls.tasks.ExplicitReceiverKind
|
||||
import org.jetbrains.kotlin.resolve.coroutine.CoroutineReceiverValue
|
||||
import org.jetbrains.kotlin.resolve.coroutine.createCoroutineSuspensionFunctionView
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.*
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.DetailedReceiver
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.QualifierReceiver
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValueWithSmartCastInfo
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.check
|
||||
|
||||
|
||||
@@ -109,14 +109,6 @@ private class NoExplicitReceiverScopeTowerProcessor<D : CallableDescriptor, C: C
|
||||
result.add(
|
||||
candidateFactory.createCandidate(
|
||||
it, ExplicitReceiverKind.NO_EXPLICIT_RECEIVER, extensionReceiver = data.implicitReceiver))
|
||||
|
||||
if (data.implicitReceiver.receiverValue is CoroutineReceiverValue) {
|
||||
val newDescriptor = it.descriptor.createCoroutineSuspensionFunctionView() ?: return@forEach
|
||||
result.add(
|
||||
candidateFactory.createCandidate(
|
||||
it.copy(newDescriptor = newDescriptor),
|
||||
ExplicitReceiverKind.NO_EXPLICIT_RECEIVER, extensionReceiver = data.implicitReceiver))
|
||||
}
|
||||
}
|
||||
|
||||
result
|
||||
@@ -204,4 +196,4 @@ fun <D : CallableDescriptor, C: Candidate<D>> createProcessorWithReceiverValueOr
|
||||
else {
|
||||
create(explicitReceiver as ReceiverValueWithSmartCastInfo?)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,14 +24,15 @@ import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.calls.smartcasts.getReceiverValueWithSmartCast
|
||||
import org.jetbrains.kotlin.resolve.calls.util.FakeCallableDescriptorForObject
|
||||
import org.jetbrains.kotlin.resolve.calls.util.FakeCallableDescriptorForTypeAliasObject
|
||||
import org.jetbrains.kotlin.resolve.coroutine.CoroutineReceiverValue
|
||||
import org.jetbrains.kotlin.resolve.coroutine.createCoroutineSuspensionFunctionView
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.HIDES_MEMBERS_NAME_LIST
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.hasClassValueDescriptor
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.hasHidesMembersAnnotation
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.hasLowPriorityInOverloadResolution
|
||||
import org.jetbrains.kotlin.resolve.scopes.*
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.*
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.CastImplicitClassReceiver
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ImplicitClassReceiver
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.QualifierReceiver
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValueWithSmartCastInfo
|
||||
import org.jetbrains.kotlin.resolve.scopes.utils.collectFunctions
|
||||
import org.jetbrains.kotlin.resolve.scopes.utils.collectVariables
|
||||
import org.jetbrains.kotlin.resolve.selectMostSpecificInEachOverridableGroup
|
||||
@@ -118,13 +119,6 @@ internal class ReceiverScopeTowerLevel(
|
||||
}
|
||||
}
|
||||
|
||||
if (receiverValue is CoroutineReceiverValue) {
|
||||
result.addAll(result.mapNotNull {
|
||||
val suspensionFunctionView = it.descriptor.createCoroutineSuspensionFunctionView() ?: return@mapNotNull null
|
||||
createCandidateDescriptor(suspensionFunctionView, dispatchReceiver)
|
||||
})
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
@@ -17,37 +17,7 @@
|
||||
package org.jetbrains.kotlin.resolve.coroutine
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ExtensionReceiver
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
|
||||
val SUSPENSION_POINT_KEY: FunctionDescriptor.UserDataKey<Boolean> = object : FunctionDescriptor.UserDataKey<Boolean> {}
|
||||
val REPLACED_SUSPENSION_POINT_KEY: FunctionDescriptor.UserDataKey<Boolean> = object : FunctionDescriptor.UserDataKey<Boolean> {}
|
||||
|
||||
// Returns suspension function as it's visible within coroutines:
|
||||
// E.g. `fun <V> await(f: CompletableFuture<V>): V` instead of `fun <V> await(f: CompletableFuture<V>, machine: Continuation<V>): Unit`
|
||||
fun <D : CallableDescriptor> D.createCoroutineSuspensionFunctionView(): D? {
|
||||
if (this !is SimpleFunctionDescriptor) return null
|
||||
if (!isSuspend) return null
|
||||
val returnType = getSuspensionPointReturnType() ?: return null
|
||||
|
||||
val newOriginal =
|
||||
if (original !== this)
|
||||
original.createCoroutineSuspensionFunctionView()
|
||||
else null
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
return newCopyBuilder().apply {
|
||||
setReturnType(returnType)
|
||||
setOriginal(newOriginal)
|
||||
setValueParameters(valueParameters.subList(0, valueParameters.size - 1))
|
||||
setSignatureChange()
|
||||
setPreserveSourceElement()
|
||||
putUserData(SUSPENSION_POINT_KEY, true)
|
||||
}.build()!! as D
|
||||
}
|
||||
|
||||
fun SimpleFunctionDescriptor.getSuspensionPointReturnType(): KotlinType? = valueParameters.lastOrNull()?.returnType?.arguments?.getOrNull(0)?.type
|
||||
|
||||
class CoroutineReceiverValue(callableDescriptor: CallableDescriptor, receiverType: KotlinType) : ExtensionReceiver(callableDescriptor, receiverType)
|
||||
|
||||
+4
-7
@@ -1,13 +1,11 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
class Controller {
|
||||
suspend fun suspendHere(a: String, x: Continuation<Int>) {
|
||||
}
|
||||
suspend fun suspendHere(a: String) = 1
|
||||
}
|
||||
|
||||
class A {
|
||||
suspend fun suspendHere(a: Int, x: Continuation<Int>) {
|
||||
}
|
||||
suspend fun suspendHere(a: Int) = 1
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {}
|
||||
@@ -18,9 +16,8 @@ fun test() {
|
||||
|
||||
with(A()) {
|
||||
suspendHere("")
|
||||
// This test checks that suspending functions
|
||||
// that are not from coroutine controller can't be called by suspending convention
|
||||
suspendHere(1<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
// With the new convention calling a suspension member with receiver different from the one obtained from the coroutine is OK
|
||||
suspendHere(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ public final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final suspend fun suspendHere(/*0*/ a: kotlin.Int, /*1*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun suspendHere(/*0*/ a: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@@ -15,6 +15,6 @@ public final class Controller {
|
||||
public constructor Controller()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final suspend fun suspendHere(/*0*/ a: kotlin.String, /*1*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun suspendHere(/*0*/ a: kotlin.String): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class Controller<T> {
|
||||
suspend fun suspendHere(x: Continuation<Int>) {
|
||||
}
|
||||
suspend fun suspendHere() = 1
|
||||
|
||||
suspend fun another(a: T, x: Continuation<Int>) {
|
||||
}
|
||||
suspend fun another(a: T) = 1
|
||||
}
|
||||
|
||||
fun <T> builder(coroutine c: Controller<T>.() -> Continuation<Unit>) { }
|
||||
@@ -62,7 +60,7 @@ fun foo() {
|
||||
suspendHere()
|
||||
|
||||
another(1)
|
||||
<!NON_LOCAL_SUSPENSION_POINT!>another<!>("")
|
||||
another("")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ public inline fun runCross(/*0*/ crossinline x: () -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
public final class Controller</*0*/ T> {
|
||||
public constructor Controller</*0*/ T>()
|
||||
public final suspend fun another(/*0*/ a: T, /*1*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun another(/*0*/ a: T): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final suspend fun suspendHere(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun suspendHere(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@@ -1,44 +1,25 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -NOTHING_TO_INLINE
|
||||
<!INAPPLICABLE_MODIFIER!>suspend<!> fun notMember(x: Continuation<Int>) {
|
||||
suspend fun notMember(q: Double) = 1
|
||||
|
||||
}
|
||||
suspend fun String.wrongExtension(x: Any) = 1
|
||||
|
||||
<!INAPPLICABLE_MODIFIER!>suspend<!> fun String.wrongExtension(x: Continuation<Int>) {
|
||||
}
|
||||
suspend fun Controller.controllerReceiver() = 1
|
||||
|
||||
suspend fun Controller.correctExtension(x: Continuation<Int>) {
|
||||
}
|
||||
|
||||
@AllowSuspendExtensions
|
||||
class Controller {
|
||||
suspend fun valid(x: Continuation<Int>) {
|
||||
// is still valid
|
||||
suspend fun oldConvention(x: Continuation<Int>) {
|
||||
|
||||
}
|
||||
|
||||
inline suspend fun inlineFun(x: Continuation<Int>) {
|
||||
suspend fun noParameters() {
|
||||
|
||||
}
|
||||
|
||||
<!INAPPLICABLE_MODIFIER!>suspend<!> fun noParams() {
|
||||
suspend fun oneParameter(q: Any) {}
|
||||
suspend fun varargParameter(vararg q: Any) {}
|
||||
suspend fun returnsString(q: Any) = ""
|
||||
|
||||
}
|
||||
inline suspend fun inlineFun(x: Int) {}
|
||||
|
||||
<!INAPPLICABLE_MODIFIER!>suspend<!> fun wrongParam(x: Collection<Int>) {
|
||||
|
||||
}
|
||||
|
||||
<!INAPPLICABLE_MODIFIER!>suspend<!> fun starProjection(x: Continuation<*>) {
|
||||
|
||||
}
|
||||
|
||||
<!INAPPLICABLE_MODIFIER!>suspend<!> fun varargs(vararg x: Continuation<Any>) {
|
||||
|
||||
}
|
||||
|
||||
suspend fun String.memberExtension(x: Continuation<Int>) {
|
||||
|
||||
}
|
||||
|
||||
suspend fun returnsUnit(x: Continuation<Int>) = Unit
|
||||
<!INAPPLICABLE_MODIFIER!>suspend<!> fun returnsNotUnit(x: Continuation<Int>) = 1
|
||||
suspend fun String.memberExtension() = 1
|
||||
}
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
package
|
||||
|
||||
public suspend fun notMember(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public suspend fun Controller.correctExtension(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public suspend fun kotlin.String.wrongExtension(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public suspend fun notMember(/*0*/ q: kotlin.Double): kotlin.Int
|
||||
public suspend fun Controller.controllerReceiver(): kotlin.Int
|
||||
public suspend fun kotlin.String.wrongExtension(/*0*/ x: kotlin.Any): kotlin.Int
|
||||
|
||||
@kotlin.coroutines.AllowSuspendExtensions public final class Controller {
|
||||
public final class Controller {
|
||||
public constructor Controller()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final inline suspend fun inlineFun(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun noParams(): kotlin.Unit
|
||||
public final suspend fun returnsNotUnit(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Int
|
||||
public final suspend fun returnsUnit(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun starProjection(/*0*/ x: kotlin.coroutines.Continuation<*>): kotlin.Unit
|
||||
public final inline suspend fun inlineFun(/*0*/ x: kotlin.Int): kotlin.Unit
|
||||
public final suspend fun noParameters(): kotlin.Unit
|
||||
public final suspend fun oldConvention(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun oneParameter(/*0*/ q: kotlin.Any): kotlin.Unit
|
||||
public final suspend fun returnsString(/*0*/ q: kotlin.Any): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun valid(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun varargs(/*0*/ vararg x: kotlin.coroutines.Continuation<kotlin.Any> /*kotlin.Array<out kotlin.coroutines.Continuation<kotlin.Any>>*/): kotlin.Unit
|
||||
public final suspend fun wrongParam(/*0*/ x: kotlin.collections.Collection<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun kotlin.String.memberExtension(/*0*/ x: kotlin.coroutines.Continuation<kotlin.Int>): kotlin.Unit
|
||||
public final suspend fun varargParameter(/*0*/ vararg q: kotlin.Any /*kotlin.Array<out kotlin.Any>*/): kotlin.Unit
|
||||
public final suspend fun kotlin.String.memberExtension(): kotlin.Int
|
||||
}
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
@AllowSuspendExtensions
|
||||
class Controller
|
||||
|
||||
suspend fun Controller.noParams(c: Continuation<Unit>) {
|
||||
|
||||
}
|
||||
suspend fun Controller.yieldString(value: String, c: Continuation<Unit>) {
|
||||
}
|
||||
|
||||
suspend fun <V> Controller.await(f: () -> V, machine: Continuation<V>) {
|
||||
}
|
||||
|
||||
suspend fun <V> Controller.await(f: Int, machine: Continuation<V>) {
|
||||
}
|
||||
|
||||
suspend fun Controller.severalParams(x: String, y: Int, machine: Continuation<Double>) {
|
||||
}
|
||||
|
||||
// These two must be prohibited because String and Any are not properly annotated
|
||||
<!INAPPLICABLE_MODIFIER!>suspend<!> fun String.wrongReceiver(y: Int, machine: Continuation<Double>) {
|
||||
}
|
||||
|
||||
<!INAPPLICABLE_MODIFIER!>suspend<!> fun Any.anyReceiver(y: Int, machine: Continuation<Double>) {
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {}
|
||||
|
||||
fun test() {
|
||||
builder {
|
||||
noParams()
|
||||
yieldString("abc") checkType { _<Unit>() }
|
||||
yieldString(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>) checkType { _<Unit>() }
|
||||
|
||||
await<String> { "123" } checkType { _<String>() }
|
||||
|
||||
// Inference from lambda return type
|
||||
await { 123 } checkType { _<Int>() }
|
||||
|
||||
// Inference from expected type
|
||||
checkSubtype<String>(await(567))
|
||||
|
||||
await<Double>(123) checkType { _<Double>() }
|
||||
|
||||
severalParams("", 89) checkType { _<Double>() }
|
||||
// TODO: prohibit such calls
|
||||
severalParams("", 89, <!CONSTANT_EXPECTED_TYPE_MISMATCH!>6.9<!>) checkType { _<Unit>() }
|
||||
severalParams("", 89, this <!CAST_NEVER_SUCCEEDS!>as<!> Continuation<Double>) checkType { _<Unit>() }
|
||||
|
||||
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>wrongReceiver<!>(1)
|
||||
|
||||
with("") {
|
||||
wrongReceiver(2<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
|
||||
// Though such calls are allowed declarations with not-annotated receiver should be prohibited
|
||||
anyReceiver(3)
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package
|
||||
|
||||
public fun builder(/*0*/ coroutine c: Controller.() -> kotlin.coroutines.Continuation<kotlin.Unit>): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
public suspend fun kotlin.Any.anyReceiver(/*0*/ y: kotlin.Int, /*1*/ machine: kotlin.coroutines.Continuation<kotlin.Double>): kotlin.Unit
|
||||
public suspend fun </*0*/ V> Controller.await(/*0*/ f: () -> V, /*1*/ machine: kotlin.coroutines.Continuation<V>): kotlin.Unit
|
||||
public suspend fun </*0*/ V> Controller.await(/*0*/ f: kotlin.Int, /*1*/ machine: kotlin.coroutines.Continuation<V>): kotlin.Unit
|
||||
public suspend fun Controller.noParams(/*0*/ c: kotlin.coroutines.Continuation<kotlin.Unit>): kotlin.Unit
|
||||
public suspend fun Controller.severalParams(/*0*/ x: kotlin.String, /*1*/ y: kotlin.Int, /*2*/ machine: kotlin.coroutines.Continuation<kotlin.Double>): kotlin.Unit
|
||||
public suspend fun kotlin.String.wrongReceiver(/*0*/ y: kotlin.Int, /*1*/ machine: kotlin.coroutines.Continuation<kotlin.Double>): kotlin.Unit
|
||||
public suspend fun Controller.yieldString(/*0*/ value: kotlin.String, /*1*/ c: kotlin.coroutines.Continuation<kotlin.Unit>): kotlin.Unit
|
||||
|
||||
@kotlin.coroutines.AllowSuspendExtensions public final class Controller {
|
||||
public constructor Controller()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
class Controller
|
||||
|
||||
suspend fun noParams() {
|
||||
|
||||
}
|
||||
|
||||
suspend fun yieldString(value: String) {}
|
||||
|
||||
suspend fun <V> await(f: () -> V) = f()
|
||||
|
||||
suspend fun <V> Controller.await(f: Int): V = null!!
|
||||
|
||||
suspend fun Controller.severalParams(x: String, y: Int) = 1.0
|
||||
|
||||
suspend fun String.stringReceiver(y: Int) = 1.0
|
||||
|
||||
suspend fun Any.anyReceiver(y: Int) = 1.0
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {}
|
||||
|
||||
fun test() {
|
||||
builder {
|
||||
noParams()
|
||||
yieldString("abc") checkType { _<Unit>() }
|
||||
yieldString(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>) checkType { _<Unit>() }
|
||||
|
||||
await<String> { "123" } checkType { _<String>() }
|
||||
|
||||
// Inference from lambda return type
|
||||
await { 123 } checkType { _<Int>() }
|
||||
|
||||
// Inference from expected type
|
||||
checkSubtype<String>(await(567))
|
||||
|
||||
await<Double>(123) checkType { _<Double>() }
|
||||
|
||||
severalParams("", 89) checkType { _<Double>() }
|
||||
// TODO: should we allow somehow to call with passing continuation explicitly?
|
||||
severalParams("", 89, <!TOO_MANY_ARGUMENTS!>6.9<!>) checkType { <!TYPE_MISMATCH!>_<!><Unit>() }
|
||||
severalParams("", 89, <!TOO_MANY_ARGUMENTS!>this <!CAST_NEVER_SUCCEEDS!>as<!> Continuation<Double><!>) checkType { <!TYPE_MISMATCH!>_<!><Unit>() }
|
||||
|
||||
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>stringReceiver<!>(1)
|
||||
|
||||
with("") {
|
||||
stringReceiver(2)
|
||||
}
|
||||
|
||||
// Though such calls are allowed declarations with not-annotated receiver should be prohibited
|
||||
anyReceiver(3)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package
|
||||
|
||||
public suspend fun </*0*/ V> await(/*0*/ f: () -> V): V
|
||||
public fun builder(/*0*/ coroutine c: Controller.() -> kotlin.coroutines.Continuation<kotlin.Unit>): kotlin.Unit
|
||||
public suspend fun noParams(): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
public suspend fun yieldString(/*0*/ value: kotlin.String): kotlin.Unit
|
||||
public suspend fun kotlin.Any.anyReceiver(/*0*/ y: kotlin.Int): kotlin.Double
|
||||
public suspend fun </*0*/ V> Controller.await(/*0*/ f: kotlin.Int): V
|
||||
public suspend fun Controller.severalParams(/*0*/ x: kotlin.String, /*1*/ y: kotlin.Int): kotlin.Double
|
||||
public suspend fun kotlin.String.stringReceiver(/*0*/ y: kotlin.Int): kotlin.Double
|
||||
|
||||
public final class Controller {
|
||||
public constructor Controller()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -1,20 +1,16 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
class Controller {
|
||||
suspend fun noParams(c: Continuation<Unit>) {
|
||||
suspend fun noParams() {
|
||||
|
||||
}
|
||||
suspend fun yieldString(value: String, c: Continuation<Unit>) {
|
||||
}
|
||||
suspend fun yieldString(value: String) {}
|
||||
|
||||
suspend fun <V> await(f: () -> V, machine: Continuation<V>) {
|
||||
}
|
||||
suspend fun <V> await(f: () -> V): V = f()
|
||||
|
||||
suspend fun <V> await(f: Int, machine: Continuation<V>) {
|
||||
}
|
||||
suspend fun <V> await(f: Int): V = null!!
|
||||
|
||||
suspend fun severalParams(x: String, y: Int, machine: Continuation<Double>) {
|
||||
}
|
||||
suspend fun severalParams(x: String, y: Int) = 1.0
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {}
|
||||
@@ -36,8 +32,9 @@ fun test() {
|
||||
await<Double>(123) checkType { _<Double>() }
|
||||
|
||||
severalParams("", 89) checkType { _<Double>() }
|
||||
// TODO: prohibit such calls
|
||||
severalParams("", 89, <!CONSTANT_EXPECTED_TYPE_MISMATCH!>6.9<!>) checkType { _<Unit>() }
|
||||
severalParams("", 89, this <!CAST_NEVER_SUCCEEDS!>as<!> Continuation<Double>) checkType { _<Unit>() }
|
||||
|
||||
// TODO: should we allow somehow to call with passing continuation explicitly?
|
||||
severalParams("", 89, <!TOO_MANY_ARGUMENTS!>6.9<!>) checkType { <!TYPE_MISMATCH!>_<!><Unit>() }
|
||||
severalParams("", 89, <!TOO_MANY_ARGUMENTS!>this <!CAST_NEVER_SUCCEEDS!>as<!> Continuation<Double><!>) checkType { <!TYPE_MISMATCH!>_<!><Unit>() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@ public fun test(): kotlin.Unit
|
||||
|
||||
public final class Controller {
|
||||
public constructor Controller()
|
||||
public final suspend fun </*0*/ V> await(/*0*/ f: () -> V, /*1*/ machine: kotlin.coroutines.Continuation<V>): kotlin.Unit
|
||||
public final suspend fun </*0*/ V> await(/*0*/ f: kotlin.Int, /*1*/ machine: kotlin.coroutines.Continuation<V>): kotlin.Unit
|
||||
public final suspend fun </*0*/ V> await(/*0*/ f: () -> V): V
|
||||
public final suspend fun </*0*/ V> await(/*0*/ f: kotlin.Int): V
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final suspend fun noParams(/*0*/ c: kotlin.coroutines.Continuation<kotlin.Unit>): kotlin.Unit
|
||||
public final suspend fun severalParams(/*0*/ x: kotlin.String, /*1*/ y: kotlin.Int, /*2*/ machine: kotlin.coroutines.Continuation<kotlin.Double>): kotlin.Unit
|
||||
public final suspend fun noParams(): kotlin.Unit
|
||||
public final suspend fun severalParams(/*0*/ x: kotlin.String, /*1*/ y: kotlin.Int): kotlin.Double
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun yieldString(/*0*/ value: kotlin.String, /*1*/ c: kotlin.coroutines.Continuation<kotlin.Unit>): kotlin.Unit
|
||||
public final suspend fun yieldString(/*0*/ value: kotlin.String): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_VARIABLE
|
||||
class GenericController<T> {
|
||||
operator fun handleResult(x: T, c: Continuation<Nothing>) { }
|
||||
suspend fun <V> await(f: V, machine: Continuation<V>) {}
|
||||
suspend fun <V> await(f: V): V = f
|
||||
}
|
||||
|
||||
fun <T> genericBuilder(coroutine c: GenericController<T>.() -> Continuation<Unit>): T = null!!
|
||||
|
||||
@@ -5,7 +5,7 @@ public fun </*0*/ T> genericBuilder(/*0*/ coroutine c: GenericController<T>.() -
|
||||
|
||||
public final class GenericController</*0*/ T> {
|
||||
public constructor GenericController</*0*/ T>()
|
||||
public final suspend fun </*0*/ V> await(/*0*/ f: V, /*1*/ machine: kotlin.coroutines.Continuation<V>): kotlin.Unit
|
||||
public final suspend fun </*0*/ V> await(/*0*/ f: V): V
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final operator fun handleResult(/*0*/ x: T, /*1*/ c: kotlin.coroutines.Continuation<kotlin.Nothing>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
// !LANGUAGE: -Coroutines
|
||||
|
||||
class Controller {
|
||||
<!UNSUPPORTED_FEATURE!>suspend<!> fun suspendHere(x: Continuation<String>) {
|
||||
x.resume("OK")
|
||||
}
|
||||
<!UNSUPPORTED_FEATURE!>suspend<!> fun suspendHere(): String = "OK"
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>operator<!> fun handleResult(x: String, y: Continuation<Nothing>) {}
|
||||
|
||||
|
||||
@@ -10,6 +10,6 @@ public final class Controller {
|
||||
public final operator fun handleResult(/*0*/ x: kotlin.String, /*1*/ y: kotlin.coroutines.Continuation<kotlin.Nothing>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final operator fun interceptResume(/*0*/ x: () -> kotlin.Unit): kotlin.Unit
|
||||
public final suspend fun suspendHere(/*0*/ x: kotlin.coroutines.Continuation<kotlin.String>): kotlin.Unit
|
||||
public final suspend fun suspendHere(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@@ -4288,9 +4288,9 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("suspendExtensionFunctions.kt")
|
||||
public void testSuspendExtensionFunctions() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/coroutines/suspendExtensionFunctions.kt");
|
||||
@TestMetadata("suspendExternalFunctions.kt")
|
||||
public void testSuspendExternalFunctions() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/coroutines/suspendExternalFunctions.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -NOTHING_TO_INLINE
|
||||
<error descr="[INAPPLICABLE_MODIFIER] 'suspend' modifier is inapplicable. The reason is that function must be either a class member or an extension"><info descr="null">suspend</info></error> fun notMember(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Continuation<Int>) {
|
||||
|
||||
}
|
||||
|
||||
<error descr="[INAPPLICABLE_MODIFIER] 'suspend' modifier is inapplicable. The reason is that controller class must be annotated with AllowSuspendExtensions annotation"><info descr="null">suspend</info></error> fun String.wrongExtension(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Continuation<Int>) {
|
||||
}
|
||||
|
||||
<info descr="null">suspend</info> fun Controller.correctExtension(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Continuation<Int>) {
|
||||
}
|
||||
|
||||
@AllowSuspendExtensions
|
||||
class Controller {
|
||||
<info descr="null">suspend</info> fun valid(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Continuation<Int>) {
|
||||
|
||||
}
|
||||
|
||||
<warning descr="[NOTHING_TO_INLINE] Expected performance impact of inlining 'public final inline suspend fun inlineFun(x: Continuation<Int>): Unit defined in Controller' can be insignificant. Inlining works best for functions with lambda parameters"><info descr="null">inline</info></warning> <info descr="null">suspend</info> fun inlineFun(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Continuation<Int>) {
|
||||
|
||||
}
|
||||
|
||||
<error descr="[INAPPLICABLE_MODIFIER] 'suspend' modifier is inapplicable. The reason is that last parameter of suspend function should have a type of Continuation<T>"><info descr="null">suspend</info></error> fun noParams() {
|
||||
|
||||
}
|
||||
|
||||
<error descr="[INAPPLICABLE_MODIFIER] 'suspend' modifier is inapplicable. The reason is that last parameter of suspend function should have a type of Continuation<T>"><info descr="null">suspend</info></error> fun wrongParam(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Collection<Int>) {
|
||||
|
||||
}
|
||||
|
||||
<error descr="[INAPPLICABLE_MODIFIER] 'suspend' modifier is inapplicable. The reason is that Continuation<*> is prohibited as a last parameter of suspend function"><info descr="null">suspend</info></error> fun starProjection(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Continuation<*>) {
|
||||
|
||||
}
|
||||
|
||||
<error descr="[INAPPLICABLE_MODIFIER] 'suspend' modifier is inapplicable. The reason is that last parameter of suspend function should have a type of Continuation<T>"><info descr="null">suspend</info></error> fun varargs(<info descr="null">vararg</info> <warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Continuation<Any>) {
|
||||
|
||||
}
|
||||
|
||||
<info descr="null">suspend</info> fun String.memberExtension(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Continuation<Int>) {
|
||||
|
||||
}
|
||||
|
||||
<error descr="[INAPPLICABLE_MODIFIER] 'suspend' modifier is inapplicable. The reason is that return type of suspension function must be a kotlin.Unit, but Int was found"><info descr="null">suspend</info></error> fun returnsNotUnit(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning>: Continuation<Int>) = 1
|
||||
}
|
||||
@@ -935,12 +935,6 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest {
|
||||
doTestWithInfos(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("suspendApplicability.kt")
|
||||
public void testSuspendApplicability() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/suspendApplicability.kt");
|
||||
doTestWithInfos(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("threeImplicitReceivers.kt")
|
||||
public void testThreeImplicitReceivers() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/threeImplicitReceivers.kt");
|
||||
|
||||
Reference in New Issue
Block a user