Initial import of ADIF API reverse-engineering toolkit

This commit is contained in:
2025-12-16 08:37:56 +01:00
commit 60388529c1
11486 changed files with 1086536 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedHashSet;
import kotlin.collections.CollectionsKt;
import kotlin.comparisons.ComparisonsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeAliasDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.NoLookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope;
@SourceDebugExtension({"SMAP\nSealedClassInheritorsProvider.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SealedClassInheritorsProvider.kt\norg/jetbrains/kotlin/resolve/CliSealedClassInheritorsProvider\n+ 2 _Sequences.kt\nkotlin/sequences/SequencesKt___SequencesKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,86:1\n179#2,2:87\n1045#3:89\n*S KotlinDebug\n*F\n+ 1 SealedClassInheritorsProvider.kt\norg/jetbrains/kotlin/resolve/CliSealedClassInheritorsProvider\n*L\n73#1:87,2\n82#1:89\n*E\n"})
/* loaded from: classes3.dex */
public final class CliSealedClassInheritorsProvider extends SealedClassInheritorsProvider {
public static final CliSealedClassInheritorsProvider INSTANCE = new CliSealedClassInheritorsProvider();
private CliSealedClassInheritorsProvider() {
}
private static final void computeSealedSubclasses$collectSubclasses(ClassDescriptor classDescriptor, LinkedHashSet<ClassDescriptor> linkedHashSet, MemberScope memberScope, boolean z3) {
for (DeclarationDescriptor declarationDescriptor : ResolutionScope.DefaultImpls.getContributedDescriptors$default(memberScope, DescriptorKindFilter.CLASSIFIERS, null, 2, null)) {
if (declarationDescriptor instanceof ClassDescriptor) {
ClassDescriptor classDescriptor2 = (ClassDescriptor) declarationDescriptor;
if (classDescriptor2.isExpect()) {
Name name = classDescriptor2.getName();
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
ClassifierDescriptor mo1396getContributedClassifier = memberScope.mo1396getContributedClassifier(name, NoLookupLocation.WHEN_GET_ALL_DESCRIPTORS);
classDescriptor2 = mo1396getContributedClassifier instanceof ClassDescriptor ? (ClassDescriptor) mo1396getContributedClassifier : mo1396getContributedClassifier instanceof TypeAliasDescriptor ? ((TypeAliasDescriptor) mo1396getContributedClassifier).getClassDescriptor() : null;
}
if (classDescriptor2 != null) {
if (DescriptorUtils.isDirectSubclass(classDescriptor2, classDescriptor)) {
linkedHashSet.add(classDescriptor2);
}
if (z3) {
MemberScope unsubstitutedInnerClassesScope = classDescriptor2.getUnsubstitutedInnerClassesScope();
Intrinsics.checkNotNullExpressionValue(unsubstitutedInnerClassesScope, "getUnsubstitutedInnerClassesScope(...)");
computeSealedSubclasses$collectSubclasses(classDescriptor, linkedHashSet, unsubstitutedInnerClassesScope, z3);
}
}
}
}
}
public Collection<ClassDescriptor> computeSealedSubclasses(ClassDescriptor sealedClass, boolean z3) {
DeclarationDescriptor declarationDescriptor;
DeclarationDescriptor declarationDescriptor2;
Intrinsics.checkNotNullParameter(sealedClass, "sealedClass");
if (sealedClass.getModality() != Modality.SEALED) {
return CollectionsKt.emptyList();
}
LinkedHashSet linkedHashSet = new LinkedHashSet();
if (z3) {
Iterator<DeclarationDescriptor> it = DescriptorUtilsKt.getParents(sealedClass).iterator();
while (true) {
if (!it.hasNext()) {
declarationDescriptor = null;
break;
}
declarationDescriptor = it.next();
if (declarationDescriptor instanceof PackageFragmentDescriptor) {
break;
}
}
declarationDescriptor2 = declarationDescriptor;
} else {
declarationDescriptor2 = sealedClass.getContainingDeclaration();
}
if (declarationDescriptor2 instanceof PackageFragmentDescriptor) {
computeSealedSubclasses$collectSubclasses(sealedClass, linkedHashSet, ((PackageFragmentDescriptor) declarationDescriptor2).getMemberScope(), z3);
}
MemberScope unsubstitutedInnerClassesScope = sealedClass.getUnsubstitutedInnerClassesScope();
Intrinsics.checkNotNullExpressionValue(unsubstitutedInnerClassesScope, "getUnsubstitutedInnerClassesScope(...)");
computeSealedSubclasses$collectSubclasses(sealedClass, linkedHashSet, unsubstitutedInnerClassesScope, true);
return CollectionsKt.sortedWith(linkedHashSet, new Comparator() { // from class: kotlin.reflect.jvm.internal.impl.resolve.CliSealedClassInheritorsProvider$computeSealedSubclasses$$inlined$sortedBy$1
@Override // java.util.Comparator
public final int compare(T t2, T t4) {
return ComparisonsKt.compareValues(DescriptorUtilsKt.getFqNameSafe((ClassDescriptor) t2).asString(), DescriptorUtilsKt.getFqNameSafe((ClassDescriptor) t4).asString());
}
});
}
}

View File

@@ -0,0 +1,21 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.name.StandardClassIds;
/* loaded from: classes3.dex */
final class CliStdlibClassFinderImpl implements StdlibClassFinder {
public static final CliStdlibClassFinderImpl INSTANCE = new CliStdlibClassFinderImpl();
private CliStdlibClassFinderImpl() {
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.StdlibClassFinder
public ClassDescriptor findEnumEntriesClass(ModuleDescriptor moduleDescriptor) {
Intrinsics.checkNotNullParameter(moduleDescriptor, "moduleDescriptor");
return FindClassInModuleKt.findClassAcrossModuleDependencies(moduleDescriptor, StandardClassIds.INSTANCE.getEnumEntries());
}
}

View File

@@ -0,0 +1,179 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import java.util.Collection;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.MemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.resolve.OverridingUtil;
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeChecker;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
/* loaded from: classes3.dex */
public final class DescriptorEquivalenceForOverrides {
public static final DescriptorEquivalenceForOverrides INSTANCE = new DescriptorEquivalenceForOverrides();
private DescriptorEquivalenceForOverrides() {
}
public static /* synthetic */ boolean areCallableDescriptorsEquivalent$default(DescriptorEquivalenceForOverrides descriptorEquivalenceForOverrides, CallableDescriptor callableDescriptor, CallableDescriptor callableDescriptor2, boolean z3, boolean z4, boolean z5, KotlinTypeRefiner kotlinTypeRefiner, int i, Object obj) {
if ((i & 8) != 0) {
z4 = true;
}
boolean z6 = z4;
if ((i & 16) != 0) {
z5 = false;
}
return descriptorEquivalenceForOverrides.areCallableDescriptorsEquivalent(callableDescriptor, callableDescriptor2, z3, z6, z5, kotlinTypeRefiner);
}
/* JADX INFO: Access modifiers changed from: private */
public static final boolean areCallableDescriptorsEquivalent$lambda$0(boolean z3, final CallableDescriptor a2, final CallableDescriptor b4, TypeConstructor c12, TypeConstructor c22) {
Intrinsics.checkNotNullParameter(a2, "$a");
Intrinsics.checkNotNullParameter(b4, "$b");
Intrinsics.checkNotNullParameter(c12, "c1");
Intrinsics.checkNotNullParameter(c22, "c2");
if (Intrinsics.areEqual(c12, c22)) {
return true;
}
ClassifierDescriptor mo1394getDeclarationDescriptor = c12.mo1394getDeclarationDescriptor();
ClassifierDescriptor mo1394getDeclarationDescriptor2 = c22.mo1394getDeclarationDescriptor();
if ((mo1394getDeclarationDescriptor instanceof TypeParameterDescriptor) && (mo1394getDeclarationDescriptor2 instanceof TypeParameterDescriptor)) {
return INSTANCE.areTypeParametersEquivalent((TypeParameterDescriptor) mo1394getDeclarationDescriptor, (TypeParameterDescriptor) mo1394getDeclarationDescriptor2, z3, new Function2<DeclarationDescriptor, DeclarationDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.DescriptorEquivalenceForOverrides$areCallableDescriptorsEquivalent$overridingUtil$1$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(2);
}
@Override // kotlin.jvm.functions.Function2
public final Boolean invoke(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2) {
return Boolean.valueOf(Intrinsics.areEqual(declarationDescriptor, CallableDescriptor.this) && Intrinsics.areEqual(declarationDescriptor2, b4));
}
});
}
return false;
}
private final boolean areClassesEquivalent(ClassDescriptor classDescriptor, ClassDescriptor classDescriptor2) {
return Intrinsics.areEqual(classDescriptor.getTypeConstructor(), classDescriptor2.getTypeConstructor());
}
public static /* synthetic */ boolean areEquivalent$default(DescriptorEquivalenceForOverrides descriptorEquivalenceForOverrides, DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2, boolean z3, boolean z4, int i, Object obj) {
if ((i & 8) != 0) {
z4 = true;
}
return descriptorEquivalenceForOverrides.areEquivalent(declarationDescriptor, declarationDescriptor2, z3, z4);
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ boolean areTypeParametersEquivalent$default(DescriptorEquivalenceForOverrides descriptorEquivalenceForOverrides, TypeParameterDescriptor typeParameterDescriptor, TypeParameterDescriptor typeParameterDescriptor2, boolean z3, Function2 function2, int i, Object obj) {
if ((i & 8) != 0) {
function2 = new Function2<DeclarationDescriptor, DeclarationDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.DescriptorEquivalenceForOverrides$areTypeParametersEquivalent$1
@Override // kotlin.jvm.functions.Function2
public final Boolean invoke(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2) {
return Boolean.FALSE;
}
};
}
return descriptorEquivalenceForOverrides.areTypeParametersEquivalent(typeParameterDescriptor, typeParameterDescriptor2, z3, function2);
}
private final boolean ownersEquivalent(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2, Function2<? super DeclarationDescriptor, ? super DeclarationDescriptor, Boolean> function2, boolean z3) {
DeclarationDescriptor containingDeclaration = declarationDescriptor.getContainingDeclaration();
DeclarationDescriptor containingDeclaration2 = declarationDescriptor2.getContainingDeclaration();
return ((containingDeclaration instanceof CallableMemberDescriptor) || (containingDeclaration2 instanceof CallableMemberDescriptor)) ? function2.invoke(containingDeclaration, containingDeclaration2).booleanValue() : areEquivalent$default(this, containingDeclaration, containingDeclaration2, z3, false, 8, null);
}
private final SourceElement singleSource(CallableDescriptor callableDescriptor) {
while (callableDescriptor instanceof CallableMemberDescriptor) {
CallableMemberDescriptor callableMemberDescriptor = (CallableMemberDescriptor) callableDescriptor;
if (callableMemberDescriptor.getKind() != CallableMemberDescriptor.Kind.FAKE_OVERRIDE) {
break;
}
Collection<? extends CallableMemberDescriptor> overriddenDescriptors = callableMemberDescriptor.getOverriddenDescriptors();
Intrinsics.checkNotNullExpressionValue(overriddenDescriptors, "getOverriddenDescriptors(...)");
callableDescriptor = (CallableMemberDescriptor) CollectionsKt.singleOrNull(overriddenDescriptors);
if (callableDescriptor == null) {
return null;
}
}
return callableDescriptor.getSource();
}
public final boolean areCallableDescriptorsEquivalent(final CallableDescriptor a2, final CallableDescriptor b4, final boolean z3, boolean z4, boolean z5, KotlinTypeRefiner kotlinTypeRefiner) {
Intrinsics.checkNotNullParameter(a2, "a");
Intrinsics.checkNotNullParameter(b4, "b");
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
if (Intrinsics.areEqual(a2, b4)) {
return true;
}
if (!Intrinsics.areEqual(a2.getName(), b4.getName())) {
return false;
}
if (z4 && (a2 instanceof MemberDescriptor) && (b4 instanceof MemberDescriptor) && ((MemberDescriptor) a2).isExpect() != ((MemberDescriptor) b4).isExpect()) {
return false;
}
if ((Intrinsics.areEqual(a2.getContainingDeclaration(), b4.getContainingDeclaration()) && (!z3 || !Intrinsics.areEqual(singleSource(a2), singleSource(b4)))) || DescriptorUtils.isLocal(a2) || DescriptorUtils.isLocal(b4) || !ownersEquivalent(a2, b4, new Function2<DeclarationDescriptor, DeclarationDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.DescriptorEquivalenceForOverrides$areCallableDescriptorsEquivalent$1
@Override // kotlin.jvm.functions.Function2
public final Boolean invoke(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2) {
return Boolean.FALSE;
}
}, z3)) {
return false;
}
OverridingUtil create = OverridingUtil.create(kotlinTypeRefiner, new KotlinTypeChecker.TypeConstructorEquality(z3, a2, b4) { // from class: kotlin.reflect.jvm.internal.impl.resolve.DescriptorEquivalenceForOverrides$$Lambda$0
private final boolean arg$0;
private final CallableDescriptor arg$1;
private final CallableDescriptor arg$2;
{
this.arg$0 = z3;
this.arg$1 = a2;
this.arg$2 = b4;
}
@Override // kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeChecker.TypeConstructorEquality
public boolean equals(TypeConstructor typeConstructor, TypeConstructor typeConstructor2) {
boolean areCallableDescriptorsEquivalent$lambda$0;
areCallableDescriptorsEquivalent$lambda$0 = DescriptorEquivalenceForOverrides.areCallableDescriptorsEquivalent$lambda$0(this.arg$0, this.arg$1, this.arg$2, typeConstructor, typeConstructor2);
return areCallableDescriptorsEquivalent$lambda$0;
}
});
Intrinsics.checkNotNullExpressionValue(create, "create(...)");
OverridingUtil.OverrideCompatibilityInfo.Result result = create.isOverridableBy(a2, b4, null, !z5).getResult();
OverridingUtil.OverrideCompatibilityInfo.Result result2 = OverridingUtil.OverrideCompatibilityInfo.Result.OVERRIDABLE;
return result == result2 && create.isOverridableBy(b4, a2, null, z5 ^ true).getResult() == result2;
}
public final boolean areEquivalent(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2, boolean z3, boolean z4) {
return ((declarationDescriptor instanceof ClassDescriptor) && (declarationDescriptor2 instanceof ClassDescriptor)) ? areClassesEquivalent((ClassDescriptor) declarationDescriptor, (ClassDescriptor) declarationDescriptor2) : ((declarationDescriptor instanceof TypeParameterDescriptor) && (declarationDescriptor2 instanceof TypeParameterDescriptor)) ? areTypeParametersEquivalent$default(this, (TypeParameterDescriptor) declarationDescriptor, (TypeParameterDescriptor) declarationDescriptor2, z3, null, 8, null) : ((declarationDescriptor instanceof CallableDescriptor) && (declarationDescriptor2 instanceof CallableDescriptor)) ? areCallableDescriptorsEquivalent$default(this, (CallableDescriptor) declarationDescriptor, (CallableDescriptor) declarationDescriptor2, z3, z4, false, KotlinTypeRefiner.Default.INSTANCE, 16, null) : ((declarationDescriptor instanceof PackageFragmentDescriptor) && (declarationDescriptor2 instanceof PackageFragmentDescriptor)) ? Intrinsics.areEqual(((PackageFragmentDescriptor) declarationDescriptor).getFqName(), ((PackageFragmentDescriptor) declarationDescriptor2).getFqName()) : Intrinsics.areEqual(declarationDescriptor, declarationDescriptor2);
}
@JvmOverloads
public final boolean areTypeParametersEquivalent(TypeParameterDescriptor a2, TypeParameterDescriptor b4, boolean z3) {
Intrinsics.checkNotNullParameter(a2, "a");
Intrinsics.checkNotNullParameter(b4, "b");
return areTypeParametersEquivalent$default(this, a2, b4, z3, null, 8, null);
}
@JvmOverloads
public final boolean areTypeParametersEquivalent(TypeParameterDescriptor a2, TypeParameterDescriptor b4, boolean z3, Function2<? super DeclarationDescriptor, ? super DeclarationDescriptor, Boolean> equivalentCallables) {
Intrinsics.checkNotNullParameter(a2, "a");
Intrinsics.checkNotNullParameter(b4, "b");
Intrinsics.checkNotNullParameter(equivalentCallables, "equivalentCallables");
if (Intrinsics.areEqual(a2, b4)) {
return true;
}
return !Intrinsics.areEqual(a2.getContainingDeclaration(), b4.getContainingDeclaration()) && ownersEquivalent(a2, b4, equivalentCallables, z3) && a2.getIndex() == b4.getIndex();
}
}

View File

@@ -0,0 +1,420 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import java.util.Collections;
import java.util.List;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility;
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ReceiverParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ClassConstructorDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyGetterDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertySetterDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ReceiverParameterDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.SimpleFunctionDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ValueParameterDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.name.NameUtils;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ContextClassReceiver;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ContextReceiver;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ExtensionReceiver;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeFactory;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.TypeAttributes;
import kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl;
import kotlin.reflect.jvm.internal.impl.types.Variance;
/* loaded from: classes3.dex */
public class DescriptorFactory {
/* loaded from: classes3.dex */
public static class DefaultClassConstructorDescriptor extends ClassConstructorDescriptorImpl {
private static /* synthetic */ void $$$reportNull$$$0(int i) {
Object[] objArr = new Object[3];
if (i != 1) {
objArr[0] = "containingClass";
} else {
objArr[0] = "source";
}
objArr[1] = "kotlin/reflect/jvm/internal/impl/resolve/DescriptorFactory$DefaultClassConstructorDescriptor";
objArr[2] = "<init>";
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DefaultClassConstructorDescriptor(ClassDescriptor classDescriptor, SourceElement sourceElement, boolean z3) {
super(classDescriptor, null, Annotations.Companion.getEMPTY(), true, CallableMemberDescriptor.Kind.DECLARATION, sourceElement);
if (classDescriptor == null) {
$$$reportNull$$$0(0);
}
if (sourceElement == null) {
$$$reportNull$$$0(1);
}
initialize(Collections.EMPTY_LIST, DescriptorUtils.getDefaultConstructorVisibility(classDescriptor, z3));
}
}
private static /* synthetic */ void $$$reportNull$$$0(int i) {
String str = (i == 12 || i == 23 || i == 25) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
Object[] objArr = new Object[(i == 12 || i == 23 || i == 25) ? 2 : 3];
switch (i) {
case 1:
case 4:
case 8:
case 14:
case 16:
case 18:
case 31:
case 33:
case 35:
objArr[0] = "annotations";
break;
case 2:
case 5:
case 9:
objArr[0] = "parameterAnnotations";
break;
case 3:
case 7:
case 13:
case 15:
case 17:
default:
objArr[0] = "propertyDescriptor";
break;
case 6:
case 11:
case 19:
objArr[0] = "sourceElement";
break;
case 10:
objArr[0] = "visibility";
break;
case 12:
case 23:
case 25:
objArr[0] = "kotlin/reflect/jvm/internal/impl/resolve/DescriptorFactory";
break;
case 20:
objArr[0] = "containingClass";
break;
case 21:
objArr[0] = "source";
break;
case 22:
case 24:
case 26:
objArr[0] = "enumClass";
break;
case 27:
case 28:
case 29:
objArr[0] = "descriptor";
break;
case 30:
case 32:
case 34:
objArr[0] = "owner";
break;
}
if (i == 12) {
objArr[1] = "createSetter";
} else if (i == 23) {
objArr[1] = "createEnumValuesMethod";
} else if (i != 25) {
objArr[1] = "kotlin/reflect/jvm/internal/impl/resolve/DescriptorFactory";
} else {
objArr[1] = "createEnumValueOfMethod";
}
switch (i) {
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
objArr[2] = "createSetter";
break;
case 12:
case 23:
case 25:
break;
case 13:
case 14:
objArr[2] = "createDefaultGetter";
break;
case 15:
case 16:
case 17:
case 18:
case 19:
objArr[2] = "createGetter";
break;
case 20:
case 21:
objArr[2] = "createPrimaryConstructorForObject";
break;
case 22:
objArr[2] = "createEnumValuesMethod";
break;
case 24:
objArr[2] = "createEnumValueOfMethod";
break;
case 26:
objArr[2] = "createEnumEntriesProperty";
break;
case 27:
objArr[2] = "isEnumValuesMethod";
break;
case 28:
objArr[2] = "isEnumValueOfMethod";
break;
case 29:
objArr[2] = "isEnumSpecialMethod";
break;
case 30:
case 31:
objArr[2] = "createExtensionReceiverParameterForCallable";
break;
case 32:
case 33:
objArr[2] = "createContextReceiverParameterForCallable";
break;
case 34:
case 35:
objArr[2] = "createContextReceiverParameterForClass";
break;
default:
objArr[2] = "createDefaultSetter";
break;
}
String format = String.format(str, objArr);
if (i != 12 && i != 23 && i != 25) {
throw new IllegalArgumentException(format);
}
throw new IllegalStateException(format);
}
public static ReceiverParameterDescriptor createContextReceiverParameterForCallable(CallableDescriptor callableDescriptor, KotlinType kotlinType, Name name, Annotations annotations, int i) {
if (callableDescriptor == null) {
$$$reportNull$$$0(32);
}
if (annotations == null) {
$$$reportNull$$$0(33);
}
if (kotlinType == null) {
return null;
}
return new ReceiverParameterDescriptorImpl(callableDescriptor, new ContextReceiver(callableDescriptor, kotlinType, name, null), annotations, NameUtils.contextReceiverName(i));
}
public static ReceiverParameterDescriptor createContextReceiverParameterForClass(ClassDescriptor classDescriptor, KotlinType kotlinType, Name name, Annotations annotations, int i) {
if (classDescriptor == null) {
$$$reportNull$$$0(34);
}
if (annotations == null) {
$$$reportNull$$$0(35);
}
if (kotlinType == null) {
return null;
}
return new ReceiverParameterDescriptorImpl(classDescriptor, new ContextClassReceiver(classDescriptor, kotlinType, name, null), annotations, NameUtils.contextReceiverName(i));
}
public static PropertyGetterDescriptorImpl createDefaultGetter(PropertyDescriptor propertyDescriptor, Annotations annotations) {
if (propertyDescriptor == null) {
$$$reportNull$$$0(13);
}
if (annotations == null) {
$$$reportNull$$$0(14);
}
return createGetter(propertyDescriptor, annotations, true, false, false);
}
public static PropertySetterDescriptorImpl createDefaultSetter(PropertyDescriptor propertyDescriptor, Annotations annotations, Annotations annotations2) {
if (propertyDescriptor == null) {
$$$reportNull$$$0(0);
}
if (annotations == null) {
$$$reportNull$$$0(1);
}
if (annotations2 == null) {
$$$reportNull$$$0(2);
}
return createSetter(propertyDescriptor, annotations, annotations2, true, false, false, propertyDescriptor.getSource());
}
public static PropertyDescriptor createEnumEntriesProperty(ClassDescriptor classDescriptor) {
if (classDescriptor == null) {
$$$reportNull$$$0(26);
}
ModuleDescriptor containingModule = DescriptorUtils.getContainingModule(classDescriptor);
ClassDescriptor findEnumEntriesClass = StdlibClassFinderKt.getStdlibClassFinder(containingModule).findEnumEntriesClass(containingModule);
if (findEnumEntriesClass == null) {
return null;
}
Annotations.Companion companion = Annotations.Companion;
Annotations empty = companion.getEMPTY();
Modality modality = Modality.FINAL;
DescriptorVisibility descriptorVisibility = DescriptorVisibilities.PUBLIC;
Name name = StandardNames.ENUM_ENTRIES;
CallableMemberDescriptor.Kind kind = CallableMemberDescriptor.Kind.SYNTHESIZED;
PropertyDescriptorImpl create = PropertyDescriptorImpl.create(classDescriptor, empty, modality, descriptorVisibility, false, name, kind, classDescriptor.getSource(), false, false, false, false, false, false);
PropertyGetterDescriptorImpl propertyGetterDescriptorImpl = new PropertyGetterDescriptorImpl(create, companion.getEMPTY(), modality, descriptorVisibility, false, false, false, kind, null, classDescriptor.getSource());
create.initialize(propertyGetterDescriptorImpl, null);
SimpleType simpleType = KotlinTypeFactory.simpleType(TypeAttributes.Companion.getEmpty(), findEnumEntriesClass.getTypeConstructor(), Collections.singletonList(new TypeProjectionImpl(classDescriptor.getDefaultType())), false);
List<? extends TypeParameterDescriptor> list = Collections.EMPTY_LIST;
create.setType(simpleType, list, null, null, list);
propertyGetterDescriptorImpl.initialize(create.getReturnType());
return create;
}
public static SimpleFunctionDescriptor createEnumValueOfMethod(ClassDescriptor classDescriptor) {
if (classDescriptor == null) {
$$$reportNull$$$0(24);
}
Annotations.Companion companion = Annotations.Companion;
SimpleFunctionDescriptorImpl create = SimpleFunctionDescriptorImpl.create(classDescriptor, companion.getEMPTY(), StandardNames.ENUM_VALUE_OF, CallableMemberDescriptor.Kind.SYNTHESIZED, classDescriptor.getSource());
ValueParameterDescriptorImpl valueParameterDescriptorImpl = new ValueParameterDescriptorImpl(create, null, 0, companion.getEMPTY(), Name.identifier("value"), DescriptorUtilsKt.getBuiltIns(classDescriptor).getStringType(), false, false, false, null, classDescriptor.getSource());
List<ReceiverParameterDescriptor> list = Collections.EMPTY_LIST;
SimpleFunctionDescriptorImpl initialize = create.initialize((ReceiverParameterDescriptor) null, (ReceiverParameterDescriptor) null, list, (List<? extends TypeParameterDescriptor>) list, Collections.singletonList(valueParameterDescriptorImpl), (KotlinType) classDescriptor.getDefaultType(), Modality.FINAL, DescriptorVisibilities.PUBLIC);
if (initialize == null) {
$$$reportNull$$$0(25);
}
return initialize;
}
public static SimpleFunctionDescriptor createEnumValuesMethod(ClassDescriptor classDescriptor) {
if (classDescriptor == null) {
$$$reportNull$$$0(22);
}
SimpleFunctionDescriptorImpl create = SimpleFunctionDescriptorImpl.create(classDescriptor, Annotations.Companion.getEMPTY(), StandardNames.ENUM_VALUES, CallableMemberDescriptor.Kind.SYNTHESIZED, classDescriptor.getSource());
List<ReceiverParameterDescriptor> list = Collections.EMPTY_LIST;
SimpleFunctionDescriptorImpl initialize = create.initialize((ReceiverParameterDescriptor) null, (ReceiverParameterDescriptor) null, list, (List<? extends TypeParameterDescriptor>) list, (List<ValueParameterDescriptor>) list, (KotlinType) DescriptorUtilsKt.getBuiltIns(classDescriptor).getArrayType(Variance.INVARIANT, classDescriptor.getDefaultType()), Modality.FINAL, DescriptorVisibilities.PUBLIC);
if (initialize == null) {
$$$reportNull$$$0(23);
}
return initialize;
}
public static ReceiverParameterDescriptor createExtensionReceiverParameterForCallable(CallableDescriptor callableDescriptor, KotlinType kotlinType, Annotations annotations) {
if (callableDescriptor == null) {
$$$reportNull$$$0(30);
}
if (annotations == null) {
$$$reportNull$$$0(31);
}
if (kotlinType == null) {
return null;
}
return new ReceiverParameterDescriptorImpl(callableDescriptor, new ExtensionReceiver(callableDescriptor, kotlinType, null), annotations);
}
public static PropertyGetterDescriptorImpl createGetter(PropertyDescriptor propertyDescriptor, Annotations annotations, boolean z3, boolean z4, boolean z5) {
if (propertyDescriptor == null) {
$$$reportNull$$$0(15);
}
if (annotations == null) {
$$$reportNull$$$0(16);
}
return createGetter(propertyDescriptor, annotations, z3, z4, z5, propertyDescriptor.getSource());
}
public static ClassConstructorDescriptorImpl createPrimaryConstructorForObject(ClassDescriptor classDescriptor, SourceElement sourceElement) {
if (classDescriptor == null) {
$$$reportNull$$$0(20);
}
if (sourceElement == null) {
$$$reportNull$$$0(21);
}
return new DefaultClassConstructorDescriptor(classDescriptor, sourceElement, false);
}
public static PropertySetterDescriptorImpl createSetter(PropertyDescriptor propertyDescriptor, Annotations annotations, Annotations annotations2, boolean z3, boolean z4, boolean z5, SourceElement sourceElement) {
if (propertyDescriptor == null) {
$$$reportNull$$$0(3);
}
if (annotations == null) {
$$$reportNull$$$0(4);
}
if (annotations2 == null) {
$$$reportNull$$$0(5);
}
if (sourceElement == null) {
$$$reportNull$$$0(6);
}
return createSetter(propertyDescriptor, annotations, annotations2, z3, z4, z5, propertyDescriptor.getVisibility(), sourceElement);
}
private static boolean isEnumSpecialMethod(FunctionDescriptor functionDescriptor) {
if (functionDescriptor == null) {
$$$reportNull$$$0(29);
}
return functionDescriptor.getKind() == CallableMemberDescriptor.Kind.SYNTHESIZED && DescriptorUtils.isEnumClass(functionDescriptor.getContainingDeclaration());
}
public static boolean isEnumValueOfMethod(FunctionDescriptor functionDescriptor) {
if (functionDescriptor == null) {
$$$reportNull$$$0(28);
}
return functionDescriptor.getName().equals(StandardNames.ENUM_VALUE_OF) && isEnumSpecialMethod(functionDescriptor);
}
public static boolean isEnumValuesMethod(FunctionDescriptor functionDescriptor) {
if (functionDescriptor == null) {
$$$reportNull$$$0(27);
}
return functionDescriptor.getName().equals(StandardNames.ENUM_VALUES) && isEnumSpecialMethod(functionDescriptor);
}
public static PropertyGetterDescriptorImpl createGetter(PropertyDescriptor propertyDescriptor, Annotations annotations, boolean z3, boolean z4, boolean z5, SourceElement sourceElement) {
if (propertyDescriptor == null) {
$$$reportNull$$$0(17);
}
if (annotations == null) {
$$$reportNull$$$0(18);
}
if (sourceElement == null) {
$$$reportNull$$$0(19);
}
return new PropertyGetterDescriptorImpl(propertyDescriptor, annotations, propertyDescriptor.getModality(), propertyDescriptor.getVisibility(), z3, z4, z5, CallableMemberDescriptor.Kind.DECLARATION, null, sourceElement);
}
public static PropertySetterDescriptorImpl createSetter(PropertyDescriptor propertyDescriptor, Annotations annotations, Annotations annotations2, boolean z3, boolean z4, boolean z5, DescriptorVisibility descriptorVisibility, SourceElement sourceElement) {
if (propertyDescriptor == null) {
$$$reportNull$$$0(7);
}
if (annotations == null) {
$$$reportNull$$$0(8);
}
if (annotations2 == null) {
$$$reportNull$$$0(9);
}
if (descriptorVisibility == null) {
$$$reportNull$$$0(10);
}
if (sourceElement == null) {
$$$reportNull$$$0(11);
}
PropertySetterDescriptorImpl propertySetterDescriptorImpl = new PropertySetterDescriptorImpl(propertyDescriptor, annotations, propertyDescriptor.getModality(), descriptorVisibility, z3, z4, z5, CallableMemberDescriptor.Kind.DECLARATION, null, sourceElement);
propertySetterDescriptorImpl.initialize(PropertySetterDescriptorImpl.createSetterParameter(propertySetterDescriptorImpl, propertyDescriptor.getType(), annotations2));
return propertySetterDescriptorImpl;
}
}

View File

@@ -0,0 +1,27 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
/* loaded from: classes3.dex */
public interface ExternalOverridabilityCondition {
/* loaded from: classes3.dex */
public enum Contract {
CONFLICTS_ONLY,
SUCCESS_ONLY,
BOTH
}
/* loaded from: classes3.dex */
public enum Result {
OVERRIDABLE,
CONFLICT,
INCOMPATIBLE,
UNKNOWN
}
Contract getContract();
Result isOverridable(CallableDescriptor callableDescriptor, CallableDescriptor callableDescriptor2, ClassDescriptor classDescriptor);
}

View File

@@ -0,0 +1,138 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.InlineClassRepresentation;
import kotlin.reflect.jvm.internal.impl.descriptors.MultiFieldValueClassRepresentation;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyGetterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueClassRepresentation;
import kotlin.reflect.jvm.internal.impl.descriptors.VariableDescriptor;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
import kotlin.reflect.jvm.internal.impl.types.Variance;
import kotlin.reflect.jvm.internal.impl.types.checker.SimpleClassicTypeSystemContext;
@SourceDebugExtension({"SMAP\ninlineClassesUtils.kt\nKotlin\n*S Kotlin\n*F\n+ 1 inlineClassesUtils.kt\norg/jetbrains/kotlin/resolve/InlineClassesUtilsKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,100:1\n1549#2:101\n1620#2,3:102\n1549#2:106\n1620#2,3:107\n1747#2,3:110\n1#3:105\n*S KotlinDebug\n*F\n+ 1 inlineClassesUtils.kt\norg/jetbrains/kotlin/resolve/InlineClassesUtilsKt\n*L\n39#1:101\n39#1:102,3\n56#1:106\n56#1:107,3\n67#1:110,3\n*E\n"})
/* loaded from: classes3.dex */
public final class InlineClassesUtilsKt {
private static final ClassId JVM_INLINE_ANNOTATION_CLASS_ID;
private static final FqName JVM_INLINE_ANNOTATION_FQ_NAME;
static {
FqName fqName = new FqName("kotlin.jvm.JvmInline");
JVM_INLINE_ANNOTATION_FQ_NAME = fqName;
ClassId classId = ClassId.topLevel(fqName);
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
JVM_INLINE_ANNOTATION_CLASS_ID = classId;
}
public static final boolean isGetterOfUnderlyingPropertyOfValueClass(CallableDescriptor callableDescriptor) {
Intrinsics.checkNotNullParameter(callableDescriptor, "<this>");
if (!(callableDescriptor instanceof PropertyGetterDescriptor)) {
return false;
}
PropertyDescriptor correspondingProperty = ((PropertyGetterDescriptor) callableDescriptor).getCorrespondingProperty();
Intrinsics.checkNotNullExpressionValue(correspondingProperty, "getCorrespondingProperty(...)");
return isUnderlyingPropertyOfValueClass(correspondingProperty);
}
public static final boolean isInlineClass(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
return (declarationDescriptor instanceof ClassDescriptor) && (((ClassDescriptor) declarationDescriptor).getValueClassRepresentation() instanceof InlineClassRepresentation);
}
public static final boolean isInlineClassType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
if (mo1394getDeclarationDescriptor != null) {
return isInlineClass(mo1394getDeclarationDescriptor);
}
return false;
}
public static final boolean isMultiFieldValueClass(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
return (declarationDescriptor instanceof ClassDescriptor) && (((ClassDescriptor) declarationDescriptor).getValueClassRepresentation() instanceof MultiFieldValueClassRepresentation);
}
public static final boolean isUnderlyingPropertyOfInlineClass(VariableDescriptor variableDescriptor) {
InlineClassRepresentation<SimpleType> inlineClassRepresentation;
Intrinsics.checkNotNullParameter(variableDescriptor, "<this>");
if (variableDescriptor.getExtensionReceiverParameter() != null) {
return false;
}
DeclarationDescriptor containingDeclaration = variableDescriptor.getContainingDeclaration();
Name name = null;
ClassDescriptor classDescriptor = containingDeclaration instanceof ClassDescriptor ? (ClassDescriptor) containingDeclaration : null;
if (classDescriptor != null && (inlineClassRepresentation = DescriptorUtilsKt.getInlineClassRepresentation(classDescriptor)) != null) {
name = inlineClassRepresentation.getUnderlyingPropertyName();
}
return Intrinsics.areEqual(name, variableDescriptor.getName());
}
public static final boolean isUnderlyingPropertyOfValueClass(VariableDescriptor variableDescriptor) {
ValueClassRepresentation<SimpleType> valueClassRepresentation;
Intrinsics.checkNotNullParameter(variableDescriptor, "<this>");
if (variableDescriptor.getExtensionReceiverParameter() != null) {
return false;
}
DeclarationDescriptor containingDeclaration = variableDescriptor.getContainingDeclaration();
ClassDescriptor classDescriptor = containingDeclaration instanceof ClassDescriptor ? (ClassDescriptor) containingDeclaration : null;
if (classDescriptor == null || (valueClassRepresentation = classDescriptor.getValueClassRepresentation()) == null) {
return false;
}
Name name = variableDescriptor.getName();
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
return valueClassRepresentation.containsPropertyWithName(name);
}
public static final boolean isValueClass(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
return isInlineClass(declarationDescriptor) || isMultiFieldValueClass(declarationDescriptor);
}
public static final boolean isValueClassType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
if (mo1394getDeclarationDescriptor != null) {
return isValueClass(mo1394getDeclarationDescriptor);
}
return false;
}
public static final boolean needsMfvcFlattening(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
return (mo1394getDeclarationDescriptor == null || !isMultiFieldValueClass(mo1394getDeclarationDescriptor) || SimpleClassicTypeSystemContext.INSTANCE.isNullableType(kotlinType)) ? false : true;
}
public static final KotlinType substitutedUnderlyingType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
KotlinType unsubstitutedUnderlyingType = unsubstitutedUnderlyingType(kotlinType);
if (unsubstitutedUnderlyingType != null) {
return TypeSubstitutor.create(kotlinType).substitute(unsubstitutedUnderlyingType, Variance.INVARIANT);
}
return null;
}
public static final KotlinType unsubstitutedUnderlyingType(KotlinType kotlinType) {
InlineClassRepresentation<SimpleType> inlineClassRepresentation;
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
ClassDescriptor classDescriptor = mo1394getDeclarationDescriptor instanceof ClassDescriptor ? (ClassDescriptor) mo1394getDeclarationDescriptor : null;
if (classDescriptor == null || (inlineClassRepresentation = DescriptorUtilsKt.getInlineClassRepresentation(classDescriptor)) == null) {
return null;
}
return inlineClassRepresentation.getUnderlyingType();
}
}

