Skip to content

Commit e8f4aee

Browse files
committed
Kotlin: Remove some redundant braces
1 parent 8438fb2 commit e8f4aee

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ open class KotlinFileExtractor(
552552
logger.warnElement("Expected annotation property to define a getter", prop)
553553
} else {
554554
val getterId = useFunction<DbMethod>(getter)
555-
val exprId = extractAnnotationValueExpression(v, id, i, "{${getterId}}", getter.returnType, extractEnumTypeAccesses)
555+
val exprId = extractAnnotationValueExpression(v, id, i, "{$getterId}", getter.returnType, extractEnumTypeAccesses)
556556
if (exprId != null) {
557557
tw.writeAnnotValue(id, getterId, exprId)
558558
}
@@ -587,7 +587,7 @@ open class KotlinFileExtractor(
587587
extractAnnotation(v, parent, idx, extractEnumTypeAccesses, contextLabel)
588588
}
589589
is IrVararg -> {
590-
tw.getLabelFor<DbArrayinit>("@\"annotationarray;{${parent}};$contextLabel\"").also { arrayId ->
590+
tw.getLabelFor<DbArrayinit>("@\"annotationarray;{$parent};$contextLabel\"").also { arrayId ->
591591
// Use the context type (i.e., the type the annotation expects, not the actual type of the array)
592592
// because the Java extractor fills in array types using the same technique. These should only
593593
// differ for generic annotations.

java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ open class KotlinUsesExtractor(
612612
val componentTypeLabel = recInfo.componentTypeResults.javaResult.id
613613
val dimensions = recInfo.dimensions + 1
614614

615-
val id = tw.getLabelFor<DbArray>("@\"array;$dimensions;{${elementTypeLabel}}\"") {
615+
val id = tw.getLabelFor<DbArray>("@\"array;$dimensions;{$elementTypeLabel}\"") {
616616
tw.writeArrays(
617617
it,
618618
javaShortName,
@@ -1141,7 +1141,7 @@ open class KotlinUsesExtractor(
11411141
// method (and presumably that disambiguation is never needed when the method belongs to a parameterized
11421142
// instance of a generic class), but as of now I don't know when the raw method would be referred to.
11431143
val typeArgSuffix = if (functionTypeParameters.isNotEmpty() && classTypeArgsIncludingOuterClasses.isNullOrEmpty()) "<${functionTypeParameters.size}>" else "";
1144-
return "@\"$prefix;{$parentId}.$name($paramTypeIds){$returnTypeId}${typeArgSuffix}\""
1144+
return "@\"$prefix;{$parentId}.$name($paramTypeIds){$returnTypeId}$typeArgSuffix\""
11451145
}
11461146

11471147
val javaLangClass by lazy { referenceExternalClass("java.lang.Class") }
@@ -1672,7 +1672,7 @@ open class KotlinUsesExtractor(
16721672
// clashing trap labels. These are always private, so we can just make up a label without
16731673
// worrying about their names as seen from Java.
16741674
val extensionPropertyDiscriminator = getExtensionReceiverType(f)?.let { "extension;${useType(it).javaResult.id}" } ?: ""
1675-
return "@\"field;{$parentId};${extensionPropertyDiscriminator}${f.name.asString()}\""
1675+
return "@\"field;{$parentId};$extensionPropertyDiscriminator${f.name.asString()}\""
16761676
}
16771677

16781678
fun useField(f: IrField): Label<out DbField> =

0 commit comments

Comments
 (0)