Skip to content

Commit ca8e921

Browse files
committed
make kt compiler happy
1 parent cb9f85d commit ca8e921

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/com/tang/intellij/lua/documentation/LuaDocumentationProvider.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ class LuaDocumentationProvider : AbstractDocumentationProvider(), DocumentationP
7070
private fun genDoc(owner: LuaCommentOwner): String? {
7171
val sb = StringBuilder()
7272
if (owner is LuaFuncBodyOwner && owner is PsiNameIdentifierOwner) {
73-
val methodDef = owner as PsiNameIdentifierOwner
74-
sb.append("<h1>")
75-
sb.append(methodDef.name)
76-
sb.append(owner.paramSignature)
77-
sb.append("</h1><br>")
73+
val methodDef: PsiNameIdentifierOwner = owner
74+
with(sb) {
75+
append("<h1>")
76+
append(methodDef.name)
77+
append(owner.paramSignature)
78+
append("</h1><br>")
79+
}
7880
}
7981

8082
val comment = LuaCommentUtil.findComment(owner)

0 commit comments

Comments
 (0)