View File

@@ -0,0 +1,174 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import java.util.Comparator;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ConstructorDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ReceiverParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeAliasDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.renderer.AnnotationArgumentsRenderingPolicy;
import kotlin.reflect.jvm.internal.impl.renderer.DescriptorRenderer;
import kotlin.reflect.jvm.internal.impl.renderer.DescriptorRendererModifier;
import kotlin.reflect.jvm.internal.impl.renderer.DescriptorRendererOptions;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public class MemberComparator implements Comparator<DeclarationDescriptor> {
static final /* synthetic */ boolean $assertionsDisabled = false;
public static final MemberComparator INSTANCE = new MemberComparator();
private static final DescriptorRenderer RENDERER = DescriptorRenderer.Companion.withOptions(new Function1<DescriptorRendererOptions, Unit>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.MemberComparator.1
@Override // kotlin.jvm.functions.Function1
public Unit invoke(DescriptorRendererOptions descriptorRendererOptions) {
descriptorRendererOptions.setWithDefinedIn(false);
descriptorRendererOptions.setVerbose(true);
descriptorRendererOptions.setAnnotationArgumentsRenderingPolicy(AnnotationArgumentsRenderingPolicy.UNLESS_EMPTY);
descriptorRendererOptions.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE;
}
});
/* loaded from: classes3.dex */
public static class NameAndTypeMemberComparator implements Comparator<DeclarationDescriptor> {
public static final NameAndTypeMemberComparator INSTANCE = new NameAndTypeMemberComparator();
private NameAndTypeMemberComparator() {
}
/* JADX INFO: Access modifiers changed from: private */
public static Integer compareInternal(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2) {
int declarationPriority = getDeclarationPriority(declarationDescriptor2) - getDeclarationPriority(declarationDescriptor);
if (declarationPriority != 0) {
return Integer.valueOf(declarationPriority);
}
if (DescriptorUtils.isEnumEntry(declarationDescriptor) && DescriptorUtils.isEnumEntry(declarationDescriptor2)) {
return 0;
}
int compareTo = declarationDescriptor.getName().compareTo(declarationDescriptor2.getName());
if (compareTo != 0) {
return Integer.valueOf(compareTo);
}
return null;
}
private static int getDeclarationPriority(DeclarationDescriptor declarationDescriptor) {
if (DescriptorUtils.isEnumEntry(declarationDescriptor)) {
return 8;
}
if (declarationDescriptor instanceof ConstructorDescriptor) {
return 7;
}
if (declarationDescriptor instanceof PropertyDescriptor) {
return ((PropertyDescriptor) declarationDescriptor).getExtensionReceiverParameter() == null ? 6 : 5;
}
if (declarationDescriptor instanceof FunctionDescriptor) {
return ((FunctionDescriptor) declarationDescriptor).getExtensionReceiverParameter() == null ? 4 : 3;
}
if (declarationDescriptor instanceof ClassDescriptor) {
return 2;
}
return declarationDescriptor instanceof TypeAliasDescriptor ? 1 : 0;
}
@Override // java.util.Comparator
public int compare(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2) {
Integer compareInternal = compareInternal(declarationDescriptor, declarationDescriptor2);
if (compareInternal != null) {
return compareInternal.intValue();
}
return 0;
}
}
private MemberComparator() {
}
@Override // java.util.Comparator
public int compare(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2) {
Integer compareInternal = NameAndTypeMemberComparator.compareInternal(declarationDescriptor, declarationDescriptor2);
if (compareInternal != null) {
return compareInternal.intValue();
}
if ((declarationDescriptor instanceof TypeAliasDescriptor) && (declarationDescriptor2 instanceof TypeAliasDescriptor)) {
DescriptorRenderer descriptorRenderer = RENDERER;
int compareTo = descriptorRenderer.renderType(((TypeAliasDescriptor) declarationDescriptor).getUnderlyingType()).compareTo(descriptorRenderer.renderType(((TypeAliasDescriptor) declarationDescriptor2).getUnderlyingType()));
if (compareTo != 0) {
return compareTo;
}
} else if ((declarationDescriptor instanceof CallableDescriptor) && (declarationDescriptor2 instanceof CallableDescriptor)) {
CallableDescriptor callableDescriptor = (CallableDescriptor) declarationDescriptor;
CallableDescriptor callableDescriptor2 = (CallableDescriptor) declarationDescriptor2;
ReceiverParameterDescriptor extensionReceiverParameter = callableDescriptor.getExtensionReceiverParameter();
ReceiverParameterDescriptor extensionReceiverParameter2 = callableDescriptor2.getExtensionReceiverParameter();
if (extensionReceiverParameter != null) {
DescriptorRenderer descriptorRenderer2 = RENDERER;
int compareTo2 = descriptorRenderer2.renderType(extensionReceiverParameter.getType()).compareTo(descriptorRenderer2.renderType(extensionReceiverParameter2.getType()));
if (compareTo2 != 0) {
return compareTo2;
}
}
List<ValueParameterDescriptor> valueParameters = callableDescriptor.getValueParameters();
List<ValueParameterDescriptor> valueParameters2 = callableDescriptor2.getValueParameters();
for (int i = 0; i < Math.min(valueParameters.size(), valueParameters2.size()); i++) {
DescriptorRenderer descriptorRenderer3 = RENDERER;
int compareTo3 = descriptorRenderer3.renderType(valueParameters.get(i).getType()).compareTo(descriptorRenderer3.renderType(valueParameters2.get(i).getType()));
if (compareTo3 != 0) {
return compareTo3;
}
}
int size = valueParameters.size() - valueParameters2.size();
if (size != 0) {
return size;
}
List<TypeParameterDescriptor> typeParameters = callableDescriptor.getTypeParameters();
List<TypeParameterDescriptor> typeParameters2 = callableDescriptor2.getTypeParameters();
for (int i4 = 0; i4 < Math.min(typeParameters.size(), typeParameters2.size()); i4++) {
List<KotlinType> upperBounds = typeParameters.get(i4).getUpperBounds();
List<KotlinType> upperBounds2 = typeParameters2.get(i4).getUpperBounds();
int size2 = upperBounds.size() - upperBounds2.size();
if (size2 != 0) {
return size2;
}
for (int i5 = 0; i5 < upperBounds.size(); i5++) {
DescriptorRenderer descriptorRenderer4 = RENDERER;
int compareTo4 = descriptorRenderer4.renderType(upperBounds.get(i5)).compareTo(descriptorRenderer4.renderType(upperBounds2.get(i5)));
if (compareTo4 != 0) {
return compareTo4;
}
}
}
int size3 = typeParameters.size() - typeParameters2.size();
if (size3 != 0) {
return size3;
}
if ((callableDescriptor instanceof CallableMemberDescriptor) && (callableDescriptor2 instanceof CallableMemberDescriptor)) {
int ordinal = ((CallableMemberDescriptor) callableDescriptor).getKind().ordinal() - ((CallableMemberDescriptor) callableDescriptor2).getKind().ordinal();
if (ordinal != 0) {
return ordinal;
}
}
} else if ((declarationDescriptor instanceof ClassDescriptor) && (declarationDescriptor2 instanceof ClassDescriptor)) {
ClassDescriptor classDescriptor = (ClassDescriptor) declarationDescriptor;
ClassDescriptor classDescriptor2 = (ClassDescriptor) declarationDescriptor2;
if (classDescriptor.getKind().ordinal() != classDescriptor2.getKind().ordinal()) {
return classDescriptor.getKind().ordinal() - classDescriptor2.getKind().ordinal();
}
if (classDescriptor.isCompanionObject() != classDescriptor2.isCompanionObject()) {
return classDescriptor.isCompanionObject() ? 1 : -1;
}
} else {
throw new AssertionError(String.format("Unsupported pair of descriptors:\n'%s' Class: %s\n%s' Class: %s", declarationDescriptor, declarationDescriptor.getClass(), declarationDescriptor2, declarationDescriptor2.getClass()));
}
DescriptorRenderer descriptorRenderer5 = RENDERER;
int compareTo5 = descriptorRenderer5.render(declarationDescriptor).compareTo(descriptorRenderer5.render(declarationDescriptor2));
return compareTo5 != 0 ? compareTo5 : DescriptorUtils.getContainingModule(declarationDescriptor).getName().compareTo(DescriptorUtils.getContainingModule(declarationDescriptor2).getName());
}
}

View File

