Cleanup: apply "Use synthetic property access syntax"
This commit is contained in:
+2
-2
@@ -77,8 +77,8 @@ class LazyJavaAnnotationDescriptor(
|
||||
val nameToArg = javaAnnotation.arguments.associateBy { it.name }
|
||||
|
||||
return constructors.first().valueParameters.keysToMapExceptNulls { valueParameter ->
|
||||
var javaAnnotationArgument = nameToArg[valueParameter.getName()]
|
||||
if (javaAnnotationArgument == null && valueParameter.getName() == DEFAULT_ANNOTATION_MEMBER_NAME) {
|
||||
var javaAnnotationArgument = nameToArg[valueParameter.name]
|
||||
if (javaAnnotationArgument == null && valueParameter.name == DEFAULT_ANNOTATION_MEMBER_NAME) {
|
||||
javaAnnotationArgument = nameToArg[null]
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -240,7 +240,7 @@ class LazyJavaClassDescriptor(
|
||||
|
||||
override fun getDeclarationDescriptor() = this@LazyJavaClassDescriptor
|
||||
|
||||
override fun toString(): String = getName().asString()
|
||||
override fun toString(): String = name.asString()
|
||||
}
|
||||
|
||||
// Only needed when calculating built-ins member scope
|
||||
|
||||
+2
-2
@@ -183,7 +183,7 @@ abstract class LazyJavaScope(protected val c: LazyJavaResolverContext) : MemberS
|
||||
|
||||
val name = if (function.name.asString() == "equals" &&
|
||||
jValueParameters.size == 1 &&
|
||||
c.module.builtIns.getNullableAnyType() == outType) {
|
||||
c.module.builtIns.nullableAnyType == outType) {
|
||||
// This is a hack to prevent numerous warnings on Kotlin classes that inherit Java classes: if you override "equals" in such
|
||||
// class without this hack, you'll be warned that in the superclass the name is "p0" (regardless of the fact that it's
|
||||
// "other" in Any)
|
||||
@@ -258,7 +258,7 @@ abstract class LazyJavaScope(protected val c: LazyJavaResolverContext) : MemberS
|
||||
|
||||
propertyDescriptor.setType(propertyType, listOf(), getDispatchReceiverParameter(), null as KotlinType?)
|
||||
|
||||
if (DescriptorUtils.shouldRecordInitializerForProperty(propertyDescriptor, propertyDescriptor.getType())) {
|
||||
if (DescriptorUtils.shouldRecordInitializerForProperty(propertyDescriptor, propertyDescriptor.type)) {
|
||||
propertyDescriptor.setCompileTimeInitializer(
|
||||
c.storageManager.createNullableLazyValue {
|
||||
c.components.javaPropertyInitializerEvaluator.getInitializerConstant(field, propertyDescriptor)
|
||||
|
||||
Reference in New Issue
Block a user