Iniital implementation of synthetic extensions for SAM-adapter functions (non-static only)
This commit is contained in:
@@ -21,6 +21,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor;
|
||||
import org.jetbrains.kotlin.load.java.descriptors.SamAdapterDescriptor;
|
||||
import org.jetbrains.kotlin.synthetic.SamAdapterExtensionFunctionDescriptor;
|
||||
|
||||
public class SamCodegenUtil {
|
||||
@Nullable
|
||||
@@ -30,6 +31,10 @@ public class SamCodegenUtil {
|
||||
return ((SamAdapterDescriptor<?>) original).getOriginForSam();
|
||||
}
|
||||
|
||||
if (original instanceof SamAdapterExtensionFunctionDescriptor) {
|
||||
return ((SamAdapterExtensionFunctionDescriptor) original).getOriginalFunction();
|
||||
}
|
||||
|
||||
if (original.getKind() == CallableMemberDescriptor.Kind.FAKE_OVERRIDE) {
|
||||
for (FunctionDescriptor overridden : original.getOverriddenDescriptors()) {
|
||||
FunctionDescriptor originalIfSamAdapter = getOriginalIfSamAdapter(overridden);
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.jetbrains.kotlin.resolve.jvm.AsmTypes;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterSignature;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue;
|
||||
import org.jetbrains.kotlin.synthetic.SamAdapterExtensionFunctionDescriptor;
|
||||
import org.jetbrains.org.objectweb.asm.Label;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter;
|
||||
@@ -485,15 +486,29 @@ public abstract class StackValue {
|
||||
ExpressionCodegen codegen,
|
||||
@Nullable Callable callableMethod
|
||||
) {
|
||||
if (resolvedCall.getDispatchReceiver().exists() || resolvedCall.getExtensionReceiver().exists() || isLocalFunCall(callableMethod)) {
|
||||
boolean hasExtensionReceiver = resolvedCall.getExtensionReceiver().exists();
|
||||
ReceiverValue callDispatchReceiver = resolvedCall.getDispatchReceiver();
|
||||
ReceiverValue callExtensionReceiver = resolvedCall.getExtensionReceiver();
|
||||
if (callDispatchReceiver.exists() || callExtensionReceiver.exists() || isLocalFunCall(callableMethod)) {
|
||||
CallableDescriptor descriptor = resolvedCall.getResultingDescriptor();
|
||||
ReceiverParameterDescriptor dispatchReceiverParameter = descriptor.getDispatchReceiverParameter();
|
||||
ReceiverParameterDescriptor extensionReceiverParameter = descriptor.getExtensionReceiverParameter();
|
||||
|
||||
if (descriptor.getOriginal() instanceof SamAdapterExtensionFunctionDescriptor) {
|
||||
callDispatchReceiver = callExtensionReceiver;
|
||||
callExtensionReceiver = ReceiverValue.NO_RECEIVER;
|
||||
dispatchReceiverParameter = extensionReceiverParameter;
|
||||
extensionReceiverParameter = null;
|
||||
}
|
||||
|
||||
boolean hasExtensionReceiver = callExtensionReceiver.exists();
|
||||
StackValue dispatchReceiver = platformStaticCallIfPresent(
|
||||
genReceiver(hasExtensionReceiver ? none() : receiver, codegen, resolvedCall, callableMethod, false),
|
||||
resolvedCall.getResultingDescriptor()
|
||||
genReceiver(hasExtensionReceiver ? none() : receiver, codegen, resolvedCall, callableMethod, callDispatchReceiver, false),
|
||||
descriptor
|
||||
);
|
||||
StackValue extensionReceiver = genReceiver(receiver, codegen, resolvedCall, callableMethod, true);
|
||||
return new CallReceiver(dispatchReceiver, extensionReceiver,
|
||||
CallReceiver.calcType(resolvedCall, codegen.typeMapper, callableMethod));
|
||||
StackValue extensionReceiver = genReceiver(receiver, codegen, resolvedCall, callableMethod, callExtensionReceiver, true);
|
||||
Type type = CallReceiver.calcType(resolvedCall, dispatchReceiverParameter, extensionReceiverParameter, codegen.typeMapper, callableMethod);
|
||||
assert type != null : "Could not map receiver type for " + resolvedCall;
|
||||
return new CallReceiver(dispatchReceiver, extensionReceiver, type);
|
||||
}
|
||||
return receiver;
|
||||
}
|
||||
@@ -503,9 +518,9 @@ public abstract class StackValue {
|
||||
@NotNull ExpressionCodegen codegen,
|
||||
@NotNull ResolvedCall resolvedCall,
|
||||
@Nullable Callable callableMethod,
|
||||
ReceiverValue receiverValue,
|
||||
boolean isExtension
|
||||
) {
|
||||
ReceiverValue receiverValue = isExtension ? resolvedCall.getExtensionReceiver() : resolvedCall.getDispatchReceiver();
|
||||
if (receiver == none()) {
|
||||
if (receiverValue.exists()) {
|
||||
return codegen.generateReceiverValue(receiverValue);
|
||||
@@ -1253,24 +1268,36 @@ public abstract class StackValue {
|
||||
this.extensionReceiver = extensionReceiver;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static Type calcType(
|
||||
@NotNull ResolvedCall<?> resolvedCall,
|
||||
@Nullable ReceiverParameterDescriptor dispatchReceiver,
|
||||
@Nullable ReceiverParameterDescriptor extensionReceiver,
|
||||
@NotNull JetTypeMapper typeMapper,
|
||||
@Nullable Callable callableMethod
|
||||
) {
|
||||
CallableDescriptor descriptor = resolvedCall.getResultingDescriptor();
|
||||
|
||||
Type dispatchReceiverType = smartDispatchReceiverType(descriptor, typeMapper);
|
||||
ReceiverParameterDescriptor extensionReceiver = descriptor.getExtensionReceiverParameter();
|
||||
|
||||
if (extensionReceiver != null) {
|
||||
return callableMethod != null ? callableMethod.getExtensionReceiverType() : typeMapper.mapType(extensionReceiver.getType());
|
||||
}
|
||||
else if (dispatchReceiverType != null) {
|
||||
else if (dispatchReceiver != null) {
|
||||
CallableDescriptor descriptor = resolvedCall.getResultingDescriptor();
|
||||
|
||||
if (AnnotationsPackage.isPlatformStaticInObjectOrClass(descriptor)) {
|
||||
return Type.VOID_TYPE;
|
||||
}
|
||||
return callableMethod != null ? callableMethod.getDispatchReceiverType() : dispatchReceiverType;
|
||||
|
||||
if (callableMethod != null) {
|
||||
return callableMethod.getDispatchReceiverType();
|
||||
}
|
||||
|
||||
// Extract the receiver from the resolved call, workarounding the fact that ResolvedCall#dispatchReceiver doesn't have
|
||||
// all the needed information, for example there's no way to find out whether or not a smart cast was applied to the receiver.
|
||||
DeclarationDescriptor container = descriptor.getContainingDeclaration();
|
||||
if (container instanceof ClassDescriptor) {
|
||||
return typeMapper.mapClass((ClassDescriptor) container);
|
||||
}
|
||||
|
||||
return typeMapper.mapType(dispatchReceiver);
|
||||
}
|
||||
else if (isLocalFunCall(callableMethod)) {
|
||||
return callableMethod.getGenerateCalleeType();
|
||||
@@ -1279,23 +1306,6 @@ public abstract class StackValue {
|
||||
return Type.VOID_TYPE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the receiver from the resolved call, workarounding the fact that ResolvedCall#dispatchReceiver doesn't have
|
||||
* all the needed information, for example there's no way to find out whether or not a smart cast was applied to the receiver.
|
||||
*/
|
||||
@Nullable
|
||||
private static Type smartDispatchReceiverType(@NotNull CallableDescriptor descriptor, @NotNull JetTypeMapper typeMapper) {
|
||||
ReceiverParameterDescriptor dispatchReceiverParameter = descriptor.getDispatchReceiverParameter();
|
||||
if (dispatchReceiverParameter == null) return null;
|
||||
|
||||
DeclarationDescriptor container = descriptor.getContainingDeclaration();
|
||||
if (container instanceof ClassDescriptor) {
|
||||
return typeMapper.mapClass((ClassDescriptor) container);
|
||||
}
|
||||
|
||||
return typeMapper.mapType(dispatchReceiverParameter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putSelector(@NotNull Type type, @NotNull InstructionAdapter v) {
|
||||
StackValue currentExtensionReceiver = extensionReceiver;
|
||||
|
||||
+2
-3
@@ -416,9 +416,8 @@ class CodegenAnnotatingVisitor extends JetVisitorVoid {
|
||||
if (original == null) return;
|
||||
|
||||
List<ResolvedValueArgument> valueArguments = call.getValueArgumentsByIndex();
|
||||
if (valueArguments == null) {
|
||||
throw new IllegalStateException("Failed to arrange value arguments by index: " + descriptor);
|
||||
}
|
||||
if (valueArguments == null) return;
|
||||
|
||||
for (ValueParameterDescriptor valueParameter : original.getValueParameters()) {
|
||||
SamType samType = SamType.create(valueParameter.getType());
|
||||
if (samType == null) continue;
|
||||
|
||||
+19
-9
@@ -239,30 +239,40 @@ public class SingleAbstractMethodUtils {
|
||||
JetType returnTypeUnsubstituted = original.getReturnType();
|
||||
assert returnTypeUnsubstituted != null : "Creating SAM adapter for not initialized original: " + original;
|
||||
|
||||
JetType returnType = typeParameters.substitutor.substitute(returnTypeUnsubstituted, Variance.OUT_VARIANCE);
|
||||
TypeSubstitutor substitutor = typeParameters.substitutor;
|
||||
JetType returnType = substitutor.substitute(returnTypeUnsubstituted, Variance.OUT_VARIANCE);
|
||||
assert returnType != null : "couldn't substitute type: " + returnTypeUnsubstituted +
|
||||
", substitutor = " + typeParameters.substitutor;
|
||||
", substitutor = " + substitutor;
|
||||
|
||||
|
||||
List<ValueParameterDescriptor> valueParameters = createValueParametersForSamAdapter(original, adapter, substitutor);
|
||||
|
||||
initializer.initialize(typeParameters.descriptors, valueParameters, returnType);
|
||||
|
||||
return adapter;
|
||||
}
|
||||
|
||||
public static List<ValueParameterDescriptor> createValueParametersForSamAdapter(
|
||||
@NotNull FunctionDescriptor original,
|
||||
@NotNull FunctionDescriptor samAdapter,
|
||||
@NotNull TypeSubstitutor substitutor
|
||||
) {
|
||||
List<ValueParameterDescriptor> originalValueParameters = original.getValueParameters();
|
||||
List<ValueParameterDescriptor> valueParameters = new ArrayList<ValueParameterDescriptor>(originalValueParameters.size());
|
||||
for (ValueParameterDescriptor originalParam : originalValueParameters) {
|
||||
JetType originalType = originalParam.getType();
|
||||
JetType functionType = getFunctionTypeForSamType(originalType, false);
|
||||
JetType newTypeUnsubstituted = functionType != null ? functionType : originalType;
|
||||
JetType newType = typeParameters.substitutor.substitute(newTypeUnsubstituted, Variance.IN_VARIANCE);
|
||||
assert newType != null : "couldn't substitute type: " + newTypeUnsubstituted + ", substitutor = " + typeParameters.substitutor;
|
||||
JetType newType = substitutor.substitute(newTypeUnsubstituted, Variance.IN_VARIANCE);
|
||||
assert newType != null : "couldn't substitute type: " + newTypeUnsubstituted + ", substitutor = " + substitutor;
|
||||
|
||||
ValueParameterDescriptor newParam = new ValueParameterDescriptorImpl(
|
||||
adapter, null, originalParam.getIndex(), originalParam.getAnnotations(),
|
||||
samAdapter, null, originalParam.getIndex(), originalParam.getAnnotations(),
|
||||
originalParam.getName(), newType, false, null, SourceElement.NO_SOURCE
|
||||
);
|
||||
valueParameters.add(newParam);
|
||||
}
|
||||
|
||||
initializer.initialize(typeParameters.descriptors, valueParameters, returnType);
|
||||
|
||||
return adapter;
|
||||
return valueParameters;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.synthetic
|
||||
|
||||
import org.jetbrains.kotlin.psi.JetFile
|
||||
import org.jetbrains.kotlin.resolve.lazy.FileScopeProvider
|
||||
import org.jetbrains.kotlin.storage.StorageManager
|
||||
|
||||
class AdditionalScopesWithJavaSyntheticExtensions(storageManager: StorageManager) : FileScopeProvider.AdditionalScopes {
|
||||
private val scopes = listOf(JavaSyntheticPropertiesScope(storageManager), SamAdapterFunctionsScope(storageManager))
|
||||
|
||||
override fun scopes(file: JetFile) = scopes
|
||||
}
|
||||
+11
-18
@@ -22,21 +22,19 @@ import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.impl.PropertyDescriptorImpl
|
||||
import org.jetbrains.kotlin.descriptors.impl.PropertyGetterDescriptorImpl
|
||||
import org.jetbrains.kotlin.descriptors.impl.PropertySetterDescriptorImpl
|
||||
import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.JetFile
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.resolve.lazy.FileScopeProvider
|
||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
import org.jetbrains.kotlin.resolve.scopes.JetScope
|
||||
import org.jetbrains.kotlin.resolve.scopes.JetScopeImpl
|
||||
import org.jetbrains.kotlin.storage.StorageManager
|
||||
import org.jetbrains.kotlin.types.*
|
||||
import org.jetbrains.kotlin.types.typeUtil.isBoolean
|
||||
import org.jetbrains.kotlin.types.typeUtil.isSubtypeOf
|
||||
import org.jetbrains.kotlin.types.typeUtil.isUnit
|
||||
import org.jetbrains.kotlin.types.typeUtil.makeNotNullable
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.capitalizeFirstWord
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.decapitalizeSmart
|
||||
import org.jetbrains.kotlin.utils.Printer
|
||||
import org.jetbrains.kotlin.utils.addIfNotNull
|
||||
import java.util.ArrayList
|
||||
import java.util.HashSet
|
||||
@@ -84,13 +82,7 @@ interface SyntheticJavaPropertyDescriptor : PropertyDescriptor {
|
||||
}
|
||||
}
|
||||
|
||||
class AdditionalScopesWithJavaSyntheticExtensions(storageManager: StorageManager) : FileScopeProvider.AdditionalScopes {
|
||||
private val scope = JavaSyntheticExtensionsScope(storageManager)
|
||||
|
||||
override fun scopes(file: JetFile) = listOf(scope)
|
||||
}
|
||||
|
||||
class JavaSyntheticExtensionsScope(storageManager: StorageManager) : JetScope by JetScope.Empty {
|
||||
class JavaSyntheticPropertiesScope(storageManager: StorageManager) : JetScopeImpl() {
|
||||
private val syntheticPropertyInClass = storageManager.createMemoizedFunctionWithNullableValues<Pair<ClassDescriptor, Name>, PropertyDescriptor> { pair ->
|
||||
syntheticPropertyInClassNotCached(pair.first, pair.second)
|
||||
}
|
||||
@@ -117,13 +109,6 @@ class JavaSyntheticExtensionsScope(storageManager: StorageManager) : JetScope by
|
||||
return MyPropertyDescriptor(ownerClass, getMethod.original, setMethod?.original, name, propertyType)
|
||||
}
|
||||
|
||||
private fun FunctionDescriptor.hasJavaOriginInHierarchy(): Boolean {
|
||||
return if (overriddenDescriptors.isEmpty())
|
||||
containingDeclaration is JavaClassDescriptor
|
||||
else
|
||||
overriddenDescriptors.any { it.hasJavaOriginInHierarchy() }
|
||||
}
|
||||
|
||||
private fun isGoodGetMethod(descriptor: FunctionDescriptor): Boolean {
|
||||
val returnType = descriptor.returnType ?: return false
|
||||
if (returnType.isUnit()) return false
|
||||
@@ -251,6 +236,14 @@ class JavaSyntheticExtensionsScope(storageManager: StorageManager) : JetScope by
|
||||
return Name.identifier("set" + identifier.removePrefix(prefix))
|
||||
}
|
||||
|
||||
override fun getContainingDeclaration(): DeclarationDescriptor {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
override fun printScopeStructure(p: Printer) {
|
||||
p.println(javaClass.simpleName)
|
||||
}
|
||||
|
||||
private class MyPropertyDescriptor(
|
||||
ownerClass: ClassDescriptor,
|
||||
override val getMethod: FunctionDescriptor,
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.synthetic
|
||||
|
||||
import com.intellij.util.SmartList
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl
|
||||
import org.jetbrains.kotlin.load.java.sam.SingleAbstractMethodUtils
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.parentsWithSelf
|
||||
import org.jetbrains.kotlin.resolve.scopes.JetScope
|
||||
import org.jetbrains.kotlin.storage.StorageManager
|
||||
import org.jetbrains.kotlin.types.DescriptorSubstitutor
|
||||
import org.jetbrains.kotlin.types.JetType
|
||||
import org.jetbrains.kotlin.types.TypeSubstitution
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
import java.util.ArrayList
|
||||
|
||||
interface SamAdapterExtensionFunctionDescriptor : FunctionDescriptor {
|
||||
val originalFunction: FunctionDescriptor
|
||||
}
|
||||
|
||||
class SamAdapterFunctionsScope(storageManager: StorageManager) : JetScope by JetScope.Empty {
|
||||
private val extensionForFunction = storageManager.createMemoizedFunctionWithNullableValues<FunctionDescriptor, FunctionDescriptor> { function ->
|
||||
extensionForFunctionNotCached(function)
|
||||
}
|
||||
|
||||
private fun extensionForFunctionNotCached(function: FunctionDescriptor): FunctionDescriptor? {
|
||||
//TODO!
|
||||
if (function.visibility == Visibilities.PRIVATE || function.visibility == Visibilities.PRIVATE_TO_THIS || function.visibility == Visibilities.INVISIBLE_FAKE) return null
|
||||
if (!function.hasJavaOriginInHierarchy()) return null //TODO: should we go into base at all?
|
||||
if (!SingleAbstractMethodUtils.isSamAdapterNecessary(function)) return null
|
||||
val returnType = function.returnType ?: return null
|
||||
return MyFunctionDescriptor(function, returnType)
|
||||
}
|
||||
|
||||
override fun getSyntheticExtensionFunctions(receiverTypes: Collection<JetType>, name: Name): Collection<FunctionDescriptor> {
|
||||
var result: SmartList<FunctionDescriptor>? = null
|
||||
for (type in receiverTypes) {
|
||||
for (function in type.memberScope.getFunctions(name)) {
|
||||
val extension = extensionForFunction(function.original)
|
||||
if (extension != null) {
|
||||
if (result == null) {
|
||||
result = SmartList()
|
||||
}
|
||||
result.add(extension)
|
||||
}
|
||||
}
|
||||
}
|
||||
return when {
|
||||
result == null -> emptyList()
|
||||
result.size() > 1 -> result.toSet()
|
||||
else -> result
|
||||
}
|
||||
}
|
||||
|
||||
private class MyFunctionDescriptor(
|
||||
override val originalFunction: FunctionDescriptor,
|
||||
originalReturnType: JetType
|
||||
) : SamAdapterExtensionFunctionDescriptor, SimpleFunctionDescriptorImpl(
|
||||
DescriptorUtils.getContainingModule(originalFunction),
|
||||
null,
|
||||
Annotations.EMPTY, //TODO
|
||||
originalFunction.name,
|
||||
CallableMemberDescriptor.Kind.SYNTHESIZED,
|
||||
originalFunction.source
|
||||
) {
|
||||
init {
|
||||
val typeParamsSum = (originalFunction.typeParameters).toArrayList()
|
||||
val ownerClass = originalFunction.containingDeclaration as ClassDescriptor
|
||||
//TODO: should we go up parents for getters/setters too?
|
||||
for (parent in ownerClass.parentsWithSelf) {
|
||||
if (parent !is ClassDescriptor) break
|
||||
typeParamsSum += parent.typeConstructor.parameters
|
||||
}
|
||||
//TODO: duplicated parameter names
|
||||
|
||||
val typeParameters = ArrayList<TypeParameterDescriptor>(typeParamsSum.size())
|
||||
val typeSubstitutor = DescriptorSubstitutor.substituteTypeParameters(typeParamsSum, TypeSubstitution.EMPTY, this, typeParameters)
|
||||
|
||||
val returnType = typeSubstitutor.safeSubstitute(originalReturnType, Variance.OUT_VARIANCE)
|
||||
val receiverType = typeSubstitutor.safeSubstitute(ownerClass.defaultType, Variance.INVARIANT)
|
||||
val valueParameters = SingleAbstractMethodUtils.createValueParametersForSamAdapter(originalFunction, this, typeSubstitutor)
|
||||
initialize(receiverType, null, typeParameters, valueParameters, returnType, Modality.FINAL, Visibilities.PUBLIC)
|
||||
}
|
||||
|
||||
override fun hasStableParameterNames() = originalFunction.hasStableParameterNames()
|
||||
override fun hasSynthesizedParameterNames() = originalFunction.hasSynthesizedParameterNames()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.synthetic
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor
|
||||
|
||||
fun FunctionDescriptor.hasJavaOriginInHierarchy(): Boolean {
|
||||
return if (overriddenDescriptors.isEmpty())
|
||||
containingDeclaration is JavaClassDescriptor
|
||||
else
|
||||
overriddenDescriptors.any { it.hasJavaOriginInHierarchy() }
|
||||
}
|
||||
+4
-3
@@ -100,14 +100,15 @@ private object FunctionCollector : CallableDescriptorCollector<FunctionDescripto
|
||||
|
||||
override fun getExtensionsByName(scope: JetScope, name: Name, receiverTypes: Collection<JetType>, bindingTrace: BindingTrace): Collection<FunctionDescriptor> {
|
||||
val functions = scope.getFunctions(name)
|
||||
val (extensions, nonExtensions) = functions.partition { it.getExtensionReceiverParameter() != null }
|
||||
val (extensions, nonExtensions) = functions.partition { it.extensionReceiverParameter != null }
|
||||
val syntheticExtensions = scope.getSyntheticExtensionFunctions(receiverTypes, name)
|
||||
|
||||
if (name == OperatorConventions.INVOKE) {
|
||||
// Create synthesized "invoke" extensions for each non-extension "invoke" found in the scope
|
||||
return extensions + createSynthesizedInvokes(nonExtensions)
|
||||
return extensions + createSynthesizedInvokes(nonExtensions) + syntheticExtensions
|
||||
}
|
||||
|
||||
return extensions
|
||||
return extensions + syntheticExtensions
|
||||
}
|
||||
|
||||
private fun getConstructors(
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// FILE: p/Sam.java
|
||||
|
||||
package p;
|
||||
|
||||
public interface Sam {
|
||||
void sam();
|
||||
}
|
||||
|
||||
// FILE: p/Foo.java
|
||||
|
||||
package p;
|
||||
|
||||
public class Foo {
|
||||
public void foo(Sam sam);
|
||||
}
|
||||
|
||||
// FILE: k.kt
|
||||
|
||||
import p.*
|
||||
|
||||
// to have enough fake overrides
|
||||
open class K0 : Foo()
|
||||
|
||||
class K : K0() {
|
||||
// We keep this test to make sure ACCIDENTAL_OVERRIDE is not reported
|
||||
<!VIRTUAL_MEMBER_HIDDEN!>fun <!CANNOT_WEAKEN_ACCESS_PRIVILEGE!>foo<!>(f: () -> Unit)<!> {}
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
package
|
||||
|
||||
internal final class K : K0 {
|
||||
public constructor K()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final override /*1*/ fun foo(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun foo(/*0*/ sam: p.Sam!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal open class K0 : p.Foo {
|
||||
public constructor K0()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ sam: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun foo(/*0*/ sam: p.Sam!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -4,7 +4,6 @@ internal final class K : p.J.C {
|
||||
public constructor K()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
invisible_fake final override /*1*/ /*fake_override*/ fun sam(/*0*/ sam: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun sam(/*0*/ sam: p.J.Sam!): kotlin.Unit
|
||||
internal final fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@@ -16,7 +16,6 @@ public open class Test {
|
||||
public constructor Test()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun test(/*0*/ r: (() -> kotlin.Int)!): kotlin.Unit
|
||||
public open fun test(/*0*/ r: Run!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
// FILE: Super.java
|
||||
class Super {
|
||||
void foo(Runnable r) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Sub.kt
|
||||
class Sub1() : Super() {
|
||||
<!VIRTUAL_MEMBER_HIDDEN!>fun foo(r : (() -> Unit)?)<!> {
|
||||
}
|
||||
}
|
||||
|
||||
class Sub2() : Super() {
|
||||
<!OVERRIDING_FINAL_MEMBER!>override<!> fun foo(r : (() -> Unit)?) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ public fun concurrentMap(): kotlin.Unit
|
||||
|
||||
public open class ConcHashMap</*0*/ K : kotlin.Any!, /*1*/ V : kotlin.Any!> : ConcMap<K!, V!> {
|
||||
public constructor ConcHashMap</*0*/ K : kotlin.Any!, /*1*/ V : kotlin.Any!>()
|
||||
java.lang.Override() public/*package*/ final override /*1*/ /*synthesized*/ fun computeIfAbsent(/*0*/ key: K!, /*1*/ mappingFunction: ((K!) -> V!)!): V!
|
||||
java.lang.Override() public/*package*/ open override /*1*/ fun computeIfAbsent(/*0*/ key: K!, /*1*/ mappingFunction: MyFunc<in K!, out V!>!): V!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@@ -14,7 +13,6 @@ public open class ConcHashMap</*0*/ K : kotlin.Any!, /*1*/ V : kotlin.Any!> : Co
|
||||
}
|
||||
|
||||
public interface ConcMap</*0*/ K : kotlin.Any!, /*1*/ V : kotlin.Any!> {
|
||||
public final /*synthesized*/ fun computeIfAbsent(/*0*/ key: K!, /*1*/ mappingFunction: ((K!) -> V!)!): V!
|
||||
public abstract fun computeIfAbsent(/*0*/ key: K!, /*1*/ mappingFunction: MyFunc<in K!, out V!>!): V!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -4,17 +4,14 @@ public /*synthesized*/ fun A(/*0*/ function: (java.lang.Runnable!) -> kotlin.Uni
|
||||
|
||||
public interface A {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface B : A {
|
||||
public final /*synthesized*/ fun bar(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun bar(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
@@ -22,10 +19,8 @@ public interface B : A {
|
||||
|
||||
internal final class C : B {
|
||||
public constructor C()
|
||||
public final override /*1*/ /*fake_override*/ fun bar(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public open override /*1*/ fun bar(/*0*/ r: java.lang.Runnable?): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public open override /*1*/ fun foo(/*0*/ r: java.lang.Runnable?): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@@ -6,7 +6,6 @@ internal fun main(): kotlin.Unit
|
||||
|
||||
public interface A</*0*/ K : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final /*synthesized*/ fun foo(/*0*/ key: K!, /*1*/ f: ((kotlin.String!) -> kotlin.String!)!): K!
|
||||
public abstract fun foo(/*0*/ key: K!, /*1*/ f: MyFunc!): K!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
@@ -15,7 +14,6 @@ public interface A</*0*/ K : kotlin.Any!> {
|
||||
public open class B</*0*/ E : kotlin.Any!> : A<E!> {
|
||||
public constructor B</*0*/ E : kotlin.Any!>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
java.lang.Override() public final override /*1*/ /*synthesized*/ fun foo(/*0*/ key: E!, /*1*/ f: ((kotlin.String!) -> kotlin.String!)!): E!
|
||||
java.lang.Override() public open override /*1*/ fun foo(/*0*/ key: E!, /*1*/ f: MyFunc!): E!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@@ -335,9 +335,7 @@ package test {
|
||||
public open override /*1*/ /*fake_override*/ fun getModalExclusionType(): [ERROR : Unresolved java classifier: ModalExclusionType]!
|
||||
public open override /*1*/ /*fake_override*/ fun getMostRecentFocusOwner(): java.awt.Component!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun getMouseEventTarget(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Boolean): java.awt.Component!
|
||||
invisible_fake final override /*1*/ /*fake_override*/ fun getMouseEventTarget(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Boolean, /*3*/ p3: ((java.awt.Component!) -> kotlin.Boolean)!, /*4*/ p4: kotlin.Boolean): java.awt.Component!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun getMouseEventTarget(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Boolean, /*3*/ p3: java.awt.Container.EventTargetFilter!, /*4*/ p4: kotlin.Boolean): java.awt.Component!
|
||||
invisible_fake final override /*1*/ /*fake_override*/ fun getMouseEventTargetImpl(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Boolean, /*3*/ p3: ((java.awt.Component!) -> kotlin.Boolean)!, /*4*/ p4: kotlin.Boolean, /*5*/ p5: kotlin.Boolean): java.awt.Component!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun getMouseEventTargetImpl(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Boolean, /*3*/ p3: java.awt.Container.EventTargetFilter!, /*4*/ p4: kotlin.Boolean, /*5*/ p5: kotlin.Boolean): java.awt.Component!
|
||||
public open override /*1*/ /*fake_override*/ fun getMouseListeners(): kotlin.Array<(out) [ERROR : Unresolved java classifier: MouseListener]!>!
|
||||
public open override /*1*/ /*fake_override*/ fun getMouseMotionListeners(): kotlin.Array<(out) [ERROR : Unresolved java classifier: MouseMotionListener]!>!
|
||||
|
||||
@@ -40,7 +40,6 @@ internal final class Test : java.lang.Thread {
|
||||
public final override /*1*/ /*fake_override*/ fun getThreadGroup(): [ERROR : Unresolved java classifier: ThreadGroup]!
|
||||
public open override /*1*/ /*fake_override*/ fun getUncaughtExceptionHandler(): java.lang.Thread.UncaughtExceptionHandler!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
invisible_fake final override /*1*/ /*fake_override*/ fun init(/*0*/ p0: [ERROR : Unresolved java classifier: ThreadGroup]!, /*1*/ p1: (() -> kotlin.Unit)!, /*2*/ p2: kotlin.String!, /*3*/ p3: kotlin.Long): kotlin.Unit
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun init(/*0*/ p0: [ERROR : Unresolved java classifier: ThreadGroup]!, /*1*/ p1: java.lang.Runnable!, /*2*/ p2: kotlin.String!, /*3*/ p3: kotlin.Long): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun interrupt(): kotlin.Unit
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun interrupt0(): kotlin.Unit
|
||||
@@ -60,7 +59,6 @@ internal final class Test : java.lang.Thread {
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun setNativeName(/*0*/ p0: kotlin.String!): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun setPriority(/*0*/ p0: kotlin.Int): kotlin.Unit
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun setPriority0(/*0*/ p0: kotlin.Int): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun setUncaughtExceptionHandler(/*0*/ p0: ((java.lang.Thread!, kotlin.Throwable!) -> kotlin.Unit)!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun setUncaughtExceptionHandler(/*0*/ p0: java.lang.Thread.UncaughtExceptionHandler!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun start(): kotlin.Unit
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun start0(): kotlin.Unit
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// FILE: KotlinFile.kt
|
||||
fun foo(javaClass: JavaClass<String>): String {
|
||||
return javaClass.doSomething("", 1) { s: String -> "" }
|
||||
}
|
||||
|
||||
fun useString(<!UNUSED_PARAMETER!>s<!>: String) {}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass<T> {
|
||||
public T doSomething(T t, int anInt, I<T> i) { return t; }
|
||||
}
|
||||
|
||||
interface I<T> {
|
||||
T doIt(T t);
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
internal fun foo(/*0*/ javaClass: JavaClass<kotlin.String>): kotlin.String
|
||||
internal fun useString(/*0*/ s: kotlin.String): kotlin.Unit
|
||||
|
||||
public open class JavaClass</*0*/ T : kotlin.Any!> {
|
||||
public constructor JavaClass</*0*/ T : kotlin.Any!>()
|
||||
public open fun doSomething(/*0*/ t: T!, /*1*/ anInt: kotlin.Int, /*2*/ i: I<T!>!): T!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// FILE: KotlinFile.kt
|
||||
fun foo(javaClass: JavaClass): String {
|
||||
return javaClass.doSomething("") { it }
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
public <T> T doSomething(T t, I<T> i) { return i.run(t); }
|
||||
}
|
||||
|
||||
interface I<T> {
|
||||
T run(T t);
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
internal fun foo(/*0*/ javaClass: JavaClass): kotlin.String
|
||||
|
||||
public open class JavaClass {
|
||||
public constructor JavaClass()
|
||||
public open fun </*0*/ T : kotlin.Any!> doSomething(/*0*/ t: T!, /*1*/ i: I<T!>!): T!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// FILE: KotlinFile.kt
|
||||
fun foo(javaClass: JavaClass<Int>): String {
|
||||
return javaClass.doSomething("", 1) { it }
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass<X> {
|
||||
public <T> T doSomething(T t, X x, I<T> i) { return i.run(t); }
|
||||
}
|
||||
|
||||
interface I<T> {
|
||||
T run(T t);
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
internal fun foo(/*0*/ javaClass: JavaClass<kotlin.Int>): kotlin.String
|
||||
|
||||
public open class JavaClass</*0*/ X : kotlin.Any!> {
|
||||
public constructor JavaClass</*0*/ X : kotlin.Any!>()
|
||||
public open fun </*0*/ T : kotlin.Any!> doSomething(/*0*/ t: T!, /*1*/ x: X!, /*2*/ i: I<T!>!): T!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: KotlinFile.kt
|
||||
fun foo(javaClass: JavaClass<Int>) {
|
||||
val inner = javaClass.createInner<String>()
|
||||
inner.doSomething(1, "") {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(){}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass<T> {
|
||||
public <X> Inner<X> createInner() {
|
||||
return new Inner<X>();
|
||||
}
|
||||
|
||||
public class Inner<X>{
|
||||
public void doSomething(T t, X x, Runnable runnable) { runnable.run(); }
|
||||
}
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
internal fun bar(): kotlin.Unit
|
||||
internal fun foo(/*0*/ javaClass: JavaClass<kotlin.Int>): kotlin.Unit
|
||||
|
||||
public open class JavaClass</*0*/ T : kotlin.Any!> {
|
||||
public constructor JavaClass</*0*/ T : kotlin.Any!>()
|
||||
public open fun </*0*/ X : kotlin.Any!> createInner(): JavaClass.Inner<X!>!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open inner class Inner</*0*/ X : kotlin.Any!> {
|
||||
public constructor Inner</*0*/ X : kotlin.Any!>()
|
||||
public open fun doSomething(/*0*/ t: T!, /*1*/ x: X!, /*2*/ runnable: java.lang.Runnable!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// FILE: KotlinFile.kt
|
||||
fun foo(javaClass: JavaClass) {
|
||||
javaClass.doSomething(<!NAMED_ARGUMENTS_NOT_ALLOWED!>p<!> = 1) {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(){}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
public void doSomething(int p, Runnable runnable) { runnable.run(); }
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
internal fun bar(): kotlin.Unit
|
||||
internal fun foo(/*0*/ javaClass: JavaClass): kotlin.Unit
|
||||
|
||||
public open class JavaClass {
|
||||
public constructor JavaClass()
|
||||
public open fun doSomething(/*0*/ p: kotlin.Int, /*1*/ runnable: java.lang.Runnable!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// FILE: KotlinFile.kt
|
||||
class KotlinClass {
|
||||
public fun doSomething(runnable: Runnable) { runnable.run() }
|
||||
}
|
||||
|
||||
public interface I {
|
||||
public fun doIt()
|
||||
}
|
||||
|
||||
fun foo(javaClass: JavaClass, kotlinClass: KotlinClass) {
|
||||
javaClass.doSomething {
|
||||
bar()
|
||||
}
|
||||
|
||||
kotlinClass.doSomething <!TYPE_MISMATCH!>{
|
||||
bar()
|
||||
}<!>
|
||||
|
||||
javaClass.doSomething2 <!TYPE_MISMATCH!>{
|
||||
bar()
|
||||
}<!>
|
||||
}
|
||||
|
||||
fun bar(){}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
public void doSomething(Runnable runnable) { runnable.run(); }
|
||||
public void doSomething2(I i) { i.doIt(); }
|
||||
}
|
||||
+12
-12
@@ -1,28 +1,28 @@
|
||||
package
|
||||
|
||||
internal final class Sub1 : Super {
|
||||
public constructor Sub1()
|
||||
internal fun bar(): kotlin.Unit
|
||||
internal fun foo(/*0*/ javaClass: JavaClass, /*1*/ kotlinClass: KotlinClass): kotlin.Unit
|
||||
|
||||
public interface I {
|
||||
public abstract fun doIt(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final override /*1*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal final class Sub2 : Super {
|
||||
public constructor Sub2()
|
||||
public open class JavaClass {
|
||||
public constructor JavaClass()
|
||||
public open fun doSomething(/*0*/ runnable: java.lang.Runnable!): kotlin.Unit
|
||||
public open fun doSomething2(/*0*/ i: I!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal open override /*1*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class Super {
|
||||
public/*package*/ constructor Super()
|
||||
internal final class KotlinClass {
|
||||
public constructor KotlinClass()
|
||||
public final fun doSomething(/*0*/ runnable: java.lang.Runnable): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -2,8 +2,6 @@ package test
|
||||
|
||||
public open class AmbiguousAdapters {
|
||||
public constructor AmbiguousAdapters()
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: java.io.Closeable!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package test
|
||||
|
||||
public open class Basic {
|
||||
public constructor Basic()
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
|
||||
// Static members
|
||||
|
||||
@@ -3,12 +3,10 @@ package test
|
||||
public interface DeepSamLoop {
|
||||
|
||||
public interface Bar {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: ((test.DeepSamLoop.Bar!) -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Foo!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Foo {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: ((test.DeepSamLoop.Foo!) -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Bar!): kotlin.Unit
|
||||
}
|
||||
|
||||
|
||||
-8
@@ -2,33 +2,25 @@ package test
|
||||
|
||||
public/*package*/ open class NoSamForTypeParameter</*0*/ K : java.lang.Runnable!> {
|
||||
public/*package*/ constructor NoSamForTypeParameter</*0*/ K : java.lang.Runnable!>()
|
||||
public/*package*/ final /*synthesized*/ fun foo(/*0*/ p0: K!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open fun foo(/*0*/ p0: K!, /*1*/ p1: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ open class NoSamForTypeParameterDerived1 : test.NoSamForTypeParameter<java.lang.Runnable!> {
|
||||
public/*package*/ constructor NoSamForTypeParameterDerived1()
|
||||
public/*package*/ final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ fun foo(/*0*/ p0: java.lang.Runnable!, /*1*/ p1: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ open class NoSamForTypeParameterDerived2</*0*/ E : java.lang.Runnable!> : test.NoSamForTypeParameter<E!> {
|
||||
public/*package*/ constructor NoSamForTypeParameterDerived2</*0*/ E : java.lang.Runnable!>()
|
||||
public/*package*/ final override /*1*/ /*synthesized*/ fun foo(/*0*/ p0: E!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ fun foo(/*0*/ p0: E!, /*1*/ p1: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ open class NoSamForTypeParameterDerived3 : test.NoSamForTypeParameterDerived1 {
|
||||
public/*package*/ constructor NoSamForTypeParameterDerived3()
|
||||
public/*package*/ final override /*1*/ /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ fun foo(/*0*/ p0: java.lang.Runnable!, /*1*/ p1: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ open class NoSamForTypeParameterDerived4 : test.NoSamForTypeParameterDerived2<java.lang.Runnable!> {
|
||||
public/*package*/ constructor NoSamForTypeParameterDerived4()
|
||||
public/*package*/ final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ fun foo(/*0*/ p0: java.lang.Runnable!, /*1*/ p1: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
-6
@@ -2,26 +2,20 @@ package test
|
||||
|
||||
public/*package*/ open class NoSamForTypeParameter {
|
||||
public/*package*/ constructor NoSamForTypeParameter()
|
||||
public/*package*/ final /*synthesized*/ fun </*0*/ K : java.lang.Runnable!> foo(/*0*/ p0: K!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open fun </*0*/ K : java.lang.Runnable!> foo(/*0*/ p0: K!, /*1*/ p1: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ open class NoSamForTypeParameterDerived1 : test.NoSamForTypeParameter {
|
||||
public/*package*/ constructor NoSamForTypeParameterDerived1()
|
||||
public/*package*/ final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ fun </*0*/ K : java.lang.Runnable!> foo(/*0*/ p0: K!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open fun foo(/*0*/ p0: java.lang.Runnable!, /*1*/ p1: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ open class NoSamForTypeParameterDerived2 : test.NoSamForTypeParameter {
|
||||
public/*package*/ constructor NoSamForTypeParameterDerived2()
|
||||
public/*package*/ final override /*1*/ /*synthesized*/ fun </*0*/ K : java.lang.Runnable!> foo(/*0*/ p0: K!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ fun </*0*/ K : java.lang.Runnable!> foo(/*0*/ p0: K!, /*1*/ p1: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ open class NoSamForTypeParameterDerived3 : test.NoSamForTypeParameterDerived1 {
|
||||
public/*package*/ constructor NoSamForTypeParameterDerived3()
|
||||
public/*package*/ final override /*1*/ /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ fun </*0*/ K : java.lang.Runnable!> foo(/*0*/ p0: K!, /*1*/ p1: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ fun foo(/*0*/ p0: java.lang.Runnable!, /*1*/ p1: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
-3
@@ -2,11 +2,8 @@ package test
|
||||
|
||||
public open class NonTrivialFunctionType {
|
||||
public constructor NonTrivialFunctionType()
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: ((java.io.File!, kotlin.String!) -> kotlin.Boolean)!): kotlin.Unit
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: ((kotlin.String!, kotlin.String!) -> kotlin.Int)!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: java.io.FilenameFilter!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: java.util.Comparator<kotlin.String!>!): kotlin.Unit
|
||||
public final /*synthesized*/ fun wildcardBound(/*0*/ p0: ((kotlin.CharSequence!, kotlin.CharSequence!) -> kotlin.Int)!): kotlin.Unit
|
||||
public open fun wildcardBound(/*0*/ p0: java.util.Comparator<in kotlin.CharSequence!>!): kotlin.Unit
|
||||
public open fun wildcardUnbound(/*0*/ p0: java.util.Comparator<*>!): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package test
|
||||
|
||||
public open class PrivateSamAdapter {
|
||||
public constructor PrivateSamAdapter()
|
||||
private final /*synthesized*/ fun samAdapter(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
private open fun samAdapter(/*0*/ p0: test.PrivateSamAdapter.SamInterface!): kotlin.Unit
|
||||
|
||||
private interface SamInterface {
|
||||
|
||||
@@ -3,6 +3,5 @@ package test
|
||||
public /*synthesized*/ fun SelfAsParameter(/*0*/ function: (test.SelfAsParameter!) -> kotlin.Unit): test.SelfAsParameter
|
||||
|
||||
public interface SelfAsParameter {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: ((test.SelfAsParameter!) -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: test.SelfAsParameter!): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -2,6 +2,5 @@ package test
|
||||
|
||||
public open class TypeParameterOfClass</*0*/ T : kotlin.Any!> {
|
||||
public constructor TypeParameterOfClass</*0*/ T : kotlin.Any!>()
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: ((T!, T!) -> kotlin.Int)!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: java.util.Comparator<T!>!): kotlin.Unit
|
||||
}
|
||||
|
||||
-1
@@ -5,7 +5,6 @@ public open class TypeParameterOfOuterClass</*0*/ T : kotlin.Any!> {
|
||||
|
||||
public open inner class Inner {
|
||||
public constructor Inner()
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: ((T!, T!) -> kotlin.Int)!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: java.util.Comparator<T!>!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -4,7 +4,6 @@ public interface AdapterDoesntOverrideDeclaration {
|
||||
|
||||
public interface Sub : test.AdapterDoesntOverrideDeclaration.Super {
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit!)!): kotlin.Unit
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
|
||||
Vendored
-2
@@ -4,13 +4,11 @@ public interface InheritedAdapterAndDeclaration {
|
||||
|
||||
public interface Sub : test.InheritedAdapterAndDeclaration.Super {
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit!)!): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super {
|
||||
public abstract fun foo(/*0*/ p0: (() -> kotlin.Unit!)!): kotlin.Unit
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-4
@@ -3,15 +3,11 @@ package test
|
||||
public interface InheritedAmbiguousAdapters {
|
||||
|
||||
public interface Sub : test.InheritedAmbiguousAdapters.Super {
|
||||
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.io.Closeable!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.io.Closeable!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
-4
@@ -3,15 +3,11 @@ package test
|
||||
public interface InheritedAndOverriddenAmbiguousAdapters {
|
||||
|
||||
public interface Sub : test.InheritedAndOverriddenAmbiguousAdapters.Super {
|
||||
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public final override /*1*/ /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.io.Closeable!): kotlin.Unit
|
||||
public abstract override /*1*/ fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.io.Closeable!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
-2
@@ -4,13 +4,11 @@ public interface InheritedOverridden {
|
||||
|
||||
public open class Sub : test.InheritedOverridden.Super {
|
||||
public constructor Sub()
|
||||
public final override /*1*/ /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public open override /*1*/ fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public open class Super {
|
||||
public constructor Super()
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-2
@@ -4,13 +4,12 @@ public interface InheritedOverriddenAdapter {
|
||||
|
||||
public open class Sub : test.InheritedOverriddenAdapter.Super {
|
||||
public constructor Sub()
|
||||
public open override /*1*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: (() -> kotlin.Unit!)!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public open class Super {
|
||||
public constructor Super()
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
-3
@@ -3,17 +3,14 @@ package test
|
||||
public interface InheritedSameAdapters {
|
||||
|
||||
public interface Sub : test.InheritedSameAdapters.Super1, test.InheritedSameAdapters.Super2 {
|
||||
public final override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super1 {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super2 {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
|
||||
-4
@@ -3,22 +3,18 @@ package test
|
||||
public interface InheritedSameAdaptersWithSubstitution {
|
||||
|
||||
public interface Sub : test.InheritedSameAdaptersWithSubstitution.Super1, test.InheritedSameAdaptersWithSubstitution.Super2Substituted {
|
||||
public final override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: ((kotlin.String!, kotlin.String!) -> kotlin.Int)!): kotlin.Unit
|
||||
public abstract override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: java.util.Comparator<kotlin.String!>!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super1 {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: ((kotlin.String!, kotlin.String!) -> kotlin.Int)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.util.Comparator<kotlin.String!>!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super2</*0*/ T : kotlin.Any!> {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: ((T!, T!) -> kotlin.Int)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.util.Comparator<T!>!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super2Substituted : test.InheritedSameAdaptersWithSubstitution.Super2<kotlin.String!> {
|
||||
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: ((kotlin.String!, kotlin.String!) -> kotlin.Int)!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.util.Comparator<kotlin.String!>!): kotlin.Unit
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -3,12 +3,10 @@ package test
|
||||
public interface InheritedSimple {
|
||||
|
||||
public interface Sub : test.InheritedSimple.Super {
|
||||
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-3
@@ -3,14 +3,12 @@ package test
|
||||
public interface OverriddenAmbiguousAdapters {
|
||||
|
||||
public interface Sub : test.OverriddenAmbiguousAdapters.Super {
|
||||
public abstract override /*2*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: (() -> kotlin.Unit!)!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.io.Closeable!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super {
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.io.Closeable!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
Vendored
-4
@@ -2,16 +2,12 @@ package test
|
||||
|
||||
public final class Sub : test.Super {
|
||||
public constructor Sub()
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.io.Closeable!): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public open class Super {
|
||||
public constructor Super()
|
||||
public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open fun foo(/*0*/ r: java.io.Closeable!): kotlin.Unit
|
||||
public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
-2
@@ -2,12 +2,10 @@ package test
|
||||
|
||||
public final class Sub : test.Super {
|
||||
public constructor Sub()
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public open class Super {
|
||||
public constructor Super()
|
||||
public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
+1
-2
@@ -2,12 +2,11 @@ package test
|
||||
|
||||
public final class Sub : test.Super {
|
||||
public constructor Sub()
|
||||
internal open override /*1*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit
|
||||
internal open fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
public open class Super {
|
||||
public constructor Super()
|
||||
public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit
|
||||
public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user