Cleanup: apply "Use synthetic property access syntax"

This commit is contained in:
Mikhail Glukhikh
2017-02-17 15:39:05 +03:00
parent 1375267996
commit d0cc1635db
163 changed files with 344 additions and 344 deletions
@@ -403,7 +403,7 @@ class ExpressionCodegen(
val spreadBuilderClassName = AsmUtil.asmPrimitiveTypeToLangPrimitiveType(elementType)!!.typeName.identifier + "SpreadBuilder"
owner = "kotlin/jvm/internal/" + spreadBuilderClassName
addDescriptor = "(" + elementType.descriptor + ")V"
toArrayDescriptor = "()" + type.getDescriptor()
toArrayDescriptor = "()" + type.descriptor
}
mv.anew(Type.getObjectType(owner))
mv.dup()
@@ -91,7 +91,7 @@ class FunctionCodegen(val irFunction: IrFunction, val classCodegen: ClassCodegen
val defaultValue = this
val constant = org.jetbrains.kotlin.codegen.ExpressionCodegen.getCompileTimeConstant(
defaultValue, state.bindingContext, true, state.shouldInlineConstVals)
assert(!state.classBuilderMode.generateBodies || constant != null) { "Default value for annotation parameter should be compile time value: " + defaultValue.getText() }
assert(!state.classBuilderMode.generateBodies || constant != null) { "Default value for annotation parameter should be compile time value: " + defaultValue.text }
if (constant != null) {
val annotationCodegen = AnnotationCodegen.forAnnotationDefaultValue(methodVisitor, classCodegen, state.typeMapper)
annotationCodegen.generateAnnotationDefaultValue(constant, descriptor.returnType!!)
@@ -212,7 +212,7 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
primaryConstructorDescriptor)
val bodyGenerator = BodyGenerator(primaryConstructorDescriptor, context)
ktClassOrObject.getPrimaryConstructor()?.valueParameterList?.let { ktValueParameterList ->
ktClassOrObject.primaryConstructor?.valueParameterList?.let { ktValueParameterList ->
bodyGenerator.generateDefaultParameters(ktValueParameterList, irPrimaryConstructor)
}
irPrimaryConstructor.body = bodyGenerator.generatePrimaryConstructorBody(ktClassOrObject)
@@ -221,7 +221,7 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
}
private fun generatePropertiesDeclaredInPrimaryConstructor(irClass: IrClassImpl, ktClassOrObject: KtClassOrObject) {
ktClassOrObject.getPrimaryConstructor()?.let { ktPrimaryConstructor ->
ktClassOrObject.primaryConstructor?.let { ktPrimaryConstructor ->
for (ktParameter in ktPrimaryConstructor.valueParameters) {
if (ktParameter.hasValOrVar()) {
val irProperty = PropertyGenerator(declarationGenerator).generatePropertyForPrimaryConstructorParameter(ktParameter)