Pull Up: Drop default parameter values in function which becomes overriding. Disable function with default values if target class is the Java one
#KT-9833 Fixed
This commit is contained in:
@@ -191,4 +191,10 @@ fun KtSecondaryConstructor.getOrCreateBody(): KtBlockExpression {
|
||||
val anchor = if (delegationCall.isImplicit) valueParameterList else delegationCall
|
||||
val newBody = KtPsiFactory(this).createEmptyBody()
|
||||
return addAfter(newBody, anchor) as KtBlockExpression
|
||||
}
|
||||
|
||||
fun KtParameter.dropDefaultValue() {
|
||||
val from = equalsToken ?: return
|
||||
val to = defaultValue ?: from
|
||||
deleteChildRange(from, to)
|
||||
}
|
||||
Reference in New Issue
Block a user