Fix "Add function to supertype" braces #KT-23215 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
404bcc58e5
commit
f93b21eaa2
@@ -143,7 +143,7 @@ class AddFunctionToSupertypeFix private constructor(
|
|||||||
functionDescriptor.returnType?.let { IdeDescriptorRenderers.SOURCE_CODE.renderType(it) } ?: "Unit",
|
functionDescriptor.returnType?.let { IdeDescriptorRenderers.SOURCE_CODE.renderType(it) } ?: "Unit",
|
||||||
classDescriptor.importableFqName
|
classDescriptor.importableFqName
|
||||||
)
|
)
|
||||||
"{ $bodyText }"
|
"{\n$bodyText\n}"
|
||||||
} else {
|
} else {
|
||||||
"{}"
|
"{}"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -2,7 +2,8 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
open class A {
|
open class A {
|
||||||
open fun f(): Int {
|
open fun f(): Int {
|
||||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. }
|
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
class B : A() {
|
class B : A() {
|
||||||
<caret>override fun f(): Int = 5
|
<caret>override fun f(): Int = 5
|
||||||
|
|||||||
Reference in New Issue
Block a user