Fix minor compile warnings
This commit is contained in:
+2
-3
@@ -81,10 +81,9 @@ class JavaClassImpl(psiClass: PsiClass) : JavaClassifierImpl<PsiClass>(psiClass)
|
||||
override val fields: Collection<JavaField>
|
||||
get() {
|
||||
assertNotLightClass()
|
||||
return fields(psi.fields.filter { field ->
|
||||
val name = field.name
|
||||
return fields(psi.fields.filter {
|
||||
// ex. Android plugin generates LightFields for resources started from '.' (.DS_Store file etc)
|
||||
name != null && Name.isValidIdentifier(name)
|
||||
Name.isValidIdentifier(it.name)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -52,6 +52,7 @@ object JvmArrayVariableInLoopAssignmentChecker : AdditionalTypeChecker {
|
||||
val resolvedCall = lhsExpression.getResolvedCall(c.trace.bindingContext) ?: return
|
||||
val variableDescriptor = resolvedCall.resultingDescriptor as? LocalVariableDescriptor ?: return
|
||||
if (variableDescriptor is SyntheticFieldDescriptor) return
|
||||
@Suppress("DEPRECATION")
|
||||
if (variableDescriptor.isDelegated) return
|
||||
|
||||
val variableType = variableDescriptor.returnType
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@ class JvmDefaultSuperCallChecker : CallChecker {
|
||||
override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) {
|
||||
val jvmDefaultMode = context.languageVersionSettings.getFlag(JvmAnalysisFlags.jvmDefaultMode)
|
||||
if (jvmDefaultMode.isEnabled) return
|
||||
val superExpression = getSuperCallExpression(resolvedCall.call) ?: return
|
||||
if (getSuperCallExpression(resolvedCall.call) == null) return
|
||||
|
||||
val resultingDescriptor = resolvedCall.resultingDescriptor as? CallableMemberDescriptor ?: return
|
||||
if (!resultingDescriptor.hasJvmDefaultAnnotation()) return
|
||||
|
||||
|
||||
+3
-3
@@ -385,14 +385,14 @@ class JavaSyntheticPropertiesScope(storageManager: StorageManager, private val l
|
||||
}
|
||||
}
|
||||
|
||||
override fun substitute(originalSubstitutor: TypeSubstitutor): PropertyDescriptor? {
|
||||
val descriptor = super.substitute(originalSubstitutor) as MyPropertyDescriptor? ?: return null
|
||||
override fun substitute(substitutor: TypeSubstitutor): PropertyDescriptor? {
|
||||
val descriptor = super.substitute(substitutor) as MyPropertyDescriptor? ?: return null
|
||||
if (descriptor == this) return descriptor
|
||||
|
||||
val classTypeParameters = (getMethod.containingDeclaration as ClassDescriptor).typeConstructor.parameters
|
||||
val substitutionMap = HashMap<TypeConstructor, TypeProjection>()
|
||||
for ((typeParameter, classTypeParameter) in typeParameters.zip(classTypeParameters)) {
|
||||
val typeProjection = originalSubstitutor.substitution[typeParameter.defaultType] ?: continue
|
||||
val typeProjection = substitutor.substitution[typeParameter.defaultType] ?: continue
|
||||
substitutionMap[classTypeParameter.typeConstructor] = typeProjection
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user