Fix "Add function to supertype" braces #KT-23215 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-03-12 10:17:17 +03:00
committed by Mikhail Glukhikh
parent 404bcc58e5
commit f93b21eaa2
2 changed files with 3 additions and 2 deletions
@@ -143,7 +143,7 @@ class AddFunctionToSupertypeFix private constructor(
functionDescriptor.returnType?.let { IdeDescriptorRenderers.SOURCE_CODE.renderType(it) } ?: "Unit",
classDescriptor.importableFqName
)
"{ $bodyText }"
"{\n$bodyText\n}"
} else {
"{}"
}
@@ -2,7 +2,8 @@
// WITH_RUNTIME
open class A {
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() {
<caret>override fun f(): Int = 5