Skip to content

Commit

Permalink
Fixed tooltip generic alias type rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Dobell committed Jul 24, 2021
1 parent 00df863 commit e29f03a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/com/tang/intellij/lua/ty/TyRenderer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ open class TyRenderer : TyVisitor(), ITyRenderer {
if (base is TyDocTable) {
visitClass(base)
} else {
val list = mutableListOf<String>()
ty.args.forEach { list.add(it.displayName) }

val baseName = if (base is ITyClass) base.className else base.displayName
val list = ty.args.map { render(it) }
val baseName = if (base is ITyClass) {
base.className
} else if (base is ITyAlias) {
base.name
} else {
base.displayName
}
sb.append("${baseName}${renderParamsList(list)}")
}
}
Expand Down

0 comments on commit e29f03a

Please sign in to comment.