Create actual fix: handle companions correctly #KT-21114 Fixed
This commit is contained in:
@@ -179,7 +179,11 @@ class KtPsiFactory @JvmOverloads constructor(private val project: Project, val m
|
||||
}
|
||||
|
||||
fun createCompanionObject(): KtObjectDeclaration {
|
||||
return createClass("class A {\n companion object{\n}\n}").companionObjects.first()
|
||||
return createCompanionObject("companion object {\n}")
|
||||
}
|
||||
|
||||
fun createCompanionObject(text: String): KtObjectDeclaration {
|
||||
return createClass("class A {\n $text\n}").companionObjects.first()
|
||||
}
|
||||
|
||||
fun createFileAnnotation(annotationText: String): KtAnnotationEntry {
|
||||
|
||||
Reference in New Issue
Block a user