-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expression body indent wrong #1300
Comments
I made the second example a non-empty block and things got weirder: public override val descriptor: SerialDescriptor =
buildClassSerialDescriptor("RowVerticalAlignment") {
element<Int>("direction")
} Here's the code: addProperty(PropertySpec.builder("descriptor", SerialDescriptor)
.addModifiers(OVERRIDE)
.initializer(CodeBlock.builder()
.beginControlFlow("%M(%S)", buildClassSerialDescriptor, layoutModifierType.simpleName)
.apply {
for (property in layoutModifier.traits) {
addStatement("%M<%T>(%S)", element, property.type.asTypeName(), property.name)
}
}
.endControlFlow()
.build())
.build()) |
public override fun equals(other: Any?): Boolean = other is AccessibilityDescription
&& other.`value` == `value` Beginning to think expression body support was a mistake because it seems to be wrong more often than not. |
I dug a bit into how we emit |
Today:
Should be:
We need to remove the function indent when it collapses so that wraps are +2 and begin/end control flows can have their curly's flush with the function's visibility modifier indent level.
The text was updated successfully, but these errors were encountered: