Add diagnostics tests. Forbid callable reference to coroutineContext
#KT-16908: Fixed
This commit is contained in:
@@ -982,11 +982,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
|||||||
|
|
||||||
ClosureCodegen coroutineCodegen = CoroutineCodegenForLambda.create(this, descriptor, declaration, cv);
|
ClosureCodegen coroutineCodegen = CoroutineCodegenForLambda.create(this, descriptor, declaration, cv);
|
||||||
ClosureContext closureContext = descriptor.isSuspend() ? this.context.intoCoroutineClosure(
|
ClosureContext closureContext = descriptor.isSuspend() ? this.context.intoCoroutineClosure(
|
||||||
CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(descriptor, state),
|
||||||
descriptor,
|
|
||||||
state.getLanguageVersionSettings().supportsFeature(LanguageFeature.ReleaseCoroutines),
|
|
||||||
state.getBindingContext()
|
|
||||||
),
|
|
||||||
descriptor, this, state.getTypeMapper()
|
descriptor, this, state.getTypeMapper()
|
||||||
) : this.context.intoClosure(descriptor, this, typeMapper);
|
) : this.context.intoClosure(descriptor, this, typeMapper);
|
||||||
ClosureCodegen closureCodegen = coroutineCodegen != null ? coroutineCodegen : new ClosureCodegen(
|
ClosureCodegen closureCodegen = coroutineCodegen != null ? coroutineCodegen : new ClosureCodegen(
|
||||||
|
|||||||
@@ -178,8 +178,7 @@ public class FunctionCodegen {
|
|||||||
@NotNull FunctionGenerationStrategy strategy
|
@NotNull FunctionGenerationStrategy strategy
|
||||||
) {
|
) {
|
||||||
if (CoroutineCodegenUtilKt.isSuspendFunctionNotSuspensionView(descriptor)) {
|
if (CoroutineCodegenUtilKt.isSuspendFunctionNotSuspensionView(descriptor)) {
|
||||||
generateMethod(origin, CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(descriptor, state.getLanguageVersionSettings()
|
generateMethod(origin, CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(descriptor, state), strategy);
|
||||||
.supportsFeature(LanguageFeature.ReleaseCoroutines), bindingContext), strategy);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -675,8 +674,7 @@ public class FunctionCodegen {
|
|||||||
if (functionDescriptor instanceof AnonymousFunctionDescriptor && functionDescriptor.isSuspend()) {
|
if (functionDescriptor instanceof AnonymousFunctionDescriptor && functionDescriptor.isSuspend()) {
|
||||||
functionDescriptor = CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
functionDescriptor = CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
||||||
functionDescriptor,
|
functionDescriptor,
|
||||||
parentCodegen.state.getLanguageVersionSettings().supportsFeature(LanguageFeature.ReleaseCoroutines),
|
parentCodegen.state
|
||||||
typeMapper.getBindingContext()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-24
@@ -1,17 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2015 JetBrains s.r.o.
|
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
*
|
* that can be found in the license/LICENSE.txt file.
|
||||||
* 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.codegen;
|
package org.jetbrains.kotlin.codegen;
|
||||||
@@ -42,6 +31,8 @@ import java.util.LinkedHashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static org.jetbrains.kotlin.codegen.inline.InlineCodegenUtilsKt.addFakeContinuationMarker;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Notice the difference between two function descriptors in this class.
|
* Notice the difference between two function descriptors in this class.
|
||||||
* - [referencedFunction] is the function declaration which is referenced by the "::" expression. This is a real function present in code.
|
* - [referencedFunction] is the function declaration which is referenced by the "::" expression. This is a real function present in code.
|
||||||
@@ -78,19 +69,14 @@ public class FunctionReferenceGenerationStrategy extends FunctionGenerationStrat
|
|||||||
) {
|
) {
|
||||||
super(state);
|
super(state);
|
||||||
this.resolvedCall = resolvedCall;
|
this.resolvedCall = resolvedCall;
|
||||||
if (resolvedCall.getResultingDescriptor() instanceof FunctionDescriptor &&
|
CallableDescriptor resultingDescriptor = resolvedCall.getResultingDescriptor();
|
||||||
((FunctionDescriptor) resolvedCall.getResultingDescriptor()).isSuspend()) {
|
if (resultingDescriptor instanceof FunctionDescriptor && ((FunctionDescriptor) resultingDescriptor).isSuspend()) {
|
||||||
this.referencedFunction = CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
this.referencedFunction =
|
||||||
(FunctionDescriptor) resolvedCall.getResultingDescriptor(),
|
CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView((FunctionDescriptor) resultingDescriptor, state);
|
||||||
state.getLanguageVersionSettings().supportsFeature(LanguageFeature.ReleaseCoroutines),
|
this.functionDescriptor = CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(functionDescriptor, state);
|
||||||
state.getBindingContext());
|
|
||||||
this.functionDescriptor = CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
|
||||||
functionDescriptor,
|
|
||||||
state.getLanguageVersionSettings().supportsFeature(LanguageFeature.ReleaseCoroutines),
|
|
||||||
state.getBindingContext());
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.referencedFunction = (FunctionDescriptor) resolvedCall.getResultingDescriptor();
|
this.referencedFunction = (FunctionDescriptor) resultingDescriptor;
|
||||||
this.functionDescriptor = functionDescriptor;
|
this.functionDescriptor = functionDescriptor;
|
||||||
}
|
}
|
||||||
this.receiverType = receiverType;
|
this.receiverType = receiverType;
|
||||||
|
|||||||
+41
-48
@@ -407,20 +407,7 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
|||||||
if (callableDescriptor instanceof SimpleFunctionDescriptor) {
|
if (callableDescriptor instanceof SimpleFunctionDescriptor) {
|
||||||
SimpleFunctionDescriptor functionDescriptor = (SimpleFunctionDescriptor) callableDescriptor;
|
SimpleFunctionDescriptor functionDescriptor = (SimpleFunctionDescriptor) callableDescriptor;
|
||||||
if (functionDescriptor.isSuspend()){
|
if (functionDescriptor.isSuspend()){
|
||||||
SimpleFunctionDescriptor jvmSuspendFunctionView =
|
createAndRecordSuspendFunctionView(closure, functionDescriptor, /* isSuspendLambda */ false, /* isDropSuspend */ false);
|
||||||
CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
|
||||||
functionDescriptor,
|
|
||||||
languageVersionSettings.supportsFeature(LanguageFeature.ReleaseCoroutines),
|
|
||||||
/*bindingContext*/ null
|
|
||||||
);
|
|
||||||
|
|
||||||
bindingTrace.record(
|
|
||||||
CodegenBinding.SUSPEND_FUNCTION_TO_JVM_VIEW,
|
|
||||||
functionDescriptor,
|
|
||||||
jvmSuspendFunctionView
|
|
||||||
);
|
|
||||||
|
|
||||||
closure.setSuspend(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -431,6 +418,33 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
|||||||
super.visitCallableReferenceExpression(expression);
|
super.visitCallableReferenceExpression(expression);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private SimpleFunctionDescriptor createAndRecordSuspendFunctionView(
|
||||||
|
MutableClosure closure,
|
||||||
|
SimpleFunctionDescriptor functionDescriptor,
|
||||||
|
boolean isSuspendLambda,
|
||||||
|
boolean isDropSuspend
|
||||||
|
) {
|
||||||
|
SimpleFunctionDescriptor jvmSuspendFunctionView =
|
||||||
|
CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
||||||
|
functionDescriptor,
|
||||||
|
languageVersionSettings.supportsFeature(LanguageFeature.ReleaseCoroutines),
|
||||||
|
this.bindingContext,
|
||||||
|
isDropSuspend
|
||||||
|
);
|
||||||
|
|
||||||
|
bindingTrace.record(
|
||||||
|
CodegenBinding.SUSPEND_FUNCTION_TO_JVM_VIEW,
|
||||||
|
functionDescriptor,
|
||||||
|
jvmSuspendFunctionView
|
||||||
|
);
|
||||||
|
|
||||||
|
closure.setSuspend(true);
|
||||||
|
if (isSuspendLambda) {
|
||||||
|
closure.setSuspendLambda();
|
||||||
|
}
|
||||||
|
return jvmSuspendFunctionView;
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private MutableClosure recordClosure(@NotNull ClassDescriptor classDescriptor, @NotNull String name) {
|
private MutableClosure recordClosure(@NotNull ClassDescriptor classDescriptor, @NotNull String name) {
|
||||||
return CodegenBinding.recordClosure(bindingTrace, classDescriptor, getProperEnclosingClass(), Type.getObjectType(name));
|
return CodegenBinding.recordClosure(bindingTrace, classDescriptor, getProperEnclosingClass(), Type.getObjectType(name));
|
||||||
@@ -557,11 +571,18 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
|||||||
|
|
||||||
if (functionDescriptor instanceof SimpleFunctionDescriptor && functionDescriptor.isSuspend() &&
|
if (functionDescriptor instanceof SimpleFunctionDescriptor && functionDescriptor.isSuspend() &&
|
||||||
!functionDescriptor.getVisibility().equals(Visibilities.LOCAL)) {
|
!functionDescriptor.getVisibility().equals(Visibilities.LOCAL)) {
|
||||||
|
|
||||||
|
if (nameForClassOrPackageMember != null) {
|
||||||
|
nameStack.push(nameForClassOrPackageMember);
|
||||||
|
}
|
||||||
|
|
||||||
|
String name = inventAnonymousClassName();
|
||||||
|
ClassDescriptor classDescriptor = recordClassForFunction(function, functionDescriptor, name, functionDescriptor);
|
||||||
|
MutableClosure closure = recordClosure(classDescriptor, name);
|
||||||
|
|
||||||
SimpleFunctionDescriptor jvmSuspendFunctionView =
|
SimpleFunctionDescriptor jvmSuspendFunctionView =
|
||||||
CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
createAndRecordSuspendFunctionView(closure, (SimpleFunctionDescriptor) functionDescriptor,
|
||||||
(SimpleFunctionDescriptor) functionDescriptor,
|
/* isSuspendLambda*/ false, /* isDropSuspend */ false);
|
||||||
languageVersionSettings.supportsFeature(LanguageFeature.ReleaseCoroutines)
|
|
||||||
);
|
|
||||||
|
|
||||||
// This is a very subtle place (hack).
|
// This is a very subtle place (hack).
|
||||||
// When generating bytecode of some suspend function, we replace the original descriptor
|
// When generating bytecode of some suspend function, we replace the original descriptor
|
||||||
@@ -577,21 +598,6 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bindingTrace.record(
|
|
||||||
CodegenBinding.SUSPEND_FUNCTION_TO_JVM_VIEW,
|
|
||||||
functionDescriptor,
|
|
||||||
jvmSuspendFunctionView
|
|
||||||
);
|
|
||||||
|
|
||||||
if (nameForClassOrPackageMember != null) {
|
|
||||||
nameStack.push(nameForClassOrPackageMember);
|
|
||||||
}
|
|
||||||
|
|
||||||
String name = inventAnonymousClassName();
|
|
||||||
ClassDescriptor classDescriptor =
|
|
||||||
recordClassForFunction(function, functionDescriptor, name, functionDescriptor);
|
|
||||||
MutableClosure closure = recordClosure(classDescriptor, name);
|
|
||||||
closure.setSuspend(true);
|
|
||||||
functionsStack.push(functionDescriptor);
|
functionsStack.push(functionDescriptor);
|
||||||
|
|
||||||
super.visitNamedFunction(function);
|
super.visitNamedFunction(function);
|
||||||
@@ -620,21 +626,8 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
|||||||
nameStack.push(name);
|
nameStack.push(name);
|
||||||
|
|
||||||
if (functionDescriptor instanceof SimpleFunctionDescriptor && functionDescriptor.isSuspend()) {
|
if (functionDescriptor instanceof SimpleFunctionDescriptor && functionDescriptor.isSuspend()) {
|
||||||
SimpleFunctionDescriptor jvmSuspendFunctionView =
|
createAndRecordSuspendFunctionView(closure, (SimpleFunctionDescriptor) functionDescriptor,
|
||||||
CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
/* isSuspendLambda */ true, /* isDropSuspend */ true);
|
||||||
(SimpleFunctionDescriptor) functionDescriptor,
|
|
||||||
languageVersionSettings.supportsFeature(LanguageFeature.ReleaseCoroutines),
|
|
||||||
/*bindingContext*/ null,
|
|
||||||
/*dropSuspend*/ true
|
|
||||||
);
|
|
||||||
|
|
||||||
bindingTrace.record(
|
|
||||||
CodegenBinding.SUSPEND_FUNCTION_TO_JVM_VIEW,
|
|
||||||
functionDescriptor,
|
|
||||||
jvmSuspendFunctionView
|
|
||||||
);
|
|
||||||
closure.setSuspend(true);
|
|
||||||
closure.setSuspendLambda();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
functionsStack.push(functionDescriptor);
|
functionsStack.push(functionDescriptor);
|
||||||
|
|||||||
@@ -338,11 +338,7 @@ class CoroutineCodegenForLambda private constructor(
|
|||||||
expressionCodegen,
|
expressionCodegen,
|
||||||
declaration,
|
declaration,
|
||||||
expressionCodegen.context.intoCoroutineClosure(
|
expressionCodegen.context.intoCoroutineClosure(
|
||||||
getOrCreateJvmSuspendFunctionView(
|
getOrCreateJvmSuspendFunctionView(originalSuspendLambdaDescriptor, expressionCodegen.state),
|
||||||
originalSuspendLambdaDescriptor,
|
|
||||||
expressionCodegen.state.languageVersionSettings.supportsFeature(LanguageFeature.ReleaseCoroutines),
|
|
||||||
expressionCodegen.state.bindingContext
|
|
||||||
),
|
|
||||||
originalSuspendLambdaDescriptor, expressionCodegen, expressionCodegen.state.typeMapper
|
originalSuspendLambdaDescriptor, expressionCodegen, expressionCodegen.state.typeMapper
|
||||||
),
|
),
|
||||||
classBuilder,
|
classBuilder,
|
||||||
|
|||||||
@@ -201,6 +201,12 @@ fun CallableDescriptor.isSuspendFunctionNotSuspensionView(): Boolean {
|
|||||||
return this.isSuspend && this.getUserData(INITIAL_DESCRIPTOR_FOR_SUSPEND_FUNCTION) == null
|
return this.isSuspend && this.getUserData(INITIAL_DESCRIPTOR_FOR_SUSPEND_FUNCTION) == null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun <D : FunctionDescriptor> getOrCreateJvmSuspendFunctionView(function: D, state: GenerationState): D = getOrCreateJvmSuspendFunctionView(
|
||||||
|
function,
|
||||||
|
state.languageVersionSettings.supportsFeature(LanguageFeature.ReleaseCoroutines),
|
||||||
|
state.bindingContext
|
||||||
|
)
|
||||||
|
|
||||||
// Suspend functions have irregular signatures on JVM, containing an additional last parameter with type `Continuation<return-type>`,
|
// Suspend functions have irregular signatures on JVM, containing an additional last parameter with type `Continuation<return-type>`,
|
||||||
// and return type Any?
|
// and return type Any?
|
||||||
// This function returns a function descriptor reflecting how the suspend function looks from point of view of JVM
|
// This function returns a function descriptor reflecting how the suspend function looks from point of view of JVM
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.codegen.AsmUtil
|
|||||||
import org.jetbrains.kotlin.codegen.ClosureCodegen
|
import org.jetbrains.kotlin.codegen.ClosureCodegen
|
||||||
import org.jetbrains.kotlin.codegen.StackValue
|
import org.jetbrains.kotlin.codegen.StackValue
|
||||||
import org.jetbrains.kotlin.codegen.coroutines.continuationAsmType
|
import org.jetbrains.kotlin.codegen.coroutines.continuationAsmType
|
||||||
|
import org.jetbrains.kotlin.codegen.coroutines.getOrCreateJvmSuspendFunctionView
|
||||||
import org.jetbrains.kotlin.codegen.inline.FieldRemapper.Companion.foldName
|
import org.jetbrains.kotlin.codegen.inline.FieldRemapper.Companion.foldName
|
||||||
import org.jetbrains.kotlin.codegen.intrinsics.IntrinsicMethods
|
import org.jetbrains.kotlin.codegen.intrinsics.IntrinsicMethods
|
||||||
import org.jetbrains.kotlin.codegen.optimization.ApiVersionCallsPreprocessingMethodTransformer
|
import org.jetbrains.kotlin.codegen.optimization.ApiVersionCallsPreprocessingMethodTransformer
|
||||||
@@ -21,6 +22,7 @@ import org.jetbrains.kotlin.codegen.optimization.fixStack.peek
|
|||||||
import org.jetbrains.kotlin.codegen.optimization.fixStack.top
|
import org.jetbrains.kotlin.codegen.optimization.fixStack.top
|
||||||
import org.jetbrains.kotlin.descriptors.ParameterDescriptor
|
import org.jetbrains.kotlin.descriptors.ParameterDescriptor
|
||||||
import org.jetbrains.kotlin.resolve.isInlineClassType
|
import org.jetbrains.kotlin.resolve.isInlineClassType
|
||||||
|
import org.jetbrains.kotlin.resolve.jvm.AsmTypes
|
||||||
import org.jetbrains.kotlin.resolve.jvm.AsmTypes.OBJECT_TYPE
|
import org.jetbrains.kotlin.resolve.jvm.AsmTypes.OBJECT_TYPE
|
||||||
import org.jetbrains.kotlin.utils.SmartList
|
import org.jetbrains.kotlin.utils.SmartList
|
||||||
import org.jetbrains.kotlin.utils.SmartSet
|
import org.jetbrains.kotlin.utils.SmartSet
|
||||||
@@ -214,12 +216,34 @@ class MethodInliner(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// in case of inlining suspend lambda reference as ordinary parameter of inline function:
|
||||||
|
// suspend fun foo (...) ...
|
||||||
|
// inline fun inlineMe(c: (...) -> ...) ...
|
||||||
|
// builder {
|
||||||
|
// inlineMe(::foo)
|
||||||
|
// }
|
||||||
|
// we should create additional parameter for continuation.
|
||||||
|
var coroutineDesc = desc
|
||||||
|
if (info.invokeMethodDescriptor.isSuspend) {
|
||||||
|
val coroutineInvokeMethodDescriptor = getOrCreateJvmSuspendFunctionView(
|
||||||
|
info.invokeMethodDescriptor,
|
||||||
|
inliningContext.state
|
||||||
|
)
|
||||||
|
val coroutineInvokeDesc = typeMapper.mapAsmMethod(coroutineInvokeMethodDescriptor).descriptor
|
||||||
|
// And here we expect invoke(...Ljava/lang/Object;) be replaced with invoke(...Lkotlin/coroutines/Continuation;)
|
||||||
|
// if this does not happen, insert fake continuation, since we could not have one yet.
|
||||||
|
val argumentTypes = Type.getArgumentTypes(desc)
|
||||||
|
if (Type.getArgumentTypes(coroutineInvokeDesc).size != argumentTypes.size) {
|
||||||
|
addFakeContinuationMarker(this)
|
||||||
|
coroutineDesc = Type.getMethodDescriptor(Type.getReturnType(desc), *argumentTypes, AsmTypes.OBJECT_TYPE)
|
||||||
|
}
|
||||||
|
}
|
||||||
val valueParameters =
|
val valueParameters =
|
||||||
listOfNotNull(info.invokeMethodDescriptor.extensionReceiverParameter) + info.invokeMethodDescriptor.valueParameters
|
listOfNotNull(info.invokeMethodDescriptor.extensionReceiverParameter) + info.invokeMethodDescriptor.valueParameters
|
||||||
|
|
||||||
val valueParamShift = Math.max(nextLocalIndex, markerShift)//NB: don't inline cause it changes
|
val valueParamShift = Math.max(nextLocalIndex, markerShift)//NB: don't inline cause it changes
|
||||||
putStackValuesIntoLocalsForLambdaOnInvoke(
|
putStackValuesIntoLocalsForLambdaOnInvoke(
|
||||||
listOf(*info.invokeMethod.argumentTypes), valueParameters, valueParamShift, this, desc
|
listOf(*info.invokeMethod.argumentTypes), valueParameters, valueParamShift, this, coroutineDesc
|
||||||
)
|
)
|
||||||
|
|
||||||
if (invokeCall.lambdaInfo.invokeMethodDescriptor.valueParameters.isEmpty()) {
|
if (invokeCall.lambdaInfo.invokeMethodDescriptor.valueParameters.isEmpty()) {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import org.jetbrains.kotlin.codegen.signature.JvmSignatureWriter;
|
|||||||
import org.jetbrains.kotlin.descriptors.*;
|
import org.jetbrains.kotlin.descriptors.*;
|
||||||
import org.jetbrains.kotlin.descriptors.impl.LocalVariableAccessorDescriptor;
|
import org.jetbrains.kotlin.descriptors.impl.LocalVariableAccessorDescriptor;
|
||||||
import org.jetbrains.kotlin.descriptors.impl.LocalVariableDescriptor;
|
import org.jetbrains.kotlin.descriptors.impl.LocalVariableDescriptor;
|
||||||
|
import org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl;
|
||||||
import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor;
|
import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor;
|
||||||
import org.jetbrains.kotlin.fileClasses.JvmFileClassInfo;
|
import org.jetbrains.kotlin.fileClasses.JvmFileClassInfo;
|
||||||
import org.jetbrains.kotlin.fileClasses.JvmFileClassUtil;
|
import org.jetbrains.kotlin.fileClasses.JvmFileClassUtil;
|
||||||
@@ -1024,8 +1025,8 @@ public class KotlinTypeMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isSuspendFunctionReference(FunctionDescriptor descriptor) {
|
private static boolean isSuspendFunctionReference(FunctionDescriptor descriptor) {
|
||||||
return descriptor.getSource() instanceof KotlinSourceElement &&
|
return descriptor instanceof SimpleFunctionDescriptor &&
|
||||||
((KotlinSourceElement) descriptor.getSource()).getPsi() instanceof KtCallableReferenceExpression &&
|
descriptor.getName().isSpecial() &&
|
||||||
CoroutineCodegenUtilKt.unwrapInitialDescriptorForSuspendFunction(descriptor) != null &&
|
CoroutineCodegenUtilKt.unwrapInitialDescriptorForSuspendFunction(descriptor) != null &&
|
||||||
CoroutineCodegenUtilKt.unwrapInitialDescriptorForSuspendFunction(descriptor).isSuspend();
|
CoroutineCodegenUtilKt.unwrapInitialDescriptorForSuspendFunction(descriptor).isSuspend();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.resolve.calls
|
package org.jetbrains.kotlin.resolve.calls
|
||||||
|
|
||||||
import org.jetbrains.kotlin.builtins.getReturnTypeFromFunctionType
|
import org.jetbrains.kotlin.builtins.*
|
||||||
import org.jetbrains.kotlin.builtins.getValueParameterTypesFromFunctionType
|
|
||||||
import org.jetbrains.kotlin.builtins.isFunctionType
|
|
||||||
import org.jetbrains.kotlin.builtins.isSuspendFunctionType
|
|
||||||
import org.jetbrains.kotlin.contracts.EffectSystem
|
import org.jetbrains.kotlin.contracts.EffectSystem
|
||||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||||
@@ -161,7 +158,7 @@ class CallCompleter(
|
|||||||
val expectedReturnType =
|
val expectedReturnType =
|
||||||
if (call.isCallableReference()) {
|
if (call.isCallableReference()) {
|
||||||
// TODO: compute generic type argument for R in the kotlin.Function<R> supertype (KT-12963)
|
// TODO: compute generic type argument for R in the kotlin.Function<R> supertype (KT-12963)
|
||||||
if (!TypeUtils.noExpectedType(expectedType) && (expectedType.isFunctionType || expectedType.isSuspendFunctionType))
|
if (!TypeUtils.noExpectedType(expectedType) && expectedType.isFunctionOrSuspendFunctionType)
|
||||||
expectedType.getReturnTypeFromFunctionType()
|
expectedType.getReturnTypeFromFunctionType()
|
||||||
else TypeUtils.NO_EXPECTED_TYPE
|
else TypeUtils.NO_EXPECTED_TYPE
|
||||||
} else expectedType
|
} else expectedType
|
||||||
@@ -213,7 +210,7 @@ class CallCompleter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (call.isCallableReference() && !TypeUtils.noExpectedType(expectedType) && (expectedType.isFunctionType || expectedType.isSuspendFunctionType)) {
|
if (call.isCallableReference() && !TypeUtils.noExpectedType(expectedType) && expectedType.isFunctionOrSuspendFunctionType) {
|
||||||
updateSystemIfNeeded { builder ->
|
updateSystemIfNeeded { builder ->
|
||||||
candidateDescriptor.valueParameters.zip(expectedType.getValueParameterTypesFromFunctionType())
|
candidateDescriptor.valueParameters.zip(expectedType.getValueParameterTypesFromFunctionType())
|
||||||
.forEach { (parameter, argument) ->
|
.forEach { (parameter, argument) ->
|
||||||
|
|||||||
+2
-4
@@ -15,11 +15,11 @@ import org.jetbrains.kotlin.descriptors.*
|
|||||||
import org.jetbrains.kotlin.diagnostics.DiagnosticSink
|
import org.jetbrains.kotlin.diagnostics.DiagnosticSink
|
||||||
import org.jetbrains.kotlin.diagnostics.Errors
|
import org.jetbrains.kotlin.diagnostics.Errors
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
import org.jetbrains.kotlin.psi.KtCallableReferenceExpression
|
|
||||||
import org.jetbrains.kotlin.psi.KtExpression
|
import org.jetbrains.kotlin.psi.KtExpression
|
||||||
import org.jetbrains.kotlin.psi.KtThisExpression
|
import org.jetbrains.kotlin.psi.KtThisExpression
|
||||||
import org.jetbrains.kotlin.resolve.BindingContext
|
import org.jetbrains.kotlin.resolve.BindingContext
|
||||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||||
|
import org.jetbrains.kotlin.resolve.calls.callUtil.isCallableReference
|
||||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
||||||
import org.jetbrains.kotlin.resolve.inline.InlineUtil
|
import org.jetbrains.kotlin.resolve.inline.InlineUtil
|
||||||
@@ -60,8 +60,6 @@ object CoroutineSuspendCallChecker : CallChecker {
|
|||||||
it.ownerDescriptor.safeAs<FunctionDescriptor>()?.isSuspend == true
|
it.ownerDescriptor.safeAs<FunctionDescriptor>()?.isSuspend == true
|
||||||
}?.cast<LexicalScope>()?.ownerDescriptor?.cast<FunctionDescriptor>()
|
}?.cast<LexicalScope>()?.ownerDescriptor?.cast<FunctionDescriptor>()
|
||||||
|
|
||||||
val isCallableReference = resolvedCall.call.callElement.parent is KtCallableReferenceExpression
|
|
||||||
|
|
||||||
when {
|
when {
|
||||||
enclosingSuspendFunction != null -> {
|
enclosingSuspendFunction != null -> {
|
||||||
val callElement = resolvedCall.call.callElement as KtExpression
|
val callElement = resolvedCall.call.callElement as KtExpression
|
||||||
@@ -80,7 +78,7 @@ object CoroutineSuspendCallChecker : CallChecker {
|
|||||||
|
|
||||||
checkRestrictsSuspension(enclosingSuspendFunction, resolvedCall, reportOn, context)
|
checkRestrictsSuspension(enclosingSuspendFunction, resolvedCall, reportOn, context)
|
||||||
}
|
}
|
||||||
isCallableReference -> {
|
resolvedCall.call.isCallableReference() -> {
|
||||||
// do nothing: we can get callable reference to suspend function outside suspend context
|
// do nothing: we can get callable reference to suspend function outside suspend context
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
|
|||||||
+2
-1
@@ -228,7 +228,8 @@ class ResolvedAtomCompleter(
|
|||||||
is FunctionDescriptor -> doubleColonExpressionResolver.bindFunctionReference(
|
is FunctionDescriptor -> doubleColonExpressionResolver.bindFunctionReference(
|
||||||
callableReferenceExpression,
|
callableReferenceExpression,
|
||||||
resultType,
|
resultType,
|
||||||
topLevelCallContext
|
topLevelCallContext,
|
||||||
|
callableCandidate.candidate as FunctionDescriptor
|
||||||
)
|
)
|
||||||
is PropertyDescriptor -> doubleColonExpressionResolver.bindPropertyReference(
|
is PropertyDescriptor -> doubleColonExpressionResolver.bindPropertyReference(
|
||||||
callableReferenceExpression,
|
callableReferenceExpression,
|
||||||
|
|||||||
+15
-26
@@ -1,24 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2017 JetBrains s.r.o.
|
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
*
|
* that can be found in the license/LICENSE.txt file.
|
||||||
* 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.types.expressions
|
package org.jetbrains.kotlin.types.expressions
|
||||||
|
|
||||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||||
import org.jetbrains.kotlin.builtins.ReflectionTypes
|
import org.jetbrains.kotlin.builtins.ReflectionTypes
|
||||||
import org.jetbrains.kotlin.builtins.isSuspendFunctionType
|
|
||||||
import org.jetbrains.kotlin.config.LanguageFeature
|
import org.jetbrains.kotlin.config.LanguageFeature
|
||||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||||
import org.jetbrains.kotlin.descriptors.*
|
import org.jetbrains.kotlin.descriptors.*
|
||||||
@@ -37,6 +25,7 @@ import org.jetbrains.kotlin.resolve.calls.CallResolver
|
|||||||
import org.jetbrains.kotlin.resolve.calls.callResolverUtil.ResolveArgumentsMode
|
import org.jetbrains.kotlin.resolve.calls.callResolverUtil.ResolveArgumentsMode
|
||||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getCalleeExpressionIfAny
|
import org.jetbrains.kotlin.resolve.calls.callUtil.getCalleeExpressionIfAny
|
||||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||||
|
import org.jetbrains.kotlin.resolve.calls.checkers.isBuiltInCoroutineContext
|
||||||
import org.jetbrains.kotlin.resolve.calls.context.*
|
import org.jetbrains.kotlin.resolve.calls.context.*
|
||||||
import org.jetbrains.kotlin.resolve.calls.results.OverloadResolutionResults
|
import org.jetbrains.kotlin.resolve.calls.results.OverloadResolutionResults
|
||||||
import org.jetbrains.kotlin.resolve.calls.results.OverloadResolutionResultsUtil
|
import org.jetbrains.kotlin.resolve.calls.results.OverloadResolutionResultsUtil
|
||||||
@@ -46,7 +35,6 @@ import org.jetbrains.kotlin.resolve.calls.util.CallMaker
|
|||||||
import org.jetbrains.kotlin.resolve.calls.util.FakeCallableDescriptorForObject
|
import org.jetbrains.kotlin.resolve.calls.util.FakeCallableDescriptorForObject
|
||||||
import org.jetbrains.kotlin.resolve.calls.util.createValueParametersForInvokeInFunctionType
|
import org.jetbrains.kotlin.resolve.calls.util.createValueParametersForInvokeInFunctionType
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
|
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isExtensionProperty
|
|
||||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ClassQualifier
|
import org.jetbrains.kotlin.resolve.scopes.receivers.ClassQualifier
|
||||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver
|
import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver
|
||||||
import org.jetbrains.kotlin.resolve.scopes.receivers.Receiver
|
import org.jetbrains.kotlin.resolve.scopes.receivers.Receiver
|
||||||
@@ -544,7 +532,7 @@ class DoubleColonExpressionResolver(
|
|||||||
val type = createKCallableTypeForReference(descriptor, lhs, reflectionTypes, context.scope.ownerDescriptor) ?: return null
|
val type = createKCallableTypeForReference(descriptor, lhs, reflectionTypes, context.scope.ownerDescriptor) ?: return null
|
||||||
|
|
||||||
when (descriptor) {
|
when (descriptor) {
|
||||||
is FunctionDescriptor -> bindFunctionReference(expression, type, context)
|
is FunctionDescriptor -> bindFunctionReference(expression, type, context, descriptor)
|
||||||
is PropertyDescriptor -> bindPropertyReference(expression, type, context)
|
is PropertyDescriptor -> bindPropertyReference(expression, type, context)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -581,13 +569,18 @@ class DoubleColonExpressionResolver(
|
|||||||
return original.extensionReceiverParameter != null && original.dispatchReceiverParameter != null
|
return original.extensionReceiverParameter != null && original.dispatchReceiverParameter != null
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun bindFunctionReference(expression: KtCallableReferenceExpression, type: KotlinType, context: ResolutionContext<*>) {
|
internal fun bindFunctionReference(
|
||||||
|
expression: KtCallableReferenceExpression,
|
||||||
|
type: KotlinType,
|
||||||
|
context: ResolutionContext<*>,
|
||||||
|
referencedFunction: FunctionDescriptor
|
||||||
|
) {
|
||||||
val functionDescriptor = AnonymousFunctionDescriptor(
|
val functionDescriptor = AnonymousFunctionDescriptor(
|
||||||
context.scope.ownerDescriptor,
|
context.scope.ownerDescriptor,
|
||||||
Annotations.EMPTY,
|
Annotations.EMPTY,
|
||||||
CallableMemberDescriptor.Kind.DECLARATION,
|
CallableMemberDescriptor.Kind.DECLARATION,
|
||||||
expression.toSourceElement(),
|
expression.toSourceElement(),
|
||||||
/* isCoroutine = */ ReflectionTypes.isKSuspendFunction(type)
|
/* isCoroutine = */ ReflectionTypes.isNumberedKSuspendFunction(type) || referencedFunction.isSuspend
|
||||||
)
|
)
|
||||||
|
|
||||||
functionDescriptor.initialize(
|
functionDescriptor.initialize(
|
||||||
@@ -637,8 +630,8 @@ class DoubleColonExpressionResolver(
|
|||||||
resolutionResults: OverloadResolutionResults<CallableDescriptor>?
|
resolutionResults: OverloadResolutionResults<CallableDescriptor>?
|
||||||
) {
|
) {
|
||||||
val descriptor =
|
val descriptor =
|
||||||
if (resolutionResults?.isSingleResult == true) resolutionResults.resultingDescriptor as? FunctionDescriptor else null
|
if (resolutionResults?.isSingleResult == true) resolutionResults.resultingDescriptor else null
|
||||||
if (descriptor?.isSuspend == true && descriptor is PropertyDescriptor) {
|
if (descriptor is PropertyDescriptor && descriptor.isBuiltInCoroutineContext(languageVersionSettings)) {
|
||||||
context.trace.report(UNSUPPORTED.on(expression.callableReference, "Callable references to suspend property"))
|
context.trace.report(UNSUPPORTED.on(expression.callableReference, "Callable references to suspend property"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -785,13 +778,9 @@ class DoubleColonExpressionResolver(
|
|||||||
val returnType = descriptor.returnType ?: return null
|
val returnType = descriptor.returnType ?: return null
|
||||||
val parametersTypes = descriptor.valueParameters.map { it.type }
|
val parametersTypes = descriptor.valueParameters.map { it.type }
|
||||||
val parametersNames = descriptor.valueParameters.map { it.name }
|
val parametersNames = descriptor.valueParameters.map { it.name }
|
||||||
return if (descriptor.isSuspend) reflectionTypes.getKSuspendFunctionType(
|
return reflectionTypes.getKFunctionType(
|
||||||
Annotations.EMPTY, receiverType,
|
Annotations.EMPTY, receiverType,
|
||||||
parametersTypes, parametersNames, returnType, descriptor.builtIns
|
parametersTypes, parametersNames, returnType, descriptor.builtIns, descriptor.isSuspend
|
||||||
)
|
|
||||||
else reflectionTypes.getKFunctionType(
|
|
||||||
Annotations.EMPTY, receiverType,
|
|
||||||
parametersTypes, parametersNames, returnType, descriptor.builtIns
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
is PropertyDescriptor -> {
|
is PropertyDescriptor -> {
|
||||||
|
|||||||
+4
-15
@@ -1,17 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2017 JetBrains s.r.o.
|
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
*
|
* that can be found in the license/LICENSE.txt file.
|
||||||
* 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.calls.components
|
package org.jetbrains.kotlin.resolve.calls.components
|
||||||
@@ -327,7 +316,7 @@ class CallableReferencesCandidateFactory(
|
|||||||
|
|
||||||
return callComponents.reflectionTypes.getKFunctionType(
|
return callComponents.reflectionTypes.getKFunctionType(
|
||||||
Annotations.EMPTY, null, argumentsAndReceivers, null,
|
Annotations.EMPTY, null, argumentsAndReceivers, null,
|
||||||
returnType, descriptor.builtIns
|
returnType, descriptor.builtIns, isSuspend = false
|
||||||
) to defaults
|
) to defaults
|
||||||
}
|
}
|
||||||
else -> error("Unsupported descriptor type: $descriptor")
|
else -> error("Unsupported descriptor type: $descriptor")
|
||||||
@@ -358,7 +347,7 @@ fun getFunctionTypeFromCallableReferenceExpectedType(expectedType: UnwrappedType
|
|||||||
|
|
||||||
return if (expectedType.isFunctionType) {
|
return if (expectedType.isFunctionType) {
|
||||||
expectedType
|
expectedType
|
||||||
} else if (ReflectionTypes.isNumberedKFunction(expectedType)) {
|
} else if (ReflectionTypes.isNumberedKFunctionOrKSuspendFunction(expectedType)) {
|
||||||
expectedType.immediateSupertypes().first { it.isFunctionType }.unwrap()
|
expectedType.immediateSupertypes().first { it.isFunctionType }.unwrap()
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
|
|||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
class A {
|
|
||||||
companion object {
|
|
||||||
suspend fun ok() = "OK"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = (A.Companion::ok)()
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// SKIP_SOURCEMAP_REMAPPING
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val name = ::coroutineContext.name
|
|
||||||
if (name != "coroutineContext") return "Fail 1: $name"
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
Vendored
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
// IGNORE_BACKEND: JS
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
// LANGUAGE_VERSION: 1.2
|
// COMMON_COROUTINES_TEST
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// WITH_COROUTINES
|
// WITH_COROUTINES
|
||||||
|
|
||||||
import helpers.*
|
import helpers.*
|
||||||
import kotlin.coroutines.experimental.*
|
import COROUTINES_PACKAGE.*
|
||||||
|
|
||||||
var result = ""
|
var result = ""
|
||||||
|
|
||||||
|
|||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
enum class E {
|
|
||||||
A, B;
|
|
||||||
|
|
||||||
suspend fun foo() = this.name
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val f = E.A::foo
|
|
||||||
val ef = E::foo
|
|
||||||
|
|
||||||
var res = ""
|
|
||||||
builder {
|
|
||||||
if (f() != "A") res = "Fail 1: ${f()}"
|
|
||||||
else if (f == E.B::foo) res = "Fail 2"
|
|
||||||
else if (ef != E::foo) res = "Fail 3"
|
|
||||||
}
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
// TODO: investigate should it be ran for JS or not
|
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_REFLECT
|
|
||||||
|
|
||||||
class A
|
|
||||||
|
|
||||||
val a = A()
|
|
||||||
val aa = A()
|
|
||||||
|
|
||||||
suspend fun A?.foo() {}
|
|
||||||
|
|
||||||
val aFoo = a::foo
|
|
||||||
val A_foo = A::foo
|
|
||||||
val nullFoo = null::foo
|
|
||||||
|
|
||||||
fun box(): String =
|
|
||||||
when {
|
|
||||||
nullFoo != null::foo -> "Bound extension refs with same receiver SHOULD be equal"
|
|
||||||
nullFoo == aFoo -> "Bound extension refs with different receivers SHOULD NOT be equal"
|
|
||||||
nullFoo == A_foo -> "Bound extension ref with receiver 'null' SHOULD NOT be equal to free ref"
|
|
||||||
|
|
||||||
else -> "OK"
|
|
||||||
}
|
|
||||||
-29
@@ -1,29 +0,0 @@
|
|||||||
// TODO: investigate should it be ran for JS or not
|
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
|
|
||||||
package test
|
|
||||||
|
|
||||||
class A {
|
|
||||||
suspend fun foo() {}
|
|
||||||
suspend fun bar() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
val a = A()
|
|
||||||
val aa = A()
|
|
||||||
|
|
||||||
val aFoo = a::foo
|
|
||||||
val aBar = a::bar
|
|
||||||
val aaFoo = aa::foo
|
|
||||||
val A_foo = A::foo
|
|
||||||
|
|
||||||
fun box(): String =
|
|
||||||
when {
|
|
||||||
aFoo != a::foo -> "Bound refs with same receiver SHOULD be equal"
|
|
||||||
aFoo == aBar -> "Bound refs to different members SHOULD NOT be equal"
|
|
||||||
aFoo == aaFoo -> "Bound refs with different receiver SHOULD NOT be equal"
|
|
||||||
aFoo == A_foo -> "Bound ref SHOULD NOT be equal to free ref"
|
|
||||||
|
|
||||||
else -> "OK"
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
// TODO: investigate should it be ran for JS or not
|
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_REFLECT
|
|
||||||
|
|
||||||
import kotlin.reflect.full.*
|
|
||||||
|
|
||||||
class C {
|
|
||||||
suspend fun foo() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
val C_fooReflect = C::class.functions.find { it.name == "foo" }!!
|
|
||||||
val C_foo = C::foo
|
|
||||||
val cFoo = C()::foo
|
|
||||||
|
|
||||||
val Any.className: String
|
|
||||||
get() = this::class.qualifiedName!!
|
|
||||||
|
|
||||||
fun box(): String =
|
|
||||||
when {
|
|
||||||
C_fooReflect != C_foo -> "C_fooReflect != C_foo, ${C_fooReflect.className}"
|
|
||||||
C_foo != C_fooReflect -> "C_foo != C_fooReflect, ${C_foo.className}"
|
|
||||||
C_fooReflect == cFoo -> "C_fooReflect == cFoo, ${C_fooReflect.className}"
|
|
||||||
cFoo == C_fooReflect -> "cFoo == C_fooReflect, ${cFoo.className}"
|
|
||||||
else -> "OK"
|
|
||||||
}
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
inline suspend fun foo(x: suspend () -> String) = x()
|
|
||||||
|
|
||||||
suspend fun String.id() = this
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = ""
|
|
||||||
builder {
|
|
||||||
res = foo("OK"::id)
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
inline suspend fun go(f: suspend () -> String) = f()
|
|
||||||
|
|
||||||
suspend fun String.id(): String = this
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val x = "OK"
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = go(x::id)
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
// TARGET_BACKEND: JVM
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
suspend fun foo(): Unit {}
|
|
||||||
builder {
|
|
||||||
assert(Unit.javaClass.equals(foo().javaClass))
|
|
||||||
assert(Unit.javaClass.equals(foo()::class.java))
|
|
||||||
}
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
Vendored
-66
@@ -1,66 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A(var v: Int) {
|
|
||||||
suspend fun f(x: Int) = x * v
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun A.g(x: Int) = x * f(x);
|
|
||||||
|
|
||||||
var A.w: Int
|
|
||||||
get() = 1000 * v
|
|
||||||
set(c: Int) {
|
|
||||||
v = c + 10
|
|
||||||
}
|
|
||||||
|
|
||||||
object F {
|
|
||||||
var u = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
builder {
|
|
||||||
val a = A(5)
|
|
||||||
|
|
||||||
val av = a::v
|
|
||||||
if (av() != 5) throw RuntimeException("fail1: ${av()}")
|
|
||||||
if (av.get() != 5) throw RuntimeException("fail2: ${av.get()}")
|
|
||||||
av.set(7)
|
|
||||||
if (a.v != 7) throw RuntimeException("fail3: ${a.v}")
|
|
||||||
|
|
||||||
val af = a::f
|
|
||||||
if (af(10) != 70) throw RuntimeException("fail4: ${af(10)}")
|
|
||||||
|
|
||||||
val ag = a::g
|
|
||||||
if (ag(10) != 700) throw RuntimeException("fail5: ${ag(10)}")
|
|
||||||
|
|
||||||
val aw = a::w
|
|
||||||
if (aw() != 7000) throw RuntimeException("fail6: ${aw()}")
|
|
||||||
if (aw.get() != 7000) throw RuntimeException("fail7: ${aw.get()}")
|
|
||||||
aw.set(5)
|
|
||||||
if (a.v != 15) throw RuntimeException("fail8: ${a.v}")
|
|
||||||
|
|
||||||
val fu = F::u
|
|
||||||
if (fu() != 0) throw RuntimeException("fail9: ${fu()}")
|
|
||||||
if (fu.get() != 0) throw RuntimeException("fail10: ${fu.get()}")
|
|
||||||
fu.set(8)
|
|
||||||
if (F.u != 8) throw RuntimeException("fail11: ${F.u}")
|
|
||||||
|
|
||||||
val x = 100
|
|
||||||
|
|
||||||
fun A.lf() = v * x;
|
|
||||||
val alf = a::lf
|
|
||||||
if (alf() != 1500) throw RuntimeException("fail9: ${alf()}")
|
|
||||||
}
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt
Vendored
-22
@@ -1,22 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun String?.ok() = "OK"
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = (null::ok)()
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
object Singleton {
|
|
||||||
suspend fun ok() = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = (Singleton::ok)()
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-41
@@ -1,41 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun Boolean.foo() = 1
|
|
||||||
suspend fun Byte.foo() = 2
|
|
||||||
suspend fun Short.foo() = 3
|
|
||||||
suspend fun Int.foo() = 4
|
|
||||||
suspend fun Long.foo() = 5
|
|
||||||
suspend fun Char.foo() = 6
|
|
||||||
suspend fun Float.foo() = 7
|
|
||||||
suspend fun Double.foo() = 8
|
|
||||||
|
|
||||||
fun testRef(name: String, f: suspend () -> Int, expected: Int) {
|
|
||||||
builder {
|
|
||||||
val actual = f()
|
|
||||||
if (actual != expected) throw AssertionError("$name: $actual != $expected")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
testRef("Boolean", true::foo, 1)
|
|
||||||
testRef("Byte", 1.toByte()::foo, 2)
|
|
||||||
testRef("Short", 1.toShort()::foo, 3)
|
|
||||||
testRef("Int", 1::foo, 4)
|
|
||||||
testRef("Long", 1L::foo, 5)
|
|
||||||
testRef("Char", '1'::foo, 6)
|
|
||||||
testRef("Float", 1.0F::foo, 7)
|
|
||||||
testRef("Double", 1.0::foo, 8)
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-30
@@ -1,30 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class B
|
|
||||||
|
|
||||||
suspend fun B.magic() {
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun suspendRun(c: suspend() -> Unit) = c()
|
|
||||||
|
|
||||||
fun boom(a: Any) {
|
|
||||||
when (a) {
|
|
||||||
is B -> builder { suspendRun(a::magic) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
boom(B())
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class A {
|
|
||||||
abstract suspend fun foo(): String
|
|
||||||
}
|
|
||||||
|
|
||||||
class B : A() {
|
|
||||||
override suspend fun foo() = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = (A::foo)(B()) }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
suspend fun foo(k: Int) = k
|
|
||||||
|
|
||||||
suspend fun result() = (A::foo)(this, 111)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var result = 0
|
|
||||||
builder { result = A().result() }
|
|
||||||
if (result != 111) return "Fail $result"
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
suspend fun o() = 111
|
|
||||||
suspend fun k(k: Int) = k
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun A.foo() = (A::o)(this) + (A::k)(this, 222)
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var result = 0
|
|
||||||
builder { result = A().foo() }
|
|
||||||
if (result != 333) return "Fail $result"
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
suspend fun foo() = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val x = A::foo
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = x(A())
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
suspend fun foo(result: String) = result
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val x = A::foo
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = x(A(), "OK")
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
var result = "Fail"
|
|
||||||
|
|
||||||
suspend fun foo() {
|
|
||||||
result = "OK"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val a = A()
|
|
||||||
val x = A::foo
|
|
||||||
builder { x(a) }
|
|
||||||
return a.result
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
var result = "Fail"
|
|
||||||
|
|
||||||
suspend fun foo(newResult: String) {
|
|
||||||
result = newResult
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val a = A()
|
|
||||||
val x = A::foo
|
|
||||||
builder { x(a, "OK") }
|
|
||||||
return a.result
|
|
||||||
}
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
suspend fun result() = (A::foo)(this, "OK")
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun A.foo(x: String) = x
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = A().result() }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A
|
|
||||||
|
|
||||||
suspend fun A.foo() = (A::bar)(this, "OK")
|
|
||||||
|
|
||||||
suspend fun A.bar(x: String) = x
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = A().foo()
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-23
@@ -1,23 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A
|
|
||||||
|
|
||||||
suspend fun A.foo() = "OK"
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val x = A::foo
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = x(A()) }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-23
@@ -1,23 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A
|
|
||||||
|
|
||||||
suspend fun A.foo(result: String) = result
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val x = A::foo
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = x(A(), "OK") }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
var result = "Fail"
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun A.foo() {
|
|
||||||
result = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val a = A()
|
|
||||||
val x = A::foo
|
|
||||||
builder { x(a) }
|
|
||||||
return a.result
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
var result = "Fail"
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun A.foo(newResult: String) {
|
|
||||||
result = newResult
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val a = A()
|
|
||||||
val x = A::foo
|
|
||||||
builder { x(a, "OK") }
|
|
||||||
return a.result
|
|
||||||
}
|
|
||||||
+3
-3
@@ -15,7 +15,7 @@ fun builder(c: suspend () -> Unit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun <T, R> foo(x: T): R = TODO()
|
suspend fun <T, R> foo(x: T): R = TODO()
|
||||||
suspend fun <T> fooReturnInt(x: T): Int = 1
|
suspend fun <T> fooReturnLong(x: T): Long = 1L
|
||||||
suspend fun Int.suspendToString(): String = toString()
|
suspend fun Int.suspendToString(): String = toString()
|
||||||
|
|
||||||
suspend inline fun <reified T, reified R> check(x: T, y: R, f: suspend (T) -> R, tType: String, rType: String) {
|
suspend inline fun <reified T, reified R> check(x: T, y: R, f: suspend (T) -> R, tType: String, rType: String) {
|
||||||
@@ -31,8 +31,8 @@ suspend inline fun <reified T, reified R> check(f: suspend (T) -> R, g: suspend
|
|||||||
fun box(): String {
|
fun box(): String {
|
||||||
builder {
|
builder {
|
||||||
check("", 1, ::foo, "String", "Int")
|
check("", 1, ::foo, "String", "Int")
|
||||||
check("", 1, ::fooReturnInt, "String", "Int")
|
check("", 1L, ::fooReturnLong, "String", "Long")
|
||||||
check("", "", ::fooReturnInt, "String", "Any")
|
check("", "", ::fooReturnLong, "String", "Any")
|
||||||
|
|
||||||
check(Int::suspendToString, ::foo, "Int", "String")
|
check(Int::suspendToString, ::foo, "Int", "String")
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -28,8 +28,8 @@ fun box(): String {
|
|||||||
builder {
|
builder {
|
||||||
bar(1, "", ::foo, "Int", "String")
|
bar(1, "", ::foo, "Int", "String")
|
||||||
|
|
||||||
val s1: Pair<Int, String?> = bar(1, "", ::foo, "Int", "String")
|
val s1: Pair<Long, String?> = bar(1L, "", ::foo, "Long", "String")
|
||||||
val (a: Int, b: String?) = bar(1, "", ::foo, "Int", "String")
|
val (a: Long, b: String?) = bar(1L, "", ::foo, "Long", "String")
|
||||||
|
|
||||||
val ns: String? = null
|
val ns: String? = null
|
||||||
bar(ns, ns, ::foo, "String", "String")
|
bar(ns, ns, ::foo, "String", "String")
|
||||||
|
|||||||
-33
@@ -1,33 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS, NATIVE
|
|
||||||
|
|
||||||
// WITH_REFLECT
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
import kotlin.test.assertEquals
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun foo(x: Int?) {}
|
|
||||||
suspend fun foo(y: String?) {}
|
|
||||||
suspend fun foo(z: Boolean) {}
|
|
||||||
|
|
||||||
suspend inline fun <reified T> bar(f: suspend (T) -> Unit, tType: String): T? {
|
|
||||||
assertEquals(tType, T::class.simpleName)
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
builder {
|
|
||||||
val a1: Int? = bar(::foo, "Int")
|
|
||||||
val a2: String? = bar(::foo, "String")
|
|
||||||
val a3: Boolean? = bar<Boolean>(::foo, "Boolean")
|
|
||||||
}
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A<T>(val t: T) {
|
|
||||||
suspend fun foo(): T = t
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = (A<String>::foo)(A("OK"))
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class Outer {
|
|
||||||
val result = "OK"
|
|
||||||
|
|
||||||
inner class Inner {
|
|
||||||
suspend fun foo() = result
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val f = Outer.Inner::foo
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = f(Outer().Inner()) }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-23
@@ -1,23 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
class Local {
|
|
||||||
suspend fun foo() = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
val ref = Local::foo
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = ref(Local()) }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-22
@@ -1,22 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var result = "Fail"
|
|
||||||
|
|
||||||
suspend fun changeToOK() { result = "OK" }
|
|
||||||
|
|
||||||
val ok = ::changeToOK
|
|
||||||
builder { ok() }
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Named {
|
|
||||||
suspend fun name() = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
enum class E : Named {
|
|
||||||
OK
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = E.OK.name }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
suspend fun A.foo() = "OK"
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = (A::foo)(A()) }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
class A
|
|
||||||
suspend fun A.foo() = "OK"
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = (A::foo)((::A)()) }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
suspend fun Int.is42With(that: Int) = this + 2 * that == 42
|
|
||||||
var res = ""
|
|
||||||
builder { res = if ((Int::is42With)(16, 13)) "OK" else "Fail" }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var result = "Fail"
|
|
||||||
|
|
||||||
suspend fun A.ext() { result = "OK" }
|
|
||||||
|
|
||||||
val f = A::ext
|
|
||||||
builder { f(A()) }
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
-23
@@ -1,23 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
class Id<T> {
|
|
||||||
suspend fun invoke(t: T) = t
|
|
||||||
}
|
|
||||||
|
|
||||||
val ref = Id<String>::invoke
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = ref(Id<String>(), "OK") }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val result = "OK"
|
|
||||||
|
|
||||||
class Local {
|
|
||||||
suspend fun foo() = result
|
|
||||||
}
|
|
||||||
|
|
||||||
val member = Local::foo
|
|
||||||
val instance = Local()
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = member(instance) }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
suspend fun OK() {}
|
|
||||||
|
|
||||||
return ::OK.name
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
suspend fun foo(): String {
|
|
||||||
suspend fun bar() = "OK"
|
|
||||||
val ref = ::bar
|
|
||||||
return ref()
|
|
||||||
}
|
|
||||||
|
|
||||||
val ref = ::foo
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = ref() }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
suspend fun foo() = "OK"
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = (::foo)()
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val result = "OK"
|
|
||||||
|
|
||||||
suspend fun foo() = result
|
|
||||||
|
|
||||||
var res = "FAIL"
|
|
||||||
|
|
||||||
builder {
|
|
||||||
res = (::foo)()
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
suspend fun foo(s: String) = s
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = (::foo)("OK") }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-30
@@ -1,30 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
var state = 23
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
suspend fun incrementState(inc: Int) {
|
|
||||||
state += inc
|
|
||||||
}
|
|
||||||
|
|
||||||
val inc = ::incrementState
|
|
||||||
builder {
|
|
||||||
inc(12)
|
|
||||||
inc(-5)
|
|
||||||
inc(27)
|
|
||||||
inc(-15)
|
|
||||||
}
|
|
||||||
|
|
||||||
return if (state == 42) "OK" else "Fail $state"
|
|
||||||
}
|
|
||||||
-42
@@ -1,42 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun foo(): String = "foo1"
|
|
||||||
suspend fun foo(i: Int): String = "foo2"
|
|
||||||
|
|
||||||
val f1: suspend () -> String = ::foo
|
|
||||||
val f2: suspend (Int) -> String = ::foo
|
|
||||||
|
|
||||||
suspend fun foo1() {}
|
|
||||||
suspend fun foo2(i: Int) {}
|
|
||||||
|
|
||||||
suspend fun bar(f: suspend () -> Unit): String = "bar1"
|
|
||||||
suspend fun bar(f: suspend (Int) -> Unit): String = "bar2"
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
builder {
|
|
||||||
val x1 = f1()
|
|
||||||
if (x1 != "foo1") throw RuntimeException("Fail 1: $x1")
|
|
||||||
|
|
||||||
val x2 = f2(0)
|
|
||||||
if (x2 != "foo2") throw RuntimeException("Fail 2: $x2")
|
|
||||||
|
|
||||||
val y1 = bar(::foo1)
|
|
||||||
if (y1 != "bar1") throw RuntimeException("Fail 3: $y1")
|
|
||||||
|
|
||||||
val y2 = bar(::foo2)
|
|
||||||
if (y2 != "bar2") throw RuntimeException("Fail 4: $y2")
|
|
||||||
}
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import kotlin.reflect.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
val x = 1
|
|
||||||
suspend fun x(): String = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
val f1: KProperty1<A, Int> = A::x
|
|
||||||
val f2: suspend (A) -> String = A::x
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val a = A()
|
|
||||||
|
|
||||||
val x1 = f1.get(a)
|
|
||||||
if (x1 != 1) return "Fail 1: $x1"
|
|
||||||
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = f2(a)
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
class A {
|
|
||||||
private suspend fun foo() = "OK"
|
|
||||||
|
|
||||||
suspend fun bar() = (A::foo)(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = A().bar()
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-44
@@ -1,44 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun baz(i: Int) = i
|
|
||||||
suspend fun <T> bar(x: T): T = x
|
|
||||||
|
|
||||||
suspend fun nullableFun(): (suspend (Int) -> Int)? = null
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
builder {
|
|
||||||
val x1: suspend (Int) -> Int = bar(if (true) ::baz else ::baz)
|
|
||||||
val x2: suspend (Int) -> Int = bar(nullableFun() ?: ::baz)
|
|
||||||
val x3: suspend (Int) -> Int = bar(::baz ?: ::baz)
|
|
||||||
|
|
||||||
val i = 0
|
|
||||||
val x4: suspend (Int) -> Int = bar(when (i) {
|
|
||||||
10 -> ::baz
|
|
||||||
20 -> ::baz
|
|
||||||
else -> ::baz
|
|
||||||
})
|
|
||||||
|
|
||||||
val x5: suspend (Int) -> Int = bar(::baz!!)
|
|
||||||
|
|
||||||
if (x1(1) != 1) throw RuntimeException("fail 1")
|
|
||||||
if (x2(1) != 1) throw RuntimeException("fail 2")
|
|
||||||
if (x3(1) != 1) throw RuntimeException("fail 3")
|
|
||||||
if (x4(1) != 1) throw RuntimeException("fail 4")
|
|
||||||
if (x5(1) != 1) throw RuntimeException("fail 5")
|
|
||||||
|
|
||||||
if ((if (true) ::baz else ::baz)(1) != 1) throw RuntimeException("fail 6")
|
|
||||||
}
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun foo(o: Int, k: Int) = o + k
|
|
||||||
|
|
||||||
class A {
|
|
||||||
suspend fun bar() = (::foo)(111, 222)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var result = 0
|
|
||||||
builder { result = A().bar() }
|
|
||||||
if (result != 333) return "Fail $result"
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun foo(o: Int, k: Int) = o + k
|
|
||||||
|
|
||||||
class A
|
|
||||||
|
|
||||||
suspend fun A.bar() = (::foo)(111, 222)
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var result = 0
|
|
||||||
builder { result = A().bar() }
|
|
||||||
if (result != 333) return "Fail $result"
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun foo() = "OK"
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val x = ::foo
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = x() }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun foo(x: String) = x
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val x = ::foo
|
|
||||||
var res = "FAIL"
|
|
||||||
builder { res = x("OK") }
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
var result = "Fail"
|
|
||||||
|
|
||||||
suspend fun foo() {
|
|
||||||
result = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val x = ::foo
|
|
||||||
builder { x() }
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
var result = "Fail"
|
|
||||||
|
|
||||||
suspend fun foo(newResult: String) {
|
|
||||||
result = newResult
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val x = ::foo
|
|
||||||
builder { x("OK") }
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
-30
@@ -1,30 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
interface T {
|
|
||||||
suspend fun foo() = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
class B : T {
|
|
||||||
inner class C {
|
|
||||||
suspend fun bar() = (T::foo)(this@B)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = B().C().bar()
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_COROUTINES
|
|
||||||
|
|
||||||
import helpers.*
|
|
||||||
import COROUTINES_PACKAGE.*
|
|
||||||
|
|
||||||
fun builder(c: suspend () -> Unit) {
|
|
||||||
c.startCoroutine(EmptyContinuation)
|
|
||||||
}
|
|
||||||
|
|
||||||
interface A {
|
|
||||||
suspend fun foo(): String
|
|
||||||
}
|
|
||||||
|
|
||||||
class B : A {
|
|
||||||
override suspend fun foo() = "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var res = "FAIL"
|
|
||||||
builder {
|
|
||||||
res = (A::foo)(B())
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
// IGNORE_BACKEND: JS, JS_IR
|
||||||
|
// COMMON_COROUTINES_TEST
|
||||||
|
// WITH_COROUTINES
|
||||||
|
|
||||||
|
import helpers.*
|
||||||
|
import COROUTINES_PACKAGE.*
|
||||||
|
import COROUTINES_PACKAGE.intrinsics.*
|
||||||
|
|
||||||
|
suspend inline fun Long.longArgs(a: Long, b: Long, c: Long) = suspendCoroutineOrReturn<Long> {
|
||||||
|
it.resume(this + a + b + c)
|
||||||
|
COROUTINE_SUSPENDED
|
||||||
|
}
|
||||||
|
|
||||||
|
fun builder(c: suspend () -> Unit) {
|
||||||
|
c.startCoroutine(EmptyContinuation)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
var res = 0L
|
||||||
|
val ref = 1L::longArgs
|
||||||
|
builder {
|
||||||
|
res = ref(1L, 1L, 1L)
|
||||||
|
}
|
||||||
|
return if (res == 4L) "OK" else "FAIL $res"
|
||||||
|
}
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS, NATIVE
|
|
||||||
// WITH_RUNTIME
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
|
|
||||||
import java.io.*
|
|
||||||
import kotlin.test.*
|
|
||||||
|
|
||||||
class Foo {
|
|
||||||
suspend fun method() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val baos = ByteArrayOutputStream()
|
|
||||||
val oos = ObjectOutputStream(baos)
|
|
||||||
oos.writeObject(Foo::method)
|
|
||||||
oos.writeObject(::Foo)
|
|
||||||
oos.close()
|
|
||||||
|
|
||||||
val bais = ByteArrayInputStream(baos.toByteArray())
|
|
||||||
val ois = ObjectInputStream(bais)
|
|
||||||
assertEquals(Foo::method, ois.readObject())
|
|
||||||
assertEquals(::Foo, ois.readObject())
|
|
||||||
ois.close()
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS, NATIVE
|
|
||||||
// WITH_REFLECT
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
|
|
||||||
import java.io.*
|
|
||||||
import kotlin.test.*
|
|
||||||
|
|
||||||
suspend fun bar() {}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val baos = ByteArrayOutputStream()
|
|
||||||
val oos = ObjectOutputStream(baos)
|
|
||||||
oos.writeObject(::bar)
|
|
||||||
oos.close()
|
|
||||||
|
|
||||||
val bais = ByteArrayInputStream(baos.toByteArray())
|
|
||||||
val ois = ObjectInputStream(bais)
|
|
||||||
val o = ois.readObject()
|
|
||||||
ois.close()
|
|
||||||
|
|
||||||
// Test that we don't serialize the reflected view of the reference: it's not needed because it can be restored at runtime
|
|
||||||
val field = kotlin.jvm.internal.CallableReference::class.java.getDeclaredField("reflected").apply { isAccessible = true }
|
|
||||||
assertNull(field.get(o))
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JS, NATIVE
|
|
||||||
// WITH_REFLECT
|
|
||||||
// COMMON_COROUTINES_TEST
|
|
||||||
// WITH_RUNTIME
|
|
||||||
|
|
||||||
import java.io.*
|
|
||||||
import kotlin.test.*
|
|
||||||
|
|
||||||
class Foo {
|
|
||||||
suspend fun method() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val baos = ByteArrayOutputStream()
|
|
||||||
val oos = ObjectOutputStream(baos)
|
|
||||||
oos.writeObject(Foo::method)
|
|
||||||
oos.writeObject(::Foo)
|
|
||||||
oos.close()
|
|
||||||
|
|
||||||
val bais = ByteArrayInputStream(baos.toByteArray())
|
|
||||||
val ois = ObjectInputStream(bais)
|
|
||||||
assertEquals(Foo::method, ois.readObject())
|
|
||||||
assertEquals(::Foo, ois.readObject())
|
|
||||||
ois.close()
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// IGNORE_BACKEND: JS, JS_IR
|
||||||
|
// NO_CHECK_LAMBDA_INLINING
|
||||||
|
// FILE: test.kt
|
||||||
|
// We cannot use COMMON_COROUTINES_TEST here due to !LANGUAGE directive
|
||||||
|
// TODO: Fix this
|
||||||
|
|
||||||
|
inline fun go(f: () -> String) = f()
|
||||||
|
|
||||||
|
// FILE: box.kt
|
||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
import kotlin.coroutines.experimental.*
|
||||||
|
import kotlin.coroutines.experimental.intrinsics.*
|
||||||
|
|
||||||
|
fun builder(c: suspend () -> Unit) {
|
||||||
|
c.startCoroutine(object: Continuation<Unit> {
|
||||||
|
override val context: CoroutineContext
|
||||||
|
get() = EmptyCoroutineContext
|
||||||
|
|
||||||
|
override fun resume(value: Unit) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun resumeWithException(exception: Throwable) {
|
||||||
|
throw exception
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun String.id(): String = this
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val x = "OK"
|
||||||
|
var res = "FAIL"
|
||||||
|
builder {
|
||||||
|
res = go(x::id)
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
// IGNORE_BACKEND: JS, JS_IR
|
||||||
|
// NO_CHECK_LAMBDA_INLINING
|
||||||
|
// FILE: test.kt
|
||||||
|
// COMMON_COROUTINES_TEST
|
||||||
|
|
||||||
|
inline suspend fun foo(x: suspend () -> String) = x()
|
||||||
|
|
||||||
|
// FILE: box.kt
|
||||||
|
// WITH_RUNTIME
|
||||||
|
// COMMON_COROUTINES_TEST
|
||||||
|
|
||||||
|
import COROUTINES_PACKAGE.*
|
||||||
|
import COROUTINES_PACKAGE.intrinsics.*
|
||||||
|
|
||||||
|
fun builder(c: suspend () -> Unit) {
|
||||||
|
c.startCoroutine(object: Continuation<Unit> {
|
||||||
|
override val context: CoroutineContext
|
||||||
|
get() = EmptyCoroutineContext
|
||||||
|
|
||||||
|
override fun resume(value: Unit) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun resumeWithException(exception: Throwable) {
|
||||||
|
throw exception
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun String.id() = this
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
var res = ""
|
||||||
|
builder {
|
||||||
|
res = foo("OK"::id)
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// IGNORE_BACKEND: JS, JS_IR
|
||||||
|
// NO_CHECK_LAMBDA_INLINING
|
||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
inline suspend fun go(f: () -> String) = f()
|
||||||
|
|
||||||
|
// FILE: box.kt
|
||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
import kotlin.coroutines.experimental.*
|
||||||
|
import kotlin.coroutines.experimental.intrinsics.*
|
||||||
|
|
||||||
|
fun builder(c: suspend () -> Unit) {
|
||||||
|
c.startCoroutine(object: Continuation<Unit> {
|
||||||
|
override val context: CoroutineContext
|
||||||
|
get() = EmptyCoroutineContext
|
||||||
|
|
||||||
|
override fun resume(value: Unit) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun resumeWithException(exception: Throwable) {
|
||||||
|
throw exception
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun String.id(): String = this
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val x = "OK"
|
||||||
|
var res = "FAIL"
|
||||||
|
builder {
|
||||||
|
res = go(x::id)
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
// !LANGUAGE: +Coroutines
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
import kotlin.reflect.KSuspendFunction0
|
||||||
|
|
||||||
|
fun test(c: KSuspendFunction0<Unit>) {
|
||||||
|
<!ILLEGAL_SUSPEND_FUNCTION_CALL!>c<!>()
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
// !LANGUAGE: +Coroutines
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
suspend fun foo() {}
|
||||||
|
|
||||||
|
val ref = ::foo
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
// SKIP_TXT
|
||||||
|
// COMMON_COROUTINES_TEST
|
||||||
|
|
||||||
|
import COROUTINES_PACKAGE.coroutineContext
|
||||||
|
|
||||||
|
val c = ::<!UNSUPPORTED!>coroutineContext<!>
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
c()
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun test2() {
|
||||||
|
c()
|
||||||
|
}
|
||||||
+10
-10
@@ -8,21 +8,21 @@ class A {
|
|||||||
suspend fun A.ext() {}
|
suspend fun A.ext() {}
|
||||||
|
|
||||||
fun test1(a: A) {
|
fun test1(a: A) {
|
||||||
val x = ::<!ILLEGAL_SUSPEND_FUNCTION_CALL, UNSUPPORTED!>foo<!>
|
val x = ::foo
|
||||||
|
|
||||||
val y1 = a::<!ILLEGAL_SUSPEND_FUNCTION_CALL, UNSUPPORTED!>member<!>
|
val y1 = a::member
|
||||||
val y2 = A::<!ILLEGAL_SUSPEND_FUNCTION_CALL, UNSUPPORTED!>member<!>
|
val y2 = A::member
|
||||||
|
|
||||||
val z1 = a::<!ILLEGAL_SUSPEND_FUNCTION_CALL, UNSUPPORTED!>ext<!>
|
val z1 = a::ext
|
||||||
val z2 = A::<!ILLEGAL_SUSPEND_FUNCTION_CALL, UNSUPPORTED!>ext<!>
|
val z2 = A::ext
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun test2(a: A) {
|
suspend fun test2(a: A) {
|
||||||
val x = ::<!UNSUPPORTED!>foo<!>
|
val x = ::foo
|
||||||
|
|
||||||
val y1 = a::<!UNSUPPORTED!>member<!>
|
val y1 = a::member
|
||||||
val y2 = A::<!UNSUPPORTED!>member<!>
|
val y2 = A::member
|
||||||
|
|
||||||
val z1 = a::<!UNSUPPORTED!>ext<!>
|
val z1 = a::ext
|
||||||
val z2 = A::<!UNSUPPORTED!>ext<!>
|
val z2 = A::ext
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ typealias Test4 = <!WRONG_MODIFIER_TARGET!>suspend<!> Action
|
|||||||
typealias Test5 = List<suspend () -> Unit>
|
typealias Test5 = List<suspend () -> Unit>
|
||||||
typealias Test6 = <!WRONG_MODIFIER_TARGET!>suspend<!> List<() -> Unit>
|
typealias Test6 = <!WRONG_MODIFIER_TARGET!>suspend<!> List<() -> Unit>
|
||||||
typealias Test7 = <!WRONG_MODIFIER_TARGET!>suspend<!> SAM
|
typealias Test7 = <!WRONG_MODIFIER_TARGET!>suspend<!> SAM
|
||||||
typealias Test8 = <!WRONG_MODIFIER_TARGET!>suspend<!> <!UNRESOLVED_REFERENCE!>SuspendFunction0<!><Unit>
|
typealias Test8 = <!WRONG_MODIFIER_TARGET!>suspend<!> SuspendFunction0<Unit>
|
||||||
typealias Test9 = suspend (() -> Unit) -> Unit
|
typealias Test9 = suspend (() -> Unit) -> Unit
|
||||||
typealias Test10 = suspend (suspend () -> Unit) -> Unit
|
typealias Test10 = suspend (suspend () -> Unit) -> Unit
|
||||||
typealias Test11 = suspend () -> (suspend () -> Unit)
|
typealias Test11 = suspend () -> (suspend () -> Unit)
|
||||||
|
|||||||
+1
-1
@@ -50,5 +50,5 @@ public typealias Test4 = Action
|
|||||||
public typealias Test5 = kotlin.collections.List<suspend () -> kotlin.Unit>
|
public typealias Test5 = kotlin.collections.List<suspend () -> kotlin.Unit>
|
||||||
public typealias Test6 = kotlin.collections.List<() -> kotlin.Unit>
|
public typealias Test6 = kotlin.collections.List<() -> kotlin.Unit>
|
||||||
public typealias Test7 = SAM
|
public typealias Test7 = SAM
|
||||||
public typealias Test8 = [ERROR : SuspendFunction0<Unit>]<kotlin.Unit>
|
public typealias Test8 = suspend () -> kotlin.Unit
|
||||||
public typealias Test9 = suspend (() -> kotlin.Unit) -> kotlin.Unit
|
public typealias Test9 = suspend (() -> kotlin.Unit) -> kotlin.Unit
|
||||||
|
|||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
// JAVAC_SKIP
|
||||||
|
typealias Test1 = SuspendFunction0<Unit>
|
||||||
|
typealias Test2 = kotlin.SuspendFunction0<Unit>
|
||||||
|
typealias Test3 = kotlin.coroutines.<!UNRESOLVED_REFERENCE!>SuspendFunction0<!><Unit>
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public typealias Test1 = suspend () -> kotlin.Unit
|
||||||
|
public typealias Test2 = suspend () -> kotlin.Unit
|
||||||
|
public typealias Test3 = [ERROR : kotlin.coroutines.SuspendFunction0<Unit>]<kotlin.Unit>
|
||||||
-4
@@ -1,4 +0,0 @@
|
|||||||
// JAVAC_SKIP
|
|
||||||
typealias Test1 = <!UNRESOLVED_REFERENCE!>SuspendFunction0<!><Unit>
|
|
||||||
typealias Test2 = kotlin.<!UNRESOLVED_REFERENCE!>SuspendFunction0<!><Unit>
|
|
||||||
typealias Test3 = kotlin.coroutines.<!UNRESOLVED_REFERENCE!>SuspendFunction0<!><Unit>
|
|
||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
package
|
|
||||||
|
|
||||||
public typealias Test1 = [ERROR : SuspendFunction0<Unit>]<kotlin.Unit>
|
|
||||||
public typealias Test2 = [ERROR : kotlin.SuspendFunction0<Unit>]<kotlin.Unit>
|
|
||||||
public typealias Test3 = [ERROR : kotlin.coroutines.SuspendFunction0<Unit>]<kotlin.Unit>
|
|
||||||
Generated
+25
-765
@@ -6287,11 +6287,23 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class CallableReference extends AbstractIrBlackBoxCodegenTest {
|
public static class CallableReference extends AbstractIrBlackBoxCodegenTest {
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInCallableReference() throws Exception {
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("longArgs.kt")
|
||||||
|
public void testLongArgs_1_2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/longArgs.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("longArgs.kt")
|
||||||
|
public void testLongArgs_1_3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/longArgs.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound")
|
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound")
|
||||||
@@ -6299,211 +6311,24 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Bound extends AbstractIrBlackBoxCodegenTest {
|
public static class Bound extends AbstractIrBlackBoxCodegenTest {
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInBound() throws Exception {
|
public void testAllFilesPresentInBound() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("companionObjectReceiver.kt")
|
|
||||||
public void testCompanionObjectReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("companionObjectReceiver.kt")
|
|
||||||
public void testCompanionObjectReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("coroutineContext.kt")
|
|
||||||
public void testCoroutineContext_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("coroutineContext.kt")
|
|
||||||
public void testCoroutineContext_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("emptyLHS.kt")
|
@TestMetadata("emptyLHS.kt")
|
||||||
public void testEmptyLHS() throws Exception {
|
public void testEmptyLHS_1_2() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("enumEntryMember.kt")
|
|
||||||
public void testEnumEntryMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("enumEntryMember.kt")
|
@TestMetadata("emptyLHS.kt")
|
||||||
public void testEnumEntryMember_1_3() throws Exception {
|
public void testEmptyLHS_1_3() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("localUnitFunction.kt")
|
|
||||||
public void testLocalUnitFunction_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localUnitFunction.kt")
|
|
||||||
public void testLocalUnitFunction_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("multiCase.kt")
|
|
||||||
public void testMultiCase_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("multiCase.kt")
|
|
||||||
public void testMultiCase_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nullReceiver.kt")
|
|
||||||
public void testNullReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nullReceiver.kt")
|
|
||||||
public void testNullReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("objectReceiver.kt")
|
|
||||||
public void testObjectReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("objectReceiver.kt")
|
|
||||||
public void testObjectReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("primitiveReceiver.kt")
|
|
||||||
public void testPrimitiveReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("primitiveReceiver.kt")
|
|
||||||
public void testPrimitiveReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
|
||||||
public void testSmartCastForExtensionReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
|
||||||
public void testSmartCastForExtensionReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Equals extends AbstractIrBlackBoxCodegenTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInEquals() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nullableReceiverInEquals.kt")
|
|
||||||
public void testNullableReceiverInEquals_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nullableReceiverInEquals.kt")
|
|
||||||
public void testNullableReceiverInEquals_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("receiverInEquals.kt")
|
|
||||||
public void testReceiverInEquals_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("receiverInEquals.kt")
|
|
||||||
public void testReceiverInEquals_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reflectionReference.kt")
|
|
||||||
public void testReflectionReference_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reflectionReference.kt")
|
|
||||||
public void testReflectionReference_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Inline extends AbstractIrBlackBoxCodegenTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInInline() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleVal.kt")
|
|
||||||
public void testSimpleVal_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleVal.kt")
|
|
||||||
public void testSimpleVal_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simple.kt")
|
|
||||||
public void testSimple_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simple.kt")
|
|
||||||
public void testSimple_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function")
|
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function")
|
||||||
@@ -6511,167 +6336,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Function extends AbstractIrBlackBoxCodegenTest {
|
public static class Function extends AbstractIrBlackBoxCodegenTest {
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("abstractClassMember.kt")
|
|
||||||
public void testAbstractClassMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("abstractClassMember.kt")
|
|
||||||
public void testAbstractClassMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInFunction() throws Exception {
|
public void testAllFilesPresentInFunction() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromClass.kt")
|
|
||||||
public void testClassMemberFromClass_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromClass.kt")
|
|
||||||
public void testClassMemberFromClass_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromExtension.kt")
|
|
||||||
public void testClassMemberFromExtension_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromExtension.kt")
|
|
||||||
public void testClassMemberFromExtension_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testClassMemberFromTopLevelStringNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testClassMemberFromTopLevelStringNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testClassMemberFromTopLevelStringOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testClassMemberFromTopLevelStringOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testClassMemberFromTopLevelUnitNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testClassMemberFromTopLevelUnitNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromClass.kt")
|
|
||||||
public void testExtensionFromClass_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromClass.kt")
|
|
||||||
public void testExtensionFromClass_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromExtension.kt")
|
|
||||||
public void testExtensionFromExtension_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromExtension.kt")
|
|
||||||
public void testExtensionFromExtension_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testExtensionFromTopLevelStringNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testExtensionFromTopLevelStringNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testExtensionFromTopLevelStringOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testExtensionFromTopLevelStringOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testExtensionFromTopLevelUnitNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testExtensionFromTopLevelUnitNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testExtensionFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testExtensionFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("genericCallableReferenceArguments.kt")
|
@TestMetadata("genericCallableReferenceArguments.kt")
|
||||||
@@ -6698,237 +6367,21 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
|
||||||
public void testGenericCallableReferencesWithOverload_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
|
||||||
public void testGenericCallableReferencesWithOverload_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericMember.kt")
|
|
||||||
public void testGenericMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericMember.kt")
|
|
||||||
public void testGenericMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("getArityViaFunctionImpl.kt")
|
@TestMetadata("getArityViaFunctionImpl.kt")
|
||||||
public void testGetArityViaFunctionImpl() throws Exception {
|
public void testGetArityViaFunctionImpl() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/getArityViaFunctionImpl.kt");
|
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/getArityViaFunctionImpl.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("overloadedFunVsVal.kt")
|
|
||||||
public void testOverloadedFunVsVal_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("overloadedFunVsVal.kt")
|
|
||||||
public void testOverloadedFunVsVal_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("overloadedFun.kt")
|
|
||||||
public void testOverloadedFun_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("overloadedFun.kt")
|
|
||||||
public void testOverloadedFun_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("privateClassMember.kt")
|
|
||||||
public void testPrivateClassMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("privateClassMember.kt")
|
|
||||||
public void testPrivateClassMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("specialCalls.kt")
|
|
||||||
public void testSpecialCalls_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("specialCalls.kt")
|
|
||||||
public void testSpecialCalls_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromClass.kt")
|
|
||||||
public void testTopLevelFromClass_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromClass.kt")
|
|
||||||
public void testTopLevelFromClass_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromExtension.kt")
|
|
||||||
public void testTopLevelFromExtension_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromExtension.kt")
|
|
||||||
public void testTopLevelFromExtension_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testTopLevelFromTopLevelStringNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testTopLevelFromTopLevelStringNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testTopLevelFromTopLevelStringOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testTopLevelFromTopLevelStringOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testTopLevelFromTopLevelUnitNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testTopLevelFromTopLevelUnitNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
|
||||||
public void testTraitImplMethodWithClassReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
|
||||||
public void testTraitImplMethodWithClassReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("traitMember.kt")
|
|
||||||
public void testTraitMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("traitMember.kt")
|
|
||||||
public void testTraitMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local")
|
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Local extends AbstractIrBlackBoxCodegenTest {
|
public static class Local extends AbstractIrBlackBoxCodegenTest {
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInLocal() throws Exception {
|
public void testAllFilesPresentInLocal() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("captureOuter.kt")
|
|
||||||
public void testCaptureOuter_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("captureOuter.kt")
|
|
||||||
public void testCaptureOuter_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMember.kt")
|
|
||||||
public void testClassMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMember.kt")
|
|
||||||
public void testClassMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("closureWithSideEffect.kt")
|
|
||||||
public void testClosureWithSideEffect_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("closureWithSideEffect.kt")
|
|
||||||
public void testClosureWithSideEffect_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("enumExtendsTrait.kt")
|
|
||||||
public void testEnumExtendsTrait_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("enumExtendsTrait.kt")
|
|
||||||
public void testEnumExtendsTrait_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("equalsHashCode.kt")
|
@TestMetadata("equalsHashCode.kt")
|
||||||
@@ -6942,199 +6395,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("extensionToLocalClass.kt")
|
|
||||||
public void testExtensionToLocalClass_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionToLocalClass.kt")
|
|
||||||
public void testExtensionToLocalClass_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionToPrimitive.kt")
|
|
||||||
public void testExtensionToPrimitive_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionToPrimitive.kt")
|
|
||||||
public void testExtensionToPrimitive_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionWithClosure.kt")
|
|
||||||
public void testExtensionWithClosure_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionWithClosure.kt")
|
|
||||||
public void testExtensionWithClosure_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extension.kt")
|
|
||||||
public void testExtension_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extension.kt")
|
|
||||||
public void testExtension_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericMember.kt")
|
|
||||||
public void testGenericMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericMember.kt")
|
|
||||||
public void testGenericMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localClassMember.kt")
|
|
||||||
public void testLocalClassMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localClassMember.kt")
|
|
||||||
public void testLocalClassMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localFunctionName.kt")
|
|
||||||
public void testLocalFunctionName_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localFunctionName.kt")
|
|
||||||
public void testLocalFunctionName_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localLocal.kt")
|
|
||||||
public void testLocalLocal_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localLocal.kt")
|
|
||||||
public void testLocalLocal_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleClosure.kt")
|
|
||||||
public void testSimpleClosure_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleClosure.kt")
|
|
||||||
public void testSimpleClosure_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleWithArg.kt")
|
|
||||||
public void testSimpleWithArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleWithArg.kt")
|
|
||||||
public void testSimpleWithArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simple.kt")
|
|
||||||
public void testSimple_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simple.kt")
|
|
||||||
public void testSimple_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("unitWithSideEffect.kt")
|
|
||||||
public void testUnitWithSideEffect_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("unitWithSideEffect.kt")
|
|
||||||
public void testUnitWithSideEffect_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Serializability extends AbstractIrBlackBoxCodegenTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInSerializability() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("noReflect.kt")
|
|
||||||
public void testNoReflect_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("noReflect.kt")
|
|
||||||
public void testNoReflect_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
|
||||||
public void testReflectedIsNotSerialized_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
|
||||||
public void testReflectedIsNotSerialized_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("withReflect.kt")
|
|
||||||
public void testWithReflect_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("withReflect.kt")
|
|
||||||
public void testWithReflect_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+35
@@ -3359,6 +3359,41 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
|||||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
|
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class CallableReference extends AbstractIrBlackBoxInlineCodegenTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ordinaryParameter.kt")
|
||||||
|
public void testOrdinaryParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/suspend/callableReference/ordinaryParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("simple.kt")
|
||||||
|
public void testSimple_1_2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("simple.kt")
|
||||||
|
public void testSimple_1_3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("suspendOfOrdinary.kt")
|
||||||
|
public void testSuspendOfOrdinary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/suspend/callableReference/suspendOfOrdinary.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
|
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+35
@@ -3359,6 +3359,41 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
|||||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
|
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class CallableReference extends AbstractIrCompileKotlinAgainstInlineKotlinTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ordinaryParameter.kt")
|
||||||
|
public void testOrdinaryParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/suspend/callableReference/ordinaryParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("simple.kt")
|
||||||
|
public void testSimple_1_2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("simple.kt")
|
||||||
|
public void testSimple_1_3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("suspendOfOrdinary.kt")
|
||||||
|
public void testSuspendOfOrdinary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/suspend/callableReference/suspendOfOrdinary.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
|
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
@@ -4166,6 +4166,42 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/coroutines")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Coroutines extends AbstractDiagnosticsTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCoroutines() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/coroutines/callableReference")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class CallableReference extends AbstractDiagnosticsTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("invokeOutideSuspend.kt")
|
||||||
|
public void testInvokeOutideSuspend() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/coroutines/callableReference/invokeOutideSuspend.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("outsideSuspend.kt")
|
||||||
|
public void testOutsideSuspend() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/coroutines/callableReference/outsideSuspend.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy")
|
@TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+28
-3
@@ -1578,6 +1578,31 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/unsupported.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/unsupported.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class CallableReference extends AbstractDiagnosticsTestWithStdLib {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("property.kt")
|
||||||
|
public void testProperty_1_2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("property.kt")
|
||||||
|
public void testProperty_1_3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference")
|
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
@@ -1987,9 +2012,9 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/nullableSuspendFunction.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/nullableSuspendFunction.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("suspendFunctionNIsUnresolved.kt")
|
@TestMetadata("suspendFunctionN.kt")
|
||||||
public void testSuspendFunctionNIsUnresolved() throws Exception {
|
public void testSuspendFunctionN() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/suspendFunctionNIsUnresolved.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/suspendFunctionN.kt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+28
-3
@@ -1578,6 +1578,31 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/unsupported.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/unsupported.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class CallableReference extends AbstractDiagnosticsTestWithStdLibUsingJavac {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("property.kt")
|
||||||
|
public void testProperty_1_2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("property.kt")
|
||||||
|
public void testProperty_1_3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference")
|
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
@@ -1987,9 +2012,9 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/nullableSuspendFunction.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/nullableSuspendFunction.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("suspendFunctionNIsUnresolved.kt")
|
@TestMetadata("suspendFunctionN.kt")
|
||||||
public void testSuspendFunctionNIsUnresolved() throws Exception {
|
public void testSuspendFunctionN() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/suspendFunctionNIsUnresolved.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/suspendFunctionN.kt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Generated
+36
@@ -4166,6 +4166,42 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/coroutines")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Coroutines extends AbstractDiagnosticsUsingJavacTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCoroutines() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/coroutines/callableReference")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class CallableReference extends AbstractDiagnosticsUsingJavacTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("invokeOutideSuspend.kt")
|
||||||
|
public void testInvokeOutideSuspend() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/coroutines/callableReference/invokeOutideSuspend.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("outsideSuspend.kt")
|
||||||
|
public void testOutsideSuspend() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/coroutines/callableReference/outsideSuspend.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy")
|
@TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+17
-757
@@ -6294,6 +6294,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("longArgs.kt")
|
||||||
|
public void testLongArgs_1_2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/longArgs.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("longArgs.kt")
|
||||||
|
public void testLongArgs_1_3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/longArgs.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound")
|
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
@@ -6306,204 +6318,17 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("companionObjectReceiver.kt")
|
@TestMetadata("emptyLHS.kt")
|
||||||
public void testCompanionObjectReceiver_1_2() throws Exception {
|
public void testEmptyLHS_1_2() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("companionObjectReceiver.kt")
|
|
||||||
public void testCompanionObjectReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("coroutineContext.kt")
|
|
||||||
public void testCoroutineContext_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("coroutineContext.kt")
|
|
||||||
public void testCoroutineContext_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("emptyLHS.kt")
|
@TestMetadata("emptyLHS.kt")
|
||||||
public void testEmptyLHS() throws Exception {
|
public void testEmptyLHS_1_3() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("enumEntryMember.kt")
|
|
||||||
public void testEnumEntryMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("enumEntryMember.kt")
|
|
||||||
public void testEnumEntryMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("localUnitFunction.kt")
|
|
||||||
public void testLocalUnitFunction_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localUnitFunction.kt")
|
|
||||||
public void testLocalUnitFunction_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("multiCase.kt")
|
|
||||||
public void testMultiCase_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("multiCase.kt")
|
|
||||||
public void testMultiCase_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nullReceiver.kt")
|
|
||||||
public void testNullReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nullReceiver.kt")
|
|
||||||
public void testNullReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("objectReceiver.kt")
|
|
||||||
public void testObjectReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("objectReceiver.kt")
|
|
||||||
public void testObjectReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("primitiveReceiver.kt")
|
|
||||||
public void testPrimitiveReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("primitiveReceiver.kt")
|
|
||||||
public void testPrimitiveReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
|
||||||
public void testSmartCastForExtensionReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
|
||||||
public void testSmartCastForExtensionReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Equals extends AbstractBlackBoxCodegenTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInEquals() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nullableReceiverInEquals.kt")
|
|
||||||
public void testNullableReceiverInEquals_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nullableReceiverInEquals.kt")
|
|
||||||
public void testNullableReceiverInEquals_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("receiverInEquals.kt")
|
|
||||||
public void testReceiverInEquals_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("receiverInEquals.kt")
|
|
||||||
public void testReceiverInEquals_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reflectionReference.kt")
|
|
||||||
public void testReflectionReference_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reflectionReference.kt")
|
|
||||||
public void testReflectionReference_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Inline extends AbstractBlackBoxCodegenTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInInline() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleVal.kt")
|
|
||||||
public void testSimpleVal_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleVal.kt")
|
|
||||||
public void testSimpleVal_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simple.kt")
|
|
||||||
public void testSimple_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simple.kt")
|
|
||||||
public void testSimple_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function")
|
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function")
|
||||||
@@ -6514,166 +6339,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("abstractClassMember.kt")
|
|
||||||
public void testAbstractClassMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("abstractClassMember.kt")
|
|
||||||
public void testAbstractClassMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInFunction() throws Exception {
|
public void testAllFilesPresentInFunction() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classMemberFromClass.kt")
|
|
||||||
public void testClassMemberFromClass_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromClass.kt")
|
|
||||||
public void testClassMemberFromClass_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromExtension.kt")
|
|
||||||
public void testClassMemberFromExtension_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromExtension.kt")
|
|
||||||
public void testClassMemberFromExtension_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testClassMemberFromTopLevelStringNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testClassMemberFromTopLevelStringNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testClassMemberFromTopLevelStringOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testClassMemberFromTopLevelStringOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testClassMemberFromTopLevelUnitNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testClassMemberFromTopLevelUnitNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromClass.kt")
|
|
||||||
public void testExtensionFromClass_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromClass.kt")
|
|
||||||
public void testExtensionFromClass_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromExtension.kt")
|
|
||||||
public void testExtensionFromExtension_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromExtension.kt")
|
|
||||||
public void testExtensionFromExtension_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testExtensionFromTopLevelStringNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testExtensionFromTopLevelStringNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testExtensionFromTopLevelStringOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testExtensionFromTopLevelStringOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testExtensionFromTopLevelUnitNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testExtensionFromTopLevelUnitNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testExtensionFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testExtensionFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericCallableReferenceArguments.kt")
|
@TestMetadata("genericCallableReferenceArguments.kt")
|
||||||
public void testGenericCallableReferenceArguments_1_2() throws Exception {
|
public void testGenericCallableReferenceArguments_1_2() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferenceArguments.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferenceArguments.kt");
|
||||||
@@ -6698,179 +6367,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
|
||||||
public void testGenericCallableReferencesWithOverload_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
|
||||||
public void testGenericCallableReferencesWithOverload_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericMember.kt")
|
|
||||||
public void testGenericMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericMember.kt")
|
|
||||||
public void testGenericMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("getArityViaFunctionImpl.kt")
|
@TestMetadata("getArityViaFunctionImpl.kt")
|
||||||
public void testGetArityViaFunctionImpl() throws Exception {
|
public void testGetArityViaFunctionImpl() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/getArityViaFunctionImpl.kt");
|
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/getArityViaFunctionImpl.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("overloadedFunVsVal.kt")
|
|
||||||
public void testOverloadedFunVsVal_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("overloadedFunVsVal.kt")
|
|
||||||
public void testOverloadedFunVsVal_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("overloadedFun.kt")
|
|
||||||
public void testOverloadedFun_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("overloadedFun.kt")
|
|
||||||
public void testOverloadedFun_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("privateClassMember.kt")
|
|
||||||
public void testPrivateClassMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("privateClassMember.kt")
|
|
||||||
public void testPrivateClassMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("specialCalls.kt")
|
|
||||||
public void testSpecialCalls_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("specialCalls.kt")
|
|
||||||
public void testSpecialCalls_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromClass.kt")
|
|
||||||
public void testTopLevelFromClass_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromClass.kt")
|
|
||||||
public void testTopLevelFromClass_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromExtension.kt")
|
|
||||||
public void testTopLevelFromExtension_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromExtension.kt")
|
|
||||||
public void testTopLevelFromExtension_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testTopLevelFromTopLevelStringNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
|
||||||
public void testTopLevelFromTopLevelStringNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testTopLevelFromTopLevelStringOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
|
||||||
public void testTopLevelFromTopLevelStringOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testTopLevelFromTopLevelUnitNoArgs_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
|
||||||
public void testTopLevelFromTopLevelUnitNoArgs_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
|
||||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
|
||||||
public void testTraitImplMethodWithClassReceiver_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
|
||||||
public void testTraitImplMethodWithClassReceiver_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("traitMember.kt")
|
|
||||||
public void testTraitMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("traitMember.kt")
|
|
||||||
public void testTraitMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local")
|
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
@@ -6883,54 +6384,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("captureOuter.kt")
|
|
||||||
public void testCaptureOuter_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("captureOuter.kt")
|
|
||||||
public void testCaptureOuter_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMember.kt")
|
|
||||||
public void testClassMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classMember.kt")
|
|
||||||
public void testClassMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("closureWithSideEffect.kt")
|
|
||||||
public void testClosureWithSideEffect_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("closureWithSideEffect.kt")
|
|
||||||
public void testClosureWithSideEffect_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("enumExtendsTrait.kt")
|
|
||||||
public void testEnumExtendsTrait_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("enumExtendsTrait.kt")
|
|
||||||
public void testEnumExtendsTrait_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("equalsHashCode.kt")
|
@TestMetadata("equalsHashCode.kt")
|
||||||
public void testEqualsHashCode_1_2() throws Exception {
|
public void testEqualsHashCode_1_2() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||||
@@ -6942,199 +6395,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("extensionToLocalClass.kt")
|
|
||||||
public void testExtensionToLocalClass_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionToLocalClass.kt")
|
|
||||||
public void testExtensionToLocalClass_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionToPrimitive.kt")
|
|
||||||
public void testExtensionToPrimitive_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionToPrimitive.kt")
|
|
||||||
public void testExtensionToPrimitive_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionWithClosure.kt")
|
|
||||||
public void testExtensionWithClosure_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionWithClosure.kt")
|
|
||||||
public void testExtensionWithClosure_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extension.kt")
|
|
||||||
public void testExtension_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extension.kt")
|
|
||||||
public void testExtension_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericMember.kt")
|
|
||||||
public void testGenericMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericMember.kt")
|
|
||||||
public void testGenericMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localClassMember.kt")
|
|
||||||
public void testLocalClassMember_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localClassMember.kt")
|
|
||||||
public void testLocalClassMember_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localFunctionName.kt")
|
|
||||||
public void testLocalFunctionName_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localFunctionName.kt")
|
|
||||||
public void testLocalFunctionName_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localLocal.kt")
|
|
||||||
public void testLocalLocal_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localLocal.kt")
|
|
||||||
public void testLocalLocal_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleClosure.kt")
|
|
||||||
public void testSimpleClosure_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleClosure.kt")
|
|
||||||
public void testSimpleClosure_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleWithArg.kt")
|
|
||||||
public void testSimpleWithArg_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleWithArg.kt")
|
|
||||||
public void testSimpleWithArg_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simple.kt")
|
|
||||||
public void testSimple_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simple.kt")
|
|
||||||
public void testSimple_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("unitWithSideEffect.kt")
|
|
||||||
public void testUnitWithSideEffect_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("unitWithSideEffect.kt")
|
|
||||||
public void testUnitWithSideEffect_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Serializability extends AbstractBlackBoxCodegenTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInSerializability() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("noReflect.kt")
|
|
||||||
public void testNoReflect_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("noReflect.kt")
|
|
||||||
public void testNoReflect_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
|
||||||
public void testReflectedIsNotSerialized_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
|
||||||
public void testReflectedIsNotSerialized_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("withReflect.kt")
|
|
||||||
public void testWithReflect_1_2() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("withReflect.kt")
|
|
||||||
public void testWithReflect_1_3() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
|
||||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+35
@@ -3359,6 +3359,41 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
|||||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
|
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class CallableReference extends AbstractBlackBoxInlineCodegenTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ordinaryParameter.kt")
|
||||||
|
public void testOrdinaryParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/suspend/callableReference/ordinaryParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("simple.kt")
|
||||||
|
public void testSimple_1_2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("simple.kt")
|
||||||
|
public void testSimple_1_3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("suspendOfOrdinary.kt")
|
||||||
|
public void testSuspendOfOrdinary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/suspend/callableReference/suspendOfOrdinary.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
|
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Generated
+35
@@ -3359,6 +3359,41 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
|||||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
|
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class CallableReference extends AbstractCompileKotlinAgainstInlineKotlinTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ordinaryParameter.kt")
|
||||||
|
public void testOrdinaryParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/suspend/callableReference/ordinaryParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("simple.kt")
|
||||||
|
public void testSimple_1_2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("simple.kt")
|
||||||
|
public void testSimple_1_3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
|
||||||
|
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("suspendOfOrdinary.kt")
|
||||||
|
public void testSuspendOfOrdinary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/suspend/callableReference/suspendOfOrdinary.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
|
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user