@@ -0,0 +1,23 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
/* loaded from: classes3.dex */
public abstract class NonReportingOverrideStrategy extends OverridingStrategy {
public abstract void conflict(CallableMemberDescriptor callableMemberDescriptor, CallableMemberDescriptor callableMemberDescriptor2);
@Override // kotlin.reflect.jvm.internal.impl.resolve.OverridingStrategy
public void inheritanceConflict(CallableMemberDescriptor first, CallableMemberDescriptor second) {
Intrinsics.checkNotNullParameter(first, "first");
Intrinsics.checkNotNullParameter(second, "second");
conflict(first, second);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.OverridingStrategy
public void overrideConflict(CallableMemberDescriptor fromSuper, CallableMemberDescriptor fromCurrent) {
Intrinsics.checkNotNullParameter(fromSuper, "fromSuper");
Intrinsics.checkNotNullParameter(fromCurrent, "fromCurrent");
conflict(fromSuper, fromCurrent);
}
}

View File

@@ -0,0 +1,20 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import java.util.Collection;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
/* loaded from: classes3.dex */
public abstract class OverridingStrategy {
public abstract void addFakeOverride(CallableMemberDescriptor callableMemberDescriptor);
public abstract void inheritanceConflict(CallableMemberDescriptor callableMemberDescriptor, CallableMemberDescriptor callableMemberDescriptor2);
public abstract void overrideConflict(CallableMemberDescriptor callableMemberDescriptor, CallableMemberDescriptor callableMemberDescriptor2);
public void setOverriddenDescriptors(CallableMemberDescriptor member, Collection<? extends CallableMemberDescriptor> overridden) {
Intrinsics.checkNotNullParameter(member, "member");
Intrinsics.checkNotNullParameter(overridden, "overridden");
member.setOverriddenDescriptors(overridden);
}
}

View File

@@ -0,0 +1,586 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.reflect.jvm.internal.impl.builtins.PrimitiveType;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.name.FqNameUnsafe;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.TypeCheckerState;
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
import kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeCheckerStateKt;
import kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeSystemContext;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeChecker;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypePreparator;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
import kotlin.reflect.jvm.internal.impl.types.model.ArgumentList;
import kotlin.reflect.jvm.internal.impl.types.model.CaptureStatus;
import kotlin.reflect.jvm.internal.impl.types.model.CapturedTypeConstructorMarker;
import kotlin.reflect.jvm.internal.impl.types.model.CapturedTypeMarker;
import kotlin.reflect.jvm.internal.impl.types.model.DefinitelyNotNullTypeMarker;
import kotlin.reflect.jvm.internal.impl.types.model.DynamicTypeMarker;
import kotlin.reflect.jvm.internal.impl.types.model.FlexibleTypeMarker;
import kotlin.reflect.jvm.internal.impl.types.model.KotlinTypeMarker;
import kotlin.reflect.jvm.internal.impl.types.model.SimpleTypeMarker;
import kotlin.reflect.jvm.internal.impl.types.model.TypeArgumentListMarker;
import kotlin.reflect.jvm.internal.impl.types.model.TypeArgumentMarker;
import kotlin.reflect.jvm.internal.impl.types.model.TypeConstructorMarker;
import kotlin.reflect.jvm.internal.impl.types.model.TypeParameterMarker;
import kotlin.reflect.jvm.internal.impl.types.model.TypeVariableTypeConstructorMarker;
import kotlin.reflect.jvm.internal.impl.types.model.TypeVariance;
/* loaded from: classes3.dex */
public final class OverridingUtilTypeSystemContext implements ClassicTypeSystemContext {
private final Function2<KotlinType, KotlinType, Boolean> customSubtype;
private final KotlinTypeChecker.TypeConstructorEquality equalityAxioms;
private final KotlinTypePreparator kotlinTypePreparator;
private final KotlinTypeRefiner kotlinTypeRefiner;
private final Map<TypeConstructor, TypeConstructor> matchingTypeConstructors;
/* JADX WARN: Multi-variable type inference failed */
public OverridingUtilTypeSystemContext(Map<TypeConstructor, ? extends TypeConstructor> map, KotlinTypeChecker.TypeConstructorEquality equalityAxioms, KotlinTypeRefiner kotlinTypeRefiner, KotlinTypePreparator kotlinTypePreparator, Function2<? super KotlinType, ? super KotlinType, Boolean> function2) {
Intrinsics.checkNotNullParameter(equalityAxioms, "equalityAxioms");
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
Intrinsics.checkNotNullParameter(kotlinTypePreparator, "kotlinTypePreparator");
this.matchingTypeConstructors = map;
this.equalityAxioms = equalityAxioms;
this.kotlinTypeRefiner = kotlinTypeRefiner;
this.kotlinTypePreparator = kotlinTypePreparator;
this.customSubtype = function2;
}
private final boolean areEqualTypeConstructorsByAxioms(TypeConstructor typeConstructor, TypeConstructor typeConstructor2) {
if (this.equalityAxioms.equals(typeConstructor, typeConstructor2)) {
return true;
}
Map<TypeConstructor, TypeConstructor> map = this.matchingTypeConstructors;
if (map == null) {
return false;
}
TypeConstructor typeConstructor3 = map.get(typeConstructor);
TypeConstructor typeConstructor4 = this.matchingTypeConstructors.get(typeConstructor2);
return (typeConstructor3 != null && Intrinsics.areEqual(typeConstructor3, typeConstructor2)) || (typeConstructor4 != null && Intrinsics.areEqual(typeConstructor4, typeConstructor));
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean areEqualTypeConstructors(TypeConstructorMarker c12, TypeConstructorMarker c22) {
Intrinsics.checkNotNullParameter(c12, "c1");
Intrinsics.checkNotNullParameter(c22, "c2");
if (!(c12 instanceof TypeConstructor)) {
throw new IllegalArgumentException("Failed requirement.");
}
if (c22 instanceof TypeConstructor) {
return ClassicTypeSystemContext.DefaultImpls.areEqualTypeConstructors(this, c12, c22) || areEqualTypeConstructorsByAxioms((TypeConstructor) c12, (TypeConstructor) c22);
}
throw new IllegalArgumentException("Failed requirement.");
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public int argumentsCount(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.argumentsCount(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeArgumentListMarker asArgumentList(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.asArgumentList(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeSystemContext, kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public CapturedTypeMarker asCapturedType(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.asCapturedType(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public DefinitelyNotNullTypeMarker asDefinitelyNotNullType(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.asDefinitelyNotNullType(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public DynamicTypeMarker asDynamicType(FlexibleTypeMarker flexibleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.asDynamicType(this, flexibleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public FlexibleTypeMarker asFlexibleType(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.asFlexibleType(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeSystemContext, kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public SimpleTypeMarker asSimpleType(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.asSimpleType(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeArgumentMarker asTypeArgument(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.asTypeArgument(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public SimpleTypeMarker captureFromArguments(SimpleTypeMarker simpleTypeMarker, CaptureStatus captureStatus) {
return ClassicTypeSystemContext.DefaultImpls.captureFromArguments(this, simpleTypeMarker, captureStatus);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public CaptureStatus captureStatus(CapturedTypeMarker capturedTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.captureStatus(this, capturedTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeSystemContext
public KotlinTypeMarker createFlexibleType(SimpleTypeMarker simpleTypeMarker, SimpleTypeMarker simpleTypeMarker2) {
return ClassicTypeSystemContext.DefaultImpls.createFlexibleType(this, simpleTypeMarker, simpleTypeMarker2);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public List<SimpleTypeMarker> fastCorrespondingSupertypes(SimpleTypeMarker simpleTypeMarker, TypeConstructorMarker constructor) {
Intrinsics.checkNotNullParameter(simpleTypeMarker, "<this>");
Intrinsics.checkNotNullParameter(constructor, "constructor");
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeArgumentMarker get(TypeArgumentListMarker typeArgumentListMarker, int i) {
Intrinsics.checkNotNullParameter(typeArgumentListMarker, "<this>");
if (typeArgumentListMarker instanceof SimpleTypeMarker) {
return getArgument((KotlinTypeMarker) typeArgumentListMarker, i);
}
if (typeArgumentListMarker instanceof ArgumentList) {
TypeArgumentMarker typeArgumentMarker = ((ArgumentList) typeArgumentListMarker).get(i);
Intrinsics.checkNotNullExpressionValue(typeArgumentMarker, "get(...)");
return typeArgumentMarker;
}
throw new IllegalStateException(("unknown type argument list type: " + typeArgumentListMarker + ", " + Reflection.getOrCreateKotlinClass(typeArgumentListMarker.getClass())).toString());
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeArgumentMarker getArgument(KotlinTypeMarker kotlinTypeMarker, int i) {
return ClassicTypeSystemContext.DefaultImpls.getArgument(this, kotlinTypeMarker, i);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeArgumentMarker getArgumentOrNull(SimpleTypeMarker simpleTypeMarker, int i) {
Intrinsics.checkNotNullParameter(simpleTypeMarker, "<this>");
if (i < 0 || i >= argumentsCount(simpleTypeMarker)) {
return null;
}
return getArgument(simpleTypeMarker, i);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public List<TypeArgumentMarker> getArguments(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.getArguments(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSystemCommonBackendContext
public FqNameUnsafe getClassFqNameUnsafe(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.getClassFqNameUnsafe(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeParameterMarker getParameter(TypeConstructorMarker typeConstructorMarker, int i) {
return ClassicTypeSystemContext.DefaultImpls.getParameter(this, typeConstructorMarker, i);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public List<TypeParameterMarker> getParameters(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.getParameters(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSystemCommonBackendContext
public PrimitiveType getPrimitiveArrayType(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.getPrimitiveArrayType(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSystemCommonBackendContext
public PrimitiveType getPrimitiveType(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.getPrimitiveType(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSystemCommonBackendContext
public KotlinTypeMarker getRepresentativeUpperBound(TypeParameterMarker typeParameterMarker) {
return ClassicTypeSystemContext.DefaultImpls.getRepresentativeUpperBound(this, typeParameterMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public KotlinTypeMarker getType(TypeArgumentMarker typeArgumentMarker) {
return ClassicTypeSystemContext.DefaultImpls.getType(this, typeArgumentMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeParameterMarker getTypeParameter(TypeVariableTypeConstructorMarker typeVariableTypeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.getTypeParameter(this, typeVariableTypeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeParameterMarker getTypeParameterClassifier(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.getTypeParameterClassifier(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSystemCommonBackendContext
public KotlinTypeMarker getUnsubstitutedUnderlyingType(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.getUnsubstitutedUnderlyingType(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public List<KotlinTypeMarker> getUpperBounds(TypeParameterMarker typeParameterMarker) {
return ClassicTypeSystemContext.DefaultImpls.getUpperBounds(this, typeParameterMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeVariance getVariance(TypeArgumentMarker typeArgumentMarker) {
return ClassicTypeSystemContext.DefaultImpls.getVariance(this, typeArgumentMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSystemCommonBackendContext
public boolean hasAnnotation(KotlinTypeMarker kotlinTypeMarker, FqName fqName) {
return ClassicTypeSystemContext.DefaultImpls.hasAnnotation(this, kotlinTypeMarker, fqName);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean hasFlexibleNullability(KotlinTypeMarker kotlinTypeMarker) {
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
return isMarkedNullable(lowerBoundIfFlexible(kotlinTypeMarker)) != isMarkedNullable(upperBoundIfFlexible(kotlinTypeMarker));
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean hasRecursiveBounds(TypeParameterMarker typeParameterMarker, TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.hasRecursiveBounds(this, typeParameterMarker, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemOptimizationContext
public boolean identicalArguments(SimpleTypeMarker simpleTypeMarker, SimpleTypeMarker simpleTypeMarker2) {
return ClassicTypeSystemContext.DefaultImpls.identicalArguments(this, simpleTypeMarker, simpleTypeMarker2);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public KotlinTypeMarker intersectTypes(List<? extends KotlinTypeMarker> list) {
return ClassicTypeSystemContext.DefaultImpls.intersectTypes(this, list);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isAnyConstructor(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.isAnyConstructor(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isCapturedType(KotlinTypeMarker kotlinTypeMarker) {
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
SimpleTypeMarker asSimpleType = asSimpleType(kotlinTypeMarker);
return (asSimpleType != null ? asCapturedType(asSimpleType) : null) != null;
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isClassType(SimpleTypeMarker simpleTypeMarker) {
Intrinsics.checkNotNullParameter(simpleTypeMarker, "<this>");
return isClassTypeConstructor(typeConstructor(simpleTypeMarker));
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isClassTypeConstructor(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.isClassTypeConstructor(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isCommonFinalClassConstructor(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.isCommonFinalClassConstructor(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isDefinitelyNotNullType(KotlinTypeMarker kotlinTypeMarker) {
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
SimpleTypeMarker asSimpleType = asSimpleType(kotlinTypeMarker);
return (asSimpleType != null ? asDefinitelyNotNullType(asSimpleType) : null) != null;
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isDenotable(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.isDenotable(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isDynamic(KotlinTypeMarker kotlinTypeMarker) {
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
FlexibleTypeMarker asFlexibleType = asFlexibleType(kotlinTypeMarker);
return (asFlexibleType != null ? asDynamicType(asFlexibleType) : null) != null;
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isError(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isError(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSystemCommonBackendContext
public boolean isInlineClass(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.isInlineClass(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isIntegerLiteralType(SimpleTypeMarker simpleTypeMarker) {
Intrinsics.checkNotNullParameter(simpleTypeMarker, "<this>");
return isIntegerLiteralTypeConstructor(typeConstructor(simpleTypeMarker));
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isIntegerLiteralTypeConstructor(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.isIntegerLiteralTypeConstructor(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isIntersection(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.isIntersection(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isMarkedNullable(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isMarkedNullable(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isNotNullTypeParameter(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isNotNullTypeParameter(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isNothing(KotlinTypeMarker kotlinTypeMarker) {
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
return isNothingConstructor(typeConstructor(kotlinTypeMarker)) && !isNullableType(kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isNothingConstructor(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.isNothingConstructor(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isNullableType(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isNullableType(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isOldCapturedType(CapturedTypeMarker capturedTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isOldCapturedType(this, capturedTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isPrimitiveType(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isPrimitiveType(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isProjectionNotNull(CapturedTypeMarker capturedTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isProjectionNotNull(this, capturedTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isRawType(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isRawType(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeSystemContext, kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isSingleClassifierType(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isSingleClassifierType(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isStarProjection(TypeArgumentMarker typeArgumentMarker) {
return ClassicTypeSystemContext.DefaultImpls.isStarProjection(this, typeArgumentMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isStubType(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isStubType(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isStubTypeForBuilderInference(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isStubTypeForBuilderInference(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isTypeVariableType(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.isTypeVariableType(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSystemCommonBackendContext
public boolean isUnderKotlinPackage(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.isUnderKotlinPackage(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeSystemContext, kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public SimpleTypeMarker lowerBound(FlexibleTypeMarker flexibleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.lowerBound(this, flexibleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public SimpleTypeMarker lowerBoundIfFlexible(KotlinTypeMarker kotlinTypeMarker) {
SimpleTypeMarker lowerBound;
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
FlexibleTypeMarker asFlexibleType = asFlexibleType(kotlinTypeMarker);
if (asFlexibleType != null && (lowerBound = lowerBound(asFlexibleType)) != null) {
return lowerBound;
}
SimpleTypeMarker asSimpleType = asSimpleType(kotlinTypeMarker);
Intrinsics.checkNotNull(asSimpleType);
return asSimpleType;
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public KotlinTypeMarker lowerType(CapturedTypeMarker capturedTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.lowerType(this, capturedTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public KotlinTypeMarker makeDefinitelyNotNullOrNotNull(KotlinTypeMarker kotlinTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.makeDefinitelyNotNullOrNotNull(this, kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSystemCommonBackendContext
public KotlinTypeMarker makeNullable(KotlinTypeMarker kotlinTypeMarker) {
SimpleTypeMarker withNullability;
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
SimpleTypeMarker asSimpleType = asSimpleType(kotlinTypeMarker);
return (asSimpleType == null || (withNullability = withNullability(asSimpleType, true)) == null) ? kotlinTypeMarker : withNullability;
}
public TypeCheckerState newTypeCheckerState(final boolean z3, final boolean z4) {
if (this.customSubtype == null) {
return ClassicTypeCheckerStateKt.createClassicTypeCheckerState(z3, z4, this, this.kotlinTypePreparator, this.kotlinTypeRefiner);
}
final KotlinTypePreparator kotlinTypePreparator = this.kotlinTypePreparator;
final KotlinTypeRefiner kotlinTypeRefiner = this.kotlinTypeRefiner;
return new TypeCheckerState(z3, z4, this, kotlinTypePreparator, kotlinTypeRefiner) { // from class: kotlin.reflect.jvm.internal.impl.resolve.OverridingUtilTypeSystemContext$newTypeCheckerState$1
final /* synthetic */ OverridingUtilTypeSystemContext this$0;
{
this.this$0 = this;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeCheckerState
public boolean customIsSubtypeOf(KotlinTypeMarker subType, KotlinTypeMarker superType) {
Function2 function2;
Intrinsics.checkNotNullParameter(subType, "subType");
Intrinsics.checkNotNullParameter(superType, "superType");
if (!(subType instanceof KotlinType)) {
throw new IllegalArgumentException("Failed requirement.");
}
if (!(superType instanceof KotlinType)) {
throw new IllegalArgumentException("Failed requirement.");
}
function2 = this.this$0.customSubtype;
return ((Boolean) function2.invoke(subType, superType)).booleanValue();
}
};
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public SimpleTypeMarker original(DefinitelyNotNullTypeMarker definitelyNotNullTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.original(this, definitelyNotNullTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public SimpleTypeMarker originalIfDefinitelyNotNullable(SimpleTypeMarker simpleTypeMarker) {
SimpleTypeMarker original;
Intrinsics.checkNotNullParameter(simpleTypeMarker, "<this>");
DefinitelyNotNullTypeMarker asDefinitelyNotNullType = asDefinitelyNotNullType(simpleTypeMarker);
return (asDefinitelyNotNullType == null || (original = original(asDefinitelyNotNullType)) == null) ? simpleTypeMarker : original;
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public int parametersCount(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.parametersCount(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public Collection<KotlinTypeMarker> possibleIntegerTypes(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.possibleIntegerTypes(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeArgumentMarker projection(CapturedTypeConstructorMarker capturedTypeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.projection(this, capturedTypeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public int size(TypeArgumentListMarker typeArgumentListMarker) {
Intrinsics.checkNotNullParameter(typeArgumentListMarker, "<this>");
if (typeArgumentListMarker instanceof SimpleTypeMarker) {
return argumentsCount((KotlinTypeMarker) typeArgumentListMarker);
}
if (typeArgumentListMarker instanceof ArgumentList) {
return ((ArgumentList) typeArgumentListMarker).size();
}
throw new IllegalStateException(("unknown type argument list type: " + typeArgumentListMarker + ", " + Reflection.getOrCreateKotlinClass(typeArgumentListMarker.getClass())).toString());
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeCheckerState.SupertypesPolicy substitutionSupertypePolicy(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.substitutionSupertypePolicy(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public Collection<KotlinTypeMarker> supertypes(TypeConstructorMarker typeConstructorMarker) {
return ClassicTypeSystemContext.DefaultImpls.supertypes(this, typeConstructorMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public CapturedTypeConstructorMarker typeConstructor(CapturedTypeMarker capturedTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.typeConstructor((ClassicTypeSystemContext) this, capturedTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeSystemContext, kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public SimpleTypeMarker upperBound(FlexibleTypeMarker flexibleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.upperBound(this, flexibleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public SimpleTypeMarker upperBoundIfFlexible(KotlinTypeMarker kotlinTypeMarker) {
SimpleTypeMarker upperBound;
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
FlexibleTypeMarker asFlexibleType = asFlexibleType(kotlinTypeMarker);
if (asFlexibleType != null && (upperBound = upperBound(asFlexibleType)) != null) {
return upperBound;
}
SimpleTypeMarker asSimpleType = asSimpleType(kotlinTypeMarker);
Intrinsics.checkNotNull(asSimpleType);
return asSimpleType;
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public KotlinTypeMarker withNullability(KotlinTypeMarker kotlinTypeMarker, boolean z3) {
return ClassicTypeSystemContext.DefaultImpls.withNullability(this, kotlinTypeMarker, z3);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeVariance getVariance(TypeParameterMarker typeParameterMarker) {
return ClassicTypeSystemContext.DefaultImpls.getVariance(this, typeParameterMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public boolean isMarkedNullable(KotlinTypeMarker kotlinTypeMarker) {
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
return (kotlinTypeMarker instanceof SimpleTypeMarker) && isMarkedNullable((SimpleTypeMarker) kotlinTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeSystemContext, kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeConstructorMarker typeConstructor(SimpleTypeMarker simpleTypeMarker) {
return ClassicTypeSystemContext.DefaultImpls.typeConstructor(this, simpleTypeMarker);
}
@Override // kotlin.reflect.jvm.internal.impl.types.checker.ClassicTypeSystemContext, kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public SimpleTypeMarker withNullability(SimpleTypeMarker simpleTypeMarker, boolean z3) {
return ClassicTypeSystemContext.DefaultImpls.withNullability((ClassicTypeSystemContext) this, simpleTypeMarker, z3);
}
@Override // kotlin.reflect.jvm.internal.impl.types.model.TypeSystemContext
public TypeConstructorMarker typeConstructor(KotlinTypeMarker kotlinTypeMarker) {
Intrinsics.checkNotNullParameter(kotlinTypeMarker, "<this>");
SimpleTypeMarker asSimpleType = asSimpleType(kotlinTypeMarker);
if (asSimpleType == null) {
asSimpleType = lowerBoundIfFlexible(kotlinTypeMarker);
}
return typeConstructor(asSimpleType);
}
}

View File

@@ -0,0 +1,73 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import A.i;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.utils.SmartSet;
@SourceDebugExtension({"SMAP\noverridingUtils.kt\nKotlin\n*S Kotlin\n*F\n+ 1 overridingUtils.kt\norg/jetbrains/kotlin/resolve/OverridingUtilsKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,84:1\n1620#2,3:85\n847#2,2:88\n*S KotlinDebug\n*F\n+ 1 overridingUtils.kt\norg/jetbrains/kotlin/resolve/OverridingUtilsKt\n*L\n40#1:85,3\n72#1:88,2\n*E\n"})
/* loaded from: classes3.dex */
public final class OverridingUtilsKt {
/* JADX WARN: Multi-variable type inference failed */
public static final <H> Collection<H> selectMostSpecificInEachOverridableGroup(Collection<? extends H> collection, Function1<? super H, ? extends CallableDescriptor> descriptorByHandle) {
Intrinsics.checkNotNullParameter(collection, "<this>");
Intrinsics.checkNotNullParameter(descriptorByHandle, "descriptorByHandle");
if (collection.size() <= 1) {
return collection;
}
LinkedList linkedList = new LinkedList(collection);
SmartSet create = SmartSet.Companion.create();
while (!linkedList.isEmpty()) {
Object first = CollectionsKt.first((List<? extends Object>) linkedList);
final SmartSet create2 = SmartSet.Companion.create();
Collection<i> extractMembersOverridableInBothWays = OverridingUtil.extractMembersOverridableInBothWays(first, linkedList, descriptorByHandle, new Function1<H, Unit>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.OverridingUtilsKt$selectMostSpecificInEachOverridableGroup$overridableGroup$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(1);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Object obj) {
invoke2((OverridingUtilsKt$selectMostSpecificInEachOverridableGroup$overridableGroup$1<H>) obj);
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(H h) {
SmartSet<H> smartSet = create2;
Intrinsics.checkNotNull(h);
smartSet.add(h);
}
});
Intrinsics.checkNotNullExpressionValue(extractMembersOverridableInBothWays, "extractMembersOverridableInBothWays(...)");
if (extractMembersOverridableInBothWays.size() == 1 && create2.isEmpty()) {
Object single = CollectionsKt.single(extractMembersOverridableInBothWays);
Intrinsics.checkNotNullExpressionValue(single, "single(...)");
create.add(single);
} else {
i iVar = (Object) OverridingUtil.selectMostSpecificMember(extractMembersOverridableInBothWays, descriptorByHandle);
Intrinsics.checkNotNullExpressionValue(iVar, "selectMostSpecificMember(...)");
CallableDescriptor invoke = descriptorByHandle.invoke(iVar);
for (i iVar2 : extractMembersOverridableInBothWays) {
Intrinsics.checkNotNull(iVar2);
if (!OverridingUtil.isMoreSpecific(invoke, descriptorByHandle.invoke(iVar2))) {
create2.add(iVar2);
}
}
if (!create2.isEmpty()) {
create.addAll(create2);
}
create.add(iVar);
}
}
return create;
}
}

View File

@@ -0,0 +1,8 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
/* loaded from: classes3.dex */
public interface ResolutionAnchorProvider {
ModuleDescriptor getResolutionAnchor(ModuleDescriptor moduleDescriptor);
}

View File

@@ -0,0 +1,19 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleCapability;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
/* loaded from: classes3.dex */
public final class ResolutionAnchorProviderKt {
private static final ModuleCapability<ResolutionAnchorProvider> RESOLUTION_ANCHOR_PROVIDER_CAPABILITY = new ModuleCapability<>("ResolutionAnchorProvider");
public static final ModuleDescriptor getResolutionAnchorIfAny(ModuleDescriptor moduleDescriptor) {
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
ResolutionAnchorProvider resolutionAnchorProvider = (ResolutionAnchorProvider) moduleDescriptor.getCapability(RESOLUTION_ANCHOR_PROVIDER_CAPABILITY);
if (resolutionAnchorProvider != null) {
return resolutionAnchorProvider.getResolutionAnchor(moduleDescriptor);
}
return null;
}
}

View File

@@ -0,0 +1,5 @@
package kotlin.reflect.jvm.internal.impl.resolve;
/* loaded from: classes3.dex */
public abstract class SealedClassInheritorsProvider {
}

View File

@@ -0,0 +1,9 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
/* loaded from: classes3.dex */
public interface StdlibClassFinder {
ClassDescriptor findEnumEntriesClass(ModuleDescriptor moduleDescriptor);
}

View File

@@ -0,0 +1,16 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleCapability;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
/* loaded from: classes3.dex */
public final class StdlibClassFinderKt {
private static final ModuleCapability<StdlibClassFinder> STDLIB_CLASS_FINDER_CAPABILITY = new ModuleCapability<>("StdlibClassFinder");
public static final StdlibClassFinder getStdlibClassFinder(ModuleDescriptor moduleDescriptor) {
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
StdlibClassFinder stdlibClassFinder = (StdlibClassFinder) moduleDescriptor.getCapability(STDLIB_CLASS_FINDER_CAPABILITY);
return stdlibClassFinder == null ? CliStdlibClassFinderImpl.INSTANCE : stdlibClassFinder;
}
}

View File

@@ -0,0 +1,23 @@
package kotlin.reflect.jvm.internal.impl.resolve;
import java.util.Collection;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities;
/* loaded from: classes3.dex */
public final class VisibilityUtilKt {
public static final CallableMemberDescriptor findMemberWithMaxVisibility(Collection<? extends CallableMemberDescriptor> descriptors) {
Integer compare;
Intrinsics.checkNotNullParameter(descriptors, "descriptors");
descriptors.isEmpty();
CallableMemberDescriptor callableMemberDescriptor = null;
for (CallableMemberDescriptor callableMemberDescriptor2 : descriptors) {
if (callableMemberDescriptor == null || ((compare = DescriptorVisibilities.compare(callableMemberDescriptor.getVisibility(), callableMemberDescriptor2.getVisibility())) != null && compare.intValue() < 0)) {
callableMemberDescriptor = callableMemberDescriptor2;
}
}
Intrinsics.checkNotNull(callableMemberDescriptor);
return callableMemberDescriptor;
}
}

View File

@@ -0,0 +1,89 @@
package kotlin.reflect.jvm.internal.impl.resolve.calls.inference;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.TypeAttributes;
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorScopeKind;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
import kotlin.reflect.jvm.internal.impl.types.model.CapturedTypeMarker;
/* loaded from: classes3.dex */
public final class CapturedType extends SimpleType implements CapturedTypeMarker {
private final TypeAttributes attributes;
private final CapturedTypeConstructor constructor;
private final boolean isMarkedNullable;
private final TypeProjection typeProjection;
public /* synthetic */ CapturedType(TypeProjection typeProjection, CapturedTypeConstructor capturedTypeConstructor, boolean z3, TypeAttributes typeAttributes, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(typeProjection, (i & 2) != 0 ? new CapturedTypeConstructorImpl(typeProjection) : capturedTypeConstructor, (i & 4) != 0 ? false : z3, (i & 8) != 0 ? TypeAttributes.Companion.getEmpty() : typeAttributes);
}
@Override // kotlin.reflect.jvm.internal.impl.types.KotlinType
public List<TypeProjection> getArguments() {
return CollectionsKt.emptyList();
}
@Override // kotlin.reflect.jvm.internal.impl.types.KotlinType
public TypeAttributes getAttributes() {
return this.attributes;
}
@Override // kotlin.reflect.jvm.internal.impl.types.KotlinType
public MemberScope getMemberScope() {
return ErrorUtils.createErrorScope(ErrorScopeKind.CAPTURED_TYPE_SCOPE, true, new String[0]);
}
@Override // kotlin.reflect.jvm.internal.impl.types.KotlinType
public boolean isMarkedNullable() {
return this.isMarkedNullable;
}
@Override // kotlin.reflect.jvm.internal.impl.types.SimpleType
public String toString() {
StringBuilder sb = new StringBuilder("Captured(");
sb.append(this.typeProjection);
sb.append(')');
sb.append(isMarkedNullable() ? "?" : "");
return sb.toString();
}
@Override // kotlin.reflect.jvm.internal.impl.types.KotlinType
public CapturedTypeConstructor getConstructor() {
return this.constructor;
}
@Override // kotlin.reflect.jvm.internal.impl.types.UnwrappedType
public SimpleType replaceAttributes(TypeAttributes newAttributes) {
Intrinsics.checkNotNullParameter(newAttributes, "newAttributes");
return new CapturedType(this.typeProjection, getConstructor(), isMarkedNullable(), newAttributes);
}
@Override // kotlin.reflect.jvm.internal.impl.types.UnwrappedType
public CapturedType makeNullableAsSpecified(boolean z3) {
return z3 == isMarkedNullable() ? this : new CapturedType(this.typeProjection, getConstructor(), z3, getAttributes());
}
@Override // kotlin.reflect.jvm.internal.impl.types.UnwrappedType, kotlin.reflect.jvm.internal.impl.types.KotlinType
public CapturedType refine(KotlinTypeRefiner kotlinTypeRefiner) {
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
TypeProjection refine = this.typeProjection.refine(kotlinTypeRefiner);
Intrinsics.checkNotNullExpressionValue(refine, "refine(...)");
return new CapturedType(refine, getConstructor(), isMarkedNullable(), getAttributes());
}
public CapturedType(TypeProjection typeProjection, CapturedTypeConstructor constructor, boolean z3, TypeAttributes attributes) {
Intrinsics.checkNotNullParameter(typeProjection, "typeProjection");
Intrinsics.checkNotNullParameter(constructor, "constructor");
Intrinsics.checkNotNullParameter(attributes, "attributes");
this.typeProjection = typeProjection;
this.constructor = constructor;
this.isMarkedNullable = z3;
this.attributes = attributes;
}
}

View File

@@ -0,0 +1,10 @@
package kotlin.reflect.jvm.internal.impl.resolve.calls.inference;
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
import kotlin.reflect.jvm.internal.impl.types.model.CapturedTypeConstructorMarker;
/* loaded from: classes3.dex */
public interface CapturedTypeConstructor extends TypeConstructor, CapturedTypeConstructorMarker {
TypeProjection getProjection();
}

View File

@@ -0,0 +1,87 @@
package kotlin.reflect.jvm.internal.impl.resolve.calls.inference;
import java.util.Collection;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
import kotlin.reflect.jvm.internal.impl.types.Variance;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
import kotlin.reflect.jvm.internal.impl.types.checker.NewCapturedTypeConstructor;
/* loaded from: classes3.dex */
public final class CapturedTypeConstructorImpl implements CapturedTypeConstructor {
private NewCapturedTypeConstructor newTypeConstructor;
private final TypeProjection projection;
public CapturedTypeConstructorImpl(TypeProjection projection) {
Intrinsics.checkNotNullParameter(projection, "projection");
this.projection = projection;
getProjection().getProjectionKind();
Variance variance = Variance.INVARIANT;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public KotlinBuiltIns getBuiltIns() {
KotlinBuiltIns builtIns = getProjection().getType().getConstructor().getBuiltIns();
Intrinsics.checkNotNullExpressionValue(builtIns, "getBuiltIns(...)");
return builtIns;
}
public Void getDeclarationDescriptor() {
return null;
}
public final NewCapturedTypeConstructor getNewTypeConstructor() {
return this.newTypeConstructor;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public List<TypeParameterDescriptor> getParameters() {
return CollectionsKt.emptyList();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.calls.inference.CapturedTypeConstructor
public TypeProjection getProjection() {
return this.projection;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
/* renamed from: getSupertypes */
public Collection<KotlinType> mo1395getSupertypes() {
KotlinType type = getProjection().getProjectionKind() == Variance.OUT_VARIANCE ? getProjection().getType() : getBuiltIns().getNullableAnyType();
Intrinsics.checkNotNull(type);
return CollectionsKt.listOf(type);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public boolean isDenotable() {
return false;
}
public final void setNewTypeConstructor(NewCapturedTypeConstructor newCapturedTypeConstructor) {
this.newTypeConstructor = newCapturedTypeConstructor;
}
public String toString() {
return "CapturedTypeConstructor(" + getProjection() + ')';
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
/* renamed from: getDeclarationDescriptor, reason: collision with other method in class */
public /* bridge */ /* synthetic */ ClassifierDescriptor mo1394getDeclarationDescriptor() {
return (ClassifierDescriptor) getDeclarationDescriptor();
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public CapturedTypeConstructorImpl refine(KotlinTypeRefiner kotlinTypeRefiner) {
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
TypeProjection refine = getProjection().refine(kotlinTypeRefiner);
Intrinsics.checkNotNullExpressionValue(refine, "refine(...)");
return new CapturedTypeConstructorImpl(refine);
}
}

View File

@@ -0,0 +1,106 @@
package kotlin.reflect.jvm.internal.impl.resolve.calls.inference;
import java.util.ArrayList;
import java.util.List;
import kotlin.Pair;
import kotlin.collections.ArraysKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
import kotlin.reflect.jvm.internal.impl.types.DelegatedTypeSubstitution;
import kotlin.reflect.jvm.internal.impl.types.IndexedParametersSubstitution;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.LazyWrappedType;
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
import kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitution;
import kotlin.reflect.jvm.internal.impl.types.Variance;
@SourceDebugExtension({"SMAP\nCapturedTypeConstructor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CapturedTypeConstructor.kt\norg/jetbrains/kotlin/resolve/calls/inference/CapturedTypeConstructorKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,153:1\n1549#2:154\n1620#2,3:155\n37#3,2:158\n*S KotlinDebug\n*F\n+ 1 CapturedTypeConstructor.kt\norg/jetbrains/kotlin/resolve/calls/inference/CapturedTypeConstructorKt\n*L\n125#1:154\n125#1:155,3\n127#1:158,2\n*E\n"})
/* loaded from: classes3.dex */
public final class CapturedTypeConstructorKt {
/* JADX INFO: Access modifiers changed from: private */
public static final TypeProjection createCapturedIfNeeded(final TypeProjection typeProjection, TypeParameterDescriptor typeParameterDescriptor) {
if (typeParameterDescriptor == null || typeProjection.getProjectionKind() == Variance.INVARIANT) {
return typeProjection;
}
if (typeParameterDescriptor.getVariance() != typeProjection.getProjectionKind()) {
return new TypeProjectionImpl(createCapturedType(typeProjection));
}
if (!typeProjection.isStarProjection()) {
return new TypeProjectionImpl(typeProjection.getType());
}
StorageManager NO_LOCKS = LockBasedStorageManager.NO_LOCKS;
Intrinsics.checkNotNullExpressionValue(NO_LOCKS, "NO_LOCKS");
return new TypeProjectionImpl(new LazyWrappedType(NO_LOCKS, new Function0<KotlinType>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.calls.inference.CapturedTypeConstructorKt$createCapturedIfNeeded$1
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final KotlinType invoke() {
KotlinType type = TypeProjection.this.getType();
Intrinsics.checkNotNullExpressionValue(type, "getType(...)");
return type;
}
}));
}
public static final KotlinType createCapturedType(TypeProjection typeProjection) {
Intrinsics.checkNotNullParameter(typeProjection, "typeProjection");
return new CapturedType(typeProjection, null, false, null, 14, null);
}
public static final boolean isCaptured(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
return kotlinType.getConstructor() instanceof CapturedTypeConstructor;
}
public static final TypeSubstitution wrapWithCapturingSubstitution(final TypeSubstitution typeSubstitution, final boolean z3) {
int collectionSizeOrDefault;
Intrinsics.checkNotNullParameter(typeSubstitution, "<this>");
if (!(typeSubstitution instanceof IndexedParametersSubstitution)) {
return new DelegatedTypeSubstitution(typeSubstitution) { // from class: kotlin.reflect.jvm.internal.impl.resolve.calls.inference.CapturedTypeConstructorKt$wrapWithCapturingSubstitution$2
@Override // kotlin.reflect.jvm.internal.impl.types.DelegatedTypeSubstitution, kotlin.reflect.jvm.internal.impl.types.TypeSubstitution
public boolean approximateContravariantCapturedTypes() {
return z3;
}
@Override // kotlin.reflect.jvm.internal.impl.types.DelegatedTypeSubstitution, kotlin.reflect.jvm.internal.impl.types.TypeSubstitution
/* renamed from: get */
public TypeProjection mo1399get(KotlinType key) {
TypeProjection createCapturedIfNeeded;
Intrinsics.checkNotNullParameter(key, "key");
TypeProjection mo1399get = super.mo1399get(key);
if (mo1399get == null) {
return null;
}
ClassifierDescriptor mo1394getDeclarationDescriptor = key.getConstructor().mo1394getDeclarationDescriptor();
createCapturedIfNeeded = CapturedTypeConstructorKt.createCapturedIfNeeded(mo1399get, mo1394getDeclarationDescriptor instanceof TypeParameterDescriptor ? (TypeParameterDescriptor) mo1394getDeclarationDescriptor : null);
return createCapturedIfNeeded;
}
};
}
IndexedParametersSubstitution indexedParametersSubstitution = (IndexedParametersSubstitution) typeSubstitution;
TypeParameterDescriptor[] parameters = indexedParametersSubstitution.getParameters();
List<Pair> zip = ArraysKt.zip(indexedParametersSubstitution.getArguments(), indexedParametersSubstitution.getParameters());
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(zip, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
for (Pair pair : zip) {
arrayList.add(createCapturedIfNeeded((TypeProjection) pair.getFirst(), (TypeParameterDescriptor) pair.getSecond()));
}
return new IndexedParametersSubstitution(parameters, (TypeProjection[]) arrayList.toArray(new TypeProjection[0]), z3);
}
public static /* synthetic */ TypeSubstitution wrapWithCapturingSubstitution$default(TypeSubstitution typeSubstitution, boolean z3, int i, Object obj) {
if ((i & 1) != 0) {
z3 = true;
}
return wrapWithCapturingSubstitution(typeSubstitution, z3);
}
}

View File

@@ -0,0 +1,21 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public final class AnnotationValue extends ConstantValue<AnnotationDescriptor> {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AnnotationValue(AnnotationDescriptor value) {
super(value);
Intrinsics.checkNotNullParameter(value, "value");
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public KotlinType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
return getValue().getType();
}
}

View File

@@ -0,0 +1,32 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import java.util.List;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public class ArrayValue extends ConstantValue<List<? extends ConstantValue<?>>> {
private final Function1<ModuleDescriptor, KotlinType> computeType;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
public ArrayValue(List<? extends ConstantValue<?>> value, Function1<? super ModuleDescriptor, ? extends KotlinType> computeType) {
super(value);
Intrinsics.checkNotNullParameter(value, "value");
Intrinsics.checkNotNullParameter(computeType, "computeType");
this.computeType = computeType;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public KotlinType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
KotlinType invoke = this.computeType.invoke(module);
if (!KotlinBuiltIns.isArray(invoke) && !KotlinBuiltIns.isPrimitiveArray(invoke)) {
KotlinBuiltIns.isUnsignedArrayType(invoke);
}
return invoke;
}
}

View File

@@ -0,0 +1,20 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class BooleanValue extends ConstantValue<Boolean> {
public BooleanValue(boolean z3) {
super(Boolean.valueOf(z3));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType booleanType = module.getBuiltIns().getBooleanType();
Intrinsics.checkNotNullExpressionValue(booleanType, "getBooleanType(...)");
return booleanType;
}
}

View File

@@ -0,0 +1,25 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class ByteValue extends IntegerValueConstant<Byte> {
public ByteValue(byte b4) {
super(Byte.valueOf(b4));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return getValue().intValue() + ".toByte()";
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType byteType = module.getBuiltIns().getByteType();
Intrinsics.checkNotNullExpressionValue(byteType, "getByteType(...)");
return byteType;
}
}

View File

@@ -0,0 +1,35 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import C.w;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class CharValue extends IntegerValueConstant<Character> {
public CharValue(char c4) {
super(Character.valueOf(c4));
}
private final String getPrintablePart(char c4) {
return c4 == '\b' ? "\\b" : c4 == '\t' ? "\\t" : c4 == '\n' ? "\\n" : c4 == '\f' ? "\\f" : c4 == '\r' ? "\\r" : isPrintableUnicode(c4) ? String.valueOf(c4) : "?";
}
private final boolean isPrintableUnicode(char c4) {
byte type = (byte) Character.getType(c4);
return (type == 0 || type == 13 || type == 14 || type == 15 || type == 16 || type == 18 || type == 19) ? false : true;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return w.s(new Object[]{Integer.valueOf(getValue().charValue()), getPrintablePart(getValue().charValue())}, 2, "\\u%04X ('%s')", "format(...)");
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType charType = module.getBuiltIns().getCharType();
Intrinsics.checkNotNullExpressionValue(charType, "getCharType(...)");
return charType;
}
}

View File

@@ -0,0 +1,65 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
@SourceDebugExtension({"SMAP\nClassLiteralValue.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ClassLiteralValue.kt\norg/jetbrains/kotlin/resolve/constants/ClassLiteralValue\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,17:1\n1#2:18\n*E\n"})
/* loaded from: classes3.dex */
public final class ClassLiteralValue {
private final int arrayNestedness;
private final ClassId classId;
public ClassLiteralValue(ClassId classId, int i) {
Intrinsics.checkNotNullParameter(classId, "classId");
this.classId = classId;
this.arrayNestedness = i;
}
public final ClassId component1() {
return this.classId;
}
public final int component2() {
return this.arrayNestedness;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ClassLiteralValue)) {
return false;
}
ClassLiteralValue classLiteralValue = (ClassLiteralValue) obj;
return Intrinsics.areEqual(this.classId, classLiteralValue.classId) && this.arrayNestedness == classLiteralValue.arrayNestedness;
}
public final int getArrayNestedness() {
return this.arrayNestedness;
}
public final ClassId getClassId() {
return this.classId;
}
public int hashCode() {
return Integer.hashCode(this.arrayNestedness) + (this.classId.hashCode() * 31);
}
public String toString() {
StringBuilder sb = new StringBuilder();
int i = this.arrayNestedness;
for (int i4 = 0; i4 < i; i4++) {
sb.append("kotlin/Array<");
}
sb.append(this.classId);
int i5 = this.arrayNestedness;
for (int i6 = 0; i6 < i5; i6++) {
sb.append(">");
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "toString(...)");
return sb2;
}
}

View File

@@ -0,0 +1,41 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public abstract class ConstantValue<T> {
private final T value;
public ConstantValue(T t2) {
this.value = t2;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
T value = getValue();
ConstantValue constantValue = obj instanceof ConstantValue ? (ConstantValue) obj : null;
return Intrinsics.areEqual(value, constantValue != null ? constantValue.getValue() : null);
}
public abstract KotlinType getType(ModuleDescriptor moduleDescriptor);
public T getValue() {
return this.value;
}
public int hashCode() {
T value = getValue();
if (value != null) {
return value.hashCode();
}
return 0;
}
public String toString() {
return String.valueOf(getValue());
}
}

View File

@@ -0,0 +1,124 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.collections.ArraysKt;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.builtins.PrimitiveType;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
@SourceDebugExtension({"SMAP\nConstantValueFactory.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ConstantValueFactory.kt\norg/jetbrains/kotlin/resolve/constants/ConstantValueFactory\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,103:1\n1603#2,9:104\n1855#2:113\n1856#2:115\n1612#2:116\n1#3:114\n*S KotlinDebug\n*F\n+ 1 ConstantValueFactory.kt\norg/jetbrains/kotlin/resolve/constants/ConstantValueFactory\n*L\n64#1:104,9\n64#1:113\n64#1:115\n64#1:116\n64#1:114\n*E\n"})
/* loaded from: classes3.dex */
public final class ConstantValueFactory {
public static final ConstantValueFactory INSTANCE = new ConstantValueFactory();
private ConstantValueFactory() {
}
public static /* synthetic */ ConstantValue createConstantValue$default(ConstantValueFactory constantValueFactory, Object obj, ModuleDescriptor moduleDescriptor, int i, Object obj2) {
if ((i & 2) != 0) {
moduleDescriptor = null;
}
return constantValueFactory.createConstantValue(obj, moduleDescriptor);
}
public final ArrayValue createArrayValue(List<? extends ConstantValue<?>> value, KotlinType type) {
Intrinsics.checkNotNullParameter(value, "value");
Intrinsics.checkNotNullParameter(type, "type");
return new TypedArrayValue(value, type);
}
public final ConstantValue<?> createConstantValue(Object obj, ModuleDescriptor moduleDescriptor) {
if (obj instanceof Byte) {
return new ByteValue(((Number) obj).byteValue());
}
if (obj instanceof Short) {
return new ShortValue(((Number) obj).shortValue());
}
if (obj instanceof Integer) {
return new IntValue(((Number) obj).intValue());
}
if (obj instanceof Long) {
return new LongValue(((Number) obj).longValue());
}
if (obj instanceof Character) {
return new CharValue(((Character) obj).charValue());
}
if (obj instanceof Float) {
return new FloatValue(((Number) obj).floatValue());
}
if (obj instanceof Double) {
return new DoubleValue(((Number) obj).doubleValue());
}
if (obj instanceof Boolean) {
return new BooleanValue(((Boolean) obj).booleanValue());
}
if (obj instanceof String) {
return new StringValue((String) obj);
}
if (obj instanceof byte[]) {
return createArrayValue(ArraysKt.toList((byte[]) obj), moduleDescriptor, PrimitiveType.BYTE);
}
if (obj instanceof short[]) {
return createArrayValue(ArraysKt.toList((short[]) obj), moduleDescriptor, PrimitiveType.SHORT);
}
if (obj instanceof int[]) {
return createArrayValue(ArraysKt.toList((int[]) obj), moduleDescriptor, PrimitiveType.INT);
}
if (obj instanceof long[]) {
return createArrayValue(ArraysKt.toList((long[]) obj), moduleDescriptor, PrimitiveType.LONG);
}
if (obj instanceof char[]) {
return createArrayValue(ArraysKt.toList((char[]) obj), moduleDescriptor, PrimitiveType.CHAR);
}
if (obj instanceof float[]) {
return createArrayValue(ArraysKt.toList((float[]) obj), moduleDescriptor, PrimitiveType.FLOAT);
}
if (obj instanceof double[]) {
return createArrayValue(ArraysKt.toList((double[]) obj), moduleDescriptor, PrimitiveType.DOUBLE);
}
if (obj instanceof boolean[]) {
return createArrayValue(ArraysKt.toList((boolean[]) obj), moduleDescriptor, PrimitiveType.BOOLEAN);
}
if (obj == null) {
return new NullValue();
}
return null;
}
private final ArrayValue createArrayValue(List<?> list, ModuleDescriptor moduleDescriptor, final PrimitiveType primitiveType) {
List list2 = CollectionsKt.toList(list);
ArrayList arrayList = new ArrayList();
Iterator it = list2.iterator();
while (it.hasNext()) {
ConstantValue createConstantValue$default = createConstantValue$default(this, it.next(), null, 2, null);
if (createConstantValue$default != null) {
arrayList.add(createConstantValue$default);
}
}
if (moduleDescriptor != null) {
SimpleType primitiveArrayKotlinType = moduleDescriptor.getBuiltIns().getPrimitiveArrayKotlinType(primitiveType);
Intrinsics.checkNotNullExpressionValue(primitiveArrayKotlinType, "getPrimitiveArrayKotlinType(...)");
return new TypedArrayValue(arrayList, primitiveArrayKotlinType);
}
return new ArrayValue(arrayList, new Function1<ModuleDescriptor, KotlinType>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValueFactory$createArrayValue$1
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public final KotlinType invoke(ModuleDescriptor it2) {
Intrinsics.checkNotNullParameter(it2, "it");
SimpleType primitiveArrayKotlinType2 = it2.getBuiltIns().getPrimitiveArrayKotlinType(PrimitiveType.this);
Intrinsics.checkNotNullExpressionValue(primitiveArrayKotlinType2, "getPrimitiveArrayKotlinType(...)");
return primitiveArrayKotlinType2;
}
});
}
}

View File

@@ -0,0 +1,25 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class DoubleValue extends ConstantValue<Double> {
public DoubleValue(double d4) {
super(Double.valueOf(d4));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return getValue().doubleValue() + ".toDouble()";
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType doubleType = module.getBuiltIns().getDoubleType();
Intrinsics.checkNotNullExpressionValue(doubleType, "getDoubleType(...)");
return doubleType;
}
}

View File

@@ -0,0 +1,69 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
@SourceDebugExtension({"SMAP\nconstantValues.kt\nKotlin\n*S Kotlin\n*F\n+ 1 constantValues.kt\norg/jetbrains/kotlin/resolve/constants/EnumValue\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,320:1\n1#2:321\n*E\n"})
/* loaded from: classes3.dex */
public final class EnumValue extends ConstantValue<Pair<? extends ClassId, ? extends Name>> {
private final ClassId enumClassId;
private final Name enumEntryName;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public EnumValue(ClassId enumClassId, Name enumEntryName) {
super(TuplesKt.to(enumClassId, enumEntryName));
Intrinsics.checkNotNullParameter(enumClassId, "enumClassId");
Intrinsics.checkNotNullParameter(enumEntryName, "enumEntryName");
this.enumClassId = enumClassId;
this.enumEntryName = enumEntryName;
}
public final Name getEnumEntryName() {
return this.enumEntryName;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public KotlinType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
ClassDescriptor findClassAcrossModuleDependencies = FindClassInModuleKt.findClassAcrossModuleDependencies(module, this.enumClassId);
SimpleType simpleType = null;
if (findClassAcrossModuleDependencies != null) {
if (!DescriptorUtils.isEnumClass(findClassAcrossModuleDependencies)) {
findClassAcrossModuleDependencies = null;
}
if (findClassAcrossModuleDependencies != null) {
simpleType = findClassAcrossModuleDependencies.getDefaultType();
}
}
if (simpleType != null) {
return simpleType;
}
ErrorTypeKind errorTypeKind = ErrorTypeKind.ERROR_ENUM_TYPE;
String classId = this.enumClassId.toString();
Intrinsics.checkNotNullExpressionValue(classId, "toString(...)");
String name = this.enumEntryName.toString();
Intrinsics.checkNotNullExpressionValue(name, "toString(...)");
return ErrorUtils.createErrorType(errorTypeKind, classId, name);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.enumClassId.getShortClassName());
sb.append('.');
sb.append(this.enumEntryName);
return sb.toString();
}
}

View File

@@ -0,0 +1,59 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.Unit;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorType;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
/* loaded from: classes3.dex */
public abstract class ErrorValue extends ConstantValue<Unit> {
public static final Companion Companion = new Companion(null);
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final ErrorValue create(String message) {
Intrinsics.checkNotNullParameter(message, "message");
return new ErrorValueWithMessage(message);
}
private Companion() {
}
}
/* loaded from: classes3.dex */
public static final class ErrorValueWithMessage extends ErrorValue {
private final String message;
public ErrorValueWithMessage(String message) {
Intrinsics.checkNotNullParameter(message, "message");
this.message = message;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return this.message;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public ErrorType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
return ErrorUtils.createErrorType(ErrorTypeKind.ERROR_CONSTANT_VALUE, this.message);
}
}
public ErrorValue() {
super(Unit.INSTANCE);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public Unit getValue() {
throw new UnsupportedOperationException();
}
}

View File

@@ -0,0 +1,25 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class FloatValue extends ConstantValue<Float> {
public FloatValue(float f2) {
super(Float.valueOf(f2));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return getValue().floatValue() + ".toFloat()";
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType floatType = module.getBuiltIns().getFloatType();
Intrinsics.checkNotNullExpressionValue(floatType, "getFloatType(...)");
return floatType;
}
}

View File

@@ -0,0 +1,20 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class IntValue extends IntegerValueConstant<Integer> {
public IntValue(int i) {
super(Integer.valueOf(i));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType intType = module.getBuiltIns().getIntType();
Intrinsics.checkNotNullExpressionValue(intType, "getIntType(...)");
return intType;
}
}

View File

@@ -0,0 +1,270 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import com.google.android.gms.measurement.internal.a;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.NoWhenBranchMatchedException;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeFactory;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.TypeAttributes;
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
import kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutionKt;
import kotlin.reflect.jvm.internal.impl.types.Variance;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
@SourceDebugExtension({"SMAP\nIntegerLiteralTypeConstructor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntegerLiteralTypeConstructor.kt\norg/jetbrains/kotlin/resolve/constants/IntegerLiteralTypeConstructor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,181:1\n1726#2,3:182\n1747#2,3:185\n*S KotlinDebug\n*F\n+ 1 IntegerLiteralTypeConstructor.kt\norg/jetbrains/kotlin/resolve/constants/IntegerLiteralTypeConstructor\n*L\n132#1:182,3\n176#1:185,3\n*E\n"})
/* loaded from: classes3.dex */
public final class IntegerLiteralTypeConstructor implements TypeConstructor {
public static final Companion Companion = new Companion(null);
private final ModuleDescriptor module;
private final Set<KotlinType> possibleTypes;
private final Lazy supertypes$delegate;
private final SimpleType type;
private final long value;
@SourceDebugExtension({"SMAP\nIntegerLiteralTypeConstructor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntegerLiteralTypeConstructor.kt\norg/jetbrains/kotlin/resolve/constants/IntegerLiteralTypeConstructor$Companion\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,181:1\n2661#2,7:182\n*S KotlinDebug\n*F\n+ 1 IntegerLiteralTypeConstructor.kt\norg/jetbrains/kotlin/resolve/constants/IntegerLiteralTypeConstructor$Companion\n*L\n40#1:182,7\n*E\n"})
/* loaded from: classes3.dex */
public static final class Companion {
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
/* loaded from: classes3.dex */
public static final class Mode {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ Mode[] $VALUES;
public static final Mode COMMON_SUPER_TYPE = new Mode("COMMON_SUPER_TYPE", 0);
public static final Mode INTERSECTION_TYPE = new Mode("INTERSECTION_TYPE", 1);
private static final /* synthetic */ Mode[] $values() {
return new Mode[]{COMMON_SUPER_TYPE, INTERSECTION_TYPE};
}
static {
Mode[] $values = $values();
$VALUES = $values;
$ENTRIES = EnumEntriesKt.enumEntries($values);
}
private Mode(String str, int i) {
}
public static Mode valueOf(String str) {
return (Mode) Enum.valueOf(Mode.class, str);
}
public static Mode[] values() {
return (Mode[]) $VALUES.clone();
}
}
/* loaded from: classes3.dex */
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[Mode.values().length];
try {
iArr[Mode.COMMON_SUPER_TYPE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[Mode.INTERSECTION_TYPE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
$EnumSwitchMapping$0 = iArr;
}
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private final SimpleType findCommonSuperTypeOrIntersectionType(Collection<? extends SimpleType> collection, Mode mode) {
if (collection.isEmpty()) {
return null;
}
Iterator<T> it = collection.iterator();
if (!it.hasNext()) {
throw new UnsupportedOperationException("Empty collection can't be reduced.");
}
Object next = it.next();
while (it.hasNext()) {
SimpleType simpleType = (SimpleType) it.next();
next = IntegerLiteralTypeConstructor.Companion.fold((SimpleType) next, simpleType, mode);
}
return (SimpleType) next;
}
private final SimpleType fold(SimpleType simpleType, SimpleType simpleType2, Mode mode) {
if (simpleType != null && simpleType2 != null) {
TypeConstructor constructor = simpleType.getConstructor();
TypeConstructor constructor2 = simpleType2.getConstructor();
boolean z3 = constructor instanceof IntegerLiteralTypeConstructor;
if (z3 && (constructor2 instanceof IntegerLiteralTypeConstructor)) {
return fold((IntegerLiteralTypeConstructor) constructor, (IntegerLiteralTypeConstructor) constructor2, mode);
}
if (z3) {
return fold((IntegerLiteralTypeConstructor) constructor, simpleType2);
}
if (constructor2 instanceof IntegerLiteralTypeConstructor) {
return fold((IntegerLiteralTypeConstructor) constructor2, simpleType);
}
}
return null;
}
public final SimpleType findIntersectionType(Collection<? extends SimpleType> types) {
Intrinsics.checkNotNullParameter(types, "types");
return findCommonSuperTypeOrIntersectionType(types, Mode.INTERSECTION_TYPE);
}
private Companion() {
}
private final SimpleType fold(IntegerLiteralTypeConstructor integerLiteralTypeConstructor, IntegerLiteralTypeConstructor integerLiteralTypeConstructor2, Mode mode) {
Set intersect;
int i = WhenMappings.$EnumSwitchMapping$0[mode.ordinal()];
if (i == 1) {
intersect = CollectionsKt___CollectionsKt.intersect(integerLiteralTypeConstructor.getPossibleTypes(), integerLiteralTypeConstructor2.getPossibleTypes());
} else {
if (i != 2) {
throw new NoWhenBranchMatchedException();
}
intersect = CollectionsKt___CollectionsKt.union(integerLiteralTypeConstructor.getPossibleTypes(), integerLiteralTypeConstructor2.getPossibleTypes());
}
return KotlinTypeFactory.integerLiteralType(TypeAttributes.Companion.getEmpty(), new IntegerLiteralTypeConstructor(integerLiteralTypeConstructor.value, integerLiteralTypeConstructor.module, intersect, null), false);
}
private final SimpleType fold(IntegerLiteralTypeConstructor integerLiteralTypeConstructor, SimpleType simpleType) {
if (integerLiteralTypeConstructor.getPossibleTypes().contains(simpleType)) {
return simpleType;
}
return null;
}
}
public /* synthetic */ IntegerLiteralTypeConstructor(long j4, ModuleDescriptor moduleDescriptor, Set set, DefaultConstructorMarker defaultConstructorMarker) {
this(j4, moduleDescriptor, set);
}
private final List<KotlinType> getSupertypes() {
return (List) this.supertypes$delegate.getValue();
}
/* JADX INFO: Access modifiers changed from: private */
public final boolean isContainsOnlyUnsignedTypes() {
Collection<KotlinType> allSignedLiteralTypes = PrimitiveTypeUtilKt.getAllSignedLiteralTypes(this.module);
if ((allSignedLiteralTypes instanceof Collection) && allSignedLiteralTypes.isEmpty()) {
return true;
}
Iterator<T> it = allSignedLiteralTypes.iterator();
while (it.hasNext()) {
if (this.possibleTypes.contains((KotlinType) it.next())) {
return false;
}
}
return true;
}
private final String valueToString() {
String joinToString$default;
StringBuilder sb = new StringBuilder("[");
joinToString$default = CollectionsKt___CollectionsKt.joinToString$default(this.possibleTypes, ",", null, null, 0, null, new Function1<KotlinType, CharSequence>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.constants.IntegerLiteralTypeConstructor$valueToString$1
@Override // kotlin.jvm.functions.Function1
public final CharSequence invoke(KotlinType it) {
Intrinsics.checkNotNullParameter(it, "it");
return it.toString();
}
}, 30, null);
return a.n(sb, joinToString$default, ']');
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public KotlinBuiltIns getBuiltIns() {
return this.module.getBuiltIns();
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
/* renamed from: getDeclarationDescriptor */
public ClassifierDescriptor mo1394getDeclarationDescriptor() {
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public List<TypeParameterDescriptor> getParameters() {
return CollectionsKt.emptyList();
}
public final Set<KotlinType> getPossibleTypes() {
return this.possibleTypes;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public boolean isDenotable() {
return false;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public TypeConstructor refine(KotlinTypeRefiner kotlinTypeRefiner) {
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
return this;
}
public String toString() {
return "IntegerLiteralType" + valueToString();
}
/* JADX WARN: Multi-variable type inference failed */
private IntegerLiteralTypeConstructor(long j4, ModuleDescriptor moduleDescriptor, Set<? extends KotlinType> set) {
this.type = KotlinTypeFactory.integerLiteralType(TypeAttributes.Companion.getEmpty(), this, false);
this.supertypes$delegate = LazyKt.lazy(new Function0<List<SimpleType>>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.constants.IntegerLiteralTypeConstructor$supertypes$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final List<SimpleType> invoke() {
SimpleType simpleType;
boolean isContainsOnlyUnsignedTypes;
SimpleType defaultType = IntegerLiteralTypeConstructor.this.getBuiltIns().getComparable().getDefaultType();
Intrinsics.checkNotNullExpressionValue(defaultType, "getDefaultType(...)");
Variance variance = Variance.IN_VARIANCE;
simpleType = IntegerLiteralTypeConstructor.this.type;
List<SimpleType> mutableListOf = CollectionsKt.mutableListOf(TypeSubstitutionKt.replace$default(defaultType, CollectionsKt.listOf(new TypeProjectionImpl(variance, simpleType)), null, 2, null));
isContainsOnlyUnsignedTypes = IntegerLiteralTypeConstructor.this.isContainsOnlyUnsignedTypes();
if (!isContainsOnlyUnsignedTypes) {
mutableListOf.add(IntegerLiteralTypeConstructor.this.getBuiltIns().getNumberType());
}
return mutableListOf;
}
});
this.value = j4;
this.module = moduleDescriptor;
this.possibleTypes = set;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
/* renamed from: getSupertypes, reason: collision with other method in class */
public Collection<KotlinType> mo1395getSupertypes() {
return getSupertypes();
}
}

View File

@@ -0,0 +1,8 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
/* loaded from: classes3.dex */
public abstract class IntegerValueConstant<T> extends ConstantValue<T> {
public IntegerValueConstant(T t2) {
super(t2);
}
}

View File

@@ -0,0 +1,62 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
/* loaded from: classes3.dex */
public final class IntegerValueTypeConstructor implements TypeConstructor {
private final ModuleDescriptor module;
private final ArrayList<KotlinType> supertypes;
private final long value;
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public KotlinBuiltIns getBuiltIns() {
return this.module.getBuiltIns();
}
public Void getDeclarationDescriptor() {
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public List<TypeParameterDescriptor> getParameters() {
return CollectionsKt.emptyList();
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
/* renamed from: getSupertypes */
public Collection<KotlinType> mo1395getSupertypes() {
return this.supertypes;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public boolean isDenotable() {
return false;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public TypeConstructor refine(KotlinTypeRefiner kotlinTypeRefiner) {
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
return this;
}
public String toString() {
return "IntegerValueType(" + this.value + ')';
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
/* renamed from: getDeclarationDescriptor */
public /* bridge */ /* synthetic */ ClassifierDescriptor mo1394getDeclarationDescriptor() {
return (ClassifierDescriptor) getDeclarationDescriptor();
}
}

View File

@@ -0,0 +1,204 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import java.util.List;
import kotlin.NoWhenBranchMatchedException;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeFactory;
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeKt;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.TypeAttributes;
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
import kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl;
import kotlin.reflect.jvm.internal.impl.types.Variance;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt;
/* loaded from: classes3.dex */
public final class KClassValue extends ConstantValue<Value> {
public static final Companion Companion = new Companion(null);
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final ConstantValue<?> create(KotlinType argumentType) {
Intrinsics.checkNotNullParameter(argumentType, "argumentType");
if (KotlinTypeKt.isError(argumentType)) {
return null;
}
int i = 0;
KotlinType kotlinType = argumentType;
while (KotlinBuiltIns.isArray(kotlinType)) {
kotlinType = ((TypeProjection) CollectionsKt.single((List) kotlinType.getArguments())).getType();
Intrinsics.checkNotNullExpressionValue(kotlinType, "getType(...)");
i++;
}
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
if (mo1394getDeclarationDescriptor instanceof ClassDescriptor) {
ClassId classId = DescriptorUtilsKt.getClassId(mo1394getDeclarationDescriptor);
return classId == null ? new KClassValue(new Value.LocalClass(argumentType)) : new KClassValue(classId, i);
}
if (!(mo1394getDeclarationDescriptor instanceof TypeParameterDescriptor)) {
return null;
}
ClassId classId2 = ClassId.topLevel(StandardNames.FqNames.any.toSafe());
Intrinsics.checkNotNullExpressionValue(classId2, "topLevel(...)");
return new KClassValue(classId2, 0);
}
private Companion() {
}
}
/* loaded from: classes3.dex */
public static abstract class Value {
/* loaded from: classes3.dex */
public static final class LocalClass extends Value {
private final KotlinType type;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LocalClass(KotlinType type) {
super(null);
Intrinsics.checkNotNullParameter(type, "type");
this.type = type;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof LocalClass) && Intrinsics.areEqual(this.type, ((LocalClass) obj).type);
}
public final KotlinType getType() {
return this.type;
}
public int hashCode() {
return this.type.hashCode();
}
public String toString() {
return "LocalClass(type=" + this.type + ')';
}
}
/* loaded from: classes3.dex */
public static final class NormalClass extends Value {
private final ClassLiteralValue value;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public NormalClass(ClassLiteralValue value) {
super(null);
Intrinsics.checkNotNullParameter(value, "value");
this.value = value;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof NormalClass) && Intrinsics.areEqual(this.value, ((NormalClass) obj).value);
}
public final int getArrayDimensions() {
return this.value.getArrayNestedness();
}
public final ClassId getClassId() {
return this.value.getClassId();
}
public final ClassLiteralValue getValue() {
return this.value;
}
public int hashCode() {
return this.value.hashCode();
}
public String toString() {
return "NormalClass(value=" + this.value + ')';
}
}
public /* synthetic */ Value(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Value() {
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public KClassValue(Value value) {
super(value);
Intrinsics.checkNotNullParameter(value, "value");
}
public final KotlinType getArgumentType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
Value value = getValue();
if (value instanceof Value.LocalClass) {
return ((Value.LocalClass) getValue()).getType();
}
if (!(value instanceof Value.NormalClass)) {
throw new NoWhenBranchMatchedException();
}
ClassLiteralValue value2 = ((Value.NormalClass) getValue()).getValue();
ClassId component1 = value2.component1();
int component2 = value2.component2();
ClassDescriptor findClassAcrossModuleDependencies = FindClassInModuleKt.findClassAcrossModuleDependencies(module, component1);
if (findClassAcrossModuleDependencies == null) {
ErrorTypeKind errorTypeKind = ErrorTypeKind.UNRESOLVED_KCLASS_CONSTANT_VALUE;
String classId = component1.toString();
Intrinsics.checkNotNullExpressionValue(classId, "toString(...)");
return ErrorUtils.createErrorType(errorTypeKind, classId, String.valueOf(component2));
}
SimpleType defaultType = findClassAcrossModuleDependencies.getDefaultType();
Intrinsics.checkNotNullExpressionValue(defaultType, "getDefaultType(...)");
KotlinType replaceArgumentsWithStarProjections = TypeUtilsKt.replaceArgumentsWithStarProjections(defaultType);
for (int i = 0; i < component2; i++) {
replaceArgumentsWithStarProjections = module.getBuiltIns().getArrayType(Variance.INVARIANT, replaceArgumentsWithStarProjections);
Intrinsics.checkNotNullExpressionValue(replaceArgumentsWithStarProjections, "getArrayType(...)");
}
return replaceArgumentsWithStarProjections;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public KotlinType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
TypeAttributes empty = TypeAttributes.Companion.getEmpty();
ClassDescriptor kClass = module.getBuiltIns().getKClass();
Intrinsics.checkNotNullExpressionValue(kClass, "getKClass(...)");
return KotlinTypeFactory.simpleNotNullType(empty, kClass, CollectionsKt.listOf(new TypeProjectionImpl(getArgumentType(module))));
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public KClassValue(ClassLiteralValue value) {
this(new Value.NormalClass(value));
Intrinsics.checkNotNullParameter(value, "value");
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public KClassValue(ClassId classId, int i) {
this(new ClassLiteralValue(classId, i));
Intrinsics.checkNotNullParameter(classId, "classId");
}
}

View File

@@ -0,0 +1,25 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class LongValue extends IntegerValueConstant<Long> {
public LongValue(long j4) {
super(Long.valueOf(j4));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return getValue().longValue() + ".toLong()";
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType longType = module.getBuiltIns().getLongType();
Intrinsics.checkNotNullExpressionValue(longType, "getLongType(...)");
return longType;
}
}

View File

@@ -0,0 +1,20 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class NullValue extends ConstantValue<Void> {
public NullValue() {
super(null);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType nullableNothingType = module.getBuiltIns().getNullableNothingType();
Intrinsics.checkNotNullExpressionValue(nullableNothingType, "getNullableNothingType(...)");
return nullableNothingType;
}
}

View File

@@ -0,0 +1,16 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import java.util.Collection;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class PrimitiveTypeUtilKt {
public static final Collection<KotlinType> getAllSignedLiteralTypes(ModuleDescriptor moduleDescriptor) {
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
return CollectionsKt.listOf((Object[]) new SimpleType[]{moduleDescriptor.getBuiltIns().getIntType(), moduleDescriptor.getBuiltIns().getLongType(), moduleDescriptor.getBuiltIns().getByteType(), moduleDescriptor.getBuiltIns().getShortType()});
}
}

View File

@@ -0,0 +1,25 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class ShortValue extends IntegerValueConstant<Short> {
public ShortValue(short s4) {
super(Short.valueOf(s4));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return getValue().intValue() + ".toShort()";
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType shortType = module.getBuiltIns().getShortType();
Intrinsics.checkNotNullExpressionValue(shortType, "getShortType(...)");
return shortType;
}
}

View File

@@ -0,0 +1,29 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import com.google.android.gms.measurement.internal.a;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.text.Typography;
/* loaded from: classes3.dex */
public final class StringValue extends ConstantValue<String> {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public StringValue(String value) {
super(value);
Intrinsics.checkNotNullParameter(value, "value");
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return a.n(new StringBuilder("\""), getValue(), Typography.quote);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public SimpleType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
SimpleType stringType = module.getBuiltIns().getStringType();
Intrinsics.checkNotNullExpressionValue(stringType, "getStringType(...)");
return stringType;
}
}

View File

@@ -0,0 +1,34 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import java.util.List;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public final class TypedArrayValue extends ArrayValue {
private final KotlinType type;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public TypedArrayValue(List<? extends ConstantValue<?>> value, final KotlinType type) {
super(value, new Function1<ModuleDescriptor, KotlinType>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.constants.TypedArrayValue.1
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public final KotlinType invoke(ModuleDescriptor it) {
Intrinsics.checkNotNullParameter(it, "it");
return KotlinType.this;
}
});
Intrinsics.checkNotNullParameter(value, "value");
Intrinsics.checkNotNullParameter(type, "type");
this.type = type;
}
public final KotlinType getType() {
return this.type;
}
}

View File

@@ -0,0 +1,31 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
/* loaded from: classes3.dex */
public final class UByteValue extends UnsignedValueConstant<Byte> {
public UByteValue(byte b4) {
super(Byte.valueOf(b4));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public KotlinType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
ClassDescriptor findClassAcrossModuleDependencies = FindClassInModuleKt.findClassAcrossModuleDependencies(module, StandardNames.FqNames.uByte);
SimpleType defaultType = findClassAcrossModuleDependencies != null ? findClassAcrossModuleDependencies.getDefaultType() : null;
return defaultType == null ? ErrorUtils.createErrorType(ErrorTypeKind.NOT_FOUND_UNSIGNED_TYPE, "UByte") : defaultType;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return getValue().intValue() + ".toUByte()";
}
}

View File

@@ -0,0 +1,31 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
/* loaded from: classes3.dex */
public final class UIntValue extends UnsignedValueConstant<Integer> {
public UIntValue(int i) {
super(Integer.valueOf(i));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public KotlinType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
ClassDescriptor findClassAcrossModuleDependencies = FindClassInModuleKt.findClassAcrossModuleDependencies(module, StandardNames.FqNames.uInt);
SimpleType defaultType = findClassAcrossModuleDependencies != null ? findClassAcrossModuleDependencies.getDefaultType() : null;
return defaultType == null ? ErrorUtils.createErrorType(ErrorTypeKind.NOT_FOUND_UNSIGNED_TYPE, "UInt") : defaultType;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return getValue().intValue() + ".toUInt()";
}
}

View File

@@ -0,0 +1,31 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
/* loaded from: classes3.dex */
public final class ULongValue extends UnsignedValueConstant<Long> {
public ULongValue(long j4) {
super(Long.valueOf(j4));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public KotlinType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
ClassDescriptor findClassAcrossModuleDependencies = FindClassInModuleKt.findClassAcrossModuleDependencies(module, StandardNames.FqNames.uLong);
SimpleType defaultType = findClassAcrossModuleDependencies != null ? findClassAcrossModuleDependencies.getDefaultType() : null;
return defaultType == null ? ErrorUtils.createErrorType(ErrorTypeKind.NOT_FOUND_UNSIGNED_TYPE, "ULong") : defaultType;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return getValue().longValue() + ".toULong()";
}
}

View File

@@ -0,0 +1,31 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
/* loaded from: classes3.dex */
public final class UShortValue extends UnsignedValueConstant<Short> {
public UShortValue(short s4) {
super(Short.valueOf(s4));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public KotlinType getType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
ClassDescriptor findClassAcrossModuleDependencies = FindClassInModuleKt.findClassAcrossModuleDependencies(module, StandardNames.FqNames.uShort);
SimpleType defaultType = findClassAcrossModuleDependencies != null ? findClassAcrossModuleDependencies.getDefaultType() : null;
return defaultType == null ? ErrorUtils.createErrorType(ErrorTypeKind.NOT_FOUND_UNSIGNED_TYPE, "UShort") : defaultType;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue
public String toString() {
return getValue().intValue() + ".toUShort()";
}
}

View File

@@ -0,0 +1,8 @@
package kotlin.reflect.jvm.internal.impl.resolve.constants;
/* loaded from: classes3.dex */
public abstract class UnsignedValueConstant<T> extends ConstantValue<T> {
public UnsignedValueConstant(T t2) {
super(t2);
}
}

View File

@@ -0,0 +1,20 @@
package kotlin.reflect.jvm.internal.impl.resolve.deprecation;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public abstract class DeprecationInfo implements Comparable<DeprecationInfo> {
public abstract DeprecationLevelValue getDeprecationLevel();
public abstract boolean getPropagatesToOverrides();
@Override // java.lang.Comparable
public int compareTo(DeprecationInfo other) {
Intrinsics.checkNotNullParameter(other, "other");
int compareTo = getDeprecationLevel().compareTo(other.getDeprecationLevel());
if (compareTo == 0 && !getPropagatesToOverrides() && other.getPropagatesToOverrides()) {
return 1;
}
return compareTo;
}
}

View File

@@ -0,0 +1,36 @@
package kotlin.reflect.jvm.internal.impl.resolve.deprecation;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
/* loaded from: classes3.dex */
public final class DeprecationLevelValue {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ DeprecationLevelValue[] $VALUES;
public static final DeprecationLevelValue WARNING = new DeprecationLevelValue("WARNING", 0);
public static final DeprecationLevelValue ERROR = new DeprecationLevelValue("ERROR", 1);
public static final DeprecationLevelValue HIDDEN = new DeprecationLevelValue("HIDDEN", 2);
private static final /* synthetic */ DeprecationLevelValue[] $values() {
return new DeprecationLevelValue[]{WARNING, ERROR, HIDDEN};
}
static {
DeprecationLevelValue[] $values = $values();
$VALUES = $values;
$ENTRIES = EnumEntriesKt.enumEntries($values);
}
private DeprecationLevelValue(String str, int i) {
}
public static DeprecationLevelValue valueOf(String str) {
return (DeprecationLevelValue) Enum.valueOf(DeprecationLevelValue.class, str);
}
public static DeprecationLevelValue[] values() {
return (DeprecationLevelValue[]) $VALUES.clone();
}
}

View File

@@ -0,0 +1,13 @@
package kotlin.reflect.jvm.internal.impl.resolve.deprecation;
/* loaded from: classes3.dex */
public abstract class DescriptorBasedDeprecationInfo extends DeprecationInfo {
public boolean getForcePropagationToOverrides() {
return false;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.deprecation.DeprecationInfo
public boolean getPropagatesToOverrides() {
return getForcePropagationToOverrides();
}
}

View File

@@ -0,0 +1,13 @@
package kotlin.reflect.jvm.internal.impl.resolve.deprecation;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
/* loaded from: classes3.dex */
public final class DescriptorBasedDeprecationInfoKt {
private static final CallableDescriptor.UserDataKey<DescriptorBasedDeprecationInfo> DEPRECATED_FUNCTION_KEY = new CallableDescriptor.UserDataKey<DescriptorBasedDeprecationInfo>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.deprecation.DescriptorBasedDeprecationInfoKt$DEPRECATED_FUNCTION_KEY$1
};
public static final CallableDescriptor.UserDataKey<DescriptorBasedDeprecationInfo> getDEPRECATED_FUNCTION_KEY() {
return DEPRECATED_FUNCTION_KEY;
}
}

View File

@@ -0,0 +1,38 @@
package kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.FunctionReference;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.reflect.KDeclarationContainer;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
/* loaded from: classes3.dex */
public /* synthetic */ class DescriptorUtilsKt$declaresOrInheritsDefaultValue$2 extends FunctionReference implements Function1<ValueParameterDescriptor, Boolean> {
public static final DescriptorUtilsKt$declaresOrInheritsDefaultValue$2 INSTANCE = new DescriptorUtilsKt$declaresOrInheritsDefaultValue$2();
public DescriptorUtilsKt$declaresOrInheritsDefaultValue$2() {
super(1);
}
@Override // kotlin.jvm.internal.CallableReference, kotlin.reflect.KCallable
public final String getName() {
return "declaresDefaultValue";
}
@Override // kotlin.jvm.internal.CallableReference
public final KDeclarationContainer getOwner() {
return Reflection.getOrCreateKotlinClass(ValueParameterDescriptor.class);
}
@Override // kotlin.jvm.internal.CallableReference
public final String getSignature() {
return "declaresDefaultValue()Z";
}
@Override // kotlin.jvm.functions.Function1
public final Boolean invoke(ValueParameterDescriptor p02) {
Intrinsics.checkNotNullParameter(p02, "p0");
return Boolean.valueOf(p02.declaresDefaultValue());
}
}

View File

@@ -0,0 +1,284 @@
package kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptorWithTypeParameters;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.InlineClassRepresentation;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.MultiFieldValueClassRepresentation;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyAccessorDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueClassRepresentation;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.name.FqNameUnsafe;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefinerKt;
import kotlin.reflect.jvm.internal.impl.types.checker.TypeRefinementSupport;
import kotlin.reflect.jvm.internal.impl.utils.DFS;
import kotlin.sequences.Sequence;
import kotlin.sequences.SequencesKt;
@SourceDebugExtension({"SMAP\nDescriptorUtils.kt\nKotlin\n*S Kotlin\n*F\n+ 1 DescriptorUtils.kt\norg/jetbrains/kotlin/resolve/descriptorUtil/DescriptorUtilsKt\n+ 2 ClassKind.kt\norg/jetbrains/kotlin/descriptors/ClassKindKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 4 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 5 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,465:1\n34#2:466\n819#3:467\n847#3,2:468\n1603#3,9:470\n1855#3:479\n1856#3:481\n1612#3:482\n819#3:483\n847#3,2:484\n819#3:488\n847#3,2:489\n350#3,7:492\n1747#3,3:499\n2624#3,3:502\n1549#3:505\n1620#3,3:506\n1#4:480\n1#4:491\n1282#5,2:486\n*S KotlinDebug\n*F\n+ 1 DescriptorUtils.kt\norg/jetbrains/kotlin/resolve/descriptorUtil/DescriptorUtilsKt\n*L\n148#1:466\n167#1:467\n167#1:468,2\n168#1:470,9\n168#1:479\n168#1:481\n168#1:482\n175#1:483\n175#1:484,2\n236#1:488\n236#1:489,2\n306#1:492,7\n448#1:499,3\n454#1:502,3\n208#1:505\n208#1:506,3\n168#1:480\n229#1:486,2\n*E\n"})
/* loaded from: classes3.dex */
public final class DescriptorUtilsKt {
private static final Name RETENTION_PARAMETER_NAME;
static {
Name identifier = Name.identifier("value");
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
RETENTION_PARAMETER_NAME = identifier;
}
public static final boolean declaresOrInheritsDefaultValue(ValueParameterDescriptor valueParameterDescriptor) {
Intrinsics.checkNotNullParameter(valueParameterDescriptor, "<this>");
Boolean ifAny = DFS.ifAny(CollectionsKt.listOf(valueParameterDescriptor), new DFS.Neighbors() { // from class: kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt$$Lambda$0
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.Neighbors
public Iterable getNeighbors(Object obj) {
Iterable declaresOrInheritsDefaultValue$lambda$5;
declaresOrInheritsDefaultValue$lambda$5 = DescriptorUtilsKt.declaresOrInheritsDefaultValue$lambda$5((ValueParameterDescriptor) obj);
return declaresOrInheritsDefaultValue$lambda$5;
}
}, DescriptorUtilsKt$declaresOrInheritsDefaultValue$2.INSTANCE);
Intrinsics.checkNotNullExpressionValue(ifAny, "ifAny(...)");
return ifAny.booleanValue();
}
/* JADX INFO: Access modifiers changed from: private */
public static final Iterable declaresOrInheritsDefaultValue$lambda$5(ValueParameterDescriptor valueParameterDescriptor) {
int collectionSizeOrDefault;
Collection<ValueParameterDescriptor> overriddenDescriptors = valueParameterDescriptor.getOverriddenDescriptors();
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(overriddenDescriptors, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<T> it = overriddenDescriptors.iterator();
while (it.hasNext()) {
arrayList.add(((ValueParameterDescriptor) it.next()).getOriginal());
}
return arrayList;
}
public static final CallableMemberDescriptor firstOverridden(CallableMemberDescriptor callableMemberDescriptor, final boolean z3, final Function1<? super CallableMemberDescriptor, Boolean> predicate) {
Intrinsics.checkNotNullParameter(callableMemberDescriptor, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
final Ref.ObjectRef objectRef = new Ref.ObjectRef();
return (CallableMemberDescriptor) DFS.dfs(CollectionsKt.listOf(callableMemberDescriptor), new DFS.Neighbors(z3) { // from class: kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt$$Lambda$1
private final boolean arg$0;
{
this.arg$0 = z3;
}
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.Neighbors
public Iterable getNeighbors(Object obj) {
Iterable firstOverridden$lambda$9;
firstOverridden$lambda$9 = DescriptorUtilsKt.firstOverridden$lambda$9(this.arg$0, (CallableMemberDescriptor) obj);
return firstOverridden$lambda$9;
}
}, new DFS.AbstractNodeHandler<CallableMemberDescriptor, CallableMemberDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt$firstOverridden$2
/* JADX WARN: Multi-variable type inference failed */
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.AbstractNodeHandler, kotlin.reflect.jvm.internal.impl.utils.DFS.NodeHandler
public void afterChildren(CallableMemberDescriptor current) {
Intrinsics.checkNotNullParameter(current, "current");
if (objectRef.element == null && predicate.invoke(current).booleanValue()) {
objectRef.element = current;
}
}
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.AbstractNodeHandler, kotlin.reflect.jvm.internal.impl.utils.DFS.NodeHandler
public boolean beforeChildren(CallableMemberDescriptor current) {
Intrinsics.checkNotNullParameter(current, "current");
return objectRef.element == null;
}
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.NodeHandler
public CallableMemberDescriptor result() {
return objectRef.element;
}
});
}
public static /* synthetic */ CallableMemberDescriptor firstOverridden$default(CallableMemberDescriptor callableMemberDescriptor, boolean z3, Function1 function1, int i, Object obj) {
if ((i & 1) != 0) {
z3 = false;
}
return firstOverridden(callableMemberDescriptor, z3, function1);
}
/* JADX INFO: Access modifiers changed from: private */
public static final Iterable firstOverridden$lambda$9(boolean z3, CallableMemberDescriptor callableMemberDescriptor) {
if (z3) {
callableMemberDescriptor = callableMemberDescriptor != null ? callableMemberDescriptor.getOriginal() : null;
}
Collection<? extends CallableMemberDescriptor> overriddenDescriptors = callableMemberDescriptor != null ? callableMemberDescriptor.getOverriddenDescriptors() : null;
return overriddenDescriptors == null ? CollectionsKt.emptyList() : overriddenDescriptors;
}
public static final FqName fqNameOrNull(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
FqNameUnsafe fqNameUnsafe = getFqNameUnsafe(declarationDescriptor);
if (!fqNameUnsafe.isSafe()) {
fqNameUnsafe = null;
}
if (fqNameUnsafe != null) {
return fqNameUnsafe.toSafe();
}
return null;
}
public static final ClassDescriptor getAnnotationClass(AnnotationDescriptor annotationDescriptor) {
Intrinsics.checkNotNullParameter(annotationDescriptor, "<this>");
ClassifierDescriptor mo1394getDeclarationDescriptor = annotationDescriptor.getType().getConstructor().mo1394getDeclarationDescriptor();
if (mo1394getDeclarationDescriptor instanceof ClassDescriptor) {
return (ClassDescriptor) mo1394getDeclarationDescriptor;
}
return null;
}
public static final KotlinBuiltIns getBuiltIns(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
return getModule(declarationDescriptor).getBuiltIns();
}
public static final ClassId getClassId(ClassifierDescriptor classifierDescriptor) {
DeclarationDescriptor containingDeclaration;
ClassId classId;
if (classifierDescriptor != null && (containingDeclaration = classifierDescriptor.getContainingDeclaration()) != null) {
if (containingDeclaration instanceof PackageFragmentDescriptor) {
return new ClassId(((PackageFragmentDescriptor) containingDeclaration).getFqName(), classifierDescriptor.getName());
}
if ((containingDeclaration instanceof ClassifierDescriptorWithTypeParameters) && (classId = getClassId((ClassifierDescriptor) containingDeclaration)) != null) {
return classId.createNestedClassId(classifierDescriptor.getName());
}
}
return null;
}
public static final FqName getFqNameSafe(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
FqName fqNameSafe = DescriptorUtils.getFqNameSafe(declarationDescriptor);
Intrinsics.checkNotNullExpressionValue(fqNameSafe, "getFqNameSafe(...)");
return fqNameSafe;
}
public static final FqNameUnsafe getFqNameUnsafe(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
FqNameUnsafe fqName = DescriptorUtils.getFqName(declarationDescriptor);
Intrinsics.checkNotNullExpressionValue(fqName, "getFqName(...)");
return fqName;
}
public static final InlineClassRepresentation<SimpleType> getInlineClassRepresentation(ClassDescriptor classDescriptor) {
ValueClassRepresentation<SimpleType> valueClassRepresentation = classDescriptor != null ? classDescriptor.getValueClassRepresentation() : null;
if (valueClassRepresentation instanceof InlineClassRepresentation) {
return (InlineClassRepresentation) valueClassRepresentation;
}
return null;
}
public static final KotlinTypeRefiner getKotlinTypeRefiner(ModuleDescriptor moduleDescriptor) {
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
kotlin.reflect.jvm.internal.impl.types.checker.Ref ref = (kotlin.reflect.jvm.internal.impl.types.checker.Ref) moduleDescriptor.getCapability(KotlinTypeRefinerKt.getREFINER_CAPABILITY());
TypeRefinementSupport typeRefinementSupport = ref != null ? (TypeRefinementSupport) ref.getValue() : null;
return typeRefinementSupport instanceof TypeRefinementSupport.Enabled ? ((TypeRefinementSupport.Enabled) typeRefinementSupport).getTypeRefiner() : KotlinTypeRefiner.Default.INSTANCE;
}
public static final ModuleDescriptor getModule(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
ModuleDescriptor containingModule = DescriptorUtils.getContainingModule(declarationDescriptor);
Intrinsics.checkNotNullExpressionValue(containingModule, "getContainingModule(...)");
return containingModule;
}
public static final MultiFieldValueClassRepresentation<SimpleType> getMultiFieldValueClassRepresentation(ClassDescriptor classDescriptor) {
ValueClassRepresentation<SimpleType> valueClassRepresentation = classDescriptor != null ? classDescriptor.getValueClassRepresentation() : null;
if (valueClassRepresentation instanceof MultiFieldValueClassRepresentation) {
return (MultiFieldValueClassRepresentation) valueClassRepresentation;
}
return null;
}
public static final Sequence<DeclarationDescriptor> getParents(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
return SequencesKt.drop(getParentsWithSelf(declarationDescriptor), 1);
}
public static final Sequence<DeclarationDescriptor> getParentsWithSelf(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
return SequencesKt.generateSequence(declarationDescriptor, new Function1<DeclarationDescriptor, DeclarationDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt$parentsWithSelf$1
@Override // kotlin.jvm.functions.Function1
public final DeclarationDescriptor invoke(DeclarationDescriptor it) {
Intrinsics.checkNotNullParameter(it, "it");
return it.getContainingDeclaration();
}
});
}
public static final CallableMemberDescriptor getPropertyIfAccessor(CallableMemberDescriptor callableMemberDescriptor) {
Intrinsics.checkNotNullParameter(callableMemberDescriptor, "<this>");
if (!(callableMemberDescriptor instanceof PropertyAccessorDescriptor)) {
return callableMemberDescriptor;
}
PropertyDescriptor correspondingProperty = ((PropertyAccessorDescriptor) callableMemberDescriptor).getCorrespondingProperty();
Intrinsics.checkNotNullExpressionValue(correspondingProperty, "getCorrespondingProperty(...)");
return correspondingProperty;
}
public static final ClassDescriptor getSuperClassNotAny(ClassDescriptor classDescriptor) {
Intrinsics.checkNotNullParameter(classDescriptor, "<this>");
for (KotlinType kotlinType : classDescriptor.getDefaultType().getConstructor().mo1395getSupertypes()) {
if (!KotlinBuiltIns.isAnyOrNullableAny(kotlinType)) {
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
if (DescriptorUtils.isClassOrEnumClass(mo1394getDeclarationDescriptor)) {
Intrinsics.checkNotNull(mo1394getDeclarationDescriptor, "null cannot be cast to non-null type org.jetbrains.kotlin.descriptors.ClassDescriptor");
return (ClassDescriptor) mo1394getDeclarationDescriptor;
}
}
}
return null;
}
public static final boolean isTypeRefinementEnabled(ModuleDescriptor moduleDescriptor) {
TypeRefinementSupport typeRefinementSupport;
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
kotlin.reflect.jvm.internal.impl.types.checker.Ref ref = (kotlin.reflect.jvm.internal.impl.types.checker.Ref) moduleDescriptor.getCapability(KotlinTypeRefinerKt.getREFINER_CAPABILITY());
return (ref == null || (typeRefinementSupport = (TypeRefinementSupport) ref.getValue()) == null || !typeRefinementSupport.isEnabled()) ? false : true;
}
public static final ClassDescriptor resolveTopLevelClass(ModuleDescriptor moduleDescriptor, FqName topLevelClassFqName, LookupLocation location) {
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
Intrinsics.checkNotNullParameter(topLevelClassFqName, "topLevelClassFqName");
Intrinsics.checkNotNullParameter(location, "location");
topLevelClassFqName.isRoot();
FqName parent = topLevelClassFqName.parent();
Intrinsics.checkNotNullExpressionValue(parent, "parent(...)");
MemberScope memberScope = moduleDescriptor.getPackage(parent).getMemberScope();
Name shortName = topLevelClassFqName.shortName();
Intrinsics.checkNotNullExpressionValue(shortName, "shortName(...)");
ClassifierDescriptor mo1396getContributedClassifier = memberScope.mo1396getContributedClassifier(shortName, location);
if (mo1396getContributedClassifier instanceof ClassDescriptor) {
return (ClassDescriptor) mo1396getContributedClassifier;
}
return null;
}
}

View File

@@ -0,0 +1,125 @@
package kotlin.reflect.jvm.internal.impl.resolve.jvm;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassConstructorDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
import kotlin.reflect.jvm.internal.impl.name.Name;
@SourceDebugExtension({"SMAP\nSyntheticJavaPartsProvider.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SyntheticJavaPartsProvider.kt\norg/jetbrains/kotlin/resolve/jvm/CompositeSyntheticJavaPartsProvider\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,102:1\n1360#2:103\n1446#2,5:104\n1855#2,2:109\n1360#2:111\n1446#2,5:112\n1855#2,2:117\n1855#2,2:119\n1360#2:121\n1446#2,5:122\n1855#2,2:127\n1789#2,3:129\n*S KotlinDebug\n*F\n+ 1 SyntheticJavaPartsProvider.kt\norg/jetbrains/kotlin/resolve/jvm/CompositeSyntheticJavaPartsProvider\n*L\n58#1:103\n58#1:104,5\n67#1:109,2\n72#1:111\n72#1:112,5\n76#1:117,2\n81#1:119,2\n86#1:121\n86#1:122,5\n91#1:127,2\n99#1:129,3\n*E\n"})
/* loaded from: classes3.dex */
public final class CompositeSyntheticJavaPartsProvider implements SyntheticJavaPartsProvider {
private final List<SyntheticJavaPartsProvider> inner;
/* JADX WARN: Multi-variable type inference failed */
public CompositeSyntheticJavaPartsProvider(List<? extends SyntheticJavaPartsProvider> inner) {
Intrinsics.checkNotNullParameter(inner, "inner");
this.inner = inner;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.jvm.SyntheticJavaPartsProvider
public void generateConstructors(LazyJavaResolverContext context_receiver_0, ClassDescriptor thisDescriptor, List<ClassConstructorDescriptor> result) {
Intrinsics.checkNotNullParameter(context_receiver_0, "$context_receiver_0");
Intrinsics.checkNotNullParameter(thisDescriptor, "thisDescriptor");
Intrinsics.checkNotNullParameter(result, "result");
Iterator<T> it = this.inner.iterator();
while (it.hasNext()) {
((SyntheticJavaPartsProvider) it.next()).generateConstructors(context_receiver_0, thisDescriptor, result);
}
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.jvm.SyntheticJavaPartsProvider
public void generateMethods(LazyJavaResolverContext context_receiver_0, ClassDescriptor thisDescriptor, Name name, Collection<SimpleFunctionDescriptor> result) {
Intrinsics.checkNotNullParameter(context_receiver_0, "$context_receiver_0");
Intrinsics.checkNotNullParameter(thisDescriptor, "thisDescriptor");
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(result, "result");
Iterator<T> it = this.inner.iterator();
while (it.hasNext()) {
((SyntheticJavaPartsProvider) it.next()).generateMethods(context_receiver_0, thisDescriptor, name, result);
}
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.jvm.SyntheticJavaPartsProvider
public void generateNestedClass(LazyJavaResolverContext context_receiver_0, ClassDescriptor thisDescriptor, Name name, List<ClassDescriptor> result) {
Intrinsics.checkNotNullParameter(context_receiver_0, "$context_receiver_0");
Intrinsics.checkNotNullParameter(thisDescriptor, "thisDescriptor");
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(result, "result");
Iterator<T> it = this.inner.iterator();
while (it.hasNext()) {
((SyntheticJavaPartsProvider) it.next()).generateNestedClass(context_receiver_0, thisDescriptor, name, result);
}
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.jvm.SyntheticJavaPartsProvider
public void generateStaticFunctions(LazyJavaResolverContext context_receiver_0, ClassDescriptor thisDescriptor, Name name, Collection<SimpleFunctionDescriptor> result) {
Intrinsics.checkNotNullParameter(context_receiver_0, "$context_receiver_0");
Intrinsics.checkNotNullParameter(thisDescriptor, "thisDescriptor");
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(result, "result");
Iterator<T> it = this.inner.iterator();
while (it.hasNext()) {
((SyntheticJavaPartsProvider) it.next()).generateStaticFunctions(context_receiver_0, thisDescriptor, name, result);
}
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.jvm.SyntheticJavaPartsProvider
public List<Name> getMethodNames(LazyJavaResolverContext context_receiver_0, ClassDescriptor thisDescriptor) {
Intrinsics.checkNotNullParameter(context_receiver_0, "$context_receiver_0");
Intrinsics.checkNotNullParameter(thisDescriptor, "thisDescriptor");
List<SyntheticJavaPartsProvider> list = this.inner;
ArrayList arrayList = new ArrayList();
Iterator<T> it = list.iterator();
while (it.hasNext()) {
CollectionsKt__MutableCollectionsKt.addAll(arrayList, ((SyntheticJavaPartsProvider) it.next()).getMethodNames(context_receiver_0, thisDescriptor));
}
return arrayList;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.jvm.SyntheticJavaPartsProvider
public List<Name> getNestedClassNames(LazyJavaResolverContext context_receiver_0, ClassDescriptor thisDescriptor) {
Intrinsics.checkNotNullParameter(context_receiver_0, "$context_receiver_0");
Intrinsics.checkNotNullParameter(thisDescriptor, "thisDescriptor");
List<SyntheticJavaPartsProvider> list = this.inner;
ArrayList arrayList = new ArrayList();
Iterator<T> it = list.iterator();
while (it.hasNext()) {
CollectionsKt__MutableCollectionsKt.addAll(arrayList, ((SyntheticJavaPartsProvider) it.next()).getNestedClassNames(context_receiver_0, thisDescriptor));
}
return arrayList;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.jvm.SyntheticJavaPartsProvider
public List<Name> getStaticFunctionNames(LazyJavaResolverContext context_receiver_0, ClassDescriptor thisDescriptor) {
Intrinsics.checkNotNullParameter(context_receiver_0, "$context_receiver_0");
Intrinsics.checkNotNullParameter(thisDescriptor, "thisDescriptor");
List<SyntheticJavaPartsProvider> list = this.inner;
ArrayList arrayList = new ArrayList();
Iterator<T> it = list.iterator();
while (it.hasNext()) {
CollectionsKt__MutableCollectionsKt.addAll(arrayList, ((SyntheticJavaPartsProvider) it.next()).getStaticFunctionNames(context_receiver_0, thisDescriptor));
}
return arrayList;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.jvm.SyntheticJavaPartsProvider
public PropertyDescriptorImpl modifyField(LazyJavaResolverContext context_receiver_0, ClassDescriptor thisDescriptor, PropertyDescriptorImpl propertyDescriptor) {
Intrinsics.checkNotNullParameter(context_receiver_0, "$context_receiver_0");
Intrinsics.checkNotNullParameter(thisDescriptor, "thisDescriptor");
Intrinsics.checkNotNullParameter(propertyDescriptor, "propertyDescriptor");
Iterator<T> it = this.inner.iterator();
while (it.hasNext()) {
propertyDescriptor = ((SyntheticJavaPartsProvider) it.next()).modifyField(context_receiver_0, thisDescriptor, propertyDescriptor);
}
return propertyDescriptor;
}
}

View File

@@ -0,0 +1,81 @@
package kotlin.reflect.jvm.internal.impl.resolve.jvm;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassConstructorDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
import kotlin.reflect.jvm.internal.impl.resolve.InlineClassesUtilsKt;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt;
@SourceDebugExtension({"SMAP\ninlineClassManglingRules.kt\nKotlin\n*S Kotlin\n*F\n+ 1 inlineClassManglingRules.kt\norg/jetbrains/kotlin/resolve/jvm/InlineClassManglingRulesKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,53:1\n1747#2,3:54\n1747#2,3:57\n1#3:60\n*S KotlinDebug\n*F\n+ 1 inlineClassManglingRules.kt\norg/jetbrains/kotlin/resolve/jvm/InlineClassManglingRulesKt\n*L\n21#1:54,3\n27#1:57,3\n*E\n"})
/* loaded from: classes3.dex */
public final class InlineClassManglingRulesKt {
private static final boolean isDontMangleClass(ClassDescriptor classDescriptor) {
return Intrinsics.areEqual(DescriptorUtilsKt.getFqNameSafe(classDescriptor), StandardNames.RESULT_FQ_NAME);
}
private static final boolean isTypeParameterWithUpperBoundThatRequiresMangling(KotlinType kotlinType, boolean z3) {
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
TypeParameterDescriptor typeParameterDescriptor = mo1394getDeclarationDescriptor instanceof TypeParameterDescriptor ? (TypeParameterDescriptor) mo1394getDeclarationDescriptor : null;
if (typeParameterDescriptor == null) {
return false;
}
return (z3 || !InlineClassesUtilsKt.isMultiFieldValueClass(typeParameterDescriptor)) && requiresFunctionNameManglingInParameterTypes(TypeUtilsKt.getRepresentativeUpperBound(typeParameterDescriptor));
}
public static final boolean isValueClassThatRequiresMangling(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
return InlineClassesUtilsKt.isValueClass(declarationDescriptor) && !isDontMangleClass((ClassDescriptor) declarationDescriptor);
}
private static final boolean requiresFunctionNameManglingInParameterTypes(KotlinType kotlinType) {
return isValueClassThatRequiresMangling(kotlinType) || isTypeParameterWithUpperBoundThatRequiresMangling(kotlinType, true);
}
public static final boolean shouldHideConstructorDueToValueClassTypeValueParameters(CallableMemberDescriptor descriptor) {
Intrinsics.checkNotNullParameter(descriptor, "descriptor");
ClassConstructorDescriptor classConstructorDescriptor = descriptor instanceof ClassConstructorDescriptor ? (ClassConstructorDescriptor) descriptor : null;
if (classConstructorDescriptor == null || DescriptorVisibilities.isPrivate(classConstructorDescriptor.getVisibility())) {
return false;
}
ClassDescriptor constructedClass = classConstructorDescriptor.getConstructedClass();
Intrinsics.checkNotNullExpressionValue(constructedClass, "getConstructedClass(...)");
if (InlineClassesUtilsKt.isValueClass(constructedClass) || DescriptorUtils.isSealedClass(classConstructorDescriptor.getConstructedClass())) {
return false;
}
List<ValueParameterDescriptor> valueParameters = classConstructorDescriptor.getValueParameters();
Intrinsics.checkNotNullExpressionValue(valueParameters, "getValueParameters(...)");
List<ValueParameterDescriptor> list = valueParameters;
if ((list instanceof Collection) && list.isEmpty()) {
return false;
}
Iterator<T> it = list.iterator();
while (it.hasNext()) {
KotlinType type = ((ValueParameterDescriptor) it.next()).getType();
Intrinsics.checkNotNullExpressionValue(type, "getType(...)");
if (requiresFunctionNameManglingInParameterTypes(type)) {
return true;
}
}
return false;
}
public static final boolean isValueClassThatRequiresMangling(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
return mo1394getDeclarationDescriptor != null && ((InlineClassesUtilsKt.isInlineClass(mo1394getDeclarationDescriptor) && isValueClassThatRequiresMangling(mo1394getDeclarationDescriptor)) || InlineClassesUtilsKt.needsMfvcFlattening(kotlinType));
}
}

View File

@@ -0,0 +1,61 @@
package kotlin.reflect.jvm.internal.impl.resolve.jvm;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.NoLookupLocation;
import kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache;
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaPackageFragmentProvider;
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaPackageFragment;
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
import kotlin.reflect.jvm.internal.impl.load.java.structure.LightClassOriginKind;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
/* loaded from: classes3.dex */
public final class JavaDescriptorResolver {
private final JavaResolverCache javaResolverCache;
private final LazyJavaPackageFragmentProvider packageFragmentProvider;
public JavaDescriptorResolver(LazyJavaPackageFragmentProvider packageFragmentProvider, JavaResolverCache javaResolverCache) {
Intrinsics.checkNotNullParameter(packageFragmentProvider, "packageFragmentProvider");
Intrinsics.checkNotNullParameter(javaResolverCache, "javaResolverCache");
this.packageFragmentProvider = packageFragmentProvider;
this.javaResolverCache = javaResolverCache;
}
public final LazyJavaPackageFragmentProvider getPackageFragmentProvider() {
return this.packageFragmentProvider;
}
public final ClassDescriptor resolveClass(JavaClass javaClass) {
Intrinsics.checkNotNullParameter(javaClass, "javaClass");
FqName fqName = javaClass.getFqName();
if (fqName != null && javaClass.getLightClassOriginKind() == LightClassOriginKind.SOURCE) {
return this.javaResolverCache.getClassResolvedFromSource(fqName);
}
JavaClass outerClass = javaClass.getOuterClass();
if (outerClass != null) {
ClassDescriptor resolveClass = resolveClass(outerClass);
MemberScope unsubstitutedInnerClassesScope = resolveClass != null ? resolveClass.getUnsubstitutedInnerClassesScope() : null;
ClassifierDescriptor mo1396getContributedClassifier = unsubstitutedInnerClassesScope != null ? unsubstitutedInnerClassesScope.mo1396getContributedClassifier(javaClass.getName(), NoLookupLocation.FROM_JAVA_LOADER) : null;
if (mo1396getContributedClassifier instanceof ClassDescriptor) {
return (ClassDescriptor) mo1396getContributedClassifier;
}
return null;
}
if (fqName == null) {
return null;
}
LazyJavaPackageFragmentProvider lazyJavaPackageFragmentProvider = this.packageFragmentProvider;
FqName parent = fqName.parent();
Intrinsics.checkNotNullExpressionValue(parent, "parent(...)");
LazyJavaPackageFragment lazyJavaPackageFragment = (LazyJavaPackageFragment) CollectionsKt.firstOrNull((List) lazyJavaPackageFragmentProvider.getPackageFragments(parent));
if (lazyJavaPackageFragment != null) {
return lazyJavaPackageFragment.findClassifierByJavaClass$descriptors_jvm(javaClass);
}
return null;
}
}

View File

@@ -0,0 +1,149 @@
package kotlin.reflect.jvm.internal.impl.resolve.jvm;
import com.google.firebase.sessions.settings.RemoteSettings;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.text.Typography;
/* loaded from: classes3.dex */
public class JvmClassName {
private FqName fqName;
private final String internalName;
private static /* synthetic */ void $$$reportNull$$$0(int i) {
String str = (i == 3 || i == 6 || i == 7 || i == 8) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
Object[] objArr = new Object[(i == 3 || i == 6 || i == 7 || i == 8) ? 2 : 3];
switch (i) {
case 1:
objArr[0] = "classId";
break;
case 2:
case 4:
objArr[0] = "fqName";
break;
case 3:
case 6:
case 7:
case 8:
objArr[0] = "kotlin/reflect/jvm/internal/impl/resolve/jvm/JvmClassName";
break;
case 5:
default:
objArr[0] = "internalName";
break;
}
if (i == 3) {
objArr[1] = "byFqNameWithoutInnerClasses";
} else if (i == 6) {
objArr[1] = "getFqNameForClassNameWithoutDollars";
} else if (i == 7) {
objArr[1] = "getPackageFqName";
} else if (i != 8) {
objArr[1] = "kotlin/reflect/jvm/internal/impl/resolve/jvm/JvmClassName";
} else {
objArr[1] = "getInternalName";
}
switch (i) {
case 1:
objArr[2] = "byClassId";
break;
case 2:
case 4:
objArr[2] = "byFqNameWithoutInnerClasses";
break;
case 3:
case 6:
case 7:
case 8:
break;
case 5:
objArr[2] = "<init>";
break;
default:
objArr[2] = "byInternalName";
break;
}
String format = String.format(str, objArr);
if (i != 3 && i != 6 && i != 7 && i != 8) {
throw new IllegalArgumentException(format);
}
throw new IllegalStateException(format);
}
private JvmClassName(String str) {
if (str == null) {
$$$reportNull$$$0(5);
}
this.internalName = str;
}
public static JvmClassName byClassId(ClassId classId) {
if (classId == null) {
$$$reportNull$$$0(1);
}
FqName packageFqName = classId.getPackageFqName();
String replace = classId.getRelativeClassName().asString().replace('.', Typography.dollar);
if (packageFqName.isRoot()) {
return new JvmClassName(replace);
}
return new JvmClassName(packageFqName.asString().replace('.', '/') + RemoteSettings.FORWARD_SLASH_STRING + replace);
}
public static JvmClassName byFqNameWithoutInnerClasses(FqName fqName) {
if (fqName == null) {
$$$reportNull$$$0(2);
}
JvmClassName jvmClassName = new JvmClassName(fqName.asString().replace('.', '/'));
jvmClassName.fqName = fqName;
return jvmClassName;
}
public static JvmClassName byInternalName(String str) {
if (str == null) {
$$$reportNull$$$0(0);
}
return new JvmClassName(str);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
return this.internalName.equals(((JvmClassName) obj).internalName);
}
public FqName getFqNameForTopLevelClassMaybeWithDollars() {
return new FqName(this.internalName.replace('/', '.'));
}
public String getInternalName() {
String str = this.internalName;
if (str == null) {
$$$reportNull$$$0(8);
}
return str;
}
public FqName getPackageFqName() {
int lastIndexOf = this.internalName.lastIndexOf(RemoteSettings.FORWARD_SLASH_STRING);
if (lastIndexOf != -1) {
return new FqName(this.internalName.substring(0, lastIndexOf).replace('/', '.'));
}
FqName fqName = FqName.ROOT;
if (fqName == null) {
$$$reportNull$$$0(7);
}
return fqName;
}
public int hashCode() {
return this.internalName.hashCode();
}
public String toString() {
return this.internalName;
}
}

View File

@@ -0,0 +1,299 @@
package kotlin.reflect.jvm.internal.impl.resolve.jvm;
import C.w;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import kotlin.reflect.jvm.internal.impl.builtins.PrimitiveType;
import kotlin.reflect.jvm.internal.impl.name.FqName;
/* loaded from: classes3.dex */
public enum JvmPrimitiveType {
BOOLEAN(PrimitiveType.BOOLEAN, "boolean", "Z", "java.lang.Boolean"),
CHAR(PrimitiveType.CHAR, "char", "C", "java.lang.Character"),
BYTE(PrimitiveType.BYTE, "byte", "B", "java.lang.Byte"),
SHORT(PrimitiveType.SHORT, "short", "S", "java.lang.Short"),
INT(PrimitiveType.INT, "int", "I", "java.lang.Integer"),
FLOAT(PrimitiveType.FLOAT, "float", "F", "java.lang.Float"),
LONG(PrimitiveType.LONG, "long", "J", "java.lang.Long"),
DOUBLE(PrimitiveType.DOUBLE, "double", "D", "java.lang.Double");
private final String desc;
private final String name;
private final PrimitiveType primitiveType;
private final FqName wrapperFqName;
private static final Set<FqName> WRAPPERS_CLASS_NAMES = new HashSet();
private static final Map<String, JvmPrimitiveType> TYPE_BY_NAME = new HashMap();
private static final Map<PrimitiveType, JvmPrimitiveType> TYPE_BY_PRIMITIVE_TYPE = new EnumMap(PrimitiveType.class);
private static final Map<String, JvmPrimitiveType> TYPE_BY_DESC = new HashMap();
/* JADX WARN: Removed duplicated region for block: B:12:0x0020 */
/* JADX WARN: Removed duplicated region for block: B:15:0x0045 A[ADDED_TO_REGION] */
/* JADX WARN: Removed duplicated region for block: B:19:0x0066 */
/* JADX WARN: Removed duplicated region for block: B:20:0x006b */
/* JADX WARN: Removed duplicated region for block: B:21:0x0070 */
/* JADX WARN: Removed duplicated region for block: B:22:0x0075 */
/* JADX WARN: Removed duplicated region for block: B:25:0x007d A[ADDED_TO_REGION] */
/* JADX WARN: Removed duplicated region for block: B:27:0x0082 */
/* JADX WARN: Removed duplicated region for block: B:37:0x0025 */
/* JADX WARN: Removed duplicated region for block: B:38:0x002a */
/* JADX WARN: Removed duplicated region for block: B:39:0x002f */
/* JADX WARN: Removed duplicated region for block: B:40:0x0034 */
/* JADX WARN: Removed duplicated region for block: B:41:0x0039 */
/* JADX WARN: Removed duplicated region for block: B:42:0x003c */
/* JADX WARN: Removed duplicated region for block: B:9:0x0015 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static /* synthetic */ void $$$reportNull$$$0(int r7) {
/*
r0 = 4
r1 = 2
if (r7 == r1) goto Lc
if (r7 == r0) goto Lc
switch(r7) {
case 10: goto Lc;
case 11: goto Lc;
case 12: goto Lc;
case 13: goto Lc;
default: goto L9;
}
L9:
java.lang.String r2 = "Argument for @NotNull parameter '%s' of %s.%s must not be null"
goto Le
Lc:
java.lang.String r2 = "@NotNull method %s.%s must not return null"
Le:
if (r7 == r1) goto L17
if (r7 == r0) goto L17
switch(r7) {
case 10: goto L17;
case 11: goto L17;
case 12: goto L17;
case 13: goto L17;
default: goto L15;
}
L15:
r3 = 3
goto L18
L17:
r3 = r1
L18:
java.lang.Object[] r3 = new java.lang.Object[r3]
java.lang.String r4 = "kotlin/reflect/jvm/internal/impl/resolve/jvm/JvmPrimitiveType"
r5 = 0
switch(r7) {
case 1: goto L3c;
case 2: goto L39;
case 3: goto L34;
case 4: goto L39;
case 5: goto L2f;
case 6: goto L2a;
case 7: goto L3c;
case 8: goto L2f;
case 9: goto L25;
case 10: goto L39;
case 11: goto L39;
case 12: goto L39;
case 13: goto L39;
default: goto L20;
}
L20:
java.lang.String r6 = "className"
r3[r5] = r6
goto L40
L25:
java.lang.String r6 = "wrapperClassName"
r3[r5] = r6
goto L40
L2a:
java.lang.String r6 = "primitiveType"
r3[r5] = r6
goto L40
L2f:
java.lang.String r6 = "desc"
r3[r5] = r6
goto L40
L34:
java.lang.String r6 = "type"
r3[r5] = r6
goto L40
L39:
r3[r5] = r4
goto L40
L3c:
java.lang.String r6 = "name"
r3[r5] = r6
L40:
java.lang.String r5 = "get"
r6 = 1
if (r7 == r1) goto L61
if (r7 == r0) goto L61
switch(r7) {
case 10: goto L5c;
case 11: goto L57;
case 12: goto L52;
case 13: goto L4d;
default: goto L4a;
}
L4a:
r3[r6] = r4
goto L63
L4d:
java.lang.String r4 = "getWrapperFqName"
r3[r6] = r4
goto L63
L52:
java.lang.String r4 = "getDesc"
r3[r6] = r4
goto L63
L57:
java.lang.String r4 = "getJavaKeywordName"
r3[r6] = r4
goto L63
L5c:
java.lang.String r4 = "getPrimitiveType"
r3[r6] = r4
goto L63
L61:
r3[r6] = r5
L63:
switch(r7) {
case 1: goto L75;
case 2: goto L77;
case 3: goto L75;
case 4: goto L77;
case 5: goto L70;
case 6: goto L6b;
case 7: goto L6b;
case 8: goto L6b;
case 9: goto L6b;
case 10: goto L77;
case 11: goto L77;
case 12: goto L77;
case 13: goto L77;
default: goto L66;
}
L66:
java.lang.String r4 = "isWrapperClassName"
r3[r1] = r4
goto L77
L6b:
java.lang.String r4 = "<init>"
r3[r1] = r4
goto L77
L70:
java.lang.String r4 = "getByDesc"
r3[r1] = r4
goto L77
L75:
r3[r1] = r5
L77:
java.lang.String r2 = java.lang.String.format(r2, r3)
if (r7 == r1) goto L88
if (r7 == r0) goto L88
switch(r7) {
case 10: goto L88;
case 11: goto L88;
case 12: goto L88;
case 13: goto L88;
default: goto L82;
}
L82:
java.lang.IllegalArgumentException r7 = new java.lang.IllegalArgumentException
r7.<init>(r2)
goto L8d
L88:
java.lang.IllegalStateException r7 = new java.lang.IllegalStateException
r7.<init>(r2)
L8d:
throw r7
*/
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.resolve.jvm.JvmPrimitiveType.$$$reportNull$$$0(int):void");
}
static {
for (JvmPrimitiveType jvmPrimitiveType : values()) {
WRAPPERS_CLASS_NAMES.add(jvmPrimitiveType.getWrapperFqName());
TYPE_BY_NAME.put(jvmPrimitiveType.getJavaKeywordName(), jvmPrimitiveType);
TYPE_BY_PRIMITIVE_TYPE.put(jvmPrimitiveType.getPrimitiveType(), jvmPrimitiveType);
TYPE_BY_DESC.put(jvmPrimitiveType.getDesc(), jvmPrimitiveType);
}
}
JvmPrimitiveType(PrimitiveType primitiveType, String str, String str2, String str3) {
if (primitiveType == null) {
$$$reportNull$$$0(6);
}
if (str == null) {
$$$reportNull$$$0(7);
}
if (str2 == null) {
$$$reportNull$$$0(8);
}
if (str3 == null) {
$$$reportNull$$$0(9);
}
this.primitiveType = primitiveType;
this.name = str;
this.desc = str2;
this.wrapperFqName = new FqName(str3);
}
public static JvmPrimitiveType get(String str) {
if (str == null) {
$$$reportNull$$$0(1);
}
JvmPrimitiveType jvmPrimitiveType = TYPE_BY_NAME.get(str);
if (jvmPrimitiveType != null) {
return jvmPrimitiveType;
}
throw new AssertionError(w.z("Non-primitive type name passed: ", str));
}
public String getDesc() {
String str = this.desc;
if (str == null) {
$$$reportNull$$$0(12);
}
return str;
}
public String getJavaKeywordName() {
String str = this.name;
if (str == null) {
$$$reportNull$$$0(11);
}
return str;
}
public PrimitiveType getPrimitiveType() {
PrimitiveType primitiveType = this.primitiveType;
if (primitiveType == null) {
$$$reportNull$$$0(10);
}
return primitiveType;
}
public FqName getWrapperFqName() {
FqName fqName = this.wrapperFqName;
if (fqName == null) {
$$$reportNull$$$0(13);
}
return fqName;
}
public static JvmPrimitiveType get(PrimitiveType primitiveType) {
if (primitiveType == null) {
$$$reportNull$$$0(3);
}
JvmPrimitiveType jvmPrimitiveType = TYPE_BY_PRIMITIVE_TYPE.get(primitiveType);
if (jvmPrimitiveType == null) {
$$$reportNull$$$0(4);
}
return jvmPrimitiveType;
}
}

View File

@@ -0,0 +1,45 @@
package kotlin.reflect.jvm.internal.impl.resolve.jvm;
import java.util.Collection;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassConstructorDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
import kotlin.reflect.jvm.internal.impl.name.Name;
/* loaded from: classes3.dex */
public interface SyntheticJavaPartsProvider {
public static final Companion Companion = Companion.$$INSTANCE;
/* loaded from: classes3.dex */
public static final class Companion {
static final /* synthetic */ Companion $$INSTANCE = new Companion();
private static final CompositeSyntheticJavaPartsProvider EMPTY = new CompositeSyntheticJavaPartsProvider(CollectionsKt.emptyList());
private Companion() {
}
public final CompositeSyntheticJavaPartsProvider getEMPTY() {
return EMPTY;
}
}
void generateConstructors(LazyJavaResolverContext lazyJavaResolverContext, ClassDescriptor classDescriptor, List<ClassConstructorDescriptor> list);
void generateMethods(LazyJavaResolverContext lazyJavaResolverContext, ClassDescriptor classDescriptor, Name name, Collection<SimpleFunctionDescriptor> collection);
void generateNestedClass(LazyJavaResolverContext lazyJavaResolverContext, ClassDescriptor classDescriptor, Name name, List<ClassDescriptor> list);
void generateStaticFunctions(LazyJavaResolverContext lazyJavaResolverContext, ClassDescriptor classDescriptor, Name name, Collection<SimpleFunctionDescriptor> collection);
List<Name> getMethodNames(LazyJavaResolverContext lazyJavaResolverContext, ClassDescriptor classDescriptor);
List<Name> getNestedClassNames(LazyJavaResolverContext lazyJavaResolverContext, ClassDescriptor classDescriptor);
List<Name> getStaticFunctionNames(LazyJavaResolverContext lazyJavaResolverContext, ClassDescriptor classDescriptor);
PropertyDescriptorImpl modifyField(LazyJavaResolverContext lazyJavaResolverContext, ClassDescriptor classDescriptor, PropertyDescriptorImpl propertyDescriptorImpl);
}

View File

@@ -0,0 +1,5 @@
package kotlin.reflect.jvm.internal.impl.resolve.sam;
/* loaded from: classes3.dex */
public interface SamConversionResolver {
}

View File

@@ -0,0 +1,20 @@
package kotlin.reflect.jvm.internal.impl.resolve.sam;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.storage.CacheWithNullableValues;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public final class SamConversionResolverImpl implements SamConversionResolver {
private final CacheWithNullableValues<ClassDescriptor, SimpleType> functionTypesForSamInterfaces;
private final Iterable<Object> samWithReceiverResolvers;
public SamConversionResolverImpl(StorageManager storageManager, Iterable<? extends Object> samWithReceiverResolvers) {
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(samWithReceiverResolvers, "samWithReceiverResolvers");
this.samWithReceiverResolvers = samWithReceiverResolvers;
this.functionTypesForSamInterfaces = storageManager.createCacheWithNullableValues();
}
}

View File

@@ -0,0 +1,78 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.Collection;
import java.util.Set;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
/* loaded from: classes3.dex */
public abstract class AbstractScopeAdapter implements MemberScope {
public final MemberScope getActualScope() {
if (!(getWorkerScope() instanceof AbstractScopeAdapter)) {
return getWorkerScope();
}
MemberScope workerScope = getWorkerScope();
Intrinsics.checkNotNull(workerScope, "null cannot be cast to non-null type org.jetbrains.kotlin.resolve.scopes.AbstractScopeAdapter");
return ((AbstractScopeAdapter) workerScope).getActualScope();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getClassifierNames() {
return getWorkerScope().getClassifierNames();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: getContributedClassifier */
public ClassifierDescriptor mo1396getContributedClassifier(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return getWorkerScope().mo1396getContributedClassifier(name, location);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
return getWorkerScope().getContributedDescriptors(kindFilter, nameFilter);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return getWorkerScope().getContributedFunctions(name, location);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Collection<PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return getWorkerScope().getContributedVariables(name, location);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getFunctionNames() {
return getWorkerScope().getFunctionNames();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getVariableNames() {
return getWorkerScope().getVariableNames();
}
public abstract MemberScope getWorkerScope();
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: recordLookup */
public void mo1400recordLookup(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
getWorkerScope().mo1400recordLookup(name, location);
}
}

View File

@@ -0,0 +1,191 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import kotlin.collections.ArraysKt;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
import kotlin.collections.SetsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptorWithTypeParameters;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.util.collectionUtils.ScopeUtilsKt;
import kotlin.reflect.jvm.internal.impl.utils.SmartList;
@SourceDebugExtension({"SMAP\nChainedMemberScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ChainedMemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/ChainedMemberScope\n+ 2 scopeUtils.kt\norg/jetbrains/kotlin/util/collectionUtils/ScopeUtilsKt\n+ 3 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,91:1\n92#2,14:92\n47#2,11:106\n47#2,11:117\n47#2,11:128\n10394#3,5:139\n10394#3,5:144\n13309#3,2:149\n*S KotlinDebug\n*F\n+ 1 ChainedMemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/ChainedMemberScope\n*L\n35#1:92,14\n38#1:106,11\n41#1:117,11\n44#1:128,11\n46#1:139,5\n47#1:144,5\n51#1:149,2\n*E\n"})
/* loaded from: classes3.dex */
public final class ChainedMemberScope implements MemberScope {
public static final Companion Companion = new Companion(null);
private final String debugName;
private final MemberScope[] scopes;
@SourceDebugExtension({"SMAP\nChainedMemberScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ChainedMemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/ChainedMemberScope$Companion\n+ 2 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,91:1\n37#2,2:92\n*S KotlinDebug\n*F\n+ 1 ChainedMemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/ChainedMemberScope$Companion\n*L\n87#1:92,2\n*E\n"})
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final MemberScope create(String debugName, Iterable<? extends MemberScope> scopes) {
Intrinsics.checkNotNullParameter(debugName, "debugName");
Intrinsics.checkNotNullParameter(scopes, "scopes");
SmartList smartList = new SmartList();
for (MemberScope memberScope : scopes) {
if (memberScope != MemberScope.Empty.INSTANCE) {
if (memberScope instanceof ChainedMemberScope) {
CollectionsKt__MutableCollectionsKt.addAll(smartList, ((ChainedMemberScope) memberScope).scopes);
} else {
smartList.add(memberScope);
}
}
}
return createOrSingle$descriptors(debugName, smartList);
}
public final MemberScope createOrSingle$descriptors(String debugName, List<? extends MemberScope> scopes) {
Intrinsics.checkNotNullParameter(debugName, "debugName");
Intrinsics.checkNotNullParameter(scopes, "scopes");
int size = scopes.size();
return size != 0 ? size != 1 ? new ChainedMemberScope(debugName, (MemberScope[]) scopes.toArray(new MemberScope[0]), null) : scopes.get(0) : MemberScope.Empty.INSTANCE;
}
private Companion() {
}
}
public /* synthetic */ ChainedMemberScope(String str, MemberScope[] memberScopeArr, DefaultConstructorMarker defaultConstructorMarker) {
this(str, memberScopeArr);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getClassifierNames() {
return MemberScopeKt.flatMapClassifierNamesOrNull(ArraysKt.asIterable(this.scopes));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: getContributedClassifier */
public ClassifierDescriptor mo1396getContributedClassifier(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
ClassifierDescriptor classifierDescriptor = null;
for (MemberScope memberScope : this.scopes) {
ClassifierDescriptor mo1396getContributedClassifier = memberScope.mo1396getContributedClassifier(name, location);
if (mo1396getContributedClassifier != null) {
if (!(mo1396getContributedClassifier instanceof ClassifierDescriptorWithTypeParameters) || !((ClassifierDescriptorWithTypeParameters) mo1396getContributedClassifier).isExpect()) {
return mo1396getContributedClassifier;
}
if (classifierDescriptor == null) {
classifierDescriptor = mo1396getContributedClassifier;
}
}
}
return classifierDescriptor;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
MemberScope[] memberScopeArr = this.scopes;
int length = memberScopeArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return memberScopeArr[0].getContributedDescriptors(kindFilter, nameFilter);
}
Collection<DeclarationDescriptor> collection = null;
for (MemberScope memberScope : memberScopeArr) {
collection = ScopeUtilsKt.concat(collection, memberScope.getContributedDescriptors(kindFilter, nameFilter));
}
return collection == null ? SetsKt.emptySet() : collection;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
MemberScope[] memberScopeArr = this.scopes;
int length = memberScopeArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return memberScopeArr[0].getContributedFunctions(name, location);
}
Collection<SimpleFunctionDescriptor> collection = null;
for (MemberScope memberScope : memberScopeArr) {
collection = ScopeUtilsKt.concat(collection, memberScope.getContributedFunctions(name, location));
}
return collection == null ? SetsKt.emptySet() : collection;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Collection<PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
MemberScope[] memberScopeArr = this.scopes;
int length = memberScopeArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return memberScopeArr[0].getContributedVariables(name, location);
}
Collection<PropertyDescriptor> collection = null;
for (MemberScope memberScope : memberScopeArr) {
collection = ScopeUtilsKt.concat(collection, memberScope.getContributedVariables(name, location));
}
return collection == null ? SetsKt.emptySet() : collection;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getFunctionNames() {
MemberScope[] memberScopeArr = this.scopes;
LinkedHashSet linkedHashSet = new LinkedHashSet();
for (MemberScope memberScope : memberScopeArr) {
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, memberScope.getFunctionNames());
}
return linkedHashSet;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getVariableNames() {
MemberScope[] memberScopeArr = this.scopes;
LinkedHashSet linkedHashSet = new LinkedHashSet();
for (MemberScope memberScope : memberScopeArr) {
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, memberScope.getVariableNames());
}
return linkedHashSet;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: recordLookup */
public void mo1400recordLookup(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
for (MemberScope memberScope : this.scopes) {
memberScope.mo1400recordLookup(name, location);
}
}
public String toString() {
return this.debugName;
}
private ChainedMemberScope(String str, MemberScope[] memberScopeArr) {
this.debugName = str;
this.scopes = memberScopeArr;
}
}

View File

@@ -0,0 +1,45 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter;
/* loaded from: classes3.dex */
public abstract class DescriptorKindExclude {
/* loaded from: classes3.dex */
public static final class NonExtensions extends DescriptorKindExclude {
public static final NonExtensions INSTANCE = new NonExtensions();
private static final int fullyExcludedDescriptorKinds;
static {
DescriptorKindFilter.Companion companion = DescriptorKindFilter.Companion;
fullyExcludedDescriptorKinds = (~(companion.getVARIABLES_MASK() | companion.getFUNCTIONS_MASK())) & companion.getALL_KINDS_MASK();
}
private NonExtensions() {
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindExclude
public int getFullyExcludedDescriptorKinds() {
return fullyExcludedDescriptorKinds;
}
}
/* loaded from: classes3.dex */
public static final class TopLevelPackages extends DescriptorKindExclude {
public static final TopLevelPackages INSTANCE = new TopLevelPackages();
private TopLevelPackages() {
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindExclude
public int getFullyExcludedDescriptorKinds() {
return 0;
}
}
public abstract int getFullyExcludedDescriptorKinds();
public String toString() {
return getClass().getSimpleName();
}
}

View File

@@ -0,0 +1,312 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import com.google.android.gms.measurement.internal.a;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.JvmField;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nMemberScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/DescriptorKindFilter\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 MemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/DescriptorKindFilter$Companion\n+ 5 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,261:1\n1855#2,2:262\n1726#2,3:264\n288#2,2:267\n1603#2,9:269\n1855#2:278\n1856#2:280\n1612#2:281\n1603#2,9:286\n1855#2:295\n1856#2:297\n1612#2:298\n766#2:303\n857#2,2:304\n1603#2,9:306\n1855#2:315\n1856#2:317\n1612#2:318\n1#3:279\n1#3:296\n1#3:316\n210#4:282\n210#4:299\n3792#5:283\n4307#5,2:284\n3792#5:300\n4307#5,2:301\n*S KotlinDebug\n*F\n+ 1 MemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/DescriptorKindFilter\n*L\n98#1:262,2\n103#1:264,3\n129#1:267,2\n131#1:269,9\n131#1:278\n131#1:280\n131#1:281\n197#1:286,9\n197#1:295\n197#1:297\n197#1:298\n203#1:303\n203#1:304,2\n204#1:306,9\n204#1:315\n204#1:317\n204#1:318\n131#1:279\n197#1:296\n204#1:316\n196#1:282\n202#1:299\n196#1:283\n196#1:284,2\n202#1:300\n202#1:301,2\n*E\n"})
/* loaded from: classes3.dex */
public final class DescriptorKindFilter {
@JvmField
public static final DescriptorKindFilter ALL;
private static final int ALL_KINDS_MASK;
@JvmField
public static final DescriptorKindFilter CALLABLES;
private static final int CALLABLES_MASK;
@JvmField
public static final DescriptorKindFilter CLASSIFIERS;
private static final int CLASSIFIERS_MASK;
public static final Companion Companion;
private static final List<Companion.MaskToName> DEBUG_MASK_BIT_NAMES;
private static final List<Companion.MaskToName> DEBUG_PREDEFINED_FILTERS_MASK_NAMES;
@JvmField
public static final DescriptorKindFilter FUNCTIONS;
private static final int FUNCTIONS_MASK;
@JvmField
public static final DescriptorKindFilter NON_SINGLETON_CLASSIFIERS;
private static final int NON_SINGLETON_CLASSIFIERS_MASK;
@JvmField
public static final DescriptorKindFilter PACKAGES;
private static final int PACKAGES_MASK;
@JvmField
public static final DescriptorKindFilter SINGLETON_CLASSIFIERS;
private static final int SINGLETON_CLASSIFIERS_MASK;
@JvmField
public static final DescriptorKindFilter TYPE_ALIASES;
private static final int TYPE_ALIASES_MASK;
@JvmField
public static final DescriptorKindFilter VALUES;
private static final int VALUES_MASK;
@JvmField
public static final DescriptorKindFilter VARIABLES;
private static final int VARIABLES_MASK;
private static int nextMaskValue;
private final List<DescriptorKindExclude> excludes;
private final int kindMask;
@SourceDebugExtension({"SMAP\nMemberScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/DescriptorKindFilter$Companion\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,261:1\n1#2:262\n3792#3:263\n4307#3,2:264\n*S KotlinDebug\n*F\n+ 1 MemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/DescriptorKindFilter$Companion\n*L\n210#1:263\n210#1:264,2\n*E\n"})
/* loaded from: classes3.dex */
public static final class Companion {
/* loaded from: classes3.dex */
public static final class MaskToName {
private final int mask;
private final String name;
public MaskToName(int i, String name) {
Intrinsics.checkNotNullParameter(name, "name");
this.mask = i;
this.name = name;
}
public final int getMask() {
return this.mask;
}
public final String getName() {
return this.name;
}
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
/* JADX INFO: Access modifiers changed from: private */
public final int nextMask() {
int i = DescriptorKindFilter.nextMaskValue;
DescriptorKindFilter.nextMaskValue <<= 1;
return i;
}
public final int getALL_KINDS_MASK() {
return DescriptorKindFilter.ALL_KINDS_MASK;
}
public final int getCLASSIFIERS_MASK() {
return DescriptorKindFilter.CLASSIFIERS_MASK;
}
public final int getFUNCTIONS_MASK() {
return DescriptorKindFilter.FUNCTIONS_MASK;
}
public final int getNON_SINGLETON_CLASSIFIERS_MASK() {
return DescriptorKindFilter.NON_SINGLETON_CLASSIFIERS_MASK;
}
public final int getPACKAGES_MASK() {
return DescriptorKindFilter.PACKAGES_MASK;
}
public final int getSINGLETON_CLASSIFIERS_MASK() {
return DescriptorKindFilter.SINGLETON_CLASSIFIERS_MASK;
}
public final int getTYPE_ALIASES_MASK() {
return DescriptorKindFilter.TYPE_ALIASES_MASK;
}
public final int getVARIABLES_MASK() {
return DescriptorKindFilter.VARIABLES_MASK;
}
private Companion() {
}
}
/* JADX WARN: Multi-variable type inference failed */
static {
Companion.MaskToName maskToName;
Companion.MaskToName maskToName2;
Companion companion = new Companion(null);
Companion = companion;
nextMaskValue = 1;
int nextMask = companion.nextMask();
NON_SINGLETON_CLASSIFIERS_MASK = nextMask;
int nextMask2 = companion.nextMask();
SINGLETON_CLASSIFIERS_MASK = nextMask2;
int nextMask3 = companion.nextMask();
TYPE_ALIASES_MASK = nextMask3;
int nextMask4 = companion.nextMask();
PACKAGES_MASK = nextMask4;
int nextMask5 = companion.nextMask();
FUNCTIONS_MASK = nextMask5;
int nextMask6 = companion.nextMask();
VARIABLES_MASK = nextMask6;
int nextMask7 = companion.nextMask() - 1;
ALL_KINDS_MASK = nextMask7;
int i = nextMask | nextMask2 | nextMask3;
CLASSIFIERS_MASK = i;
int i4 = nextMask2 | nextMask5 | nextMask6;
VALUES_MASK = i4;
int i5 = nextMask5 | nextMask6;
CALLABLES_MASK = i5;
int i6 = 2;
ALL = new DescriptorKindFilter(nextMask7, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
CALLABLES = new DescriptorKindFilter(i5, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
NON_SINGLETON_CLASSIFIERS = new DescriptorKindFilter(nextMask, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
SINGLETON_CLASSIFIERS = new DescriptorKindFilter(nextMask2, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
TYPE_ALIASES = new DescriptorKindFilter(nextMask3, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
CLASSIFIERS = new DescriptorKindFilter(i, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
PACKAGES = new DescriptorKindFilter(nextMask4, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
FUNCTIONS = new DescriptorKindFilter(nextMask5, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
VARIABLES = new DescriptorKindFilter(nextMask6, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
VALUES = new DescriptorKindFilter(i4, 0 == true ? 1 : 0, i6, 0 == true ? 1 : 0);
Field[] fields = DescriptorKindFilter.class.getFields();
Intrinsics.checkNotNullExpressionValue(fields, "getFields(...)");
ArrayList<Field> arrayList = new ArrayList();
for (Field field : fields) {
if (Modifier.isStatic(field.getModifiers())) {
arrayList.add(field);
}
}
ArrayList arrayList2 = new ArrayList();
for (Field field2 : arrayList) {
Object obj = field2.get(null);
DescriptorKindFilter descriptorKindFilter = obj instanceof DescriptorKindFilter ? (DescriptorKindFilter) obj : null;
if (descriptorKindFilter != null) {
int i7 = descriptorKindFilter.kindMask;
String name = field2.getName();
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
maskToName2 = new Companion.MaskToName(i7, name);
} else {
maskToName2 = null;
}
if (maskToName2 != null) {
arrayList2.add(maskToName2);
}
}
DEBUG_PREDEFINED_FILTERS_MASK_NAMES = arrayList2;
Field[] fields2 = DescriptorKindFilter.class.getFields();
Intrinsics.checkNotNullExpressionValue(fields2, "getFields(...)");
ArrayList arrayList3 = new ArrayList();
for (Field field3 : fields2) {
if (Modifier.isStatic(field3.getModifiers())) {
arrayList3.add(field3);
}
}
ArrayList<Field> arrayList4 = new ArrayList();
for (Object obj2 : arrayList3) {
if (Intrinsics.areEqual(((Field) obj2).getType(), Integer.TYPE)) {
arrayList4.add(obj2);
}
}
ArrayList arrayList5 = new ArrayList();
for (Field field4 : arrayList4) {
Object obj3 = field4.get(null);
Intrinsics.checkNotNull(obj3, "null cannot be cast to non-null type kotlin.Int");
int intValue = ((Integer) obj3).intValue();
if (intValue == ((-intValue) & intValue)) {
String name2 = field4.getName();
Intrinsics.checkNotNullExpressionValue(name2, "getName(...)");
maskToName = new Companion.MaskToName(intValue, name2);
} else {
maskToName = null;
}
if (maskToName != null) {
arrayList5.add(maskToName);
}
}
DEBUG_MASK_BIT_NAMES = arrayList5;
}
/* JADX WARN: Multi-variable type inference failed */
public DescriptorKindFilter(int i, List<? extends DescriptorKindExclude> excludes) {
Intrinsics.checkNotNullParameter(excludes, "excludes");
this.excludes = excludes;
Iterator it = excludes.iterator();
while (it.hasNext()) {
i &= ~((DescriptorKindExclude) it.next()).getFullyExcludedDescriptorKinds();
}
this.kindMask = i;
}
public final boolean acceptsKinds(int i) {
return (this.kindMask & i) != 0;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!Intrinsics.areEqual(DescriptorKindFilter.class, obj != null ? obj.getClass() : null)) {
return false;
}
Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter");
DescriptorKindFilter descriptorKindFilter = (DescriptorKindFilter) obj;
return Intrinsics.areEqual(this.excludes, descriptorKindFilter.excludes) && this.kindMask == descriptorKindFilter.kindMask;
}
public final List<DescriptorKindExclude> getExcludes() {
return this.excludes;
}
public final int getKindMask() {
return this.kindMask;
}
public int hashCode() {
return (this.excludes.hashCode() * 31) + this.kindMask;
}
public final DescriptorKindFilter restrictedToKindsOrNull(int i) {
int i4 = i & this.kindMask;
if (i4 == 0) {
return null;
}
return new DescriptorKindFilter(i4, this.excludes);
}
public String toString() {
Object obj;
Iterator<T> it = DEBUG_PREDEFINED_FILTERS_MASK_NAMES.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
break;
}
obj = it.next();
if (((Companion.MaskToName) obj).getMask() == this.kindMask) {
break;
}
}
Companion.MaskToName maskToName = (Companion.MaskToName) obj;
String name = maskToName != null ? maskToName.getName() : null;
if (name == null) {
List<Companion.MaskToName> list = DEBUG_MASK_BIT_NAMES;
ArrayList arrayList = new ArrayList();
for (Companion.MaskToName maskToName2 : list) {
String name2 = acceptsKinds(maskToName2.getMask()) ? maskToName2.getName() : null;
if (name2 != null) {
arrayList.add(name2);
}
}
name = CollectionsKt___CollectionsKt.joinToString$default(arrayList, " | ", null, null, 0, null, null, 62, null);
}
return a.o(a.p("DescriptorKindFilter(", name, ", "), this.excludes, ')');
}
public /* synthetic */ DescriptorKindFilter(int i, List list, int i4, DefaultConstructorMarker defaultConstructorMarker) {
this(i, (i4 & 2) != 0 ? CollectionsKt.emptyList() : list);
}
}

View File

@@ -0,0 +1,200 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.PropertyReference1Impl;
import kotlin.jvm.internal.Reflection;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.KProperty;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.NonReportingOverrideStrategy;
import kotlin.reflect.jvm.internal.impl.resolve.OverridingUtil;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope;
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.utils.SmartList;
@SourceDebugExtension({"SMAP\nGivenFunctionsMemberScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 GivenFunctionsMemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/GivenFunctionsMemberScope\n+ 2 CollectionUtil.kt\norg/jetbrains/kotlin/utils/CollectionUtilKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 4 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n*L\n1#1,91:1\n32#2,2:92\n9#2,6:94\n32#2,2:100\n9#2,6:102\n1360#3:108\n1446#3,5:109\n800#3,11:114\n1477#3:125\n1502#3,3:126\n1505#3,3:136\n1477#3:139\n1502#3,3:140\n1505#3,3:150\n766#3:153\n857#3,2:154\n372#4,7:129\n372#4,7:143\n*S KotlinDebug\n*F\n+ 1 GivenFunctionsMemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/GivenFunctionsMemberScope\n*L\n51#1:92,2\n51#1:94,6\n55#1:100,2\n55#1:102,6\n61#1:108\n61#1:109,5\n62#1:114,11\n63#1:125\n63#1:126,3\n63#1:136,3\n64#1:139\n64#1:140,3\n64#1:150,3\n68#1:153\n68#1:154,2\n63#1:129,7\n64#1:143,7\n*E\n"})
/* loaded from: classes3.dex */
public abstract class GivenFunctionsMemberScope extends MemberScopeImpl {
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(GivenFunctionsMemberScope.class), "allDescriptors", "getAllDescriptors()Ljava/util/List;"))};
private final NotNullLazyValue allDescriptors$delegate;
private final ClassDescriptor containingClass;
public GivenFunctionsMemberScope(StorageManager storageManager, ClassDescriptor containingClass) {
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(containingClass, "containingClass");
this.containingClass = containingClass;
this.allDescriptors$delegate = storageManager.createLazyValue(new Function0<List<? extends DeclarationDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.GivenFunctionsMemberScope$allDescriptors$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final List<? extends DeclarationDescriptor> invoke() {
List createFakeOverrides;
List<FunctionDescriptor> computeDeclaredFunctions = GivenFunctionsMemberScope.this.computeDeclaredFunctions();
createFakeOverrides = GivenFunctionsMemberScope.this.createFakeOverrides(computeDeclaredFunctions);
return CollectionsKt.plus((Collection) computeDeclaredFunctions, (Iterable) createFakeOverrides);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r7v0, types: [java.util.List] */
/* JADX WARN: Type inference failed for: r7v1 */
/* JADX WARN: Type inference failed for: r7v3, types: [java.util.ArrayList] */
public final List<DeclarationDescriptor> createFakeOverrides(List<? extends FunctionDescriptor> list) {
?? emptyList;
final ArrayList arrayList = new ArrayList(3);
Collection<KotlinType> mo1395getSupertypes = this.containingClass.getTypeConstructor().mo1395getSupertypes();
Intrinsics.checkNotNullExpressionValue(mo1395getSupertypes, "getSupertypes(...)");
ArrayList arrayList2 = new ArrayList();
Iterator it = mo1395getSupertypes.iterator();
while (it.hasNext()) {
CollectionsKt__MutableCollectionsKt.addAll(arrayList2, ResolutionScope.DefaultImpls.getContributedDescriptors$default(((KotlinType) it.next()).getMemberScope(), null, null, 3, null));
}
ArrayList arrayList3 = new ArrayList();
Iterator it2 = arrayList2.iterator();
while (it2.hasNext()) {
Object next = it2.next();
if (next instanceof CallableMemberDescriptor) {
arrayList3.add(next);
}
}
LinkedHashMap linkedHashMap = new LinkedHashMap();
Iterator it3 = arrayList3.iterator();
while (it3.hasNext()) {
Object next2 = it3.next();
Name name = ((CallableMemberDescriptor) next2).getName();
Object obj = linkedHashMap.get(name);
if (obj == null) {
obj = new ArrayList();
linkedHashMap.put(name, obj);
}
((List) obj).add(next2);
}
for (Map.Entry entry : linkedHashMap.entrySet()) {
Name name2 = (Name) entry.getKey();
List list2 = (List) entry.getValue();
LinkedHashMap linkedHashMap2 = new LinkedHashMap();
for (Object obj2 : list2) {
Boolean valueOf = Boolean.valueOf(((CallableMemberDescriptor) obj2) instanceof FunctionDescriptor);
Object obj3 = linkedHashMap2.get(valueOf);
if (obj3 == null) {
obj3 = new ArrayList();
linkedHashMap2.put(valueOf, obj3);
}
((List) obj3).add(obj2);
}
for (Map.Entry entry2 : linkedHashMap2.entrySet()) {
boolean booleanValue = ((Boolean) entry2.getKey()).booleanValue();
List list3 = (List) entry2.getValue();
OverridingUtil overridingUtil = OverridingUtil.DEFAULT;
List list4 = list3;
if (booleanValue) {
emptyList = new ArrayList();
for (Object obj4 : list) {
if (Intrinsics.areEqual(((FunctionDescriptor) obj4).getName(), name2)) {
emptyList.add(obj4);
}
}
} else {
emptyList = CollectionsKt.emptyList();
}
overridingUtil.generateOverridesInFunctionGroup(name2, list4, (Collection) emptyList, this.containingClass, new NonReportingOverrideStrategy() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.GivenFunctionsMemberScope$createFakeOverrides$4
@Override // kotlin.reflect.jvm.internal.impl.resolve.OverridingStrategy
public void addFakeOverride(CallableMemberDescriptor fakeOverride) {
Intrinsics.checkNotNullParameter(fakeOverride, "fakeOverride");
OverridingUtil.resolveUnknownVisibilityForMember(fakeOverride, null);
arrayList.add(fakeOverride);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.NonReportingOverrideStrategy
public void conflict(CallableMemberDescriptor fromSuper, CallableMemberDescriptor fromCurrent) {
Intrinsics.checkNotNullParameter(fromSuper, "fromSuper");
Intrinsics.checkNotNullParameter(fromCurrent, "fromCurrent");
throw new IllegalStateException(("Conflict in scope of " + this.getContainingClass() + ": " + fromSuper + " vs " + fromCurrent).toString());
}
});
}
}
return kotlin.reflect.jvm.internal.impl.utils.CollectionsKt.compact(arrayList);
}
private final List<DeclarationDescriptor> getAllDescriptors() {
return (List) StorageKt.getValue(this.allDescriptors$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
}
public abstract List<FunctionDescriptor> computeDeclaredFunctions();
public final ClassDescriptor getContainingClass() {
return this.containingClass;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
return !kindFilter.acceptsKinds(DescriptorKindFilter.CALLABLES.getKindMask()) ? CollectionsKt.emptyList() : getAllDescriptors();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation location) {
List list;
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
List<DeclarationDescriptor> allDescriptors = getAllDescriptors();
if (allDescriptors.isEmpty()) {
list = CollectionsKt.emptyList();
} else {
SmartList smartList = new SmartList();
for (Object obj : allDescriptors) {
if ((obj instanceof SimpleFunctionDescriptor) && Intrinsics.areEqual(((SimpleFunctionDescriptor) obj).getName(), name)) {
smartList.add(obj);
}
}
list = smartList;
}
return list;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Collection<PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
List list;
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
List<DeclarationDescriptor> allDescriptors = getAllDescriptors();
if (allDescriptors.isEmpty()) {
list = CollectionsKt.emptyList();
} else {
SmartList smartList = new SmartList();
for (Object obj : allDescriptors) {
if ((obj instanceof PropertyDescriptor) && Intrinsics.areEqual(((PropertyDescriptor) obj).getName(), name)) {
smartList.add(obj);
}
}
list = smartList;
}
return list;
}
}

View File

@@ -0,0 +1,96 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptorWithTypeParameters;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeAliasDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
@SourceDebugExtension({"SMAP\nInnerClassesScopeWrapper.kt\nKotlin\n*S Kotlin\n*F\n+ 1 InnerClassesScopeWrapper.kt\norg/jetbrains/kotlin/resolve/scopes/InnerClassesScopeWrapper\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,55:1\n800#2,11:56\n*S KotlinDebug\n*F\n+ 1 InnerClassesScopeWrapper.kt\norg/jetbrains/kotlin/resolve/scopes/InnerClassesScopeWrapper\n*L\n35#1:56,11\n*E\n"})
/* loaded from: classes3.dex */
public final class InnerClassesScopeWrapper extends MemberScopeImpl {
private final MemberScope workerScope;
public InnerClassesScopeWrapper(MemberScope workerScope) {
Intrinsics.checkNotNullParameter(workerScope, "workerScope");
this.workerScope = workerScope;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getClassifierNames() {
return this.workerScope.getClassifierNames();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: getContributedClassifier */
public ClassifierDescriptor mo1396getContributedClassifier(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
ClassifierDescriptor mo1396getContributedClassifier = this.workerScope.mo1396getContributedClassifier(name, location);
if (mo1396getContributedClassifier != null) {
ClassDescriptor classDescriptor = mo1396getContributedClassifier instanceof ClassDescriptor ? (ClassDescriptor) mo1396getContributedClassifier : null;
if (classDescriptor != null) {
return classDescriptor;
}
if (mo1396getContributedClassifier instanceof TypeAliasDescriptor) {
return (TypeAliasDescriptor) mo1396getContributedClassifier;
}
}
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public /* bridge */ /* synthetic */ Collection getContributedDescriptors(DescriptorKindFilter descriptorKindFilter, Function1 function1) {
return getContributedDescriptors(descriptorKindFilter, (Function1<? super Name, Boolean>) function1);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getFunctionNames() {
return this.workerScope.getFunctionNames();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getVariableNames() {
return this.workerScope.getVariableNames();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: recordLookup */
public void mo1400recordLookup(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
this.workerScope.mo1400recordLookup(name, location);
}
public String toString() {
return "Classes from " + this.workerScope;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public List<ClassifierDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
DescriptorKindFilter restrictedToKindsOrNull = kindFilter.restrictedToKindsOrNull(DescriptorKindFilter.Companion.getCLASSIFIERS_MASK());
if (restrictedToKindsOrNull == null) {
return CollectionsKt.emptyList();
}
Collection<DeclarationDescriptor> contributedDescriptors = this.workerScope.getContributedDescriptors(restrictedToKindsOrNull, nameFilter);
ArrayList arrayList = new ArrayList();
for (Object obj : contributedDescriptors) {
if (obj instanceof ClassifierDescriptorWithTypeParameters) {
arrayList.add(obj);
}
}
return arrayList;
}
}

View File

@@ -0,0 +1,64 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
/* loaded from: classes3.dex */
public final class LazyScopeAdapter extends AbstractScopeAdapter {
private final NotNullLazyValue<MemberScope> lazyScope;
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
@JvmOverloads
public LazyScopeAdapter(Function0<? extends MemberScope> getScope) {
this(null, getScope, 1, 0 == true ? 1 : 0);
Intrinsics.checkNotNullParameter(getScope, "getScope");
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.AbstractScopeAdapter
public MemberScope getWorkerScope() {
return this.lazyScope.invoke();
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public /* synthetic */ LazyScopeAdapter(kotlin.reflect.jvm.internal.impl.storage.StorageManager r1, kotlin.jvm.functions.Function0 r2, int r3, kotlin.jvm.internal.DefaultConstructorMarker r4) {
/*
r0 = this;
r3 = r3 & 1
if (r3 == 0) goto Lb
kotlin.reflect.jvm.internal.impl.storage.StorageManager r1 = kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager.NO_LOCKS
java.lang.String r3 = "NO_LOCKS"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r1, r3)
Lb:
r0.<init>(r1, r2)
return
*/
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.resolve.scopes.LazyScopeAdapter.<init>(kotlin.reflect.jvm.internal.impl.storage.StorageManager, kotlin.jvm.functions.Function0, int, kotlin.jvm.internal.DefaultConstructorMarker):void");
}
@JvmOverloads
public LazyScopeAdapter(StorageManager storageManager, final Function0<? extends MemberScope> getScope) {
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(getScope, "getScope");
this.lazyScope = storageManager.createLazyValue(new Function0<MemberScope>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.LazyScopeAdapter$lazyScope$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final MemberScope invoke() {
MemberScope invoke = getScope.invoke();
return invoke instanceof AbstractScopeAdapter ? ((AbstractScopeAdapter) invoke).getActualScope() : invoke;
}
});
}
}

View File

@@ -0,0 +1,79 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.Collection;
import java.util.Set;
import kotlin.collections.SetsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope;
/* loaded from: classes3.dex */
public interface MemberScope extends ResolutionScope {
public static final Companion Companion = Companion.$$INSTANCE;
/* loaded from: classes3.dex */
public static final class Companion {
static final /* synthetic */ Companion $$INSTANCE = new Companion();
private static final Function1<Name, Boolean> ALL_NAME_FILTER = new Function1<Name, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope$Companion$ALL_NAME_FILTER$1
@Override // kotlin.jvm.functions.Function1
public final Boolean invoke(Name it) {
Intrinsics.checkNotNullParameter(it, "it");
return Boolean.TRUE;
}
};
private Companion() {
}
public final Function1<Name, Boolean> getALL_NAME_FILTER() {
return ALL_NAME_FILTER;
}
}
/* loaded from: classes3.dex */
public static final class DefaultImpls {
public static void recordLookup(MemberScope memberScope, Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
ResolutionScope.DefaultImpls.recordLookup(memberScope, name, location);
}
}
/* loaded from: classes3.dex */
public static final class Empty extends MemberScopeImpl {
public static final Empty INSTANCE = new Empty();
private Empty() {
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getClassifierNames() {
return SetsKt.emptySet();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getFunctionNames() {
return SetsKt.emptySet();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getVariableNames() {
return SetsKt.emptySet();
}
}
Set<Name> getClassifierNames();
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
Collection<? extends SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation lookupLocation);
Collection<? extends PropertyDescriptor> getContributedVariables(Name name, LookupLocation lookupLocation);
Set<Name> getFunctionNames();
Set<Name> getVariableNames();
}

View File

@@ -0,0 +1,89 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Set;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.utils.FunctionsKt;
@SourceDebugExtension({"SMAP\nMemberScopeImpl.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MemberScopeImpl.kt\norg/jetbrains/kotlin/resolve/scopes/MemberScopeImpl\n+ 2 CollectionUtil.kt\norg/jetbrains/kotlin/utils/CollectionUtilKt\n*L\n1#1,56:1\n18#2,6:57\n18#2,6:63\n*S KotlinDebug\n*F\n+ 1 MemberScopeImpl.kt\norg/jetbrains/kotlin/resolve/scopes/MemberScopeImpl\n*L\n44#1:57,6\n49#1:63,6\n*E\n"})
/* loaded from: classes3.dex */
public abstract class MemberScopeImpl implements MemberScope {
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getClassifierNames() {
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: getContributedClassifier */
public ClassifierDescriptor mo1396getContributedClassifier(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
return CollectionsKt.emptyList();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<? extends SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return CollectionsKt.emptyList();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Collection<? extends PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return CollectionsKt.emptyList();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getFunctionNames() {
Collection<DeclarationDescriptor> contributedDescriptors = getContributedDescriptors(DescriptorKindFilter.FUNCTIONS, FunctionsKt.alwaysTrue());
LinkedHashSet linkedHashSet = new LinkedHashSet();
for (Object obj : contributedDescriptors) {
if (obj instanceof SimpleFunctionDescriptor) {
Name name = ((SimpleFunctionDescriptor) obj).getName();
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
linkedHashSet.add(name);
}
}
return linkedHashSet;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getVariableNames() {
Collection<DeclarationDescriptor> contributedDescriptors = getContributedDescriptors(DescriptorKindFilter.VARIABLES, FunctionsKt.alwaysTrue());
LinkedHashSet linkedHashSet = new LinkedHashSet();
for (Object obj : contributedDescriptors) {
if (obj instanceof SimpleFunctionDescriptor) {
Name name = ((SimpleFunctionDescriptor) obj).getName();
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
linkedHashSet.add(name);
}
}
return linkedHashSet;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: recordLookup */
public void mo1400recordLookup(Name name, LookupLocation lookupLocation) {
MemberScope.DefaultImpls.recordLookup(this, name, lookupLocation);
}
}

View File

@@ -0,0 +1,27 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.name.Name;
@SourceDebugExtension({"SMAP\nMemberScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/MemberScopeKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 addToStdlib.kt\norg/jetbrains/kotlin/utils/addToStdlib/AddToStdlibKt\n*L\n1#1,261:1\n223#2,2:262\n288#2,2:264\n766#2:271\n857#2,2:272\n206#3,5:266\n*S KotlinDebug\n*F\n+ 1 MemberScope.kt\norg/jetbrains/kotlin/resolve/scopes/MemberScopeKt\n*L\n71#1:262,2\n74#1:264,2\n87#1:271\n87#1:272,2\n77#1:266,5\n*E\n"})
/* loaded from: classes3.dex */
public final class MemberScopeKt {
public static final Set<Name> flatMapClassifierNamesOrNull(Iterable<? extends MemberScope> iterable) {
Intrinsics.checkNotNullParameter(iterable, "<this>");
HashSet hashSet = new HashSet();
Iterator<? extends MemberScope> it = iterable.iterator();
while (it.hasNext()) {
Set<Name> classifierNames = it.next().getClassifierNames();
if (classifierNames == null) {
return null;
}
CollectionsKt__MutableCollectionsKt.addAll(hashSet, classifierNames);
}
return hashSet;
}
}

View File

@@ -0,0 +1,49 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.Collection;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
/* loaded from: classes3.dex */
public interface ResolutionScope {
@SourceDebugExtension({"SMAP\nResolutionScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ResolutionScope.kt\norg/jetbrains/kotlin/resolve/scopes/ResolutionScope$DefaultImpls\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,61:1\n1#2:62\n*E\n"})
/* loaded from: classes3.dex */
public static final class DefaultImpls {
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ Collection getContributedDescriptors$default(ResolutionScope resolutionScope, DescriptorKindFilter descriptorKindFilter, Function1 function1, int i, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: getContributedDescriptors");
}
if ((i & 1) != 0) {
descriptorKindFilter = DescriptorKindFilter.ALL;
}
if ((i & 2) != 0) {
function1 = MemberScope.Companion.getALL_NAME_FILTER();
}
return resolutionScope.getContributedDescriptors(descriptorKindFilter, function1);
}
public static void recordLookup(ResolutionScope resolutionScope, Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
resolutionScope.getContributedFunctions(name, location);
}
}
/* renamed from: getContributedClassifier */
ClassifierDescriptor mo1396getContributedClassifier(Name name, LookupLocation lookupLocation);
Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter descriptorKindFilter, Function1<? super Name, Boolean> function1);
Collection<? extends FunctionDescriptor> getContributedFunctions(Name name, LookupLocation lookupLocation);
/* renamed from: recordLookup */
void mo1400recordLookup(Name name, LookupLocation lookupLocation);
}

View File

@@ -0,0 +1,137 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.Collection;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.PropertyReference1Impl;
import kotlin.jvm.internal.Reflection;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.KProperty;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassKind;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorFactory;
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
import kotlin.reflect.jvm.internal.impl.utils.SmartList;
@SourceDebugExtension({"SMAP\nStaticScopeForKotlinEnum.kt\nKotlin\n*S Kotlin\n*F\n+ 1 StaticScopeForKotlinEnum.kt\norg/jetbrains/kotlin/resolve/scopes/StaticScopeForKotlinEnum\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,68:1\n1#2:69\n857#3,2:70\n857#3,2:72\n*S KotlinDebug\n*F\n+ 1 StaticScopeForKotlinEnum.kt\norg/jetbrains/kotlin/resolve/scopes/StaticScopeForKotlinEnum\n*L\n59#1:70,2\n62#1:72,2\n*E\n"})
/* loaded from: classes3.dex */
public final class StaticScopeForKotlinEnum extends MemberScopeImpl {
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(StaticScopeForKotlinEnum.class), "functions", "getFunctions()Ljava/util/List;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(StaticScopeForKotlinEnum.class), "properties", "getProperties()Ljava/util/List;"))};
private final ClassDescriptor containingClass;
private final boolean enumEntriesCanBeUsed;
private final NotNullLazyValue functions$delegate;
private final NotNullLazyValue properties$delegate;
public StaticScopeForKotlinEnum(StorageManager storageManager, ClassDescriptor containingClass, boolean z3) {
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(containingClass, "containingClass");
this.containingClass = containingClass;
this.enumEntriesCanBeUsed = z3;
containingClass.getKind();
ClassKind classKind = ClassKind.CLASS;
this.functions$delegate = storageManager.createLazyValue(new Function0<List<? extends SimpleFunctionDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.StaticScopeForKotlinEnum$functions$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final List<? extends SimpleFunctionDescriptor> invoke() {
ClassDescriptor classDescriptor;
ClassDescriptor classDescriptor2;
classDescriptor = StaticScopeForKotlinEnum.this.containingClass;
SimpleFunctionDescriptor createEnumValueOfMethod = DescriptorFactory.createEnumValueOfMethod(classDescriptor);
classDescriptor2 = StaticScopeForKotlinEnum.this.containingClass;
return CollectionsKt.listOf((Object[]) new SimpleFunctionDescriptor[]{createEnumValueOfMethod, DescriptorFactory.createEnumValuesMethod(classDescriptor2)});
}
});
this.properties$delegate = storageManager.createLazyValue(new Function0<List<? extends PropertyDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.StaticScopeForKotlinEnum$properties$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final List<? extends PropertyDescriptor> invoke() {
boolean z4;
ClassDescriptor classDescriptor;
z4 = StaticScopeForKotlinEnum.this.enumEntriesCanBeUsed;
if (z4) {
classDescriptor = StaticScopeForKotlinEnum.this.containingClass;
return CollectionsKt.listOfNotNull(DescriptorFactory.createEnumEntriesProperty(classDescriptor));
}
return CollectionsKt.emptyList();
}
});
}
private final List<SimpleFunctionDescriptor> getFunctions() {
return (List) StorageKt.getValue(this.functions$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
}
private final List<PropertyDescriptor> getProperties() {
return (List) StorageKt.getValue(this.properties$delegate, this, (KProperty<?>) $$delegatedProperties[1]);
}
public Void getContributedClassifier(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public /* bridge */ /* synthetic */ Collection getContributedDescriptors(DescriptorKindFilter descriptorKindFilter, Function1 function1) {
return getContributedDescriptors(descriptorKindFilter, (Function1<? super Name, Boolean>) function1);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Collection<PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
List<PropertyDescriptor> properties = getProperties();
SmartList smartList = new SmartList();
for (Object obj : properties) {
if (Intrinsics.areEqual(((PropertyDescriptor) obj).getName(), name)) {
smartList.add(obj);
}
}
return smartList;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: getContributedClassifier, reason: collision with other method in class */
public /* bridge */ /* synthetic */ ClassifierDescriptor mo1396getContributedClassifier(Name name, LookupLocation lookupLocation) {
return (ClassifierDescriptor) getContributedClassifier(name, lookupLocation);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public List<CallableMemberDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
return CollectionsKt.plus((Collection) getFunctions(), (Iterable) getProperties());
}
/* JADX WARN: Multi-variable type inference failed */
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public SmartList<SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
List<SimpleFunctionDescriptor> functions = getFunctions();
SmartList<SimpleFunctionDescriptor> smartList = new SmartList<>();
for (Object obj : functions) {
if (Intrinsics.areEqual(((SimpleFunctionDescriptor) obj).getName(), name)) {
smartList.add(obj);
}
}
return smartList;
}
}

View File

@@ -0,0 +1,169 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.Substitutable;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.calls.inference.CapturedTypeConstructorKt;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitution;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
import kotlin.reflect.jvm.internal.impl.utils.CollectionsKt;
@SourceDebugExtension({"SMAP\nSubstitutingScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SubstitutingScope.kt\norg/jetbrains/kotlin/resolve/scopes/SubstitutingScope\n+ 2 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n+ 3 coreLib.kt\norg/jetbrains/kotlin/utils/CoreLibKt\n+ 4 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,111:1\n372#2,3:112\n375#2,4:116\n19#3:115\n1#4:120\n*S KotlinDebug\n*F\n+ 1 SubstitutingScope.kt\norg/jetbrains/kotlin/resolve/scopes/SubstitutingScope\n*L\n52#1:112,3\n52#1:116,4\n54#1:115\n*E\n"})
/* loaded from: classes3.dex */
public final class SubstitutingScope implements MemberScope {
private final Lazy _allDescriptors$delegate;
private final TypeSubstitutor capturingSubstitutor;
private Map<DeclarationDescriptor, DeclarationDescriptor> substitutedDescriptors;
private final Lazy substitutor$delegate;
private final MemberScope workerScope;
public SubstitutingScope(MemberScope workerScope, final TypeSubstitutor givenSubstitutor) {
Intrinsics.checkNotNullParameter(workerScope, "workerScope");
Intrinsics.checkNotNullParameter(givenSubstitutor, "givenSubstitutor");
this.workerScope = workerScope;
this.substitutor$delegate = LazyKt.lazy(new Function0<TypeSubstitutor>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.SubstitutingScope$substitutor$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final TypeSubstitutor invoke() {
return TypeSubstitutor.this.getSubstitution().buildSubstitutor();
}
});
TypeSubstitution substitution = givenSubstitutor.getSubstitution();
Intrinsics.checkNotNullExpressionValue(substitution, "getSubstitution(...)");
this.capturingSubstitutor = CapturedTypeConstructorKt.wrapWithCapturingSubstitution$default(substitution, false, 1, null).buildSubstitutor();
this._allDescriptors$delegate = LazyKt.lazy(new Function0<Collection<? extends DeclarationDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.SubstitutingScope$_allDescriptors$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Collection<? extends DeclarationDescriptor> invoke() {
MemberScope memberScope;
Collection<? extends DeclarationDescriptor> substitute;
SubstitutingScope substitutingScope = SubstitutingScope.this;
memberScope = substitutingScope.workerScope;
substitute = substitutingScope.substitute(ResolutionScope.DefaultImpls.getContributedDescriptors$default(memberScope, null, null, 3, null));
return substitute;
}
});
}
private final Collection<DeclarationDescriptor> get_allDescriptors() {
return (Collection) this._allDescriptors$delegate.getValue();
}
private final <D extends DeclarationDescriptor> D substitute(D d4) {
if (this.capturingSubstitutor.isEmpty()) {
return d4;
}
if (this.substitutedDescriptors == null) {
this.substitutedDescriptors = new HashMap();
}
Map<DeclarationDescriptor, DeclarationDescriptor> map = this.substitutedDescriptors;
Intrinsics.checkNotNull(map);
DeclarationDescriptor declarationDescriptor = map.get(d4);
if (declarationDescriptor == null) {
if (!(d4 instanceof Substitutable)) {
throw new IllegalStateException(("Unknown descriptor in scope: " + d4).toString());
}
declarationDescriptor = ((Substitutable) d4).substitute(this.capturingSubstitutor);
if (declarationDescriptor != null) {
map.put(d4, declarationDescriptor);
} else {
throw new AssertionError("We expect that no conflict should happen while substitution is guaranteed to generate invariant projection, but " + d4 + " substitution fails");
}
}
D d5 = (D) declarationDescriptor;
Intrinsics.checkNotNull(d5, "null cannot be cast to non-null type D of org.jetbrains.kotlin.resolve.scopes.SubstitutingScope.substitute");
return d5;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getClassifierNames() {
return this.workerScope.getClassifierNames();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: getContributedClassifier */
public ClassifierDescriptor mo1396getContributedClassifier(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
ClassifierDescriptor mo1396getContributedClassifier = this.workerScope.mo1396getContributedClassifier(name, location);
if (mo1396getContributedClassifier != null) {
return (ClassifierDescriptor) substitute((SubstitutingScope) mo1396getContributedClassifier);
}
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
return get_allDescriptors();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<? extends SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return substitute(this.workerScope.getContributedFunctions(name, location));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Collection<? extends PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return substitute(this.workerScope.getContributedVariables(name, location));
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getFunctionNames() {
return this.workerScope.getFunctionNames();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Set<Name> getVariableNames() {
return this.workerScope.getVariableNames();
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
/* renamed from: recordLookup */
public void mo1400recordLookup(Name name, LookupLocation lookupLocation) {
MemberScope.DefaultImpls.recordLookup(this, name, lookupLocation);
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Multi-variable type inference failed */
public final <D extends DeclarationDescriptor> Collection<D> substitute(Collection<? extends D> collection) {
if (this.capturingSubstitutor.isEmpty() || collection.isEmpty()) {
return collection;
}
LinkedHashSet newLinkedHashSetWithExpectedSize = CollectionsKt.newLinkedHashSetWithExpectedSize(collection.size());
Iterator it = collection.iterator();
while (it.hasNext()) {
newLinkedHashSetWithExpectedSize.add(substitute((SubstitutingScope) it.next()));
}
return newLinkedHashSetWithExpectedSize;
}
}

View File

@@ -0,0 +1,132 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.Pair;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.OverridingUtilsKt;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.util.collectionUtils.ScopeUtilsKt;
import kotlin.reflect.jvm.internal.impl.utils.SmartList;
@SourceDebugExtension({"SMAP\nTypeIntersectionScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 TypeIntersectionScope.kt\norg/jetbrains/kotlin/resolve/scopes/TypeIntersectionScope\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,59:1\n3190#2,10:60\n*S KotlinDebug\n*F\n+ 1 TypeIntersectionScope.kt\norg/jetbrains/kotlin/resolve/scopes/TypeIntersectionScope\n*L\n36#1:60,10\n*E\n"})
/* loaded from: classes3.dex */
public final class TypeIntersectionScope extends AbstractScopeAdapter {
public static final Companion Companion = new Companion(null);
private final String debugName;
private final MemberScope workerScope;
@SourceDebugExtension({"SMAP\nTypeIntersectionScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 TypeIntersectionScope.kt\norg/jetbrains/kotlin/resolve/scopes/TypeIntersectionScope$Companion\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,59:1\n1549#2:60\n1620#2,3:61\n*S KotlinDebug\n*F\n+ 1 TypeIntersectionScope.kt\norg/jetbrains/kotlin/resolve/scopes/TypeIntersectionScope$Companion\n*L\n50#1:60\n50#1:61,3\n*E\n"})
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@JvmStatic
public final MemberScope create(String message, Collection<? extends KotlinType> types) {
int collectionSizeOrDefault;
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(types, "types");
Collection<? extends KotlinType> collection = types;
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(collection, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<T> it = collection.iterator();
while (it.hasNext()) {
arrayList.add(((KotlinType) it.next()).getMemberScope());
}
SmartList<MemberScope> listOfNonEmptyScopes = ScopeUtilsKt.listOfNonEmptyScopes(arrayList);
MemberScope createOrSingle$descriptors = ChainedMemberScope.Companion.createOrSingle$descriptors(message, listOfNonEmptyScopes);
return listOfNonEmptyScopes.size() <= 1 ? createOrSingle$descriptors : new TypeIntersectionScope(message, createOrSingle$descriptors, null);
}
private Companion() {
}
}
public /* synthetic */ TypeIntersectionScope(String str, MemberScope memberScope, DefaultConstructorMarker defaultConstructorMarker) {
this(str, memberScope);
}
@JvmStatic
public static final MemberScope create(String str, Collection<? extends KotlinType> collection) {
return Companion.create(str, collection);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.AbstractScopeAdapter, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
Collection<DeclarationDescriptor> contributedDescriptors = super.getContributedDescriptors(kindFilter, nameFilter);
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (Object obj : contributedDescriptors) {
if (((DeclarationDescriptor) obj) instanceof CallableDescriptor) {
arrayList.add(obj);
} else {
arrayList2.add(obj);
}
}
Pair pair = new Pair(arrayList, arrayList2);
List list = (List) pair.component1();
List list2 = (List) pair.component2();
Intrinsics.checkNotNull(list, "null cannot be cast to non-null type kotlin.collections.Collection<org.jetbrains.kotlin.descriptors.CallableDescriptor>");
return CollectionsKt.plus(OverridingUtilsKt.selectMostSpecificInEachOverridableGroup(list, new Function1<CallableDescriptor, CallableDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.TypeIntersectionScope$getContributedDescriptors$2
@Override // kotlin.jvm.functions.Function1
public final CallableDescriptor invoke(CallableDescriptor selectMostSpecificInEachOverridableGroup) {
Intrinsics.checkNotNullParameter(selectMostSpecificInEachOverridableGroup, "$this$selectMostSpecificInEachOverridableGroup");
return selectMostSpecificInEachOverridableGroup;
}
}), (Iterable) list2);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.AbstractScopeAdapter, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
public Collection<SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return OverridingUtilsKt.selectMostSpecificInEachOverridableGroup(super.getContributedFunctions(name, location), new Function1<SimpleFunctionDescriptor, CallableDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.TypeIntersectionScope$getContributedFunctions$1
@Override // kotlin.jvm.functions.Function1
public final CallableDescriptor invoke(SimpleFunctionDescriptor selectMostSpecificInEachOverridableGroup) {
Intrinsics.checkNotNullParameter(selectMostSpecificInEachOverridableGroup, "$this$selectMostSpecificInEachOverridableGroup");
return selectMostSpecificInEachOverridableGroup;
}
});
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.AbstractScopeAdapter, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
public Collection<PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(location, "location");
return OverridingUtilsKt.selectMostSpecificInEachOverridableGroup(super.getContributedVariables(name, location), new Function1<PropertyDescriptor, CallableDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.resolve.scopes.TypeIntersectionScope$getContributedVariables$1
@Override // kotlin.jvm.functions.Function1
public final CallableDescriptor invoke(PropertyDescriptor selectMostSpecificInEachOverridableGroup) {
Intrinsics.checkNotNullParameter(selectMostSpecificInEachOverridableGroup, "$this$selectMostSpecificInEachOverridableGroup");
return selectMostSpecificInEachOverridableGroup;
}
});
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.AbstractScopeAdapter
public MemberScope getWorkerScope() {
return this.workerScope;
}
private TypeIntersectionScope(String str, MemberScope memberScope) {
this.debugName = str;
this.workerScope = memberScope;
}
}

View File

@@ -0,0 +1,51 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public abstract class AbstractReceiverValue implements ReceiverValue {
private final ReceiverValue original;
protected final KotlinType receiverType;
private static /* synthetic */ void $$$reportNull$$$0(int i) {
String str = (i == 1 || i == 2) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
Object[] objArr = new Object[(i == 1 || i == 2) ? 2 : 3];
if (i == 1 || i == 2) {
objArr[0] = "kotlin/reflect/jvm/internal/impl/resolve/scopes/receivers/AbstractReceiverValue";
} else {
objArr[0] = "receiverType";
}
if (i == 1) {
objArr[1] = "getType";
} else if (i != 2) {
objArr[1] = "kotlin/reflect/jvm/internal/impl/resolve/scopes/receivers/AbstractReceiverValue";
} else {
objArr[1] = "getOriginal";
}
if (i != 1 && i != 2) {
objArr[2] = "<init>";
}
String format = String.format(str, objArr);
if (i != 1 && i != 2) {
throw new IllegalArgumentException(format);
}
throw new IllegalStateException(format);
}
public AbstractReceiverValue(KotlinType kotlinType, ReceiverValue receiverValue) {
if (kotlinType == null) {
$$$reportNull$$$0(0);
}
this.receiverType = kotlinType;
this.original = receiverValue == null ? this : receiverValue;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ReceiverValue
public KotlinType getType() {
KotlinType kotlinType = this.receiverType;
if (kotlinType == null) {
$$$reportNull$$$0(1);
}
return kotlinType;
}
}

View File

@@ -0,0 +1,30 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public final class ContextClassReceiver extends AbstractReceiverValue implements ImplicitContextReceiver {
private final ClassDescriptor classDescriptor;
private final Name customLabelName;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ContextClassReceiver(ClassDescriptor classDescriptor, KotlinType receiverType, Name name, ReceiverValue receiverValue) {
super(receiverType, receiverValue);
Intrinsics.checkNotNullParameter(classDescriptor, "classDescriptor");
Intrinsics.checkNotNullParameter(receiverType, "receiverType");
this.classDescriptor = classDescriptor;
this.customLabelName = name;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ImplicitContextReceiver
public Name getCustomLabelName() {
return this.customLabelName;
}
public String toString() {
return getType() + ": Ctx { " + this.classDescriptor + " }";
}
}

View File

@@ -0,0 +1,34 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public final class ContextReceiver extends AbstractReceiverValue implements ImplicitContextReceiver {
private final Name customLabelName;
private final CallableDescriptor declarationDescriptor;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ContextReceiver(CallableDescriptor declarationDescriptor, KotlinType receiverType, Name name, ReceiverValue receiverValue) {
super(receiverType, receiverValue);
Intrinsics.checkNotNullParameter(declarationDescriptor, "declarationDescriptor");
Intrinsics.checkNotNullParameter(receiverType, "receiverType");
this.declarationDescriptor = declarationDescriptor;
this.customLabelName = name;
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ImplicitContextReceiver
public Name getCustomLabelName() {
return this.customLabelName;
}
public CallableDescriptor getDeclarationDescriptor() {
return this.declarationDescriptor;
}
public String toString() {
return "Cxt { " + getDeclarationDescriptor() + " }";
}
}

View File

@@ -0,0 +1,55 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public class ExtensionReceiver extends AbstractReceiverValue implements ImplicitReceiver {
private final CallableDescriptor descriptor;
private static /* synthetic */ void $$$reportNull$$$0(int i) {
String str = i != 2 ? "Argument for @NotNull parameter '%s' of %s.%s must not be null" : "@NotNull method %s.%s must not return null";
Object[] objArr = new Object[i != 2 ? 3 : 2];
if (i == 1) {
objArr[0] = "receiverType";
} else if (i == 2) {
objArr[0] = "kotlin/reflect/jvm/internal/impl/resolve/scopes/receivers/ExtensionReceiver";
} else if (i != 3) {
objArr[0] = "callableDescriptor";
} else {
objArr[0] = "newType";
}
if (i != 2) {
objArr[1] = "kotlin/reflect/jvm/internal/impl/resolve/scopes/receivers/ExtensionReceiver";
} else {
objArr[1] = "getDeclarationDescriptor";
}
if (i != 2) {
if (i != 3) {
objArr[2] = "<init>";
} else {
objArr[2] = "replaceType";
}
}
String format = String.format(str, objArr);
if (i == 2) {
throw new IllegalStateException(format);
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ExtensionReceiver(CallableDescriptor callableDescriptor, KotlinType kotlinType, ReceiverValue receiverValue) {
super(kotlinType, receiverValue);
if (callableDescriptor == null) {
$$$reportNull$$$0(0);
}
if (kotlinType == null) {
$$$reportNull$$$0(1);
}
this.descriptor = callableDescriptor;
}
public String toString() {
return getType() + ": Ext {" + this.descriptor + "}";
}
}

View File

@@ -0,0 +1,45 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
/* loaded from: classes3.dex */
public class ImplicitClassReceiver implements ImplicitReceiver, ThisClassReceiver {
private final ClassDescriptor classDescriptor;
private final ClassDescriptor declarationDescriptor;
private final ImplicitClassReceiver original;
public ImplicitClassReceiver(ClassDescriptor classDescriptor, ImplicitClassReceiver implicitClassReceiver) {
Intrinsics.checkNotNullParameter(classDescriptor, "classDescriptor");
this.classDescriptor = classDescriptor;
this.original = implicitClassReceiver == null ? this : implicitClassReceiver;
this.declarationDescriptor = classDescriptor;
}
public boolean equals(Object obj) {
ClassDescriptor classDescriptor = this.classDescriptor;
ImplicitClassReceiver implicitClassReceiver = obj instanceof ImplicitClassReceiver ? (ImplicitClassReceiver) obj : null;
return Intrinsics.areEqual(classDescriptor, implicitClassReceiver != null ? implicitClassReceiver.classDescriptor : null);
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ThisClassReceiver
public final ClassDescriptor getClassDescriptor() {
return this.classDescriptor;
}
public int hashCode() {
return this.classDescriptor.hashCode();
}
public String toString() {
return "Class{" + getType() + '}';
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ReceiverValue
public SimpleType getType() {
SimpleType defaultType = this.classDescriptor.getDefaultType();
Intrinsics.checkNotNullExpressionValue(defaultType, "getDefaultType(...)");
return defaultType;
}
}

View File

@@ -0,0 +1,8 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.reflect.jvm.internal.impl.name.Name;
/* loaded from: classes3.dex */
public interface ImplicitContextReceiver extends ImplicitReceiver {
Name getCustomLabelName();
}

View File

@@ -0,0 +1,5 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
/* loaded from: classes3.dex */
public interface ImplicitReceiver extends ReceiverValue {
}

View File

@@ -0,0 +1,8 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public interface ReceiverValue {
KotlinType getType();
}

View File

@@ -0,0 +1,8 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public interface SuperCallReceiverValue extends ReceiverValue {
KotlinType getThisType();
}

View File

@@ -0,0 +1,8 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
/* loaded from: classes3.dex */
public interface ThisClassReceiver extends ReceiverValue {
ClassDescriptor getClassDescriptor();
}

View File

@@ -0,0 +1,42 @@
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public class TransientReceiver extends AbstractReceiverValue {
private static /* synthetic */ void $$$reportNull$$$0(int i) {
Object[] objArr = new Object[3];
if (i != 2) {
objArr[0] = "type";
} else {
objArr[0] = "newType";
}
objArr[1] = "kotlin/reflect/jvm/internal/impl/resolve/scopes/receivers/TransientReceiver";
if (i != 2) {
objArr[2] = "<init>";
} else {
objArr[2] = "replaceType";
}
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public TransientReceiver(KotlinType kotlinType) {
this(kotlinType, null);
if (kotlinType == null) {
$$$reportNull$$$0(0);
}
}
public String toString() {
return "{Transient} : " + getType();
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private TransientReceiver(KotlinType kotlinType, ReceiverValue receiverValue) {
super(kotlinType, receiverValue);
if (kotlinType == null) {
$$$reportNull$$$0(1);
}
}
}